query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Finds name definition across all Haskell files in the project. All definitions are found when name is null.
@NotNull public static List<PsiNamedElement> findDefinitionNode(@NotNull Project project, @Nullable String name, @Nullable PsiNamedElement e) { // Guess where the name could be defined by lookup up potential modules. final Set<String> potentialModules = e == null ? Collections.EMPTY_SET : getPotentialDefinitionModuleNames(e, HaskellPsiUtil.parseImports(e.getContainingFile())); List<PsiNamedElement> result = ContainerUtil.newArrayList(); final String qPrefix = e == null ? null : getQualifiedPrefix(e); final PsiFile psiFile = e == null ? null : e.getContainingFile().getOriginalFile(); if (psiFile instanceof HaskellFile) { findDefinitionNode((HaskellFile)psiFile, name, e, result); } for (String potentialModule : potentialModules) { List<HaskellFile> files = HaskellModuleIndex.getFilesByModuleName(project, potentialModule, GlobalSearchScope.allScope(project)); for (HaskellFile f : files) { final boolean returnAllReferences = name == null; final boolean inLocalModule = f != null && qPrefix == null && f.equals(psiFile); final boolean inImportedModule = f != null && potentialModules.contains(f.getModuleName()); if (returnAllReferences || inLocalModule || inImportedModule) { findDefinitionNode(f, name, e, result); } } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NotNull\n public static List<PsiNamedElement> findDefinitionNodes(@Nullable HaskellFile haskellFile, @Nullable String name) {\n List<PsiNamedElement> ret = ContainerUtil.newArrayList();\n findDefinitionNode(haskellFile, name, null, ret);\n return ret;\n }", "public static void findDefinitionNode(@Nullable HaskellFile file, @Nullable String name, @Nullable PsiNamedElement e, @NotNull List<PsiNamedElement> result) {\n if (file == null) return;\n // We only want to look for classes that match the element we are resolving (e.g. varid, conid, etc.)\n final Class<? extends PsiNamedElement> elementClass;\n if (e instanceof HaskellVarid) {\n elementClass = HaskellVarid.class;\n } else if (e instanceof HaskellConid) {\n elementClass = HaskellConid.class;\n } else {\n elementClass = PsiNamedElement.class;\n }\n Collection<PsiNamedElement> namedElements = PsiTreeUtil.findChildrenOfType(file, elementClass);\n for (PsiNamedElement namedElement : namedElements) {\n if ((name == null || name.equals(namedElement.getName())) && definitionNode(namedElement)) {\n result.add(namedElement);\n }\n }\n }", "Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }", "@Override\n\tpublic Set<Person> getfindByNameContaining(String name) {\n\t\treturn null;\n\t}", "public String searchByName(String name){\n for(Thing things: everything){\n if(things.getName().equalsIgnoreCase(name)){\n return things.toString();\n }\n }\n return \"Cannot Find given Name\";\n }", "private FunctInfo findFunction(String name) {\n FunctInfo li = (FunctInfo)localScope.getLambda(name);\n if (li != null) {\n return li;\n }\n return functionDefinitions.get(name);\n }", "void searchByName(String name) {\n\t\tint i=0;\n\t\t\tfor (Entity entity : Processing.nodeSet) {\n\t\t\t\t\n\t\t\t\t/* if Entity is person */\n\t\t\t\tif(entity instanceof Person) {\n\t\t\t\t\tPerson person=(Person)entity;\n\t\t\t\t\tif(person.getName().equalsIgnoreCase(name)){\n\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\tSystem.out.println(\" name : \" + person.getName());\n\t\t\t\t\tSystem.out.println(\" phone : \" + person.getPhone());\n\t\t\t\t\tSystem.out.println(\" email : \" + person.getEmail());\n\t\t\t\t\tSystem.out.println(\" school : \" + person.getSchool());\n\t\t\t\t\tSystem.out.println(\" college : \" + person.getCollege() + \"\\n\");\n\t\t\t\t\t\tfor(String interest:person.getInterests()){\n\t\t\t\t\t\t\tSystem.out.println(\" interest in : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* If entity is organization */\n\t\t\t\telse {\n\t\t\t\t\tOrganization organization=(Organization)entity;\n\t\t\t\t\tif(organization.getName().equalsIgnoreCase(name)){\n\t\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\t\tSystem.out.println(\" name : \" + organization.getName());\n\t\t\t\t\t\tSystem.out.println(\" phone : \" + organization.getPhone());\n\t\t\t\t\t\tSystem.out.println(\" email : \" + organization.getEmail());\n\t\t\t\t\t\tfor(String interest:organization.getCourses()){\n\t\t\t\t\t\t\tSystem.out.println(\" courses are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getFaculty()){\n\t\t\t\t\t\t\tSystem.out.println(\" Faculties are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getPlacements()){\n\t\t\t\t\t\t\tSystem.out.println(\" Placements are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(i>=Processing.nodeSet.size()) {//if no such name exist\n\t\t\t\tSystem.out.println(name+\" does not exist\");\n\t\t\t}\n\t}", "private static Project findProject(String name) {\r\n \t\tfor (Project project : ProjectPlugin.getPlugin().getProjectRegistry().getProjects()) {\r\n \t\t\tif (project.getName().equals(name)) {\r\n \t\t\t\treturn project;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public static IInterfaceDefinition searchType(String unresolvedTypeName,\n\t\t\tEnvironment env)\n\t{\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Token\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))// c.rawName.equals(unresolvedTypeName))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all root productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Production\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all sub productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.SubProduction\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all alternatives\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Alternative\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup for all raw names no matter the type\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all with not raw name\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.classToType.get(cd) == ClassType.Custom)\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, false, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().getTag().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IInterfaceDefinition i : env.getInterfaces())\n\t\t{\n\t\t\tif (i.getName().getName().equals(unresolvedTypeName))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn null;// \"%\" + type;\n\n\t}", "@Override\n public Named find(String name) throws SemanticException {\n try {\n return head.find(name);\n }\n catch (NoClassException e) {\n return tail.find(name);\n }\n }", "@Nullable\n PsiElement findExportedName(String name);", "@Override\n public List<Doctor> searchByName(String name) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getName, name);\n return searchList;\n }", "private static void search_by_name() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project Name: \");\r\n\t\t\tString project_name = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_name, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project name cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}", "public void searchByName(String name) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tif(line.toLowerCase().contains(name.toLowerCase())) {\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public ClassPair findClassAndStub( String name ) {\n\n\n return null ;\n }", "@Override\n\tpublic Set<Person> getfindByNameContainingIgnoreCase(String name) {\n\t\treturn null;\n\t}", "public Class<?> findClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tLOCK.lock();\n\t\t\tint i = name.lastIndexOf('.');\n\t\t\tif (i >= 0)\n\t\t\t{\n\t\t\t\tString pkgName = name.substring(0, i);\n\t\t\t\tPackage pkg = getPackage(pkgName);\n\t\t\t\tif (pkg == null)\n\t\t\t\t{\n\t\t\t\t\tdefinePackage(pkgName, null, null, null, null, null, null, null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"looking up definition for resource [\" + name + \"]\");\n\t\t\tbyte[] b = null;\n\t\t\tString resName = name.replace('.', '/') + \".class\";\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tmap.put(\"name\", resName);\n\t\t\tJPPFResourceWrapper resource = loadResourceData(map, false);\n\t\t\tif (resource == null) throw new ClassNotFoundException(\"could not find reosurce \" + name);\n\t\t\tb = resource.getDefinition();\n\t\t\tif ((b == null) || (b.length == 0))\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] not found\");\n\t\t\t\tthrow new ClassNotFoundException(\"Could not load class '\" + name + \"'\");\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"found definition for resource [\" + name + \", definitionLength=\" + b.length + \"]\");\n\t\t\treturn defineClass(name, b, 0, b.length);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tLOCK.unlock();\n\t\t}\n\t}", "public Closure find_var(String name){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.contains(name)){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n throw new UndefinedVariable();\n }", "private static Spreadsheet findSpreadsheet(RubyProject rubyProject, String sheetName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"uss\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(sheetName)) {\r\n \t\t\t\t\treturn (Spreadsheet)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public List<Eetakemon> findEetakemonContain(String name){\n List<Eetakemon>resultlist = new ArrayList<Eetakemon>();\n for (String key: eetakemonmap.keySet()){\n Eetakemon e = eetakemonmap.get(key);\n if(e.getName().contains(name)){\n resultlist.add(e);\n }\n }\n return resultlist;\n }", "public Symbol findEntryLocal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null || (l.get(0).level < scopeLevel))\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "public void nameAnalysis() {\n SymTable symTab = new SymTable();\n myDeclList.nameAnalysis(symTab);\n\n\t// after return, the symTable is filled\n\t// check if have a main entry\n\tSemSym s = symTab.lookupGlobal(\"main\");\n\tif(s != null && s instanceof FnSym){\n\t // it's fine\n\t}else{\n\t ErrMsg.fatal(0,0,\"No main function\");\n\t}\n\n }", "public Symbol findEntryGlobal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null)\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "private static RubyFile findRubyScript(RubyProject rubyProject, String rubyScriptName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"urf\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(rubyScriptName)) {\r\n \t\t\t\t\treturn (RubyFile)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "@NotNull\n public List<String> extractPotentialPaths(@NotNull PsiElement element) {\n List<String> qualifiedNames = new ArrayList<>();\n\n String path = extractPathName(element, OclTypes.INSTANCE);\n if (!path.isEmpty()) {\n PsiQualifiedNamedElement moduleAlias = PsiFinder.getInstance().findModuleAlias(element.getProject(), path);\n String modulePath = moduleAlias == null ? path : moduleAlias.getQualifiedName();\n qualifiedNames.add(modulePath);\n qualifiedNames.add(((FileBase) element.getContainingFile()).asModuleName() + \".\" + modulePath);\n }\n\n // Walk backward until top of the file is reached, trying to find local opens and opens/includes\n PsiElement item = element;\n while (item != null) {\n if (100 < qualifiedNames.size()) {\n break; // There must be a problem with the parser\n }\n\n if (item instanceof FileBase) {\n qualifiedNames.add(((FileBase) item).asModuleName());\n break;\n } else if (item instanceof PsiOpen || item instanceof PsiInclude) {\n String openName = ((PsiNamedElement) item).getName();\n // Add open value to all previous elements\n List<String> withOpenQualifier = qualifiedNames.stream().map(name -> openName + \".\" + name).collect(Collectors.toList());\n qualifiedNames.addAll(withOpenQualifier);\n\n qualifiedNames.add(openName);\n } else if (item instanceof PsiModule) {\n PsiModule module = (PsiModule) item;\n String moduleName = module.getName();\n String moduleAlias = findModuleAlias(element.getProject(), module.getAlias());\n\n if (moduleAlias != null && !moduleAlias.equals(moduleName)) {\n // Replace module name in resolved paths with the module alias\n qualifiedNames = qualifiedNames.stream().map(name -> {\n if (name.equals(moduleName)) {\n return moduleAlias;\n } else if (name.startsWith(moduleName + \".\")) {\n int length = moduleAlias.length();\n if (length <= moduleName.length()) {\n return moduleAlias + \".\" + moduleName.substring(length);\n }\n } else if (name.endsWith(\".\" + moduleName)) {\n return name.replace(\".\" + moduleName, \".\" + moduleAlias);\n }\n return name;\n }).collect(Collectors.toList());\n }\n }\n\n PsiElement prevItem = item.getPrevSibling();\n if (prevItem == null) {\n PsiElement parent = item.getParent();\n if (parent instanceof PsiLocalOpen) {\n String localOpenName = ((PsiLocalOpen) parent).getName();\n String localOpenAlias = findModuleAlias(element.getProject(), localOpenName);\n qualifiedNames.add(localOpenAlias == null || localOpenAlias.equals(localOpenName) ? localOpenName : localOpenAlias);\n }\n item = parent;\n } else {\n item = prevItem;\n }\n }\n\n qualifiedNames.add(\"Pervasives\");\n return qualifiedNames;\n }", "private Node search(String name)\r\n\t{\r\n\t\t// Check to see if the list is empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Return null which will be checked for by the method that called it\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Tree is not empty so use the recursive search method starting at the root reference \r\n\t\t// to find the correct Node containing the String name\r\n\t\treturn search(getRoot(), name);\r\n\t}", "@Override\n\tpublic Set<Person> getfindByName(String name) {\n\t\treturn null;\n\t}", "public void find() {\n for (CompilationUnit file : this.files) {\n // Iterate over each of the class/interface declaration in the file\n for (ClassOrInterfaceDeclaration clsOrInterfDecl\n : file.findAll(ClassOrInterfaceDeclaration.class)) {\n // Stop when the declration isnt an interface\n if (!clsOrInterfDecl.isInterface()) {\n continue;\n }\n this.clsOrInterfDeclrs.add(clsOrInterfDecl);\n }\n }\n }", "private NFAState checkIfExists(String name) {\r\n\t\tNFAState ret = null;\r\n\t\tfor (NFAState s : states) {\r\n\t\t\tif (s.getName().equals(name)) {\r\n\t\t\t\tret = s;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "private FileSystem resolve(String fileName)\n {\n return fileSystems.stream().filter(fs->fs.fsName.equals(fileName)).findAny().get();\n }", "protected Definition checkDefinedOnlyOnce(){\n Definition result = null;\n List<Name> names = new ArrayList<Name>();\n \n for( Definition definition : definitions ){\n if( !definition.typedef ){\n Field field = definition.getField();\n if( field != null ){\n FieldModelNode node = field.asNode();\n if( node != null ){\n if( node.getTags().contains( Tag.USES ) || node.getTags().contains( Tag.PROVIDES )){\n \tName name = node.getName();\n \tif( name != null ){\n \t\tnames.add( name );\n \t}\n result = definition;\n }\n }\n }\n }\n }\n \n if( names.size() > 1 ){\n error( \"multiple definitions of command/event '\" + name + \"'\", names );\n return null;\n }\n \n return result;\n }", "private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }", "private boolean examineName(String name) {\r\n resourceName = null;\r\n resourceIsClass = false;\r\n\r\n if (name.endsWith(\".java\")) {\r\n return false;\r\n }\r\n\r\n if (name.endsWith(\".class\")) {\r\n name = name.substring(0, name.length() - 6);\r\n if (classMap.containsKey(name)) {\r\n return false;\r\n }\r\n resourceIsClass = true;\r\n } else {\r\n if (resourceMap.containsKey(name)) {\r\n return false;\r\n }\r\n }\r\n\r\n resourceName = name;\r\n return true;\r\n }", "public boolean match(String name) {\n\t\tboolean result = false;\n\n\t\tif (this.entries != null) {\n\t\t\tname = name.replace('/', '.');\n\t\t\tname = name.replaceFirst(\"^[.]+\", \"\");\n\t\t\tname = name.replaceAll(\"\\\\$.*$\", \"\");\n\n\t\t\tfor (Entry entry : this.entries) {\n\t\t\t\tif (entry != null) {\n\t\t\t\t\tif (entry.partial) {\n\t\t\t\t\t\tif (name.startsWith(entry.classpath)) {\n\t\t\t\t\t\t\tresult = entry.result;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (name.equals(entry.classpath)) {\n\t\t\t\t\t\t\tresult = entry.result;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public abstract String filterLibraryName(final String name);", "public void loadNames() {\n\t\tloadNames(false);\n\t}", "public void searchClassMemberDeclarations(String name, SearchIdConsumer consumer);", "public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}", "private NFAState checkIfExists(String name) {\n\t\tNFAState ret = null;\n\t\tfor(NFAState s : states){\n\t\t\tif(s.getName().equals(name)){\n\t\t\t\tret = s;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}", "public static boolean Java_find(File dir, String name) {\n boolean flag = false;\n // TODO: find files\n File[] list = dir.listFiles();\n FileOperation.listOfFiles = new ArrayList<String>();\n FileOperation.listOfMatching = new ArrayList<String>();\n listOfAllFiles(dir);\n for(String filename:FileOperation.listOfFiles){\n if(filename.contains(name)){\n flag=true;\n listOfMatching.add(filename);\n }\n }\n return flag;\n }", "private Header [] loadSource(String name, Header [] list, Header header, final boolean force)\r\n {\r\n int pos;\r\n int depth = header.depth;\r\n File file = null;\r\n\r\n name = name.trim();\r\n\r\n for(pos = 0; pos < list.length && list[pos] != header; pos++);\r\n\r\n String path = list[pos].name.substring(0, list[pos].name.lastIndexOf('\\\\'));\r\n\r\n // look in sdk's root directory\r\n if ((file = getFile(Parser.jdkSource, name)) != null)\r\n {\r\n if (Parser.jdkSource.compareToIgnoreCase(path) != 0)\r\n depth++;\r\n }\r\n\r\n // look in package\r\n if (file == null)\r\n {\r\n file = getFile(path, name);\r\n }\r\n\r\n // look in imports\r\n for (int j = 0; j < header.imports.length && file == null; j++)\r\n {\r\n String st = header.imports[j];\r\n int last = st.lastIndexOf('.') + 1;\r\n\r\n if (st.substring(last).compareToIgnoreCase(name) == 0)\r\n st = st.substring(0, last);\r\n\r\n if (st.endsWith(\".\"))\r\n st = st.substring(0, st.length() - 1);\r\n\r\n for (int k = -1; (k = st.indexOf('.')) >= 0; )\r\n st = st.substring(0, k) + '\\\\' + st.substring(k + 1);\r\n\r\n st = jdkSource + '\\\\' + st;\r\n\r\n file = getFile(st, name);\r\n\r\n if (file != null)\r\n depth++;\r\n }\r\n\r\n if (file != null)\r\n {\r\n String st = file.getAbsolutePath();\r\n\r\n // already loaded?\r\n for(int k = 0; k < list.length; k++)\r\n if (list[k].name.compareToIgnoreCase(st) == 0)\r\n {\r\n file = null;\r\n return list;\r\n }\r\n\r\n if (file != null)\r\n {\r\n File desc = new File(st.substring(0, st.lastIndexOf('.') + 1) + 'h');\r\n File fs = new File(st.substring(0, st.lastIndexOf('.') + 1) + \"fs\");\r\n\r\n st = file.getAbsolutePath();\r\n for(int i = 0; i < built.size(); i++)\r\n if (((String)built.get(i)).compareToIgnoreCase(st) == 0)\r\n {\r\n file = desc;\r\n break;\r\n }\r\n\r\n if ((!desc.exists() || !fs.exists() || fs.length() == 0 || fs.lastModified() < file.lastModified() || force) && file != desc)\r\n {\r\n Header [] hh \t= new Pass(file, built, force, gc).compilationUnit(list, depth); // compile\r\n\r\n return hh;\r\n }\r\n else\r\n {\r\n Header [] newList = new Header[list.length + 1];\r\n\r\n for (int k = 0; k < newList.length - 1; k++)\r\n newList[k] = list[k];\r\n System.out.println(desc.getAbsolutePath() + \" will be read!\");\r\n newList[newList.length - 1] = new Header(desc.getAbsolutePath(), depth); // load header\r\n list = newList;\r\n }\r\n }\r\n }\r\n\r\n return list;\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "public TypeDefinition findInternalType(DefinitionName name){\n \treturn(internalTypeDefs.get(name));\n }", "private Macrodef getMatchingMacrodef(Element targetElement)\n {\n String targetName = targetElement.getAttribute(\"name\").getValue();\n\n for (Macrodef macrodef : localMacrodefs)\n {\n String label = macrodef.getName();\n\n if (label.equals(targetName))\n {\n return macrodef;\n }\n }\n\n return null;\n }", "private FileType getFileType(String name) {\n\t\tif(name==null)\n\t\t\treturn null;\n\t\tfor(FileType fileType: fileTypes){\n\t\t\tif(name.startsWith(fileType.getFileNamePrefix())){\n\t\t\t\treturn fileType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "DefinitionName getDefName(String n){\n \tDefinitionName rc = null;\n \ttry {\n\t\t\trc = new DefinitionName(n);\n\t\t} catch (DmcValueException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn(rc);\n }", "public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }", "@Override\r\n\tpublic List<Modules> getModulesByName(String name) {\n\t\tString hql = \"from Modules m where m.name =?\";\r\n\t\treturn (List<Modules>) getHibernateTemplate().find(hql, name);\r\n\r\n\t}", "public ListWord findAList(String name) {\n for (ListWord list: list) {\n if (list.getName().equals(name)) {\n return list;\n }\n }\n return null;\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }" ]
[ "0.6222101", "0.59422815", "0.5199183", "0.514883", "0.51262844", "0.51239425", "0.51119816", "0.5101984", "0.50903016", "0.50784135", "0.50488424", "0.49873453", "0.49866933", "0.4972619", "0.49725926", "0.49452084", "0.4935986", "0.48781314", "0.48463112", "0.4843629", "0.4839971", "0.48338374", "0.48284265", "0.48212174", "0.4799451", "0.479108", "0.4777049", "0.47747177", "0.47675708", "0.47519845", "0.4748852", "0.47475824", "0.47368333", "0.47364828", "0.47274876", "0.47265247", "0.47249654", "0.4722842", "0.47192127", "0.47084108", "0.47084108", "0.4694191", "0.469271", "0.46771675", "0.46771675", "0.46764833", "0.46764833", "0.46764833", "0.46764833", "0.46764833", "0.46764833", "0.46764833", "0.46764833", "0.46764833", "0.46722534", "0.46719617", "0.46718878", "0.46514434", "0.4650585", "0.46479204", "0.46423826", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157" ]
0.6599097
0
Finds a name definition inside a Haskell file. All definitions are found when name is null.
public static void findDefinitionNode(@Nullable HaskellFile file, @Nullable String name, @Nullable PsiNamedElement e, @NotNull List<PsiNamedElement> result) { if (file == null) return; // We only want to look for classes that match the element we are resolving (e.g. varid, conid, etc.) final Class<? extends PsiNamedElement> elementClass; if (e instanceof HaskellVarid) { elementClass = HaskellVarid.class; } else if (e instanceof HaskellConid) { elementClass = HaskellConid.class; } else { elementClass = PsiNamedElement.class; } Collection<PsiNamedElement> namedElements = PsiTreeUtil.findChildrenOfType(file, elementClass); for (PsiNamedElement namedElement : namedElements) { if ((name == null || name.equals(namedElement.getName())) && definitionNode(namedElement)) { result.add(namedElement); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }", "@NotNull\n public static List<PsiNamedElement> findDefinitionNode(@NotNull Project project, @Nullable String name, @Nullable PsiNamedElement e) {\n // Guess where the name could be defined by lookup up potential modules.\n final Set<String> potentialModules =\n e == null ? Collections.EMPTY_SET\n : getPotentialDefinitionModuleNames(e, HaskellPsiUtil.parseImports(e.getContainingFile()));\n List<PsiNamedElement> result = ContainerUtil.newArrayList();\n final String qPrefix = e == null ? null : getQualifiedPrefix(e);\n final PsiFile psiFile = e == null ? null : e.getContainingFile().getOriginalFile();\n if (psiFile instanceof HaskellFile) {\n findDefinitionNode((HaskellFile)psiFile, name, e, result);\n }\n for (String potentialModule : potentialModules) {\n List<HaskellFile> files = HaskellModuleIndex.getFilesByModuleName(project, potentialModule, GlobalSearchScope.allScope(project));\n for (HaskellFile f : files) {\n final boolean returnAllReferences = name == null;\n final boolean inLocalModule = f != null && qPrefix == null && f.equals(psiFile);\n final boolean inImportedModule = f != null && potentialModules.contains(f.getModuleName());\n if (returnAllReferences || inLocalModule || inImportedModule) {\n findDefinitionNode(f, name, e, result);\n }\n }\n }\n return result;\n }", "@NotNull\n public static List<PsiNamedElement> findDefinitionNodes(@Nullable HaskellFile haskellFile, @Nullable String name) {\n List<PsiNamedElement> ret = ContainerUtil.newArrayList();\n findDefinitionNode(haskellFile, name, null, ret);\n return ret;\n }", "@Override\n public Named find(String name) throws SemanticException {\n try {\n return head.find(name);\n }\n catch (NoClassException e) {\n return tail.find(name);\n }\n }", "public Symbol findEntryLocal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null || (l.get(0).level < scopeLevel))\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "private FunctInfo findFunction(String name) {\n FunctInfo li = (FunctInfo)localScope.getLambda(name);\n if (li != null) {\n return li;\n }\n return functionDefinitions.get(name);\n }", "public void searchByName(String name) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tif(line.toLowerCase().contains(name.toLowerCase())) {\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public Class<?> findClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tLOCK.lock();\n\t\t\tint i = name.lastIndexOf('.');\n\t\t\tif (i >= 0)\n\t\t\t{\n\t\t\t\tString pkgName = name.substring(0, i);\n\t\t\t\tPackage pkg = getPackage(pkgName);\n\t\t\t\tif (pkg == null)\n\t\t\t\t{\n\t\t\t\t\tdefinePackage(pkgName, null, null, null, null, null, null, null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"looking up definition for resource [\" + name + \"]\");\n\t\t\tbyte[] b = null;\n\t\t\tString resName = name.replace('.', '/') + \".class\";\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tmap.put(\"name\", resName);\n\t\t\tJPPFResourceWrapper resource = loadResourceData(map, false);\n\t\t\tif (resource == null) throw new ClassNotFoundException(\"could not find reosurce \" + name);\n\t\t\tb = resource.getDefinition();\n\t\t\tif ((b == null) || (b.length == 0))\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] not found\");\n\t\t\t\tthrow new ClassNotFoundException(\"Could not load class '\" + name + \"'\");\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"found definition for resource [\" + name + \", definitionLength=\" + b.length + \"]\");\n\t\t\treturn defineClass(name, b, 0, b.length);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tLOCK.unlock();\n\t\t}\n\t}", "public Closure find_var(String name){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.contains(name)){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n throw new UndefinedVariable();\n }", "public Handle search(String name) {\n int homePos = hash(table, name);\n int pos;\n\n // QUADRATIC PROBE\n for (int i = 0; i < table.length; i++) {\n // possibly iterate over entire table, but will\n // likely stop before then\n pos = (homePos + i * i) % table.length;\n if (table[pos] == null) {\n break;\n }\n else if (table[pos] != GRAVESTONE\n && table[pos].getStringAt().equals(name)) {\n return table[pos];\n }\n } // end for\n\n return null;\n }", "public Field findField(final String name) {\r\n\t\tGeneratorHelper.checkJavaFieldName(\"parameter:name\", name);\r\n\r\n\t\tField found = null;\r\n\r\n\t\tfinal Iterator<Field> iterator = this.getFields().iterator();\r\n\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tfinal Field field = iterator.next();\r\n\t\t\tif (field.getName().equals(name)) {\r\n\t\t\t\tfound = field;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t}", "public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }", "final SyntaxTreeNode lookupName(QName name) {\n // Is it a local var or param ?\n final SyntaxTreeNode result = _parser.lookupVariable(name);\n\tif (result != null)\n return(result);\n else\n\t return(_symbolTable.lookupName(name));\n }", "public Symbol findEntryGlobal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null)\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "private SymObject find(String name) {\n SymObject object = table.find(name);\n if (object == SymbolTable.OBJECT_NONE) {\n error(name + \" can't be resolved to a name\");\n }\n\n return object;\n }", "public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}", "@Override\n\tpublic String findId(String name) throws Exception {\n\t\treturn null;\n\t}", "private Node search(String name)\r\n\t{\r\n\t\t// Check to see if the list is empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Return null which will be checked for by the method that called it\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Tree is not empty so use the recursive search method starting at the root reference \r\n\t\t// to find the correct Node containing the String name\r\n\t\treturn search(getRoot(), name);\r\n\t}", "Object find(String name);", "public DmcNamedObjectIF findNamedObject(String name){\n\t\tthrow(new IllegalStateException(\"The SchemaManager is designed to work with ambiguous naming. Use DmcObject.resolveReferences(DmcNameResolverWithClashSupportIF, DmcNameClashResolverIF)\\n\\n\" + DebugInfo.getCurrentStack()));\n }", "public ClassPair findClassAndStub( String name ) {\n\n\n return null ;\n }", "@Nullable\n PsiElement findExportedName(String name);", "public static Declaration findSymbol(SymbolTable table, IDExpression name) {\n Declaration ret = null;\n SymbolTable symtab = table;\n while (ret == null && symtab != null) {\n ret = getTable(symtab).get(name);\n symtab = IRTools.getAncestorOfType(symtab, SymbolTable.class);\n }\n return ret;\n }", "public TypeDefinition findInternalType(DefinitionName name){\n \treturn(internalTypeDefs.get(name));\n }", "private NFAState checkIfExists(String name) {\r\n\t\tNFAState ret = null;\r\n\t\tfor (NFAState s : states) {\r\n\t\t\tif (s.getName().equals(name)) {\r\n\t\t\t\tret = s;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public static LinkedList<Actor> nameSearch(String name) {\n //sets name to lower case\n String hname = name.toLowerCase();\n //hashes the lower cased name\n int hash = Math.abs(hname.hashCode()) % ActorList.nameHashlist.length;\n //finds the location of the linked list\n LinkedList<Actor> location = ActorList.nameHashlist[hash];\n //sets the head to the head of the linked list\n LinkedList.DataLink head = location.header;\n\n\n while (head.nextDataLink != null) {\n //runs until next data link is null and gets each Actor\n Actor actor = (Actor) head.nextDataLink.data;\n //checks the name of the actor to inputted name\n if (actor.getName().toLowerCase().equals(hname)) {\n //if it's the same it returns the actor\n return location;\n //or moves to next link\n } else {\n head = head.nextDataLink;\n }\n }\n //returns null if the list does not match input\n return null;\n\n\n }", "private NFAState checkIfExists(String name) {\n\t\tNFAState ret = null;\n\t\tfor(NFAState s : states){\n\t\t\tif(s.getName().equals(name)){\n\t\t\t\tret = s;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "@Override\r\n\tpublic Plate findByName(String nom) {\n\t\treturn null;\r\n\t}", "private static RubyFile findRubyScript(RubyProject rubyProject, String rubyScriptName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"urf\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(rubyScriptName)) {\r\n \t\t\t\t\treturn (RubyFile)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "private static Declaration searchDeclaration(Identifier id) {\n Declaration ret = null;\n Traversable parent = id.getParent();\n // Broken IR\n if (parent == null) {\n return null;\n }\n // AccessExpression handling.\n if (parent instanceof AccessExpression &&\n id == ((AccessExpression)parent).getRHS()) {\n List specs = getType(((AccessExpression)parent).getLHS());\n Declaration cdecl = findUserDeclaration(id, specs);\n if (cdecl instanceof ClassDeclaration) {\n ret = ((ClassDeclaration)cdecl).findSymbol(id);\n }\n // __builtin__offsetof handling.\n } else if (parent instanceof OffsetofExpression &&\n id == ((OffsetofExpression)parent).getExpression()) {\n List specs = ((OffsetofExpression)parent).getSpecifiers();\n Declaration cdecl = findUserDeclaration(id, specs);\n if (cdecl instanceof ClassDeclaration) {\n ret = ((ClassDeclaration)cdecl).findSymbol(id);\n }\n } else {\n ret = id.findDeclaration();\n // This code section only deals with a situation that name conflicts\n // in a scope; e.g.) { int a = b; float b; ... }\n if (ret instanceof VariableDeclaration) {\n Traversable t1 = IRTools.getAncestorOfType(id, Statement.class);\n Traversable t2 = IRTools.getAncestorOfType(ret,Statement.class);\n if (t1 != null && t2 != null\n && t1.getParent() == t2.getParent()) {\n List<Traversable> children = t1.getParent().getChildren();\n if (children.indexOf(t1) < children.indexOf(t2)) {\n ret = findDeclaration(t1.getParent().getParent(), id);\n }\n }\n }\n }\n // Prints out warning for undeclared functions/symbols.\n if (ret == null) {\n if (parent instanceof FunctionCall &&\n id == ((FunctionCall)parent).getName()) {\n \tif( verbosity > 1 ) {\n \t\tSystem.err.print(\"[WARNING] Function without declaration \");\n \t\tSystem.err.println(id + \" from \" + parent);\n \t}\n } else {\n \tif( verbosity > 0 ) {\n \t\tSystem.err.print(\"[WARNING] Undeclared symbol \");\n \t\tSystem.err.println(id + \" from \" + parent);\n \t}\n }\n }\n return ret;\n }", "@Nullable\n\tpublic MethodNode searchMethodByShortName(String name) {\n\t\tfor (MethodNode m : methods) {\n\t\t\tif (m.getMethodInfo().getName().equals(name)) {\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public NameSurferEntry findEntry(String name) {\n\t\tchar ch = name.charAt(0);\n\t\tif(Character.isLowerCase(ch) == true) {\n\t\t\tch = Character.toUpperCase(ch);\n\t\t}\n\t\tString otherLetters = name.substring(1);\n\t\totherLetters = otherLetters.toLowerCase();\n\t\tname = ch + otherLetters;\n\t\tif (nameFromDatabase.containsKey(name)) {\n\t\t\treturn nameFromDatabase.get(name);\n\t\t}\t\t\t\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public List<Doctor> searchByName(String name) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getName, name);\n return searchList;\n }", "@Nullable\n public static OutputFormat find(String name) {\n String normalized = name.trim()\n .toUpperCase().replaceAll(\"-\", \"_\");\n try {\n return OutputFormat.valueOf(normalized);\n } catch (IllegalArgumentException ex) {\n return null;\n }\n }", "public static TextPosition findByName(String name) {\n\t\tfor (TextPosition titlePosition : TextPosition.values()) {\n\t\t\tif (titlePosition.getName().equals(name)) {\n\t\t\t\treturn titlePosition;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public ListWord findAList(String name) {\n for (ListWord list: list) {\n if (list.getName().equals(name)) {\n return list;\n }\n }\n return null;\n }", "public static IInterfaceDefinition searchType(String unresolvedTypeName,\n\t\t\tEnvironment env)\n\t{\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Token\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))// c.rawName.equals(unresolvedTypeName))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all root productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Production\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all sub productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.SubProduction\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all alternatives\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Alternative\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup for all raw names no matter the type\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all with not raw name\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.classToType.get(cd) == ClassType.Custom)\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, false, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().getTag().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IInterfaceDefinition i : env.getInterfaces())\n\t\t{\n\t\t\tif (i.getName().getName().equals(unresolvedTypeName))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn null;// \"%\" + type;\n\n\t}", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}", "@Override\n public <T extends ParsedComponent> Optional<T> find(String exactName, Class<T> clazz) {\n\n if (exactName.equals(name) && clazz.equals(this.getClass())) {\n //noinspection unchecked\n return Optional.of((T) this);\n }\n\n return findInChildren(exactName, clazz);\n }", "@Override\n\tpublic Symbol resolve(String name) {\n\t\tSymbol s = symbols.get(name);\n\t\tif (s != null)\n\t\t\treturn s;\n\t\t\n\t\t// otherwise look in the enclosing scope, if there is one\n\t\tScope sc = enclosingScope;\n\t\twhile (sc != null) {\n\t\t\tSymbol sym = enclosingScope.resolve(name);\n\t\t\tif (sym != null) {\n\t\t\t\treturn sym;\n\t\t\t}\n\t\t\tsc = sc.getEnclosingScope();\n\t\t}\n\t\t// otherwise it doesn't exist\n\t\treturn null;\n\t}", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "public static Type findType(String name) {\n if (MZTabUtils.isEmpty(name)) {\n throw new IllegalArgumentException(\"Modification type name should not be empty!\");\n }\n\n Type type;\n try {\n type = Type.valueOf(name.trim().toUpperCase());\n } catch (IllegalArgumentException e) {\n type = null;\n }\n\n return type;\n }", "public static FileType getByName(String name) {\n\t\tfor(int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tFileType result = VALUES_ARRAY[i];\n\t\t\tif(result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public int search(String name){\n\t\tfor(Map.Entry<String, Integer> e : map.entrySet()){\n\t\t\tif(e.getKey().equals(name)){\n\t\t\t\treturn e.getValue();\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t/*\n\t\twhile(pointer < locations.length){\n\t\t\tif(locations[pointer].getName() == name){\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t\treturn locations[pointer - 1].getID();\n\t\t\t} else {\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t*/\n\t}", "public String searchByName(String name){\n for(Thing things: everything){\n if(things.getName().equalsIgnoreCase(name)){\n return things.toString();\n }\n }\n return \"Cannot Find given Name\";\n }", "public int indexOf(String name, int start) {\n\t\tint sz = size();\n\t\tfor (int i = start; i < sz; i++) {\n\t\t\tString n = getName(i);\n\t\t\tif (name == null) {\n\t\t\t\tif (n == null)\n\t\t\t\t\treturn i; // matched null\n\t\t\t} else if (name.equals(n)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "DefinitionName getDefName(String n){\n \tDefinitionName rc = null;\n \ttry {\n\t\t\trc = new DefinitionName(n);\n\t\t} catch (DmcValueException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn(rc);\n }", "private Macrodef getMatchingMacrodef(Element targetElement)\n {\n String targetName = targetElement.getAttribute(\"name\").getValue();\n\n for (Macrodef macrodef : localMacrodefs)\n {\n String label = macrodef.getName();\n\n if (label.equals(targetName))\n {\n return macrodef;\n }\n }\n\n return null;\n }", "@Override\n\tpublic finalDataBean findByName(String name) throws Exception {\n\t\treturn null;\n\t}", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@Override\r\n\tpublic Country find(String name) {\r\n\t\tCountry retDM = null;\r\n\r\n\t\tif (name == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treadMapFromFile();\r\n\t\t\tretDM=this.daoMap.get(name);\r\n\r\n\t\t} catch (JsonSyntaxException | JsonIOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn retDM;\r\n\t}", "public AbsenceType findByName(String name);", "private FileSystem resolve(String fileName)\n {\n return fileSystems.stream().filter(fs->fs.fsName.equals(fileName)).findAny().get();\n }", "private FileType getFileType(String name) {\n\t\tif(name==null)\n\t\t\treturn null;\n\t\tfor(FileType fileType: fileTypes){\n\t\t\tif(name.startsWith(fileType.getFileNamePrefix())){\n\t\t\t\treturn fileType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "void searchByName(String name) {\n\t\tint i=0;\n\t\t\tfor (Entity entity : Processing.nodeSet) {\n\t\t\t\t\n\t\t\t\t/* if Entity is person */\n\t\t\t\tif(entity instanceof Person) {\n\t\t\t\t\tPerson person=(Person)entity;\n\t\t\t\t\tif(person.getName().equalsIgnoreCase(name)){\n\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\tSystem.out.println(\" name : \" + person.getName());\n\t\t\t\t\tSystem.out.println(\" phone : \" + person.getPhone());\n\t\t\t\t\tSystem.out.println(\" email : \" + person.getEmail());\n\t\t\t\t\tSystem.out.println(\" school : \" + person.getSchool());\n\t\t\t\t\tSystem.out.println(\" college : \" + person.getCollege() + \"\\n\");\n\t\t\t\t\t\tfor(String interest:person.getInterests()){\n\t\t\t\t\t\t\tSystem.out.println(\" interest in : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* If entity is organization */\n\t\t\t\telse {\n\t\t\t\t\tOrganization organization=(Organization)entity;\n\t\t\t\t\tif(organization.getName().equalsIgnoreCase(name)){\n\t\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\t\tSystem.out.println(\" name : \" + organization.getName());\n\t\t\t\t\t\tSystem.out.println(\" phone : \" + organization.getPhone());\n\t\t\t\t\t\tSystem.out.println(\" email : \" + organization.getEmail());\n\t\t\t\t\t\tfor(String interest:organization.getCourses()){\n\t\t\t\t\t\t\tSystem.out.println(\" courses are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getFaculty()){\n\t\t\t\t\t\t\tSystem.out.println(\" Faculties are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getPlacements()){\n\t\t\t\t\t\t\tSystem.out.println(\" Placements are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(i>=Processing.nodeSet.size()) {//if no such name exist\n\t\t\t\tSystem.out.println(name+\" does not exist\");\n\t\t\t}\n\t}", "private Node getNode(String name) {\n for(Iterator<Node> i = nodes.iterator(); i.hasNext();) {\n Node n = i.next();\n if(n.getName().equalsIgnoreCase(name)){\n return n;\n };\n }\n return null;\n }", "@Override\n\tpublic Set<Person> getfindByNameContaining(String name) {\n\t\treturn null;\n\t}", "private static Spreadsheet findSpreadsheet(RubyProject rubyProject, String sheetName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"uss\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(sheetName)) {\r\n \t\t\t\t\treturn (Spreadsheet)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }" ]
[ "0.5998122", "0.5996398", "0.59515333", "0.5916102", "0.57006395", "0.5636416", "0.55873257", "0.55669725", "0.5498366", "0.54601216", "0.5434735", "0.5421004", "0.5414634", "0.5380867", "0.53670996", "0.5366993", "0.5354823", "0.53509015", "0.53141606", "0.53002846", "0.5281576", "0.52718055", "0.52592677", "0.52536434", "0.52401525", "0.5238976", "0.5208562", "0.5208386", "0.5200346", "0.51966494", "0.5180388", "0.5167893", "0.5165605", "0.51615864", "0.5158318", "0.50925976", "0.5089644", "0.5086084", "0.5086084", "0.50818044", "0.5079588", "0.5077176", "0.5077176", "0.5076563", "0.5068522", "0.50599927", "0.50504357", "0.5037763", "0.50372815", "0.5035229", "0.5030754", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.5019096", "0.5018514", "0.5018339", "0.49984443", "0.49972042", "0.4984937", "0.4974057", "0.4969162", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413" ]
0.6157064
0
Finds a name definition inside a Haskell file. All definitions are found when name is null.
@NotNull public static List<PsiNamedElement> findDefinitionNodes(@Nullable HaskellFile haskellFile, @Nullable String name) { List<PsiNamedElement> ret = ContainerUtil.newArrayList(); findDefinitionNode(haskellFile, name, null, ret); return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void findDefinitionNode(@Nullable HaskellFile file, @Nullable String name, @Nullable PsiNamedElement e, @NotNull List<PsiNamedElement> result) {\n if (file == null) return;\n // We only want to look for classes that match the element we are resolving (e.g. varid, conid, etc.)\n final Class<? extends PsiNamedElement> elementClass;\n if (e instanceof HaskellVarid) {\n elementClass = HaskellVarid.class;\n } else if (e instanceof HaskellConid) {\n elementClass = HaskellConid.class;\n } else {\n elementClass = PsiNamedElement.class;\n }\n Collection<PsiNamedElement> namedElements = PsiTreeUtil.findChildrenOfType(file, elementClass);\n for (PsiNamedElement namedElement : namedElements) {\n if ((name == null || name.equals(namedElement.getName())) && definitionNode(namedElement)) {\n result.add(namedElement);\n }\n }\n }", "Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }", "@NotNull\n public static List<PsiNamedElement> findDefinitionNode(@NotNull Project project, @Nullable String name, @Nullable PsiNamedElement e) {\n // Guess where the name could be defined by lookup up potential modules.\n final Set<String> potentialModules =\n e == null ? Collections.EMPTY_SET\n : getPotentialDefinitionModuleNames(e, HaskellPsiUtil.parseImports(e.getContainingFile()));\n List<PsiNamedElement> result = ContainerUtil.newArrayList();\n final String qPrefix = e == null ? null : getQualifiedPrefix(e);\n final PsiFile psiFile = e == null ? null : e.getContainingFile().getOriginalFile();\n if (psiFile instanceof HaskellFile) {\n findDefinitionNode((HaskellFile)psiFile, name, e, result);\n }\n for (String potentialModule : potentialModules) {\n List<HaskellFile> files = HaskellModuleIndex.getFilesByModuleName(project, potentialModule, GlobalSearchScope.allScope(project));\n for (HaskellFile f : files) {\n final boolean returnAllReferences = name == null;\n final boolean inLocalModule = f != null && qPrefix == null && f.equals(psiFile);\n final boolean inImportedModule = f != null && potentialModules.contains(f.getModuleName());\n if (returnAllReferences || inLocalModule || inImportedModule) {\n findDefinitionNode(f, name, e, result);\n }\n }\n }\n return result;\n }", "@Override\n public Named find(String name) throws SemanticException {\n try {\n return head.find(name);\n }\n catch (NoClassException e) {\n return tail.find(name);\n }\n }", "public Symbol findEntryLocal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null || (l.get(0).level < scopeLevel))\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "private FunctInfo findFunction(String name) {\n FunctInfo li = (FunctInfo)localScope.getLambda(name);\n if (li != null) {\n return li;\n }\n return functionDefinitions.get(name);\n }", "public void searchByName(String name) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tif(line.toLowerCase().contains(name.toLowerCase())) {\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public Class<?> findClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tLOCK.lock();\n\t\t\tint i = name.lastIndexOf('.');\n\t\t\tif (i >= 0)\n\t\t\t{\n\t\t\t\tString pkgName = name.substring(0, i);\n\t\t\t\tPackage pkg = getPackage(pkgName);\n\t\t\t\tif (pkg == null)\n\t\t\t\t{\n\t\t\t\t\tdefinePackage(pkgName, null, null, null, null, null, null, null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"looking up definition for resource [\" + name + \"]\");\n\t\t\tbyte[] b = null;\n\t\t\tString resName = name.replace('.', '/') + \".class\";\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tmap.put(\"name\", resName);\n\t\t\tJPPFResourceWrapper resource = loadResourceData(map, false);\n\t\t\tif (resource == null) throw new ClassNotFoundException(\"could not find reosurce \" + name);\n\t\t\tb = resource.getDefinition();\n\t\t\tif ((b == null) || (b.length == 0))\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] not found\");\n\t\t\t\tthrow new ClassNotFoundException(\"Could not load class '\" + name + \"'\");\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"found definition for resource [\" + name + \", definitionLength=\" + b.length + \"]\");\n\t\t\treturn defineClass(name, b, 0, b.length);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tLOCK.unlock();\n\t\t}\n\t}", "public Closure find_var(String name){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.contains(name)){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n throw new UndefinedVariable();\n }", "public Handle search(String name) {\n int homePos = hash(table, name);\n int pos;\n\n // QUADRATIC PROBE\n for (int i = 0; i < table.length; i++) {\n // possibly iterate over entire table, but will\n // likely stop before then\n pos = (homePos + i * i) % table.length;\n if (table[pos] == null) {\n break;\n }\n else if (table[pos] != GRAVESTONE\n && table[pos].getStringAt().equals(name)) {\n return table[pos];\n }\n } // end for\n\n return null;\n }", "public Field findField(final String name) {\r\n\t\tGeneratorHelper.checkJavaFieldName(\"parameter:name\", name);\r\n\r\n\t\tField found = null;\r\n\r\n\t\tfinal Iterator<Field> iterator = this.getFields().iterator();\r\n\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tfinal Field field = iterator.next();\r\n\t\t\tif (field.getName().equals(name)) {\r\n\t\t\t\tfound = field;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t}", "public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }", "final SyntaxTreeNode lookupName(QName name) {\n // Is it a local var or param ?\n final SyntaxTreeNode result = _parser.lookupVariable(name);\n\tif (result != null)\n return(result);\n else\n\t return(_symbolTable.lookupName(name));\n }", "public Symbol findEntryGlobal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null)\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "private SymObject find(String name) {\n SymObject object = table.find(name);\n if (object == SymbolTable.OBJECT_NONE) {\n error(name + \" can't be resolved to a name\");\n }\n\n return object;\n }", "public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}", "@Override\n\tpublic String findId(String name) throws Exception {\n\t\treturn null;\n\t}", "private Node search(String name)\r\n\t{\r\n\t\t// Check to see if the list is empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Return null which will be checked for by the method that called it\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Tree is not empty so use the recursive search method starting at the root reference \r\n\t\t// to find the correct Node containing the String name\r\n\t\treturn search(getRoot(), name);\r\n\t}", "Object find(String name);", "public DmcNamedObjectIF findNamedObject(String name){\n\t\tthrow(new IllegalStateException(\"The SchemaManager is designed to work with ambiguous naming. Use DmcObject.resolveReferences(DmcNameResolverWithClashSupportIF, DmcNameClashResolverIF)\\n\\n\" + DebugInfo.getCurrentStack()));\n }", "public ClassPair findClassAndStub( String name ) {\n\n\n return null ;\n }", "@Nullable\n PsiElement findExportedName(String name);", "public static Declaration findSymbol(SymbolTable table, IDExpression name) {\n Declaration ret = null;\n SymbolTable symtab = table;\n while (ret == null && symtab != null) {\n ret = getTable(symtab).get(name);\n symtab = IRTools.getAncestorOfType(symtab, SymbolTable.class);\n }\n return ret;\n }", "public TypeDefinition findInternalType(DefinitionName name){\n \treturn(internalTypeDefs.get(name));\n }", "private NFAState checkIfExists(String name) {\r\n\t\tNFAState ret = null;\r\n\t\tfor (NFAState s : states) {\r\n\t\t\tif (s.getName().equals(name)) {\r\n\t\t\t\tret = s;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public static LinkedList<Actor> nameSearch(String name) {\n //sets name to lower case\n String hname = name.toLowerCase();\n //hashes the lower cased name\n int hash = Math.abs(hname.hashCode()) % ActorList.nameHashlist.length;\n //finds the location of the linked list\n LinkedList<Actor> location = ActorList.nameHashlist[hash];\n //sets the head to the head of the linked list\n LinkedList.DataLink head = location.header;\n\n\n while (head.nextDataLink != null) {\n //runs until next data link is null and gets each Actor\n Actor actor = (Actor) head.nextDataLink.data;\n //checks the name of the actor to inputted name\n if (actor.getName().toLowerCase().equals(hname)) {\n //if it's the same it returns the actor\n return location;\n //or moves to next link\n } else {\n head = head.nextDataLink;\n }\n }\n //returns null if the list does not match input\n return null;\n\n\n }", "private NFAState checkIfExists(String name) {\n\t\tNFAState ret = null;\n\t\tfor(NFAState s : states){\n\t\t\tif(s.getName().equals(name)){\n\t\t\t\tret = s;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "@Override\r\n\tpublic Plate findByName(String nom) {\n\t\treturn null;\r\n\t}", "private static RubyFile findRubyScript(RubyProject rubyProject, String rubyScriptName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"urf\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(rubyScriptName)) {\r\n \t\t\t\t\treturn (RubyFile)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "private static Declaration searchDeclaration(Identifier id) {\n Declaration ret = null;\n Traversable parent = id.getParent();\n // Broken IR\n if (parent == null) {\n return null;\n }\n // AccessExpression handling.\n if (parent instanceof AccessExpression &&\n id == ((AccessExpression)parent).getRHS()) {\n List specs = getType(((AccessExpression)parent).getLHS());\n Declaration cdecl = findUserDeclaration(id, specs);\n if (cdecl instanceof ClassDeclaration) {\n ret = ((ClassDeclaration)cdecl).findSymbol(id);\n }\n // __builtin__offsetof handling.\n } else if (parent instanceof OffsetofExpression &&\n id == ((OffsetofExpression)parent).getExpression()) {\n List specs = ((OffsetofExpression)parent).getSpecifiers();\n Declaration cdecl = findUserDeclaration(id, specs);\n if (cdecl instanceof ClassDeclaration) {\n ret = ((ClassDeclaration)cdecl).findSymbol(id);\n }\n } else {\n ret = id.findDeclaration();\n // This code section only deals with a situation that name conflicts\n // in a scope; e.g.) { int a = b; float b; ... }\n if (ret instanceof VariableDeclaration) {\n Traversable t1 = IRTools.getAncestorOfType(id, Statement.class);\n Traversable t2 = IRTools.getAncestorOfType(ret,Statement.class);\n if (t1 != null && t2 != null\n && t1.getParent() == t2.getParent()) {\n List<Traversable> children = t1.getParent().getChildren();\n if (children.indexOf(t1) < children.indexOf(t2)) {\n ret = findDeclaration(t1.getParent().getParent(), id);\n }\n }\n }\n }\n // Prints out warning for undeclared functions/symbols.\n if (ret == null) {\n if (parent instanceof FunctionCall &&\n id == ((FunctionCall)parent).getName()) {\n \tif( verbosity > 1 ) {\n \t\tSystem.err.print(\"[WARNING] Function without declaration \");\n \t\tSystem.err.println(id + \" from \" + parent);\n \t}\n } else {\n \tif( verbosity > 0 ) {\n \t\tSystem.err.print(\"[WARNING] Undeclared symbol \");\n \t\tSystem.err.println(id + \" from \" + parent);\n \t}\n }\n }\n return ret;\n }", "@Nullable\n\tpublic MethodNode searchMethodByShortName(String name) {\n\t\tfor (MethodNode m : methods) {\n\t\t\tif (m.getMethodInfo().getName().equals(name)) {\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public NameSurferEntry findEntry(String name) {\n\t\tchar ch = name.charAt(0);\n\t\tif(Character.isLowerCase(ch) == true) {\n\t\t\tch = Character.toUpperCase(ch);\n\t\t}\n\t\tString otherLetters = name.substring(1);\n\t\totherLetters = otherLetters.toLowerCase();\n\t\tname = ch + otherLetters;\n\t\tif (nameFromDatabase.containsKey(name)) {\n\t\t\treturn nameFromDatabase.get(name);\n\t\t}\t\t\t\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public List<Doctor> searchByName(String name) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getName, name);\n return searchList;\n }", "@Nullable\n public static OutputFormat find(String name) {\n String normalized = name.trim()\n .toUpperCase().replaceAll(\"-\", \"_\");\n try {\n return OutputFormat.valueOf(normalized);\n } catch (IllegalArgumentException ex) {\n return null;\n }\n }", "public static TextPosition findByName(String name) {\n\t\tfor (TextPosition titlePosition : TextPosition.values()) {\n\t\t\tif (titlePosition.getName().equals(name)) {\n\t\t\t\treturn titlePosition;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public ListWord findAList(String name) {\n for (ListWord list: list) {\n if (list.getName().equals(name)) {\n return list;\n }\n }\n return null;\n }", "public static IInterfaceDefinition searchType(String unresolvedTypeName,\n\t\t\tEnvironment env)\n\t{\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Token\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))// c.rawName.equals(unresolvedTypeName))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all root productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Production\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all sub productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.SubProduction\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all alternatives\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Alternative\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup for all raw names no matter the type\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all with not raw name\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.classToType.get(cd) == ClassType.Custom)\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, false, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().getTag().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IInterfaceDefinition i : env.getInterfaces())\n\t\t{\n\t\t\tif (i.getName().getName().equals(unresolvedTypeName))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn null;// \"%\" + type;\n\n\t}", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}", "@Override\n public <T extends ParsedComponent> Optional<T> find(String exactName, Class<T> clazz) {\n\n if (exactName.equals(name) && clazz.equals(this.getClass())) {\n //noinspection unchecked\n return Optional.of((T) this);\n }\n\n return findInChildren(exactName, clazz);\n }", "@Override\n\tpublic Symbol resolve(String name) {\n\t\tSymbol s = symbols.get(name);\n\t\tif (s != null)\n\t\t\treturn s;\n\t\t\n\t\t// otherwise look in the enclosing scope, if there is one\n\t\tScope sc = enclosingScope;\n\t\twhile (sc != null) {\n\t\t\tSymbol sym = enclosingScope.resolve(name);\n\t\t\tif (sym != null) {\n\t\t\t\treturn sym;\n\t\t\t}\n\t\t\tsc = sc.getEnclosingScope();\n\t\t}\n\t\t// otherwise it doesn't exist\n\t\treturn null;\n\t}", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "public static Type findType(String name) {\n if (MZTabUtils.isEmpty(name)) {\n throw new IllegalArgumentException(\"Modification type name should not be empty!\");\n }\n\n Type type;\n try {\n type = Type.valueOf(name.trim().toUpperCase());\n } catch (IllegalArgumentException e) {\n type = null;\n }\n\n return type;\n }", "public static FileType getByName(String name) {\n\t\tfor(int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tFileType result = VALUES_ARRAY[i];\n\t\t\tif(result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public int search(String name){\n\t\tfor(Map.Entry<String, Integer> e : map.entrySet()){\n\t\t\tif(e.getKey().equals(name)){\n\t\t\t\treturn e.getValue();\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t/*\n\t\twhile(pointer < locations.length){\n\t\t\tif(locations[pointer].getName() == name){\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t\treturn locations[pointer - 1].getID();\n\t\t\t} else {\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t*/\n\t}", "public String searchByName(String name){\n for(Thing things: everything){\n if(things.getName().equalsIgnoreCase(name)){\n return things.toString();\n }\n }\n return \"Cannot Find given Name\";\n }", "public int indexOf(String name, int start) {\n\t\tint sz = size();\n\t\tfor (int i = start; i < sz; i++) {\n\t\t\tString n = getName(i);\n\t\t\tif (name == null) {\n\t\t\t\tif (n == null)\n\t\t\t\t\treturn i; // matched null\n\t\t\t} else if (name.equals(n)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "DefinitionName getDefName(String n){\n \tDefinitionName rc = null;\n \ttry {\n\t\t\trc = new DefinitionName(n);\n\t\t} catch (DmcValueException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn(rc);\n }", "private Macrodef getMatchingMacrodef(Element targetElement)\n {\n String targetName = targetElement.getAttribute(\"name\").getValue();\n\n for (Macrodef macrodef : localMacrodefs)\n {\n String label = macrodef.getName();\n\n if (label.equals(targetName))\n {\n return macrodef;\n }\n }\n\n return null;\n }", "@Override\n\tpublic finalDataBean findByName(String name) throws Exception {\n\t\treturn null;\n\t}", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@Override\r\n\tpublic Country find(String name) {\r\n\t\tCountry retDM = null;\r\n\r\n\t\tif (name == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treadMapFromFile();\r\n\t\t\tretDM=this.daoMap.get(name);\r\n\r\n\t\t} catch (JsonSyntaxException | JsonIOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn retDM;\r\n\t}", "public AbsenceType findByName(String name);", "private FileSystem resolve(String fileName)\n {\n return fileSystems.stream().filter(fs->fs.fsName.equals(fileName)).findAny().get();\n }", "private FileType getFileType(String name) {\n\t\tif(name==null)\n\t\t\treturn null;\n\t\tfor(FileType fileType: fileTypes){\n\t\t\tif(name.startsWith(fileType.getFileNamePrefix())){\n\t\t\t\treturn fileType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "void searchByName(String name) {\n\t\tint i=0;\n\t\t\tfor (Entity entity : Processing.nodeSet) {\n\t\t\t\t\n\t\t\t\t/* if Entity is person */\n\t\t\t\tif(entity instanceof Person) {\n\t\t\t\t\tPerson person=(Person)entity;\n\t\t\t\t\tif(person.getName().equalsIgnoreCase(name)){\n\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\tSystem.out.println(\" name : \" + person.getName());\n\t\t\t\t\tSystem.out.println(\" phone : \" + person.getPhone());\n\t\t\t\t\tSystem.out.println(\" email : \" + person.getEmail());\n\t\t\t\t\tSystem.out.println(\" school : \" + person.getSchool());\n\t\t\t\t\tSystem.out.println(\" college : \" + person.getCollege() + \"\\n\");\n\t\t\t\t\t\tfor(String interest:person.getInterests()){\n\t\t\t\t\t\t\tSystem.out.println(\" interest in : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* If entity is organization */\n\t\t\t\telse {\n\t\t\t\t\tOrganization organization=(Organization)entity;\n\t\t\t\t\tif(organization.getName().equalsIgnoreCase(name)){\n\t\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\t\tSystem.out.println(\" name : \" + organization.getName());\n\t\t\t\t\t\tSystem.out.println(\" phone : \" + organization.getPhone());\n\t\t\t\t\t\tSystem.out.println(\" email : \" + organization.getEmail());\n\t\t\t\t\t\tfor(String interest:organization.getCourses()){\n\t\t\t\t\t\t\tSystem.out.println(\" courses are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getFaculty()){\n\t\t\t\t\t\t\tSystem.out.println(\" Faculties are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getPlacements()){\n\t\t\t\t\t\t\tSystem.out.println(\" Placements are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(i>=Processing.nodeSet.size()) {//if no such name exist\n\t\t\t\tSystem.out.println(name+\" does not exist\");\n\t\t\t}\n\t}", "private Node getNode(String name) {\n for(Iterator<Node> i = nodes.iterator(); i.hasNext();) {\n Node n = i.next();\n if(n.getName().equalsIgnoreCase(name)){\n return n;\n };\n }\n return null;\n }", "@Override\n\tpublic Set<Person> getfindByNameContaining(String name) {\n\t\treturn null;\n\t}", "private static Spreadsheet findSpreadsheet(RubyProject rubyProject, String sheetName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"uss\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(sheetName)) {\r\n \t\t\t\t\treturn (Spreadsheet)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }" ]
[ "0.6157064", "0.5998122", "0.5996398", "0.5916102", "0.57006395", "0.5636416", "0.55873257", "0.55669725", "0.5498366", "0.54601216", "0.5434735", "0.5421004", "0.5414634", "0.5380867", "0.53670996", "0.5366993", "0.5354823", "0.53509015", "0.53141606", "0.53002846", "0.5281576", "0.52718055", "0.52592677", "0.52536434", "0.52401525", "0.5238976", "0.5208562", "0.5208386", "0.5200346", "0.51966494", "0.5180388", "0.5167893", "0.5165605", "0.51615864", "0.5158318", "0.50925976", "0.5089644", "0.5086084", "0.5086084", "0.50818044", "0.5079588", "0.5077176", "0.5077176", "0.5076563", "0.5068522", "0.50599927", "0.50504357", "0.5037763", "0.50372815", "0.5035229", "0.5030754", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.50218946", "0.5019096", "0.5018514", "0.5018339", "0.49984443", "0.49972042", "0.4984937", "0.4974057", "0.4969162", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413", "0.49672413" ]
0.59515333
3
Finds name definition across all Haskell files in the project. All definitions are found when name is null.
@NotNull public static List<PsiNamedElement> findDefinitionNodes(@NotNull Project project) { return findDefinitionNode(project, null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NotNull\n public static List<PsiNamedElement> findDefinitionNode(@NotNull Project project, @Nullable String name, @Nullable PsiNamedElement e) {\n // Guess where the name could be defined by lookup up potential modules.\n final Set<String> potentialModules =\n e == null ? Collections.EMPTY_SET\n : getPotentialDefinitionModuleNames(e, HaskellPsiUtil.parseImports(e.getContainingFile()));\n List<PsiNamedElement> result = ContainerUtil.newArrayList();\n final String qPrefix = e == null ? null : getQualifiedPrefix(e);\n final PsiFile psiFile = e == null ? null : e.getContainingFile().getOriginalFile();\n if (psiFile instanceof HaskellFile) {\n findDefinitionNode((HaskellFile)psiFile, name, e, result);\n }\n for (String potentialModule : potentialModules) {\n List<HaskellFile> files = HaskellModuleIndex.getFilesByModuleName(project, potentialModule, GlobalSearchScope.allScope(project));\n for (HaskellFile f : files) {\n final boolean returnAllReferences = name == null;\n final boolean inLocalModule = f != null && qPrefix == null && f.equals(psiFile);\n final boolean inImportedModule = f != null && potentialModules.contains(f.getModuleName());\n if (returnAllReferences || inLocalModule || inImportedModule) {\n findDefinitionNode(f, name, e, result);\n }\n }\n }\n return result;\n }", "@NotNull\n public static List<PsiNamedElement> findDefinitionNodes(@Nullable HaskellFile haskellFile, @Nullable String name) {\n List<PsiNamedElement> ret = ContainerUtil.newArrayList();\n findDefinitionNode(haskellFile, name, null, ret);\n return ret;\n }", "public static void findDefinitionNode(@Nullable HaskellFile file, @Nullable String name, @Nullable PsiNamedElement e, @NotNull List<PsiNamedElement> result) {\n if (file == null) return;\n // We only want to look for classes that match the element we are resolving (e.g. varid, conid, etc.)\n final Class<? extends PsiNamedElement> elementClass;\n if (e instanceof HaskellVarid) {\n elementClass = HaskellVarid.class;\n } else if (e instanceof HaskellConid) {\n elementClass = HaskellConid.class;\n } else {\n elementClass = PsiNamedElement.class;\n }\n Collection<PsiNamedElement> namedElements = PsiTreeUtil.findChildrenOfType(file, elementClass);\n for (PsiNamedElement namedElement : namedElements) {\n if ((name == null || name.equals(namedElement.getName())) && definitionNode(namedElement)) {\n result.add(namedElement);\n }\n }\n }", "Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }", "@Override\n\tpublic Set<Person> getfindByNameContaining(String name) {\n\t\treturn null;\n\t}", "public String searchByName(String name){\n for(Thing things: everything){\n if(things.getName().equalsIgnoreCase(name)){\n return things.toString();\n }\n }\n return \"Cannot Find given Name\";\n }", "private FunctInfo findFunction(String name) {\n FunctInfo li = (FunctInfo)localScope.getLambda(name);\n if (li != null) {\n return li;\n }\n return functionDefinitions.get(name);\n }", "void searchByName(String name) {\n\t\tint i=0;\n\t\t\tfor (Entity entity : Processing.nodeSet) {\n\t\t\t\t\n\t\t\t\t/* if Entity is person */\n\t\t\t\tif(entity instanceof Person) {\n\t\t\t\t\tPerson person=(Person)entity;\n\t\t\t\t\tif(person.getName().equalsIgnoreCase(name)){\n\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\tSystem.out.println(\" name : \" + person.getName());\n\t\t\t\t\tSystem.out.println(\" phone : \" + person.getPhone());\n\t\t\t\t\tSystem.out.println(\" email : \" + person.getEmail());\n\t\t\t\t\tSystem.out.println(\" school : \" + person.getSchool());\n\t\t\t\t\tSystem.out.println(\" college : \" + person.getCollege() + \"\\n\");\n\t\t\t\t\t\tfor(String interest:person.getInterests()){\n\t\t\t\t\t\t\tSystem.out.println(\" interest in : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* If entity is organization */\n\t\t\t\telse {\n\t\t\t\t\tOrganization organization=(Organization)entity;\n\t\t\t\t\tif(organization.getName().equalsIgnoreCase(name)){\n\t\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\t\tSystem.out.println(\" name : \" + organization.getName());\n\t\t\t\t\t\tSystem.out.println(\" phone : \" + organization.getPhone());\n\t\t\t\t\t\tSystem.out.println(\" email : \" + organization.getEmail());\n\t\t\t\t\t\tfor(String interest:organization.getCourses()){\n\t\t\t\t\t\t\tSystem.out.println(\" courses are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getFaculty()){\n\t\t\t\t\t\t\tSystem.out.println(\" Faculties are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getPlacements()){\n\t\t\t\t\t\t\tSystem.out.println(\" Placements are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(i>=Processing.nodeSet.size()) {//if no such name exist\n\t\t\t\tSystem.out.println(name+\" does not exist\");\n\t\t\t}\n\t}", "private static Project findProject(String name) {\r\n \t\tfor (Project project : ProjectPlugin.getPlugin().getProjectRegistry().getProjects()) {\r\n \t\t\tif (project.getName().equals(name)) {\r\n \t\t\t\treturn project;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public static IInterfaceDefinition searchType(String unresolvedTypeName,\n\t\t\tEnvironment env)\n\t{\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Token\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))// c.rawName.equals(unresolvedTypeName))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all root productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Production\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all sub productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.SubProduction\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all alternatives\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Alternative\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup for all raw names no matter the type\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all with not raw name\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.classToType.get(cd) == ClassType.Custom)\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, false, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().getTag().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IInterfaceDefinition i : env.getInterfaces())\n\t\t{\n\t\t\tif (i.getName().getName().equals(unresolvedTypeName))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn null;// \"%\" + type;\n\n\t}", "@Override\n public Named find(String name) throws SemanticException {\n try {\n return head.find(name);\n }\n catch (NoClassException e) {\n return tail.find(name);\n }\n }", "@Nullable\n PsiElement findExportedName(String name);", "@Override\n public List<Doctor> searchByName(String name) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getName, name);\n return searchList;\n }", "private static void search_by_name() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project Name: \");\r\n\t\t\tString project_name = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_name, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project name cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}", "public void searchByName(String name) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tif(line.toLowerCase().contains(name.toLowerCase())) {\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public ClassPair findClassAndStub( String name ) {\n\n\n return null ;\n }", "@Override\n\tpublic Set<Person> getfindByNameContainingIgnoreCase(String name) {\n\t\treturn null;\n\t}", "public Class<?> findClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tLOCK.lock();\n\t\t\tint i = name.lastIndexOf('.');\n\t\t\tif (i >= 0)\n\t\t\t{\n\t\t\t\tString pkgName = name.substring(0, i);\n\t\t\t\tPackage pkg = getPackage(pkgName);\n\t\t\t\tif (pkg == null)\n\t\t\t\t{\n\t\t\t\t\tdefinePackage(pkgName, null, null, null, null, null, null, null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"looking up definition for resource [\" + name + \"]\");\n\t\t\tbyte[] b = null;\n\t\t\tString resName = name.replace('.', '/') + \".class\";\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tmap.put(\"name\", resName);\n\t\t\tJPPFResourceWrapper resource = loadResourceData(map, false);\n\t\t\tif (resource == null) throw new ClassNotFoundException(\"could not find reosurce \" + name);\n\t\t\tb = resource.getDefinition();\n\t\t\tif ((b == null) || (b.length == 0))\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] not found\");\n\t\t\t\tthrow new ClassNotFoundException(\"Could not load class '\" + name + \"'\");\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"found definition for resource [\" + name + \", definitionLength=\" + b.length + \"]\");\n\t\t\treturn defineClass(name, b, 0, b.length);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tLOCK.unlock();\n\t\t}\n\t}", "public Closure find_var(String name){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.contains(name)){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n throw new UndefinedVariable();\n }", "public List<Eetakemon> findEetakemonContain(String name){\n List<Eetakemon>resultlist = new ArrayList<Eetakemon>();\n for (String key: eetakemonmap.keySet()){\n Eetakemon e = eetakemonmap.get(key);\n if(e.getName().contains(name)){\n resultlist.add(e);\n }\n }\n return resultlist;\n }", "private static Spreadsheet findSpreadsheet(RubyProject rubyProject, String sheetName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"uss\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(sheetName)) {\r\n \t\t\t\t\treturn (Spreadsheet)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public Symbol findEntryLocal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null || (l.get(0).level < scopeLevel))\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "public void nameAnalysis() {\n SymTable symTab = new SymTable();\n myDeclList.nameAnalysis(symTab);\n\n\t// after return, the symTable is filled\n\t// check if have a main entry\n\tSemSym s = symTab.lookupGlobal(\"main\");\n\tif(s != null && s instanceof FnSym){\n\t // it's fine\n\t}else{\n\t ErrMsg.fatal(0,0,\"No main function\");\n\t}\n\n }", "public Symbol findEntryGlobal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null)\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "private static RubyFile findRubyScript(RubyProject rubyProject, String rubyScriptName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"urf\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(rubyScriptName)) {\r\n \t\t\t\t\treturn (RubyFile)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "@NotNull\n public List<String> extractPotentialPaths(@NotNull PsiElement element) {\n List<String> qualifiedNames = new ArrayList<>();\n\n String path = extractPathName(element, OclTypes.INSTANCE);\n if (!path.isEmpty()) {\n PsiQualifiedNamedElement moduleAlias = PsiFinder.getInstance().findModuleAlias(element.getProject(), path);\n String modulePath = moduleAlias == null ? path : moduleAlias.getQualifiedName();\n qualifiedNames.add(modulePath);\n qualifiedNames.add(((FileBase) element.getContainingFile()).asModuleName() + \".\" + modulePath);\n }\n\n // Walk backward until top of the file is reached, trying to find local opens and opens/includes\n PsiElement item = element;\n while (item != null) {\n if (100 < qualifiedNames.size()) {\n break; // There must be a problem with the parser\n }\n\n if (item instanceof FileBase) {\n qualifiedNames.add(((FileBase) item).asModuleName());\n break;\n } else if (item instanceof PsiOpen || item instanceof PsiInclude) {\n String openName = ((PsiNamedElement) item).getName();\n // Add open value to all previous elements\n List<String> withOpenQualifier = qualifiedNames.stream().map(name -> openName + \".\" + name).collect(Collectors.toList());\n qualifiedNames.addAll(withOpenQualifier);\n\n qualifiedNames.add(openName);\n } else if (item instanceof PsiModule) {\n PsiModule module = (PsiModule) item;\n String moduleName = module.getName();\n String moduleAlias = findModuleAlias(element.getProject(), module.getAlias());\n\n if (moduleAlias != null && !moduleAlias.equals(moduleName)) {\n // Replace module name in resolved paths with the module alias\n qualifiedNames = qualifiedNames.stream().map(name -> {\n if (name.equals(moduleName)) {\n return moduleAlias;\n } else if (name.startsWith(moduleName + \".\")) {\n int length = moduleAlias.length();\n if (length <= moduleName.length()) {\n return moduleAlias + \".\" + moduleName.substring(length);\n }\n } else if (name.endsWith(\".\" + moduleName)) {\n return name.replace(\".\" + moduleName, \".\" + moduleAlias);\n }\n return name;\n }).collect(Collectors.toList());\n }\n }\n\n PsiElement prevItem = item.getPrevSibling();\n if (prevItem == null) {\n PsiElement parent = item.getParent();\n if (parent instanceof PsiLocalOpen) {\n String localOpenName = ((PsiLocalOpen) parent).getName();\n String localOpenAlias = findModuleAlias(element.getProject(), localOpenName);\n qualifiedNames.add(localOpenAlias == null || localOpenAlias.equals(localOpenName) ? localOpenName : localOpenAlias);\n }\n item = parent;\n } else {\n item = prevItem;\n }\n }\n\n qualifiedNames.add(\"Pervasives\");\n return qualifiedNames;\n }", "private Node search(String name)\r\n\t{\r\n\t\t// Check to see if the list is empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Return null which will be checked for by the method that called it\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Tree is not empty so use the recursive search method starting at the root reference \r\n\t\t// to find the correct Node containing the String name\r\n\t\treturn search(getRoot(), name);\r\n\t}", "@Override\n\tpublic Set<Person> getfindByName(String name) {\n\t\treturn null;\n\t}", "public void find() {\n for (CompilationUnit file : this.files) {\n // Iterate over each of the class/interface declaration in the file\n for (ClassOrInterfaceDeclaration clsOrInterfDecl\n : file.findAll(ClassOrInterfaceDeclaration.class)) {\n // Stop when the declration isnt an interface\n if (!clsOrInterfDecl.isInterface()) {\n continue;\n }\n this.clsOrInterfDeclrs.add(clsOrInterfDecl);\n }\n }\n }", "private NFAState checkIfExists(String name) {\r\n\t\tNFAState ret = null;\r\n\t\tfor (NFAState s : states) {\r\n\t\t\tif (s.getName().equals(name)) {\r\n\t\t\t\tret = s;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "private FileSystem resolve(String fileName)\n {\n return fileSystems.stream().filter(fs->fs.fsName.equals(fileName)).findAny().get();\n }", "private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }", "protected Definition checkDefinedOnlyOnce(){\n Definition result = null;\n List<Name> names = new ArrayList<Name>();\n \n for( Definition definition : definitions ){\n if( !definition.typedef ){\n Field field = definition.getField();\n if( field != null ){\n FieldModelNode node = field.asNode();\n if( node != null ){\n if( node.getTags().contains( Tag.USES ) || node.getTags().contains( Tag.PROVIDES )){\n \tName name = node.getName();\n \tif( name != null ){\n \t\tnames.add( name );\n \t}\n result = definition;\n }\n }\n }\n }\n }\n \n if( names.size() > 1 ){\n error( \"multiple definitions of command/event '\" + name + \"'\", names );\n return null;\n }\n \n return result;\n }", "private boolean examineName(String name) {\r\n resourceName = null;\r\n resourceIsClass = false;\r\n\r\n if (name.endsWith(\".java\")) {\r\n return false;\r\n }\r\n\r\n if (name.endsWith(\".class\")) {\r\n name = name.substring(0, name.length() - 6);\r\n if (classMap.containsKey(name)) {\r\n return false;\r\n }\r\n resourceIsClass = true;\r\n } else {\r\n if (resourceMap.containsKey(name)) {\r\n return false;\r\n }\r\n }\r\n\r\n resourceName = name;\r\n return true;\r\n }", "public boolean match(String name) {\n\t\tboolean result = false;\n\n\t\tif (this.entries != null) {\n\t\t\tname = name.replace('/', '.');\n\t\t\tname = name.replaceFirst(\"^[.]+\", \"\");\n\t\t\tname = name.replaceAll(\"\\\\$.*$\", \"\");\n\n\t\t\tfor (Entry entry : this.entries) {\n\t\t\t\tif (entry != null) {\n\t\t\t\t\tif (entry.partial) {\n\t\t\t\t\t\tif (name.startsWith(entry.classpath)) {\n\t\t\t\t\t\t\tresult = entry.result;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (name.equals(entry.classpath)) {\n\t\t\t\t\t\t\tresult = entry.result;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public void loadNames() {\n\t\tloadNames(false);\n\t}", "public abstract String filterLibraryName(final String name);", "public void searchClassMemberDeclarations(String name, SearchIdConsumer consumer);", "public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}", "private NFAState checkIfExists(String name) {\n\t\tNFAState ret = null;\n\t\tfor(NFAState s : states){\n\t\t\tif(s.getName().equals(name)){\n\t\t\t\tret = s;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}", "public static boolean Java_find(File dir, String name) {\n boolean flag = false;\n // TODO: find files\n File[] list = dir.listFiles();\n FileOperation.listOfFiles = new ArrayList<String>();\n FileOperation.listOfMatching = new ArrayList<String>();\n listOfAllFiles(dir);\n for(String filename:FileOperation.listOfFiles){\n if(filename.contains(name)){\n flag=true;\n listOfMatching.add(filename);\n }\n }\n return flag;\n }", "private Header [] loadSource(String name, Header [] list, Header header, final boolean force)\r\n {\r\n int pos;\r\n int depth = header.depth;\r\n File file = null;\r\n\r\n name = name.trim();\r\n\r\n for(pos = 0; pos < list.length && list[pos] != header; pos++);\r\n\r\n String path = list[pos].name.substring(0, list[pos].name.lastIndexOf('\\\\'));\r\n\r\n // look in sdk's root directory\r\n if ((file = getFile(Parser.jdkSource, name)) != null)\r\n {\r\n if (Parser.jdkSource.compareToIgnoreCase(path) != 0)\r\n depth++;\r\n }\r\n\r\n // look in package\r\n if (file == null)\r\n {\r\n file = getFile(path, name);\r\n }\r\n\r\n // look in imports\r\n for (int j = 0; j < header.imports.length && file == null; j++)\r\n {\r\n String st = header.imports[j];\r\n int last = st.lastIndexOf('.') + 1;\r\n\r\n if (st.substring(last).compareToIgnoreCase(name) == 0)\r\n st = st.substring(0, last);\r\n\r\n if (st.endsWith(\".\"))\r\n st = st.substring(0, st.length() - 1);\r\n\r\n for (int k = -1; (k = st.indexOf('.')) >= 0; )\r\n st = st.substring(0, k) + '\\\\' + st.substring(k + 1);\r\n\r\n st = jdkSource + '\\\\' + st;\r\n\r\n file = getFile(st, name);\r\n\r\n if (file != null)\r\n depth++;\r\n }\r\n\r\n if (file != null)\r\n {\r\n String st = file.getAbsolutePath();\r\n\r\n // already loaded?\r\n for(int k = 0; k < list.length; k++)\r\n if (list[k].name.compareToIgnoreCase(st) == 0)\r\n {\r\n file = null;\r\n return list;\r\n }\r\n\r\n if (file != null)\r\n {\r\n File desc = new File(st.substring(0, st.lastIndexOf('.') + 1) + 'h');\r\n File fs = new File(st.substring(0, st.lastIndexOf('.') + 1) + \"fs\");\r\n\r\n st = file.getAbsolutePath();\r\n for(int i = 0; i < built.size(); i++)\r\n if (((String)built.get(i)).compareToIgnoreCase(st) == 0)\r\n {\r\n file = desc;\r\n break;\r\n }\r\n\r\n if ((!desc.exists() || !fs.exists() || fs.length() == 0 || fs.lastModified() < file.lastModified() || force) && file != desc)\r\n {\r\n Header [] hh \t= new Pass(file, built, force, gc).compilationUnit(list, depth); // compile\r\n\r\n return hh;\r\n }\r\n else\r\n {\r\n Header [] newList = new Header[list.length + 1];\r\n\r\n for (int k = 0; k < newList.length - 1; k++)\r\n newList[k] = list[k];\r\n System.out.println(desc.getAbsolutePath() + \" will be read!\");\r\n newList[newList.length - 1] = new Header(desc.getAbsolutePath(), depth); // load header\r\n list = newList;\r\n }\r\n }\r\n }\r\n\r\n return list;\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "public TypeDefinition findInternalType(DefinitionName name){\n \treturn(internalTypeDefs.get(name));\n }", "private FileType getFileType(String name) {\n\t\tif(name==null)\n\t\t\treturn null;\n\t\tfor(FileType fileType: fileTypes){\n\t\t\tif(name.startsWith(fileType.getFileNamePrefix())){\n\t\t\t\treturn fileType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private Macrodef getMatchingMacrodef(Element targetElement)\n {\n String targetName = targetElement.getAttribute(\"name\").getValue();\n\n for (Macrodef macrodef : localMacrodefs)\n {\n String label = macrodef.getName();\n\n if (label.equals(targetName))\n {\n return macrodef;\n }\n }\n\n return null;\n }", "DefinitionName getDefName(String n){\n \tDefinitionName rc = null;\n \ttry {\n\t\t\trc = new DefinitionName(n);\n\t\t} catch (DmcValueException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn(rc);\n }", "@Override\r\n\tpublic List<Modules> getModulesByName(String name) {\n\t\tString hql = \"from Modules m where m.name =?\";\r\n\t\treturn (List<Modules>) getHibernateTemplate().find(hql, name);\r\n\r\n\t}", "public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }", "public ListWord findAList(String name) {\n for (ListWord list: list) {\n if (list.getName().equals(name)) {\n return list;\n }\n }\n return null;\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }" ]
[ "0.6599461", "0.6221941", "0.5941917", "0.5198786", "0.51498944", "0.5128641", "0.51245576", "0.51139945", "0.5103179", "0.50901735", "0.50796914", "0.504945", "0.49881062", "0.49875844", "0.49743155", "0.4974223", "0.49460375", "0.49369448", "0.487881", "0.4845941", "0.4845354", "0.48412678", "0.4836003", "0.48301148", "0.4820164", "0.4799825", "0.47928768", "0.47779465", "0.47737697", "0.47700503", "0.47510645", "0.47494268", "0.4747516", "0.47383294", "0.4737568", "0.47287866", "0.47283903", "0.47252193", "0.47242534", "0.4721662", "0.47086468", "0.47086468", "0.46952945", "0.469254", "0.46773034", "0.46773034", "0.46765947", "0.46765947", "0.46765947", "0.46765947", "0.46765947", "0.46765947", "0.46765947", "0.46765947", "0.46765947", "0.46728438", "0.46726573", "0.46713936", "0.46517715", "0.46501932", "0.46500322", "0.46439385", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466", "0.46395466" ]
0.0
-1
Finds name definitions that are within the scope of a file, including imports (to some degree).
@NotNull public static List<PsiNamedElement> findDefinitionNodes(@NotNull HaskellFile psiFile) { List<PsiNamedElement> result = findDefinitionNodes(psiFile, null); result.addAll(findDefinitionNode(psiFile.getProject(), null, null)); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String containsScope(String line) {\n for (int i = 0; i < ApexDoc.rgstrScope.length; i++) {\n String scope = ApexDoc.rgstrScope[i].toLowerCase();\n\n // if line starts with annotations, replace them, so\n // we can accurately use startsWith to match scope.\n line = stripAnnotations(line);\n line = line.toLowerCase().trim();\n\n // see if line starts with registered scopes.\n if (line.startsWith(scope + \" \")) {\n return scope;\n }\n\n // match implicitly private lines\n else if (scope.equals(ApexDoc.PRIVATE)) {\n // match static props or methods:\n if (line.startsWith(\"static \")) {\n return ApexDoc.PRIVATE;\n }\n\n // match methods that start with\n // keywords or return primitive types:\n for (String keyword : KEYWORDS) {\n if (line.startsWith(keyword + \" \") && line.contains(\"(\")) {\n return ApexDoc.PRIVATE;\n }\n }\n\n // match metehods that return collections:\n for (String collection : COLLECTIONS) {\n if (line.matches(\"^\" + collection + \"<.+>\\\\s.*\") && line.contains(\"(\")) {\n return ApexDoc.PRIVATE;\n }\n }\n }\n }\n return null;\n }", "@NotNull\n public static List<PsiNamedElement> findDefinitionNode(@NotNull Project project, @Nullable String name, @Nullable PsiNamedElement e) {\n // Guess where the name could be defined by lookup up potential modules.\n final Set<String> potentialModules =\n e == null ? Collections.EMPTY_SET\n : getPotentialDefinitionModuleNames(e, HaskellPsiUtil.parseImports(e.getContainingFile()));\n List<PsiNamedElement> result = ContainerUtil.newArrayList();\n final String qPrefix = e == null ? null : getQualifiedPrefix(e);\n final PsiFile psiFile = e == null ? null : e.getContainingFile().getOriginalFile();\n if (psiFile instanceof HaskellFile) {\n findDefinitionNode((HaskellFile)psiFile, name, e, result);\n }\n for (String potentialModule : potentialModules) {\n List<HaskellFile> files = HaskellModuleIndex.getFilesByModuleName(project, potentialModule, GlobalSearchScope.allScope(project));\n for (HaskellFile f : files) {\n final boolean returnAllReferences = name == null;\n final boolean inLocalModule = f != null && qPrefix == null && f.equals(psiFile);\n final boolean inImportedModule = f != null && potentialModules.contains(f.getModuleName());\n if (returnAllReferences || inLocalModule || inImportedModule) {\n findDefinitionNode(f, name, e, result);\n }\n }\n }\n return result;\n }", "@NotNull\n public List<String> extractPotentialPaths(@NotNull PsiElement element) {\n List<String> qualifiedNames = new ArrayList<>();\n\n String path = extractPathName(element, OclTypes.INSTANCE);\n if (!path.isEmpty()) {\n PsiQualifiedNamedElement moduleAlias = PsiFinder.getInstance().findModuleAlias(element.getProject(), path);\n String modulePath = moduleAlias == null ? path : moduleAlias.getQualifiedName();\n qualifiedNames.add(modulePath);\n qualifiedNames.add(((FileBase) element.getContainingFile()).asModuleName() + \".\" + modulePath);\n }\n\n // Walk backward until top of the file is reached, trying to find local opens and opens/includes\n PsiElement item = element;\n while (item != null) {\n if (100 < qualifiedNames.size()) {\n break; // There must be a problem with the parser\n }\n\n if (item instanceof FileBase) {\n qualifiedNames.add(((FileBase) item).asModuleName());\n break;\n } else if (item instanceof PsiOpen || item instanceof PsiInclude) {\n String openName = ((PsiNamedElement) item).getName();\n // Add open value to all previous elements\n List<String> withOpenQualifier = qualifiedNames.stream().map(name -> openName + \".\" + name).collect(Collectors.toList());\n qualifiedNames.addAll(withOpenQualifier);\n\n qualifiedNames.add(openName);\n } else if (item instanceof PsiModule) {\n PsiModule module = (PsiModule) item;\n String moduleName = module.getName();\n String moduleAlias = findModuleAlias(element.getProject(), module.getAlias());\n\n if (moduleAlias != null && !moduleAlias.equals(moduleName)) {\n // Replace module name in resolved paths with the module alias\n qualifiedNames = qualifiedNames.stream().map(name -> {\n if (name.equals(moduleName)) {\n return moduleAlias;\n } else if (name.startsWith(moduleName + \".\")) {\n int length = moduleAlias.length();\n if (length <= moduleName.length()) {\n return moduleAlias + \".\" + moduleName.substring(length);\n }\n } else if (name.endsWith(\".\" + moduleName)) {\n return name.replace(\".\" + moduleName, \".\" + moduleAlias);\n }\n return name;\n }).collect(Collectors.toList());\n }\n }\n\n PsiElement prevItem = item.getPrevSibling();\n if (prevItem == null) {\n PsiElement parent = item.getParent();\n if (parent instanceof PsiLocalOpen) {\n String localOpenName = ((PsiLocalOpen) parent).getName();\n String localOpenAlias = findModuleAlias(element.getProject(), localOpenName);\n qualifiedNames.add(localOpenAlias == null || localOpenAlias.equals(localOpenName) ? localOpenName : localOpenAlias);\n }\n item = parent;\n } else {\n item = prevItem;\n }\n }\n\n qualifiedNames.add(\"Pervasives\");\n return qualifiedNames;\n }", "protected ArrayList<Line> findScope (Line start, ArrayList<Line> all) throws InnerScopeHasNoEnd{\n ArrayList<Line> scopeLines = new ArrayList<>();\n int curLineNum = all.indexOf(start);\n Line cur = start;\n scopeLines.add(cur);\n int numOpen = 1;\n int numClose = 0;\n while (!(numClose== numOpen)){ // while number of opening scope lines not equals to end scope lines.\n try{\n curLineNum += 1;\n cur = all.get(curLineNum);\n scopeLines.add(cur);\n if (cur.startScope()){\n numOpen += 1;\n }\n if (cur.endScope()){\n numClose += 1;\n }\n } // if we get out of the all ArrayList, mean the scope has no end\n catch (Exception e){\n throw new InnerScopeHasNoEnd();\n }\n }\n return scopeLines;\n }", "public void find() {\n for (CompilationUnit file : this.files) {\n // Iterate over each of the class/interface declaration in the file\n for (ClassOrInterfaceDeclaration clsOrInterfDecl\n : file.findAll(ClassOrInterfaceDeclaration.class)) {\n // Stop when the declration isnt an interface\n if (!clsOrInterfDecl.isInterface()) {\n continue;\n }\n this.clsOrInterfDeclrs.add(clsOrInterfDecl);\n }\n }\n }", "public Set<String> getVariablesWithin(String exp) {\r\n Set<String> all=new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);\r\n String add=null;\r\n\r\n for(StringTokenizer tkz=new StringTokenizer(exp,SYMBOLS,true); tkz.hasMoreTokens(); ) {\r\n String tkn=tkz.nextToken().trim();\r\n\r\n if (tkn.length()!=0 && Character.isLetter(tkn.charAt(0))) { add=tkn; }\r\n else if(tkn.length()==1 && tkn.charAt(0)=='(' ) { add=null; }\r\n else if(add!=null && !constants.containsKey(add) ) { all.add(add); }\r\n }\r\n if(add!=null && !constants.containsKey(add)) { all.add(add); }\r\n return all;\r\n }", "private Map<String, ModuleReference> scan(Path entry) {\n\n BasicFileAttributes attrs;\n try {\n attrs = Files.readAttributes(entry, BasicFileAttributes.class);\n } catch (NoSuchFileException e) {\n return Map.of();\n } catch (IOException ioe) {\n throw new FindException(ioe);\n }\n\n try {\n\n if (attrs.isDirectory()) {\n Path mi = entry.resolve(MODULE_INFO);\n if (!Files.exists(mi)) {\n // assume a directory of modules\n return scanDirectory(entry);\n }\n }\n\n // packaged or exploded module\n ModuleReference mref = readModule(entry, attrs);\n if (mref != null) {\n String name = mref.descriptor().name();\n return Map.of(name, mref);\n }\n\n // not recognized\n String msg;\n if (!isLinkPhase && entry.toString().endsWith(\".jmod\")) {\n msg = \"JMOD format not supported at execution time\";\n } else {\n msg = \"Module format not recognized\";\n }\n throw new FindException(msg + \": \" + entry);\n\n } catch (IOException ioe) {\n throw new FindException(ioe);\n }\n }", "@NotNull\n public static List<PsiNamedElement> findDefinitionNodes(@Nullable HaskellFile haskellFile, @Nullable String name) {\n List<PsiNamedElement> ret = ContainerUtil.newArrayList();\n findDefinitionNode(haskellFile, name, null, ret);\n return ret;\n }", "@Override\n\tpublic void check(Block curScope, Library lib) {\n\t\tSystem.out.println(\"here typename\"+name+ \" \"+lineNum);\n\t\tPascalDecl d2 = curScope.findDecl(name,this);\n\t\t \n\t\t\n\t\t\n\t\t\n\t\n\n\n\t}", "public static void findDefinitionNode(@Nullable HaskellFile file, @Nullable String name, @Nullable PsiNamedElement e, @NotNull List<PsiNamedElement> result) {\n if (file == null) return;\n // We only want to look for classes that match the element we are resolving (e.g. varid, conid, etc.)\n final Class<? extends PsiNamedElement> elementClass;\n if (e instanceof HaskellVarid) {\n elementClass = HaskellVarid.class;\n } else if (e instanceof HaskellConid) {\n elementClass = HaskellConid.class;\n } else {\n elementClass = PsiNamedElement.class;\n }\n Collection<PsiNamedElement> namedElements = PsiTreeUtil.findChildrenOfType(file, elementClass);\n for (PsiNamedElement namedElement : namedElements) {\n if ((name == null || name.equals(namedElement.getName())) && definitionNode(namedElement)) {\n result.add(namedElement);\n }\n }\n }", "public void searchClassMemberDeclarations(String name, SearchIdConsumer consumer);", "public int findScopeLevel(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null)\n\t\t\treturn -1;\n\t\treturn l.get(0).level;\n\t}", "String getScope();", "public IAstPreprocessorIncludeDirective findInclude(ISourceFile file);", "public Closure find_var(String name){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.contains(name)){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n throw new UndefinedVariable();\n }", "private static Declaration searchDeclaration(Identifier id) {\n Declaration ret = null;\n Traversable parent = id.getParent();\n // Broken IR\n if (parent == null) {\n return null;\n }\n // AccessExpression handling.\n if (parent instanceof AccessExpression &&\n id == ((AccessExpression)parent).getRHS()) {\n List specs = getType(((AccessExpression)parent).getLHS());\n Declaration cdecl = findUserDeclaration(id, specs);\n if (cdecl instanceof ClassDeclaration) {\n ret = ((ClassDeclaration)cdecl).findSymbol(id);\n }\n // __builtin__offsetof handling.\n } else if (parent instanceof OffsetofExpression &&\n id == ((OffsetofExpression)parent).getExpression()) {\n List specs = ((OffsetofExpression)parent).getSpecifiers();\n Declaration cdecl = findUserDeclaration(id, specs);\n if (cdecl instanceof ClassDeclaration) {\n ret = ((ClassDeclaration)cdecl).findSymbol(id);\n }\n } else {\n ret = id.findDeclaration();\n // This code section only deals with a situation that name conflicts\n // in a scope; e.g.) { int a = b; float b; ... }\n if (ret instanceof VariableDeclaration) {\n Traversable t1 = IRTools.getAncestorOfType(id, Statement.class);\n Traversable t2 = IRTools.getAncestorOfType(ret,Statement.class);\n if (t1 != null && t2 != null\n && t1.getParent() == t2.getParent()) {\n List<Traversable> children = t1.getParent().getChildren();\n if (children.indexOf(t1) < children.indexOf(t2)) {\n ret = findDeclaration(t1.getParent().getParent(), id);\n }\n }\n }\n }\n // Prints out warning for undeclared functions/symbols.\n if (ret == null) {\n if (parent instanceof FunctionCall &&\n id == ((FunctionCall)parent).getName()) {\n \tif( verbosity > 1 ) {\n \t\tSystem.err.print(\"[WARNING] Function without declaration \");\n \t\tSystem.err.println(id + \" from \" + parent);\n \t}\n } else {\n \tif( verbosity > 0 ) {\n \t\tSystem.err.print(\"[WARNING] Undeclared symbol \");\n \t\tSystem.err.println(id + \" from \" + parent);\n \t}\n }\n }\n return ret;\n }", "public void testInClosureDeclaringType2() throws Exception {\n String contents = \n \"class Baz {\\n\" +\n \" def method() { }\\n\" +\n \"}\\n\" +\n \"class Bar extends Baz {\\n\" +\n \"}\\n\" +\n \"new Bar().method {\\n \" +\n \" other\\n\" +\n \"}\";\n int start = contents.lastIndexOf(\"other\");\n int end = start + \"other\".length();\n assertDeclaringType(contents, start, end, \"Search\", false, true);\n }", "public static IInterfaceDefinition searchType(String unresolvedTypeName,\n\t\t\tEnvironment env)\n\t{\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Token\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))// c.rawName.equals(unresolvedTypeName))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all root productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Production\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all sub productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.SubProduction\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all alternatives\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Alternative\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup for all raw names no matter the type\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all with not raw name\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.classToType.get(cd) == ClassType.Custom)\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, false, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().getTag().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IInterfaceDefinition i : env.getInterfaces())\n\t\t{\n\t\t\tif (i.getName().getName().equals(unresolvedTypeName))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn null;// \"%\" + type;\n\n\t}", "public IAstSourceFile findIncludeFile(String string);", "public void testInScriptDeclaringType() throws Exception {\n String contents = \n \"other\\n\";\n int start = contents.lastIndexOf(\"other\");\n int end = start + \"other\".length();\n assertDeclaringType(contents, start, end, \"Search\", false, true);\n }", "public IScope scope_IncludeDeclaration_importedNamespace(Declaration context, EReference ref) {\n\t\tIScope result = delegateGetScope(context, ref);\n\t\treturn new FilteringScope(result, new Predicate<IEObjectDescription>() {\n\t\t\tpublic boolean apply(IEObjectDescription input) {\n\t\t\t\tif (input != null) {\n\t\t\t\t\treturn input.getEObjectURI().fileExtension().equals(\"idd\");\n\t\t\t\t}\n\t\t\t\treturn false;\n\n\t\t\t}\n\t\t});\n\t}", "private Map<String, ModuleReference> scanDirectory(Path dir)\n throws IOException\n {\n // The map of name -> mref of modules found in this directory.\n Map<String, ModuleReference> nameToReference = new HashMap<>();\n\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) {\n for (Path entry : stream) {\n BasicFileAttributes attrs;\n try {\n attrs = Files.readAttributes(entry, BasicFileAttributes.class);\n } catch (NoSuchFileException ignore) {\n // file has been removed or moved, ignore for now\n continue;\n }\n\n ModuleReference mref = readModule(entry, attrs);\n\n // module found\n if (mref != null) {\n // can have at most one version of a module in the directory\n String name = mref.descriptor().name();\n ModuleReference previous = nameToReference.put(name, mref);\n if (previous != null) {\n String fn1 = fileName(mref);\n String fn2 = fileName(previous);\n throw new FindException(\"Two versions of module \"\n + name + \" found in \" + dir\n + \" (\" + fn1 + \" and \" + fn2 + \")\");\n }\n }\n }\n }\n\n return nameToReference;\n }", "public Set<OntologyScope> getRegisteredScopes();", "private String[] getScopes() {\n return scopeTextView.getText().toString().toLowerCase().split(\" \");\n }", "Map<String, FileModule> getSymbolMap() {\n Map<String, FileModule> out = new LinkedHashMap<>();\n for (FileModule module : fileToModule.values()) {\n for (String symbol : module.importedNamespacesToSymbols.keySet()) {\n out.put(symbol, module);\n }\n }\n return out;\n }", "String getImportedNamespace();", "List<Defines> getDefines();", "public IAstSourceFile findIncludeFile(ISourceFile file);", "private FunctInfo findFunction(String name) {\n FunctInfo li = (FunctInfo)localScope.getLambda(name);\n if (li != null) {\n return li;\n }\n return functionDefinitions.get(name);\n }", "private boolean isGlobalDeclaration() throws IOException\n\t{\n\t\tboolean isGlobal = false;\n\t\t\n\t\tif(theCurrentToken.TokenType == TokenType.GLOBAL)\n\t\t{\n\t\t\tisGlobal = true;\n\t\t\tupdateToken();\n\t\t\tSystem.out.println(\"Global!\");\n\t\t}\n\t\t\n\t\t// Determine declaration type.\n\t\tif(isProcedureDeclaration(isGlobal))\n\t\t\treturn true;\n\t\telse if(isVariableDeclaration(isGlobal))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public List<Declaration> localMembers() throws LookupException;", "Scope getEnclosingScope();", "public String getScopes() {\n\t\treturn getParameterValue(\"scope\");\n\t}", "private static boolean isDeclaredIn(\n CppConfiguration cppConfiguration,\n ActionExecutionContext actionExecutionContext,\n Artifact input,\n Set<PathFragment> declaredIncludeDirs) {\n // If it's a derived artifact, then it MUST be listed in \"srcs\" as checked above.\n // We define derived here as being not source and not under the include link tree.\n if (!input.isSourceArtifact()\n && !input.getRoot().getExecPath().getBaseName().equals(\"include\")) {\n return false;\n }\n // Need to do dir/package matching: first try a quick exact lookup.\n PathFragment includeDir = input.getRootRelativePath().getParentDirectory();\n if (!cppConfiguration.validateTopLevelHeaderInclusions() && includeDir.isEmpty()) {\n return true; // Legacy behavior nobody understands anymore.\n }\n if (declaredIncludeDirs.contains(includeDir)) {\n return true; // OK: quick exact match.\n }\n // Not found in the quick lookup: try the wildcards.\n for (PathFragment declared : declaredIncludeDirs) {\n if (declared.getBaseName().equals(\"**\")) {\n if (includeDir.startsWith(declared.getParentDirectory())) {\n return true; // OK: under a wildcard dir.\n }\n }\n }\n // Still not found: see if it is in a subdir of a declared package.\n Root root = actionExecutionContext.getRoot(input);\n Path dir = actionExecutionContext.getInputPath(input).getParentDirectory();\n if (dir.equals(root.asPath())) {\n return false; // Bad: at the top, give up.\n }\n // As we walk up along parent paths, we'll need to check whether Bazel build files exist, which\n // would mean that the file is in a sub-package and not a subdir of a declared include\n // directory. Do so lazily to avoid stats when this file doesn't lie beneath any declared\n // include directory.\n List<Path> packagesToCheckForBuildFiles = new ArrayList<>();\n while (true) {\n packagesToCheckForBuildFiles.add(dir);\n dir = dir.getParentDirectory();\n if (dir.equals(root.asPath())) {\n return false; // Bad: at the top, give up.\n }\n if (declaredIncludeDirs.contains(root.relativize(dir))) {\n for (Path dirOrPackage : packagesToCheckForBuildFiles) {\n FileStatus fileStatus = null;\n try {\n // This file system access shouldn't exist at all and has to go away when this is\n // rewritten in Starlark.\n // TODO(b/187366935): Consider globbing everything eagerly instead.\n fileStatus =\n actionExecutionContext\n .getSyscallCache()\n .statIfFound(dirOrPackage.getRelative(BUILD_PATH_FRAGMENT), Symlinks.FOLLOW);\n } catch (IOException e) {\n // Previously, we used Path.exists() to check whether the BUILD file exists. This did\n // return false on any error. So by ignoring the exception are maintaining current\n // behaviour.\n }\n if (fileStatus != null && fileStatus.isFile()) {\n return false; // Bad: this is a sub-package, not a subdir of a declared package.\n }\n }\n return true; // OK: found under a declared dir.\n }\n }\n }", "public void testInClosureDeclaringType4() throws Exception {\n String contents = \n \"class Bar {\\n\" +\n \" def method() { }\\n\" +\n \"}\\n\" +\n \"new Bar().method {\\n \" +\n \" this\\n\" +\n \"}\";\n int start = contents.lastIndexOf(\"this\");\n int end = start + \"this\".length();\n assertDeclaringType(contents, start, end, \"Search\", false);\n }", "public ModuleScope requestParse(Context context) throws IOException {\n // TODO [AA] This needs to evolve to support scope execution\n if (cachedScope == null) {\n cachedScope = context.createScope();\n context.compiler().run(file, cachedScope);\n }\n return cachedScope;\n }", "private Variable findVariable(String varToFind){\r\n\t\tScope curScope = this;\r\n\t\twhile (curScope!=null) {\r\n\t\t\tif(curScope.contains(varToFind)){\r\n\t\t\t\treturn curScope.getVariable(varToFind);\r\n\t\t\t}else{\r\n\t\t\t\tcurScope = curScope.parent;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public interface Environment extends ImportProvider {\n /** Searches for the best available import with the given {@code identifier}. */\n Optional<Import> search(String identifier);\n\n /**\n * Returns all files in the package of a given {@code packageName}.\n *\n * <p>This uses the actual {@code package} declaration at the top of Java files, and will\n * therefore properly detect files of the same package in different directories.\n */\n Set<ParsedFile> filesInPackage(String packageName);\n}", "public static ArrayList<GlobalHeader> GetGlobals(Path fileName) {\n ArrayList<GlobalHeader> AssList = new ArrayList<>();\n int commsNumber;\n try {\n\n Document doc = getDocument(fileName);\n\n NodeList ctrlList = doc.getElementsByTagName( \"commsController\" );\n for (int ctrlLoopCnt = 0; ctrlLoopCnt < ctrlList.getLength(); ctrlLoopCnt++) {\n Node ctrlNode = ctrlList.item( ctrlLoopCnt );\n if (ctrlNode.getNodeType() == Node.ELEMENT_NODE) {\n Element ctrlElement = (Element) ctrlNode;\n commsNumber = Integer.parseInt( ctrlElement.getAttribute( \"address\" ) );\n\n NodeList globalTableNodeList = ctrlNode.getChildNodes();\n\n for (int globalTableNodeCnt = 0; globalTableNodeCnt < globalTableNodeList.getLength(); globalTableNodeCnt++) {\n Node globalTableNode = globalTableNodeList.item( globalTableNodeCnt );\n if (globalTableNode.getNodeType() == Node.ELEMENT_NODE) {\n int dotNetNo;\n int number = 0;\n String name;\n int servicePeriod;\n String pointType;\n int id;\n int hasModule;\n int runBurstLength;\n\n NodeList globalList = globalTableNode.getChildNodes();\n for (int globalNodeCount = 0; globalNodeCount < globalList.getLength(); globalNodeCount++) {\n Node globalNode = globalList.item( globalNodeCount );\n if (globalNode.getNodeType() == Node.ELEMENT_NODE) {\n\n Element globalElement = (Element) globalNode;\n dotNetNo = commsNumber;\n if (!globalTableNode.getNodeName().equals( \"temporary\" )) {\n number = Integer.parseInt( globalElement.getAttribute( \"number\" ) );\n }\n name = globalElement.getAttribute( \"name\" );\n servicePeriod = Integer.parseInt( globalElement.getAttribute( \"servicePeriod\" ) );\n pointType = globalElement.getAttribute( \"pointType\" );\n id = Integer.parseInt( globalElement.getAttribute( \"id\" ) );\n hasModule = Integer.parseInt( globalElement.getAttribute( \"hasModule\" ) );\n\n if (globalTableNode.getNodeName().equals( \"local\" )) {\n GlobalLocal Glocals = new GlobalLocal();\n Glocals.setDotNetNo( dotNetNo );\n Glocals.setNumber( number );\n Glocals.setName( name );\n Glocals.setServicePeriod( servicePeriod );\n Glocals.setPointType( pointType );\n Glocals.setId( id );\n Glocals.setHasModule( hasModule );\n Glocals.setDefaultValue( Double.parseDouble( globalElement.getElementsByTagName( \"defaultValue\" ).item( 0 ).getTextContent() ) );\n\n NodeList globalSubList = globalNode.getChildNodes();\n for (int globalSubNodeCnt = 0; globalSubNodeCnt < globalSubList.getLength(); globalSubNodeCnt++) {\n Node globalSubNode = globalSubList.item( globalSubNodeCnt );\n if (globalSubNode.getNodeType() == Node.ELEMENT_NODE) {\n if (globalSubNode.getNodeName().contentEquals( \"source\" )) {\n String fieldCtrlAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.source.setFieldControllerAddress( Integer.parseInt( fieldCtrlAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.source.setPointAddress( Integer.parseInt( pointAddress ) );\n\n if (((Element) globalSubNode).hasAttribute( \"ScheduleOnTimePointAddress\" )) {\n String schedOnTimePointAddress = ((Element) globalSubNode).getAttributeNode( \"ScheduleOnTimePointAddress\" ).getValue();\n Glocals.source.setScheduleOnTimePointAddress( Integer.parseInt( schedOnTimePointAddress ) );\n }\n if (((Element) globalSubNode).hasAttribute( \"ScheduleOffTimePointAddress\" )) {\n String scheduleOffTimePointAddress = ((Element) globalSubNode).getAttributeNode( \"ScheduleOffTimePointAddress\" ).getValue();\n Glocals.source.setScheduleOffTimePointAddress( Integer.parseInt( scheduleOffTimePointAddress ) );\n }\n }\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"destination\" )) {\n String fieldControllerAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.destination.setFieldControllerAddress( Integer.parseInt( fieldControllerAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.destination.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"broadcast\" )) {\n String destFieldCtrlAddress = ((Element) globalSubNode).getAttributeNode( \"destinationFieldControllers\" ).getValue();\n Glocals.broadcast.setDestinationFieldControllers( destFieldCtrlAddress );\n }\n }\n AssList.add( Glocals );\n }\n\n if (globalTableNode.getNodeName().equals( \"wideDestination\" )) {\n GlobalWideDestination Glocals = new GlobalWideDestination();\n Glocals.setDotNetNo( dotNetNo );\n Glocals.setNumber( number );\n Glocals.setName( name );\n Glocals.setServicePeriod( servicePeriod );\n Glocals.setPointType( pointType );\n Glocals.setId( id );\n Glocals.setHasModule( hasModule );\n Glocals.setDefaultValue( Double.parseDouble( globalElement.getElementsByTagName( \"defaultValue\" ).item( 0 ).getTextContent() ) );\n Glocals.setConnectionNumber( Integer.parseInt( globalElement.getElementsByTagName( \"wideConnectionNumber\" ).item( 0 ).getTextContent() ) );\n\n NodeList globalSubList = globalNode.getChildNodes();\n for (int globalSubNodeCnt = 0; globalSubNodeCnt < globalSubList.getLength(); globalSubNodeCnt++) {\n Node globalSubNode = globalSubList.item( globalSubNodeCnt );\n if (globalSubNode.getNodeType() == Node.ELEMENT_NODE) {\n\n if (globalSubNode.getNodeName().contentEquals( \"destination\" )) {\n String fieldControllerAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.destination.setFieldControllerAddress( Integer.parseInt( fieldControllerAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.destination.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"broadcast\" )) {\n String destFieldCtrlAddress = ((Element) globalSubNode).getAttributeNode( \"destinationFieldControllers\" ).getValue();\n Glocals.broadcast.setDestinationFieldControllers( destFieldCtrlAddress );\n }\n }\n }\n AssList.add( Glocals );\n }\n\n if (globalTableNode.getNodeName().equals( \"wideSource\" )) {\n GlobalWideSource Glocals = new GlobalWideSource();\n Glocals.setDotNetNo( dotNetNo );\n Glocals.setNumber( number );\n Glocals.setName( name );\n Glocals.setServicePeriod( servicePeriod );\n Glocals.setPointType( pointType );\n Glocals.setId( id );\n Glocals.setHasModule( hasModule );\n Glocals.setDefaultValue( Double.parseDouble( globalElement.getElementsByTagName( \"defaultValue\" ).item( 0 ).getTextContent() ) );\n Glocals.setConnectionNumber( Integer.parseInt( globalElement.getElementsByTagName( \"wideConnectionNumber\" ).item( 0 ).getTextContent() ) );\n\n NodeList globalSubList = globalNode.getChildNodes();\n for (int globalSubNodeCnt = 0; globalSubNodeCnt < globalSubList.getLength(); globalSubNodeCnt++) {\n Node globalSubNode = globalSubList.item( globalSubNodeCnt );\n if (globalSubNode.getNodeType() == Node.ELEMENT_NODE) {\n\n if (globalSubNode.getNodeName().contentEquals( \"source\" )) {\n String fieldControllerAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.source.setFieldControllerAddress( Integer.parseInt( fieldControllerAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.source.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n }\n }\n AssList.add( Glocals );\n }\n\n if (globalTableNode.getNodeName().equals( \"temporary\" )) {\n GlobalTemporary Glocals = new GlobalTemporary();\n Glocals.setDotNetNo( dotNetNo );\n Glocals.setNumber( number );\n Glocals.setName( name );\n Glocals.setServicePeriod( servicePeriod );\n Glocals.setPointType( pointType );\n Glocals.setId( id );\n Glocals.setHasModule( hasModule );\n Glocals.setDefaultValue( Double.parseDouble( globalElement.getElementsByTagName( \"defaultValue\" ).item( 0 ).getTextContent() ) );\n runBurstLength = Integer.parseInt( globalElement.getAttribute( \"RunBurstLength\" ) );\n Glocals.setRunBurstLength( runBurstLength);\n\n NodeList globalSubList = globalNode.getChildNodes();\n for (int globalSubNodeCnt = 0; globalSubNodeCnt < globalSubList.getLength(); globalSubNodeCnt++) {\n Node globalSubNode = globalSubList.item( globalSubNodeCnt );\n if (globalSubNode.getNodeType() == Node.ELEMENT_NODE) {\n if (globalSubNode.getNodeName().contentEquals( \"source\" )) {\n String fieldCtrlAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.source.setFieldControllerAddress( Integer.parseInt( fieldCtrlAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.source.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"destination\" )) {\n String fieldControllerAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.destination.setFieldControllerAddress( Integer.parseInt( fieldControllerAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.destination.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"default\" )) {\n Double max = Double.parseDouble(globalElement.getElementsByTagName( \"maximumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setMaxAddresses(max);\n Double min = Double.parseDouble(globalElement.getElementsByTagName( \"minimumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setMinAddresses(min);\n Double sum = Double.parseDouble(globalElement.getElementsByTagName( \"sumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setSumAddresses(sum);\n Double average = Double.parseDouble(globalElement.getElementsByTagName( \"averageValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setAverageAddresses(average);\n }\n\n }\n AssList.add( Glocals );\n }\n\n if (globalTableNode.getNodeName().equals( \"smart\" )) {\n GlobalSmart Glocals = new GlobalSmart();\n Glocals.setDotNetNo( dotNetNo );\n Glocals.setNumber( number );\n Glocals.setName( name );\n Glocals.setServicePeriod( servicePeriod );\n Glocals.setPointType( pointType );\n Glocals.setId( id );\n Glocals.setHasModule( hasModule );\n runBurstLength = Integer.parseInt( globalElement.getAttribute( \"RunBurstLength\" ) );\n Glocals.setRunBurstLength( runBurstLength);\n\n NodeList globalSubList = globalNode.getChildNodes();\n for (int globalSubNodeCnt = 0; globalSubNodeCnt < globalSubList.getLength(); globalSubNodeCnt++) {\n Node globalSubNode = globalSubList.item( globalSubNodeCnt );\n if (globalSubNode.getNodeType() == Node.ELEMENT_NODE) {\n if (globalSubNode.getNodeName().contentEquals( \"source\" )) {\n String fieldCtrlAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.source.setFieldControllerAddress( Integer.parseInt( fieldCtrlAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.source.setPointAddress( Integer.parseInt( pointAddress ) );\n }\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"destination\" )) {\n String fieldControllerAddress = ((Element) globalSubNode).getAttributeNode( \"fieldControllerAddress\" ).getValue();\n Glocals.destination.setFieldControllerAddress( Integer.parseInt( fieldControllerAddress ) );\n String pointAddress = ((Element) globalSubNode).getAttributeNode( \"pointAddress\" ).getValue();\n Glocals.destination.setPointAddress( Integer.parseInt( pointAddress ) );\n\n int max = Integer.parseInt(globalElement.getElementsByTagName( \"maximumAddress\" ).item( 0 ).getTextContent() );\n Glocals.destination.setMaxAddresses(max);\n int min = Integer.parseInt(globalElement.getElementsByTagName( \"minimumAddress\" ).item( 0 ).getTextContent() );\n Glocals.destination.setMinAddresses(min);\n int sum = Integer.parseInt(globalElement.getElementsByTagName( \"sumAddress\" ).item( 0 ).getTextContent() );\n Glocals.destination.setSumAddresses(sum);\n int average = Integer.parseInt(globalElement.getElementsByTagName( \"averageAddress\" ).item( 0 ).getTextContent() );\n Glocals.destination.setAverageAddresses(average);\n\n\n\n }\n\n if (globalSubNode.getNodeName().contentEquals( \"default\" )) {\n Double max = Double.parseDouble(globalElement.getElementsByTagName( \"maximumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setMaxAddresses(max);\n Double min = Double.parseDouble(globalElement.getElementsByTagName( \"minimumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setMinAddresses(min);\n Double sum = Double.parseDouble(globalElement.getElementsByTagName( \"sumValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setSumAddresses(sum);\n Double average = Double.parseDouble(globalElement.getElementsByTagName( \"averageValue\" ).item( 0 ).getTextContent() );\n Glocals.adefault.setAverageAddresses(average);\n }\n }\n AssList.add( Glocals );\n }\n }\n }\n }\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return AssList;\n }", "private Map<String, Object> collectGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n MethodLibrary.addBindingsToBuilder(envBuilder);\n Runtime.addConstantsToBuilder(envBuilder);\n return envBuilder.build();\n }", "public ArrayList<String> getDefinitions () throws FileNotFoundException {\n String inputFile = getInputFile();\r\n Scanner scanner = new Scanner (new File (inputFile));\r\n ArrayList<String> terms = new ArrayList<String>();\r\n ArrayList<String> definitions = new ArrayList<String>();\r\n while (scanner.hasNextLine()) {\r\n terms.add(scanner.nextLine()); //took out .toLowerCase()\r\n definitions.add(scanner.nextLine());\r\n }\r\n return definitions;\r\n }", "public List<Function> getGlobalFunctions(String name);", "protected Set<AeScriptVarDef> findVariableReferences() {\r\n AeXPathVariableNodeVisitor visitor = new AeXPathVariableNodeVisitor();\r\n getXPathAST().visitAll(visitor);\r\n return visitor.getVariableReferences();\r\n }", "public Set<Scope> getScopes();", "public int getScopeOpen(){\r\n\t\tint i = getCaretPosition();\r\n\t\tint rtn = 0;\r\n\t\tString str = \"\";\r\n\t\ttry{\r\n\t\t\tstr = doc.getText(0,i);\r\n\t\t}catch(BadLocationException a){};\r\n\t\tfor(i-=1; i>0; i--) {\r\n\t\t\tif(str.charAt(i) == '{') rtn += 1;\r\n\t\t\tif(str.charAt(i) == '}') rtn -= 1;\r\n\t\t}\r\n\t\tif(rtn <0)rtn = 0;\r\n\t\treturn rtn;\r\n\t}", "void resolveRefs(SymbolTable symbolTable)\n {\n \tEnumeration e = defs.elements();\n\twhile (e.hasMoreElements())\n\t{\n\t Definition d=(Definition) e.nextElement();\n d.resolveRefs(symbolTable); \n\t}\n }", "private FileSystem resolve(String fileName)\n {\n return fileSystems.stream().filter(fs->fs.fsName.equals(fileName)).findAny().get();\n }", "CompileScope getCompileScope();", "public String getAllBindingNamespaceDeclarations() \t \n { \t \n return BindingExpression.getNamespaceDeclarations(getAllBindingNamespaces()); \t \n }", "@NotNull\n static IncludeResolver externals() {\n return new IndexedRegularExpressionIncludeResolver(PackageType.Externals, \"^(?<home>.*)(?<relative>/(?:E|e)xternals?/(?<library>.*?)/.*)$\", null);\n }", "public IAstPreprocessorIncludeDirective findInclude(String string);", "public int IndexOf(String name) {\n\t\tValues tmp = currScope.get(name);\n\t\tif(tmp != null)\n\t\t\treturn tmp.getIndex();\n\n\t\tif(currScope != classScope) {\n\t\t\ttmp = classScope.get(name);\n\t\t\tif(tmp != null)\n\t\t\t\treturn tmp.getIndex();\n\t\t}\n\t\treturn -1;\n\t}", "static boolean topLevelDefinition(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"topLevelDefinition\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_);\n r = libraryStatement(b, l + 1);\n if (!r) r = partOfStatement(b, l + 1);\n if (!r) r = importStatement(b, l + 1);\n if (!r) r = exportStatement(b, l + 1);\n if (!r) r = partStatement(b, l + 1);\n if (!r) r = classDefinition(b, l + 1);\n if (!r) r = mixinDeclaration(b, l + 1);\n if (!r) r = enumDefinition(b, l + 1);\n if (!r) r = extensionDeclaration(b, l + 1);\n if (!r) r = functionTypeAlias(b, l + 1);\n if (!r) r = getterOrSetterDeclaration(b, l + 1);\n if (!r) r = functionDeclarationWithBodyOrNative(b, l + 1);\n if (!r) r = varDeclarationListWithSemicolon(b, l + 1);\n if (!r) r = incompleteDeclaration(b, l + 1);\n exit_section_(b, l, m, r, false, DartParser::top_level_recover);\n return r;\n }", "private int matchLevel(QualifiedNameReference qNameRef, boolean resolve) {\n if (!resolve) {\n if (this.pkgName == null) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n switch (this.matchMode) {\n case EXACT_MATCH:\n case PREFIX_MATCH:\n if (CharOperation.prefixEquals(this.pkgName, CharOperation.concatWith(qNameRef.tokens, '.'), this.isCaseSensitive)) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n case PATTERN_MATCH:\n char[] pattern = this.pkgName[this.pkgName.length-1] == '*' ? this.pkgName : CharOperation.concat(this.pkgName, \".*\".toCharArray()); //$NON-NLS-1$\n if (CharOperation.match(pattern, CharOperation.concatWith(qNameRef.tokens, '.'), this.isCaseSensitive)) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n default:\n return IMPOSSIBLE_MATCH; } }\n } else {\n Binding binding = qNameRef.binding;\n if (binding == null) {\n return INACCURATE_MATCH;\n } else {\n TypeBinding typeBinding = null;\n char[][] tokens = qNameRef.tokens;\n int lastIndex = tokens.length-1;\n switch (qNameRef.bits & AstNode.RestrictiveFlagMASK) {\n case BindingIds.FIELD : // reading a field\n typeBinding = ((FieldBinding)binding).declaringClass;\n // no valid match amongst fields\n int otherBindingsCount = qNameRef.otherBindings == null ? 0 : qNameRef.otherBindings.length; \n lastIndex -= otherBindingsCount + 1;\n if (lastIndex < 0) return IMPOSSIBLE_MATCH;\n break;\n case BindingIds.LOCAL : // reading a local variable\n return IMPOSSIBLE_MATCH; // no package match in it\n case BindingIds.TYPE : //=============only type ==============\n typeBinding = (TypeBinding)binding; }\n if (typeBinding instanceof ArrayBinding) {\n typeBinding = ((ArrayBinding)typeBinding).leafComponentType; }\n if (typeBinding == null) {\n return INACCURATE_MATCH;\n } else {\n if (typeBinding instanceof ReferenceBinding) {\n PackageBinding pkgBinding = ((ReferenceBinding)typeBinding).fPackage;\n if (pkgBinding == null) {\n return INACCURATE_MATCH;\n } else if (this.matches(pkgBinding.compoundName)) {\n return ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n } else {\n return IMPOSSIBLE_MATCH; } } } } }", "boolean isScope();", "public Symbol findEntryLocal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null || (l.get(0).level < scopeLevel))\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}", "private void checkForKeywords(String fileName, String line, int loc){\n\t\tfor(Theme t: themes){\n\t\t\tfor(Keyword k: t.getKeywords()){\n\t\t\t\tif(line.contains(k.getName()))\n\t\t\t\t\tk.addOccurrence(fileName, line, loc);\n\t\t\t}\n\t\t}\n lineCount++;\n }", "static boolean FirstDecl(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"FirstDecl\")) return false;\n if (!nextTokenIs(b, \"\", K_DECLARE, K_IMPORT)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = DefaultNamespaceDecl(b, l + 1);\n if (!r) r = Setter(b, l + 1);\n if (!r) r = NamespaceDecl(b, l + 1);\n if (!r) r = Import(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "RegSet[] defined() {\r\n RegSet[] defined = new RegSet[code.length];\r\n for (int i = 0; i < code.length; i++)\r\n\tdefined[i] = code[i].defined();\r\n // Parameters are implicitly defined at top of function\r\n for (String var : params)\r\n\tdefined[0].add(new Id(var));\r\n return defined;\r\n }", "private void connectClasses(Header [] list)\r\n {\r\n Vector queue;\r\n Vector garbage = new Vector();\r\n\r\n Find.setCrossreference(list);\r\n\r\n for(int i = 0; list != null && i < list.length; i++)\r\n {\r\n queue = list[i].scopes;\r\n\r\n for(int j = 0; j < queue.size(); j++)\r\n for(Iterator iter = ((Scope)queue.get(j)).iterator(); iter.hasNext();)\r\n {\r\n Iterator a = null;\r\n Basic x = (Basic)iter.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n ClassType y = (ClassType)x;\r\n ClassType [] z;\r\n boolean done = false;\r\n String st = null;\r\n\r\n if (y.extend != null && y.extend.name != null && y.extend.scope == null)\r\n { // look for superclass\r\n st = y.extend.name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int k = 0; k < z.length; k++)\r\n if (z[k].scope.javaPath(\"\").endsWith(st) || z[k].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.extend = z[k];\r\n garbage.add(st);\r\n done = true;\r\n }\r\n }\r\n\r\n for(int k = 0; k < y.implement.length; k++)\r\n if (y.implement[k].name != null && y.implement[k].scope == null)\r\n { // look for interface\r\n st = y.implement[k].name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n done = false;\r\n \r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int l = 0; l < z.length && !done; l++)\r\n if (z[l].scope.javaPath(\"\").endsWith(st) || z[l].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.implement[k] = z[l];\r\n garbage.add(st);\r\n done = true;\r\n break;\r\n }\r\n }\r\n\r\n a = null;\r\n while(garbage.size() > 0)\r\n {\r\n st = (String)garbage.get(0);\r\n garbage.remove(0);\r\n y.unresolved.remove(st);\r\n }\r\n }\r\n }\r\n }\r\n }", "public static List<String> checkImports(CompilationUnit cu) {\n\t\tList<String> list = new ArrayList<>();\n\t\tImportCollector ic = new ImportCollector();\n\t\tic.visit(cu, list);\n\t\treturn list;\n\t}", "public void nameAnalysis() {\n SymTable symTab = new SymTable();\n myDeclList.nameAnalysis(symTab);\n\n\t// after return, the symTable is filled\n\t// check if have a main entry\n\tSemSym s = symTab.lookupGlobal(\"main\");\n\tif(s != null && s instanceof FnSym){\n\t // it's fine\n\t}else{\n\t ErrMsg.fatal(0,0,\"No main function\");\n\t}\n\n }", "@Test\n public void testPackageFileOverviewVisibilityAppliesToNameWithoutExplicitVisibility_googModule() {\n disableRewriteClosureCode();\n testNoWarning(\n srcs(\n SourceFile.fromCode(\n Compiler.joinPathParts(\"foo\", \"bar.js\"),\n lines(\n \"/**\",\n \" * @fileoverview\",\n \" * @package\",\n \" */\",\n \"goog.module('Foo');\",\n \"/** @constructor */\",\n \"var Foo = function() {};\",\n \"exports = Foo;\")),\n SourceFile.fromCode(\n Compiler.joinPathParts(\"baz\", \"quux.js\"),\n \"goog.module('client'); const Foo = goog.require('Foo'); new Foo();\")));\n }", "private HashMap<ASTNode, NodeInfo> parseFile(String file) {\n ASTParser parser = ASTParser.newParser(AST.JLS3);\n parser.setSource(file.toCharArray());\n parser.setKind(ASTParser.K_COMPILATION_UNIT);\n final CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n ASTStatsCollector astStatsCollector = new ASTStatsCollector(cu);\n cu.accept(astStatsCollector);\n\n\n return astStatsCollector.nodeSubNodeMap;\n }", "@SuppressWarnings(\"unused\")\r\n\t\tpublic static void resolveSearchInMembersScopeForFunction(CommonScopeLookup search, Reference retType) {\n\t\t}", "protected FileObject findFile(List<String> loadPaths, String moduleName) {\n\t\tif(moduleName.startsWith(\"./\")) {\n\t\t\tmoduleName = moduleName.substring(2);\n\t\t}\n\t\tString fileName = normalizeName(moduleName);\n\t\tFileObject file = null;\n\t\tfor (String loadPath : loadPaths) {\n\t\t\t// require('foo');\n\t\t\tfor (String startPath : this.startPaths) {\n\t\t\t\ttry {\n\t\t\t\t\tString newName = startPath+loadPath+fileName;\n\t\t\t\t\tfile = fetchFile(newName);\n\t\t\t\t\tif(file != null){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t//System.out.println(\"Error getting file \"+moduleName+\": \"+ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn file;\n\t}", "public static void checkLocal(Token t) {\n int k = find(t.instanc);\n if (k == -1) {\n checkGlobal(t);\n }\n }", "@VisibleForTesting\n public ImmutableCollection<String> getDefines() {\n return ccCompilationContext.getDefines();\n }", "public List<Identifier> getLocals(Function f){\n Map<String, Integer> variableScope = localVariableScopes.get(f);\n \n List<Identifier> locals = variableScope\n .keySet()\n .stream()\n .map(x -> new Identifier(Scope.LOCAL, Type.VARIABLE, x, variableScope.get(x).toString()))\n .collect(Collectors.toList());\n\n return locals;\n }", "void addScope() {\n\t\tlist.addFirst(new HashMap<String, Sym>());\n\t}", "private SymbolTableItem resolveFromImports(String id) {\n ListIterator<Imported> i = imports.listIterator(imports.size());\n while(i.hasPrevious()) {\n Imported item = i.previous();\n if (item.fullNamesOnly == false || item.fullNamesOnly && id.startsWith(item.table.unitName)) {\n SymbolTableItem resolved = item.table.resolveImmediateOnly(id);\n if (resolved != null && \n (resolved.desc.visibility == SymbolVisibility.PUBLIC ||\n (resolved.desc.visibility == SymbolVisibility.PROTECTED &&\n item.table.parentNamespace.equals(parentNamespace))))\n return resolved;\n }\n }\n return null;\n }", "public TypeDefinition findInternalType(DefinitionName name){\n \treturn(internalTypeDefs.get(name));\n }", "public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;", "public boolean has_declaration_list();", "public List<Macrodef> parseForMacrodefs()\n {\n parseElementForMacrodefs(rootElement); // parse outside of targets - most common definition\n\n for (Iterator targetsIterator = rootElement.getDescendants(new ElementFilter(\"target\")); targetsIterator.hasNext();)\n {\n Element targetElement = (Element) targetsIterator.next();\n\n parseElementForMacrodefs(targetElement); // parse inside of targets (such as \"init\"\n }\n\n return localMacrodefs;\n }", "@Override\n\tpublic void check(Block curScope, Library lib) {\n\t\tSystem.out.println(\"program\"+curScope);\n\t\t\n\t\t/*curScope.addDecl(name,this);\n\t\tPascalDecl d = curScope.findDecl(name,this);*/\n\t\t\n\t\tif(progBlock != null) progBlock.check(curScope,lib);\n\t\t\n\t\t\n\t}", "@Override\n\tpublic Symbol resolve(String name) {\n\t\tSymbol s = symbols.get(name);\n\t\tif (s != null)\n\t\t\treturn s;\n\t\t\n\t\t// otherwise look in the enclosing scope, if there is one\n\t\tScope sc = enclosingScope;\n\t\twhile (sc != null) {\n\t\t\tSymbol sym = enclosingScope.resolve(name);\n\t\t\tif (sym != null) {\n\t\t\t\treturn sym;\n\t\t\t}\n\t\t\tsc = sc.getEnclosingScope();\n\t\t}\n\t\t// otherwise it doesn't exist\n\t\treturn null;\n\t}", "static String extractScope(final String stackFrame) {\n int startIndex = getStartIndex(stackFrame);\n final int dotIndex = Math.max(startIndex, stackFrame.indexOf('.', startIndex + 1));\n int lparIndex = stackFrame.indexOf('(', dotIndex);\n final String clsMethodText = stackFrame.substring(dotIndex + 1, lparIndex != -1 ? lparIndex : stackFrame.length());\n int methodStart = clsMethodText.indexOf('/');\n\n return methodStart == -1 ? clsMethodText : clsMethodText.substring(methodStart + 1) + \": \" + clsMethodText.substring(0, methodStart);\n }", "public abstract List<String> scanAllClassNames();", "Map<String, Defines> getDefinesMap();", "PsiElement[] findCommentsContainingIdentifier( String identifier, SearchScope searchScope);", "private void inspect() {\n\t\tFileHandler handler = new FileHandler();\n\t\tIContainer container = handler.findOrCreateContainer(packageBase);\n\t\tIResource[] members = null;\n\t\ttry {\n\t\t\tmembers = container.members();\n\t\t} catch (CoreException e) {\n\t\t\tSystem.out.println(\"Could not access members of the container \"\n\t\t\t\t\t+ container.getFullPath() + \".\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttraverseSourceFiles(members);\n\t}", "public Enumeration getResourceLocations( String name );", "public interface Scope {\n\t\n\tpublic static final String PHOTO = \"photo\";\n\tpublic static final String MESSAGE = \"message\";\n\tpublic static final String FRIENDS = \"friends\";\n\tpublic static final String ACCOUNT = \"account\";\n\tpublic static final String NOTIFICATION = \"notification\";\n\tpublic static final String APPLICATION = \"application\";\n\tpublic static final String STREAM = \"stream\";\n\tpublic static final String PERSON_INFO = \"person_info\";\n\t\n\t\n}", "@Test\n public void testPackagePrivateAccessForNames_googModule() {\n disableRewriteClosureCode();\n testNoWarning(\n srcs(\n SourceFile.fromCode(\n Compiler.joinPathParts(\"foo\", \"bar.js\"),\n lines(\n \"goog.module('Foo');\",\n \"/** @package */\",\n \"var name = 'foo';\",\n \"exports = name;\")),\n SourceFile.fromCode(\n Compiler.joinPathParts(\"baz\", \"quux.js\"),\n \"goog.module('client'); const name = goog.require('Foo'); name;\")));\n }", "@Override\n public Set<String> getScopes() {\n return scopes;\n }", "@Override\n public Set<String> getScopes() {\n return scopes;\n }", "private String importDeclaration()\r\n {\r\n String handle;\r\n\r\n matchKeyword(Keyword.IMPORTSY);\r\n handle = nextToken.string;\r\n matchKeyword(Keyword.IDENTSY);\r\n handle = qualifiedImport(handle);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n\r\n return handle;\r\n }", "public static Set<String> onlyImports(final String type) {\n\n\t\tfinal Set<String> imports = new HashSet<String>();\n\t\tfinal Matcher matcher = NameUtils.IMPORT_STATEMENT_PATTERN.matcher(type);\n\n\t\twhile (matcher.find()) {\n\t\t\timports.add(matcher.group());\n\t\t}\n\t\treturn imports;\n\t}", "public static Set<Symbol> getGlobalSymbols(Traversable t) {\n while (true) {\n if (t instanceof TranslationUnit) {\n break;\n }\n t = t.getParent();\n }\n TranslationUnit t_unit = (TranslationUnit)t;\n return getVariableSymbols(t_unit);\n }", "private void parseHRefs (URL page, String name, URL base) throws IOException {\n Reader r = source.getReader (page);\n URL[] refs = ParseURLs.parse (r, page);\n \n String b = base.toExternalForm();\n for (int i = 0; i < refs.length; i++) {\n String e = refs[i].toExternalForm ();\n int hash = e.indexOf ('#');\n if (hash >= 0) {\n e = e.substring (0, hash);\n }\n if (e.startsWith (b)) {\n String s = e.substring (b.length ());\n Collection c = (Collection)deps.get (name);\n if (c == null) {\n c = new ArrayList ();\n deps.put (name, c);\n }\n c.add (s.intern ());\n }\n }\n r.close (); \n }", "private static void getRulesFromFile() {\n File ruleFolder = new File(\"rules\");\n List<String> packageManagersWithRules = Stream.of(ruleFolder.list())\n .filter(f -> f.endsWith(\".rules\"))\n .map(f -> f.substring(0,f.lastIndexOf('.')))\n .sorted()\n .collect(Collectors.toList());\n\n RULES_BY_PACKAGE = new HashMap<>();\n for (String packagemanager : packageManagersWithRules) {\n RULES_BY_PACKAGE.put(packagemanager, parseRules(ruleFolder, packagemanager));\n }\n\n }", "public LinkedHashMap<String, LinkedHashSet<String>> gatherProfilingConditions(String url, Set<String> definedAttributesNames)\n\t\t\tthrows ParserConfigurationException, SAXException, IOException {\n\t\t\n\t\t\tParserCreator parserCreator = new OxygenParserCreator();\n\t\t\t\n\t\t\tProfileDocsFinderHandler userhandler = new ProfileDocsFinderHandler(definedAttributesNames);\n\n\t\t\tInputSource is = new InputSource(url);\n\t\t\t\n\t\t\tXMLReader xmlReader = parserCreator.createXMLReader();\n\t\t\t\n\t\t\txmlReader.setContentHandler(userhandler);\n\t\t\txmlReader.parse(is);\n\t\t\t\n\t\t\treturn userhandler.getProfilingMap();\n\t}", "private boolean findClassInComponents(String name) {\n // we need to search the components of the path to see if we can find the\n // class we want.\n final String classname = name.replace('.', '/') + \".class\";\n final String[] list = classpath.list();\n boolean found = false;\n int i = 0;\n while (i < list.length && found == false) {\n final File pathComponent = (File)project.resolveFile(list[i]);\n found = this.contains(pathComponent, classname);\n i++;\n }\n return found;\n }", "private static boolean isLocalVariableForFunction(String scopedVarName, String function) {\n return scopedVarName.startsWith(function + \"::\");\n }", "TopLevelDecl getTopLevelDecl();", "private boolean isScopeIncluded(Artifact artifact) {\n\t\tboolean include = false;\n\t\tfor (String scope:scopes)\n\t\t{\n\t\t\t//If the artifact matches the root project it should always be included (scope is not relevant)\n\t\t\tif (rootProject != null && rootProject.getGroupId().equals(artifact.getGroupId()) && rootProject.getArtifactId().equals(artifact.getArtifactId()))\n\t\t\t{\n\t\t\t\tinclude = true;\n\t\t\t}\n\t\t\telse if (artifact.getScope() == null && scope.equals(\"compile\"))\n\t\t\t{\n\t\t\t\tinclude = true;\n\t\t\t}\n\t\t\telse if (artifact.getScope() != null && artifact.getScope().equals(scope))\n\t\t\t{\n\t\t\t\tinclude = true;\n\t\t\t}\n\t\t}\n\t\treturn include;\n\t}", "public List<ThingAtPoint> getLocals(IFile file,Location location){\r\n \t\tString path=file.getProjectRelativePath().toOSString();\r\n \t\tLinkedList<String> command=new LinkedList<String>();\r\n \t\tcommand.add(\"locals\");\r\n \t\tcommand.add(\"--file=\"+path);\r\n \t\tcommand.add(\"--sline=\"+location.getStartLine());\r\n \t\tcommand.add(\"--scolumn=\"+(location.getStartColumn()+1));\r\n \t\tcommand.add(\"--eline=\"+location.getEndLine());\r\n \t\tcommand.add(\"--ecolumn=\"+(location.getEndColumn()+1));\r\n \t\taddEditorStanza(file,command);\r\n \t\tJSONArray arr=run(command,ARRAY);\r\n \t\tList<ThingAtPoint> taps=new ArrayList<ThingAtPoint>();\r\n \t\tif (arr!=null){\r\n \t\t\tif (arr.length()>1){\r\n \t\t\t\tJSONArray notes=arr.optJSONArray(1);\r\n \t\t\t//\tnotes.putAll(i.getNotes());\r\n \t\t\t\tparseNotes(notes);\r\n \t\t\t}\r\n \t\t\tJSONArray locs=arr.optJSONArray(0);\r\n \t\t\tif (locs!=null){\r\n \t\t\t\tfor (int a=0;a<locs.length();a++){\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tJSONObject o=locs.getJSONObject(a);\r\n \t\t\t\t\t\ttaps.add(new ThingAtPoint(o));\r\n \t\t\t\t\t} catch (JSONException je){\r\n \t\t\t\t\t\tBuildWrapperPlugin.logError(BWText.process_parse_thingatpoint_error, je);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn taps;\r\n \t}", "Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }", "@Override\n public NestedSet<Artifact> getDeclaredIncludeSrcs() {\n return ccCompilationContext.getDeclaredIncludeSrcs();\n }" ]
[ "0.57710063", "0.57437533", "0.5698861", "0.54617107", "0.5279234", "0.5191475", "0.51206183", "0.5098433", "0.5069624", "0.50564003", "0.50388515", "0.5027518", "0.50200915", "0.5001661", "0.49975646", "0.4989435", "0.49849096", "0.49796516", "0.49668115", "0.4936563", "0.49223712", "0.49045315", "0.48873344", "0.48731232", "0.48520607", "0.48111406", "0.48105383", "0.4808018", "0.47983855", "0.4794483", "0.47909263", "0.47609374", "0.4743345", "0.47393885", "0.47392306", "0.47387946", "0.46898025", "0.4689026", "0.46836144", "0.46752125", "0.4666224", "0.46363872", "0.46224", "0.46211603", "0.4619855", "0.46110195", "0.4610151", "0.4607018", "0.4606141", "0.4586465", "0.45850933", "0.45816278", "0.45713413", "0.4563818", "0.45511436", "0.45352256", "0.4530503", "0.4526231", "0.4525747", "0.4515189", "0.45058927", "0.44912687", "0.44874272", "0.44761816", "0.4471515", "0.4468647", "0.44628564", "0.4447675", "0.44412094", "0.4435255", "0.44248977", "0.4419303", "0.44162282", "0.4415974", "0.44112304", "0.4409072", "0.44090533", "0.4406551", "0.44034666", "0.43985242", "0.4392493", "0.4386833", "0.43814772", "0.43780658", "0.43765315", "0.43752187", "0.43752187", "0.4371974", "0.43660077", "0.4360684", "0.4359784", "0.43585068", "0.43572056", "0.43558237", "0.43538532", "0.43488646", "0.4338061", "0.43373328", "0.43372357", "0.43360558" ]
0.48757392
23
Tells whether a named node is a definition node based on its context. Precondition: Element is in a Haskell file.
public static boolean definitionNode(@NotNull PsiNamedElement e) { if (e instanceof HaskellVarid) return definitionNode((HaskellVarid)e); if (e instanceof HaskellConid) return definitionNode((HaskellConid)e); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean definitionNode(@NotNull ASTNode node) {\n final PsiElement element = node.getPsi();\n return element instanceof PsiNamedElement && definitionNode((PsiNamedElement)element);\n }", "boolean hasDef();", "public boolean isElementDefinition()\n {\n return elementDefinition;\n }", "public boolean isElementDefinition()\n {\n return elementDefinition;\n }", "boolean hasNode();", "boolean hasNode();", "private boolean isDeclaration() throws IOException\n\t{\t\n\t\treturn isGlobalDeclaration();\n\t}", "boolean hasIsNodeOf();", "public boolean isDocTypeDeclaration() {\r\n\t\treturn name==Tag.DOCTYPE_DECLARATION;\r\n\t}", "public boolean hasName() {\n return typeDeclaration.hasName();\n }", "public static boolean declarationType(FileInputStream f){\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", true);\n }\n CToken t = new CToken();\n\n //DataType\n if(!dataType(f)){\n return false;\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", true);\n }\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n //Identifier\n if (!t.type.equals(\"Identifier\")) {\n System.err.format(\"Syntax Error: In rule DeclarationType unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", false);\n }\n return true;\n }", "public boolean has_declaration_list();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "public Boolean isRootNode();", "ElementDefinition createElementDefinition();", "public boolean hasEmbeddedNodeDeclaration() {\r\n\t\t\treturn true;\r\n\t\t}", "public boolean hasEmbeddedNodeDeclaration() {\r\n\t\t\treturn false;\r\n\t\t}", "public static void findDefinitionNode(@Nullable HaskellFile file, @Nullable String name, @Nullable PsiNamedElement e, @NotNull List<PsiNamedElement> result) {\n if (file == null) return;\n // We only want to look for classes that match the element we are resolving (e.g. varid, conid, etc.)\n final Class<? extends PsiNamedElement> elementClass;\n if (e instanceof HaskellVarid) {\n elementClass = HaskellVarid.class;\n } else if (e instanceof HaskellConid) {\n elementClass = HaskellConid.class;\n } else {\n elementClass = PsiNamedElement.class;\n }\n Collection<PsiNamedElement> namedElements = PsiTreeUtil.findChildrenOfType(file, elementClass);\n for (PsiNamedElement namedElement : namedElements) {\n if ((name == null || name.equals(namedElement.getName())) && definitionNode(namedElement)) {\n result.add(namedElement);\n }\n }\n }", "public boolean contains(String name) {\n return !isDocumentFile() && hasChild(name);\n }", "public static boolean functionDefinition(FileInputStream f) {\n if(observer != null){\n observer.parser.setCurrentRule(\"functionDefinition\", true);\n }\n CToken t = new CToken();\n\n\n if (!declarationType(f)) {\n return false;\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"functionDefinition\", true);\n }\n t = CScanner.peekNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n \n if (!parameterBlock(f)) {\n System.err.format(\"Syntax Error: In rule FunctionDefinition unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"functionDefinition\", true);\n }\n t = CScanner.peekNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n if (!block(f)) {\n System.err.format(\"Syntax Error: In rule FunctionDefinition unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"functionDefinition\", true);\n }\n return true;\n }", "public TypeDefinition isType(String name){\n return((TypeDefinition)typeDefs.get(getDefName(name)));\n }", "boolean hasElement();", "public boolean isXMLDeclaration() {\r\n\t\treturn name==Tag.XML_DECLARATION;\r\n\t}", "public boolean hasElement(String name) {\n return elements.has(name);\n }", "public boolean isDefined(AttributeDefinition attribute) \n throws UnknownAttributeException\n {\n if(builtinAttributes.containsKey(attribute.getName()))\n {\n if(attribute.getName().equals(\"parent\"))\n {\n return parent != null;\n }\n else\n {\n return true;\n }\n }\n else\n {\n throw new UnknownAttributeException(\"not a builtin attribute: '\"+\n attribute.getName()+\"'\");\n }\n }", "public boolean isRealNode();", "public boolean isRealNode();", "protected void definitionStarted(String definitionName) {\n\t\tTypeDefinition definition = graphLayout\n\t\t\t\t.getTypeDefinition(definitionName);\n\t\tcurrentDefinition = definition;\n\t\tif (definition == null && isElementDefinition(definitionName)) {\n\t\t\tcurrentDefinition = new ElementDefinition(definitionName);\n\t\t\tgraphLayout.add(definition);\n\t\t}\n\t}", "boolean hasDataName();", "static boolean topLevelDefinition(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"topLevelDefinition\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_);\n r = libraryStatement(b, l + 1);\n if (!r) r = partOfStatement(b, l + 1);\n if (!r) r = importStatement(b, l + 1);\n if (!r) r = exportStatement(b, l + 1);\n if (!r) r = partStatement(b, l + 1);\n if (!r) r = classDefinition(b, l + 1);\n if (!r) r = mixinDeclaration(b, l + 1);\n if (!r) r = enumDefinition(b, l + 1);\n if (!r) r = extensionDeclaration(b, l + 1);\n if (!r) r = functionTypeAlias(b, l + 1);\n if (!r) r = getterOrSetterDeclaration(b, l + 1);\n if (!r) r = functionDeclarationWithBodyOrNative(b, l + 1);\n if (!r) r = varDeclarationListWithSemicolon(b, l + 1);\n if (!r) r = incompleteDeclaration(b, l + 1);\n exit_section_(b, l, m, r, false, DartParser::top_level_recover);\n return r;\n }", "String getDefinition();", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/include/clang/AST/DeclTemplate.h\", line = 2806,\n FQN=\"clang::VarTemplateDecl::isThisDeclarationADefinition\", NM=\"_ZNK5clang15VarTemplateDecl28isThisDeclarationADefinitionEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/AST/DeclTemplate.cpp -nm=_ZNK5clang15VarTemplateDecl28isThisDeclarationADefinitionEv\")\n //</editor-fold>\n public boolean isThisDeclarationADefinition() /*const*/ {\n return (getTemplatedDecl().isThisDeclarationADefinition().getValue() != 0);\n }", "protected Definition checkDefinedOnlyOnce(){\n Definition result = null;\n List<Name> names = new ArrayList<Name>();\n \n for( Definition definition : definitions ){\n if( !definition.typedef ){\n Field field = definition.getField();\n if( field != null ){\n FieldModelNode node = field.asNode();\n if( node != null ){\n if( node.getTags().contains( Tag.USES ) || node.getTags().contains( Tag.PROVIDES )){\n \tName name = node.getName();\n \tif( name != null ){\n \t\tnames.add( name );\n \t}\n result = definition;\n }\n }\n }\n }\n }\n \n if( names.size() > 1 ){\n error( \"multiple definitions of command/event '\" + name + \"'\", names );\n return null;\n }\n \n return result;\n }", "public String getDefinitionName() {\n return null;\n }", "public final boolean isDeclared(String id)\n {\n return declarations.containsKey(id);\n }", "public boolean isChildOf(Xcode opcode) {\n Xnode crt = this;\n while(crt != null) {\n if(crt.ancestor().opcode() == opcode) {\n return true;\n }\n // Stop searching when FfunctionDefinition is reached\n if(crt.ancestor().opcode() == Xcode.F_FUNCTION_DEFINITION) {\n return false;\n }\n crt = crt.ancestor();\n }\n return false;\n }", "public boolean isDefaultElement();", "protected boolean Exists()\n\t{\n\t\tif (identity<1) return false;\n\t\tNodeReference nodeReference = getNodeReference();\n\t\treturn (nodeReference.exists() || nodeReference.hasSubnodes());\n\t}", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "private boolean isName() throws IOException\n\t{\n\t\tboolean isValid = false;\n\t\t\n\t\tif(theNextToken.TokenType == TokenType.LEFT_BRACKET)\n\t\t{\n\t\t\tupdateToken();\n\t\t\tupdateToken();\n\t\t\tif(isExpression())\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tif(theCurrentToken.TokenType == TokenType.RIGHT_BRACKET)\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(theCurrentToken.TokenType == TokenType.IDENTITY)\n\t\t{\n\t\t\tisValid = true;\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}", "static boolean declaredIdentifier(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"declaredIdentifier\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = declaredIdentifier_0(b, l + 1);\n r = r && declaredIdentifier_1(b, l + 1);\n r = r && finalConstVarOrTypeAndComponentName(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "abstract boolean hasXMLProperty(XMLName name);", "protected void checkIsFunctionType(){\n List<Name> names = new ArrayList<Name>();\n for( Definition definition : definitions ){\n if( !definition.typedef ){\n Field field = definition.getField();\n if( field != null ){\n FieldModelNode node = field.asNode();\n if( node != null && (node.getTags().contains( Tag.USES ) || node.getTags().contains( Tag.PROVIDES ))){\n\n Type type = definition.type();\n if( type == null || type.asFunctionType() == null ){\n names.add( definition.getName() );\n }\n }\n }\n }\n }\n \n if( names.size() > 0 ){\n error( \"'\" + name + \"' must have a function type\", names );\n }\n }", "IFMLNamedElement createIFMLNamedElement();", "public boolean hasChild(String name) {\n return peekObject().getFieldNames().contains(name);\n }", "private boolean isGlobalDeclaration() throws IOException\n\t{\n\t\tboolean isGlobal = false;\n\t\t\n\t\tif(theCurrentToken.TokenType == TokenType.GLOBAL)\n\t\t{\n\t\t\tisGlobal = true;\n\t\t\tupdateToken();\n\t\t\tSystem.out.println(\"Global!\");\n\t\t}\n\t\t\n\t\t// Determine declaration type.\n\t\tif(isProcedureDeclaration(isGlobal))\n\t\t\treturn true;\n\t\telse if(isVariableDeclaration(isGlobal))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public final boolean isSimpleName() {\n return (_names.length == 1);\n }", "public SchemaDefinition isSchema(String name){\n return((SchemaDefinition)schemaDefs.get(getDefName(name)));\n }", "Rule DefinitionType() {\n // No direct effect on value stack\n return FirstOf(BaseType(), ContainerType());\n }", "public static Element exists( String name, SerializationPosition state) {\n NodeList elementsByTagName = SiteMapGenerator.doc.getElementsByTagName(\"directory\");\n for(int i=0;i<elementsByTagName.getLength();i++){\n \n org.w3c.dom.Node item = elementsByTagName.item(i);\n String toString = item.toString();\n \n NamedNodeMap attributes = item.getAttributes();\n org.w3c.dom.Node namedItem = attributes.getNamedItem(\"name\");\n String nodeValue = namedItem.getNodeValue();\n ////System.out.println(\"nname: \"+nodeValue);\n if(nodeValue.equalsIgnoreCase(state.currPos.toString())){\n return serialize(state);\n //return (Element)item;\n }\n }\n return null;\n \n }", "boolean hasAstRoot();", "public String getDefinition() {\n\t\treturn null;\n\t}", "public static boolean VariableDefinition(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"VariableDefinition\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, VARIABLE_DEFINITION, \"<variable definition>\");\n r = Type(b, l + 1);\n r = r && consumeToken(b, IDENTIFIER);\n r = r && VariableDefinition_2(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "public final boolean ecmaHas(Context cx, Object id)\n {\n if (cx == null) cx = Context.getCurrentContext();\n XMLName xmlName = lib.toXMLNameOrIndex(cx, id);\n if (xmlName == null) {\n long index = ScriptRuntime.lastUint32Result(cx);\n // XXX Fix this cast\n return has((int)index, this);\n }\n return hasXMLProperty(xmlName);\n }", "boolean hasIdentifier();", "@Override\r\n public boolean isDescendent(final FileName descendent, final NameScope scope) {\r\n if (!descendent.getRootURI().equals(getRootURI())) {\r\n return false;\r\n }\r\n return checkName(getPath(), descendent.getPath(), scope);\r\n }", "boolean hasHasNodeID();", "public boolean isDeclared(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: org.xml.sax.ext.Attributes2Impl.isDeclared(java.lang.String):boolean, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.xml.sax.ext.Attributes2Impl.isDeclared(java.lang.String):boolean\");\n }", "public boolean isDeclared(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: org.xml.sax.ext.Attributes2Impl.isDeclared(int):boolean, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.xml.sax.ext.Attributes2Impl.isDeclared(int):boolean\");\n }", "private boolean isInnerType(IModelElement element) {\n \n \t\tif (element != null && element.getElementType() == IModelElement.TYPE) {\n \n \t\t\tIModelElement parent = element.getParent();\n \t\t\tif (parent != null) {\n \t\t\t\tint parentElementType = parent.getElementType();\n \t\t\t\treturn (parentElementType != IModelElement.SOURCE_MODULE);\n \t\t\t}\n \t\t}\n \n \t\treturn false;\n \t}", "public boolean isExtensionElement();", "private boolean contains(String name, AssassinNode current) {\n while (current != null) {\n if (current.name.equalsIgnoreCase(name)) {\n return true;\n } else {\n current = current.next;\n }\n }\n return false;\n }", "@Override\n public Ast visitFunction_definition(napParser.Function_definitionContext ctx) {\n String name = ctx.Identifier().getText();\n List<Pair<Pair<String, Type>, Boolean>> arguments = new LinkedList<>();\n for(napParser.ParameterContext arg : ctx.parameters().parameter()){\n String argName = arg.Identifier().getText();\n Type argType = (Type) arg.type().accept(this);\n boolean passByRef = arg.getChildCount() == 3;\n arguments.add(new Pair<>(new Pair<>(argName, argType), passByRef));\n }\n Block block = (Block) visit(ctx.block());\n if (ctx.returnType == null)\n return new FunctionDefinition(position(ctx), name, arguments, block);\n else {\n Type returnType = (Type) visit(ctx.returnType);\n return new FunctionDefinition(position(ctx), name, arguments, block, returnType);\n }\n }", "private void definitionCheck() throws SystemException {\r\n\t\t\r\n\t\t// Has it been declared?\r\n\t\tif (cachedDefinition == null) {\r\n\t\t\t\r\n\t\t\t// Try to get an instance.\r\n\t\t\tif (mYCommandRegistry.has(this.named())) {\r\n\t\t\t\t\r\n\t\t\t\t// It's defined. Use it.\r\n\t\t\t\tcachedDefinition = mYCommandRegistry.get(this.named());\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t// It's not defined. Declare it. Any problem here is a fault.\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.declare();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tthrow new SystemException(\"Instance fault; could not define.\", SystemException.SYSTEM_COMMAND_FAULT_CANNOT_DEFINE, e, SystemNamespace.ATTR_SYSTEM_COMMAND_NAME, this.named());\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} // end if\r\n\t\t\t\r\n\t\t} // end if definition\t\r\n\t}", "public boolean isElementAxis(int axis) {\n\treturn (axis == Axis.CHILD || axis == Axis.ATTRIBUTE ||\n\t\taxis == Axis.NAMESPACE || axis == Axis.DESCENDANT);\n }", "public boolean declAlreadyDeclared(String str) {\r\n Vector vector = this.m_prefixMappings;\r\n int size = vector.size();\r\n for (int peek = this.m_contextIndexes.peek(); peek < size; peek += 2) {\r\n String str2 = (String) vector.elementAt(peek);\r\n if (str2 != null && str2.equals(str)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "@NotNull\n public static List<PsiNamedElement> findDefinitionNode(@NotNull Project project, @Nullable String name, @Nullable PsiNamedElement e) {\n // Guess where the name could be defined by lookup up potential modules.\n final Set<String> potentialModules =\n e == null ? Collections.EMPTY_SET\n : getPotentialDefinitionModuleNames(e, HaskellPsiUtil.parseImports(e.getContainingFile()));\n List<PsiNamedElement> result = ContainerUtil.newArrayList();\n final String qPrefix = e == null ? null : getQualifiedPrefix(e);\n final PsiFile psiFile = e == null ? null : e.getContainingFile().getOriginalFile();\n if (psiFile instanceof HaskellFile) {\n findDefinitionNode((HaskellFile)psiFile, name, e, result);\n }\n for (String potentialModule : potentialModules) {\n List<HaskellFile> files = HaskellModuleIndex.getFilesByModuleName(project, potentialModule, GlobalSearchScope.allScope(project));\n for (HaskellFile f : files) {\n final boolean returnAllReferences = name == null;\n final boolean inLocalModule = f != null && qPrefix == null && f.equals(psiFile);\n final boolean inImportedModule = f != null && potentialModules.contains(f.getModuleName());\n if (returnAllReferences || inLocalModule || inImportedModule) {\n findDefinitionNode(f, name, e, result);\n }\n }\n }\n return result;\n }", "public boolean containsElement(String elementName) {\r\n for (int i = 0; i < eventFields.size(); i++) {\r\n EventDataEntry currentEntry = eventFields.get(i);\r\n if (currentEntry.getColumnName().equalsIgnoreCase(elementName)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "boolean hasHeading();", "boolean hasHeading();", "boolean hasHeading();", "private static boolean isElementNode(Node node) {\n return node.getNodeType() == Node.ELEMENT_NODE;\n }", "private boolean isLocalDeclaration() {\n return currentFile;\n }", "boolean hasNodeId();", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public abstract String getDefinition();" ]
[ "0.78306264", "0.6809478", "0.65953594", "0.65953594", "0.5948981", "0.5948981", "0.59395176", "0.58700913", "0.570417", "0.57022923", "0.5646378", "0.56395084", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5609457", "0.5606991", "0.5603422", "0.5574477", "0.5514118", "0.5509628", "0.547021", "0.5463632", "0.5437867", "0.54262316", "0.5367408", "0.5366909", "0.5365299", "0.5354658", "0.5354658", "0.5337126", "0.5332382", "0.53302354", "0.53240156", "0.53091234", "0.52815896", "0.524797", "0.52325445", "0.5214203", "0.5207208", "0.5204225", "0.51944005", "0.51944005", "0.5191415", "0.51909834", "0.51865214", "0.5180805", "0.5180453", "0.5180126", "0.5163774", "0.5162121", "0.51490736", "0.51434886", "0.51360095", "0.51324326", "0.51249987", "0.5121096", "0.5111626", "0.50936925", "0.5092746", "0.50838935", "0.5082549", "0.5081294", "0.5078691", "0.5074401", "0.5069306", "0.5059133", "0.5046165", "0.50403446", "0.5036384", "0.50334805", "0.5032971", "0.5024339", "0.5024339", "0.5024339", "0.49952918", "0.49902597", "0.4971875", "0.49654484", "0.49654484", "0.49610633" ]
0.7673047
1
Tells whether a node is a definition node based on its context.
public static boolean definitionNode(@NotNull ASTNode node) { final PsiElement element = node.getPsi(); return element instanceof PsiNamedElement && definitionNode((PsiNamedElement)element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean definitionNode(@NotNull PsiNamedElement e) {\n if (e instanceof HaskellVarid) return definitionNode((HaskellVarid)e);\n if (e instanceof HaskellConid) return definitionNode((HaskellConid)e);\n return false;\n }", "boolean hasDef();", "boolean hasIsNodeOf();", "boolean hasNode();", "boolean hasNode();", "public boolean isElementDefinition()\n {\n return elementDefinition;\n }", "public boolean isElementDefinition()\n {\n return elementDefinition;\n }", "public boolean isRealNode();", "public boolean isRealNode();", "public Boolean isRootNode();", "public boolean isLeafContextNode();", "public boolean isDocTypeDeclaration() {\r\n\t\treturn name==Tag.DOCTYPE_DECLARATION;\r\n\t}", "private boolean isDeclaration() throws IOException\n\t{\t\n\t\treturn isGlobalDeclaration();\n\t}", "public boolean containsContextNodes();", "public boolean hasEmbeddedNodeDeclaration() {\r\n\t\t\treturn true;\r\n\t\t}", "public boolean isRootContextNode();", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "boolean hasHasNodeID();", "public boolean hasEmbeddedNodeDeclaration() {\r\n\t\t\treturn false;\r\n\t\t}", "boolean hasAstRoot();", "boolean hasNodeId();", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public boolean has_declaration_list();", "boolean hasDocumentType();", "boolean hasHasNodeSettings();", "public boolean isChildOf(Xcode opcode) {\n Xnode crt = this;\n while(crt != null) {\n if(crt.ancestor().opcode() == opcode) {\n return true;\n }\n // Stop searching when FfunctionDefinition is reached\n if(crt.ancestor().opcode() == Xcode.F_FUNCTION_DEFINITION) {\n return false;\n }\n crt = crt.ancestor();\n }\n return false;\n }", "protected boolean Exists()\n\t{\n\t\tif (identity<1) return false;\n\t\tNodeReference nodeReference = getNodeReference();\n\t\treturn (nodeReference.exists() || nodeReference.hasSubnodes());\n\t}", "Rule DefinitionType() {\n // No direct effect on value stack\n return FirstOf(BaseType(), ContainerType());\n }", "public boolean isConcreteSyntax (Node node);", "boolean hasIsBoundaryNodeOf();", "public boolean isNode() {\n return (kids != null);\n }", "public static boolean declarationType(FileInputStream f){\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", true);\n }\n CToken t = new CToken();\n\n //DataType\n if(!dataType(f)){\n return false;\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", true);\n }\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n //Identifier\n if (!t.type.equals(\"Identifier\")) {\n System.err.format(\"Syntax Error: In rule DeclarationType unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", false);\n }\n return true;\n }", "public boolean hasName() {\n return typeDeclaration.hasName();\n }", "public boolean hasDefenseObject(){\n\t\treturn hasDefenseObject;\n\t}", "protected void checkIsFunctionType(){\n List<Name> names = new ArrayList<Name>();\n for( Definition definition : definitions ){\n if( !definition.typedef ){\n Field field = definition.getField();\n if( field != null ){\n FieldModelNode node = field.asNode();\n if( node != null && (node.getTags().contains( Tag.USES ) || node.getTags().contains( Tag.PROVIDES ))){\n\n Type type = definition.type();\n if( type == null || type.asFunctionType() == null ){\n names.add( definition.getName() );\n }\n }\n }\n }\n }\n \n if( names.size() > 0 ){\n error( \"'\" + name + \"' must have a function type\", names );\n }\n }", "public boolean isRealNode() {\n\t\t\tif (this.getHeight() != -1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public boolean isXMLDeclaration() {\r\n\t\treturn name==Tag.XML_DECLARATION;\r\n\t}", "protected final boolean isRootNode() {\n return isRootNode;\n }", "boolean isDml();", "boolean hasChildNodes();", "boolean hasContext();", "boolean hasContext();", "boolean hasBody();", "boolean hasBody();", "boolean hasBody();", "public SchemaDefinition isSchema(String name){\n return((SchemaDefinition)schemaDefs.get(getDefName(name)));\n }", "public TypeDefinition isType(String name){\n return((TypeDefinition)typeDefs.get(getDefName(name)));\n }", "public boolean exists() {\n Entity e = root;\n if (e == null) {\n if (parent != null) {\n e = parent.get(ContentType.EntityType, null);\n }\n }\n if (e == null) {\n return false;\n }\n \n if (isIndexSelector()) {\n return e instanceof EntityList;\n }\n \n if (e.getEntity().getEntityType().isDynamic()) {\n return true;\n }\n Property prop = property;\n if (prop == null) {\n prop = e.getEntity().getEntityType().findProperty(tags);\n }\n return prop != null;\n }", "public static boolean functionDefinition(FileInputStream f) {\n if(observer != null){\n observer.parser.setCurrentRule(\"functionDefinition\", true);\n }\n CToken t = new CToken();\n\n\n if (!declarationType(f)) {\n return false;\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"functionDefinition\", true);\n }\n t = CScanner.peekNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n \n if (!parameterBlock(f)) {\n System.err.format(\"Syntax Error: In rule FunctionDefinition unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"functionDefinition\", true);\n }\n t = CScanner.peekNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n if (!block(f)) {\n System.err.format(\"Syntax Error: In rule FunctionDefinition unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"functionDefinition\", true);\n }\n return true;\n }", "public boolean isChild();", "private void definitionCheck() throws SystemException {\r\n\t\t\r\n\t\t// Has it been declared?\r\n\t\tif (cachedDefinition == null) {\r\n\t\t\t\r\n\t\t\t// Try to get an instance.\r\n\t\t\tif (mYCommandRegistry.has(this.named())) {\r\n\t\t\t\t\r\n\t\t\t\t// It's defined. Use it.\r\n\t\t\t\tcachedDefinition = mYCommandRegistry.get(this.named());\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t// It's not defined. Declare it. Any problem here is a fault.\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.declare();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tthrow new SystemException(\"Instance fault; could not define.\", SystemException.SYSTEM_COMMAND_FAULT_CANNOT_DEFINE, e, SystemNamespace.ATTR_SYSTEM_COMMAND_NAME, this.named());\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} // end if\r\n\t\t\t\r\n\t\t} // end if definition\t\r\n\t}", "boolean hasTreeNodeId();", "public boolean isInFunction(){\n if (findEnclosingFunction() != null){\n return true;\n }\n return isFunction;\n }", "public boolean isChildnode() {\r\n\t\treturn isChildnode;\r\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/include/clang/AST/DeclTemplate.h\", line = 2806,\n FQN=\"clang::VarTemplateDecl::isThisDeclarationADefinition\", NM=\"_ZNK5clang15VarTemplateDecl28isThisDeclarationADefinitionEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/AST/DeclTemplate.cpp -nm=_ZNK5clang15VarTemplateDecl28isThisDeclarationADefinitionEv\")\n //</editor-fold>\n public boolean isThisDeclarationADefinition() /*const*/ {\n return (getTemplatedDecl().isThisDeclarationADefinition().getValue() != 0);\n }", "public boolean hasDSL() {\n return this.dslFiles != null && this.dslFiles.size() > 0;\n }", "public String getDefinition() {\n\t\treturn null;\n\t}", "private boolean isGlobalDeclaration() throws IOException\n\t{\n\t\tboolean isGlobal = false;\n\t\t\n\t\tif(theCurrentToken.TokenType == TokenType.GLOBAL)\n\t\t{\n\t\t\tisGlobal = true;\n\t\t\tupdateToken();\n\t\t\tSystem.out.println(\"Global!\");\n\t\t}\n\t\t\n\t\t// Determine declaration type.\n\t\tif(isProcedureDeclaration(isGlobal))\n\t\t\treturn true;\n\t\telse if(isVariableDeclaration(isGlobal))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "private boolean hasTFoot() {\r\n\t\treturn null != this.getTFoot();\r\n\t}", "public boolean visit(CommonTypeDefinition node) {\n return visit((AnnotatedBase)node);\n }", "public boolean isFunction() {\n return this.type != null;\n }", "public boolean check(XsdNode node) {\n\t\treturn true;\n\t}", "boolean hasIsMidNode();", "String getDefinition();", "boolean defined(ThreadContext tc, RakudoObject obj);", "static boolean topLevelDefinition(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"topLevelDefinition\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_);\n r = libraryStatement(b, l + 1);\n if (!r) r = partOfStatement(b, l + 1);\n if (!r) r = importStatement(b, l + 1);\n if (!r) r = exportStatement(b, l + 1);\n if (!r) r = partStatement(b, l + 1);\n if (!r) r = classDefinition(b, l + 1);\n if (!r) r = mixinDeclaration(b, l + 1);\n if (!r) r = enumDefinition(b, l + 1);\n if (!r) r = extensionDeclaration(b, l + 1);\n if (!r) r = functionTypeAlias(b, l + 1);\n if (!r) r = getterOrSetterDeclaration(b, l + 1);\n if (!r) r = functionDeclarationWithBodyOrNative(b, l + 1);\n if (!r) r = varDeclarationListWithSemicolon(b, l + 1);\n if (!r) r = incompleteDeclaration(b, l + 1);\n exit_section_(b, l, m, r, false, DartParser::top_level_recover);\n return r;\n }", "public final void mDEFINED() throws RecognitionException {\r\n try {\r\n int _type = DEFINED;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:267:9: ( 'defined' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:267:11: 'defined'\r\n {\r\n match(\"defined\"); \r\n\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "public String getDefinition_type() {\r\n\t\treturn definition_type;\r\n\t}", "boolean isScope();", "private boolean isBST() {\n return isBST(root, null, null);\n }", "public boolean hasTopLevelNode(IAstTopLevelNode node);", "public boolean isApplicableForNode(AbstractNode node);", "protected Definition checkDefinedOnlyOnce(){\n Definition result = null;\n List<Name> names = new ArrayList<Name>();\n \n for( Definition definition : definitions ){\n if( !definition.typedef ){\n Field field = definition.getField();\n if( field != null ){\n FieldModelNode node = field.asNode();\n if( node != null ){\n if( node.getTags().contains( Tag.USES ) || node.getTags().contains( Tag.PROVIDES )){\n \tName name = node.getName();\n \tif( name != null ){\n \t\tnames.add( name );\n \t}\n result = definition;\n }\n }\n }\n }\n }\n \n if( names.size() > 1 ){\n error( \"multiple definitions of command/event '\" + name + \"'\", names );\n return null;\n }\n \n return result;\n }", "public boolean hasNode(Node p_node) {\n\t\treturn nodes.contains(p_node);\n\t}", "public boolean visit(SchemaBase node) {\n return true;\n }", "public boolean hasDef() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public boolean isDefined(AttributeDefinition attribute) \n throws UnknownAttributeException\n {\n if(builtinAttributes.containsKey(attribute.getName()))\n {\n if(attribute.getName().equals(\"parent\"))\n {\n return parent != null;\n }\n else\n {\n return true;\n }\n }\n else\n {\n throw new UnknownAttributeException(\"not a builtin attribute: '\"+\n attribute.getName()+\"'\");\n }\n }", "public boolean isTaskNode()\n\t{\n\t\treturn isTaskNode;\n\t}", "public boolean isDataFlavorSupported(DataFlavor df) {\n\t\treturn df.equals(CLASS_NODE_FLAVOR);\n\t}", "public boolean isDefined() {\n return lineNumber >= 0;\n }", "public TypeDefinition tdef(String n){\n TypeDefinition rc = isType(n);\n if (rc == null){\n return(null);\n }\n else\n return(rc);\n }", "@Override\n public Ast visitFunction_definition(napParser.Function_definitionContext ctx) {\n String name = ctx.Identifier().getText();\n List<Pair<Pair<String, Type>, Boolean>> arguments = new LinkedList<>();\n for(napParser.ParameterContext arg : ctx.parameters().parameter()){\n String argName = arg.Identifier().getText();\n Type argType = (Type) arg.type().accept(this);\n boolean passByRef = arg.getChildCount() == 3;\n arguments.add(new Pair<>(new Pair<>(argName, argType), passByRef));\n }\n Block block = (Block) visit(ctx.block());\n if (ctx.returnType == null)\n return new FunctionDefinition(position(ctx), name, arguments, block);\n else {\n Type returnType = (Type) visit(ctx.returnType);\n return new FunctionDefinition(position(ctx), name, arguments, block, returnType);\n }\n }", "public boolean isRealNode()\r\n\t\t{\r\n\t\t\tif (this.key == -1)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true; \r\n\t\t}", "public boolean hasTreeNodeId() {\n return treeNodeId_ != null;\n }", "private boolean entityDefsMatch(AtlasTypesDef typesDef) {\n return compareLists(this.getEntityDefs(), typesDef.getEntityDefs());\n }", "public boolean typeCheck(){\n\tboolean result = true;\n\tfor(DeclNode node : myDecls){\n\t if(node instanceof FnDeclNode){\n\t\tif(((FnDeclNode)node).typeCheck() == false){\n\t\t result = false;\n\t\t}\n\t }else{\n\t\tcontinue;\n\t }\n\t}\n\treturn result;\n }", "boolean hasDocument();", "boolean hasDocument();", "boolean hasDocument();", "public String getDefinitionName() {\n return null;\n }", "public String getDefinition(){\n\t\treturn definition;\n\t}", "public boolean hasPlotDefinition(final String id) {\n return getPlotDefinitionRef(id) != null;\n }", "boolean hasChildren();", "protected boolean hasNode(int ID) {\n\t\treturn nodes.containsKey(ID);\n\t}", "Definition createDefinition();", "public boolean isRoot() {\n return term.isRoot();\n }", "private boolean isBST() {\r\n return isBST(root, null, null);\r\n }", "public static boolean VariableDefinition(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"VariableDefinition\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, VARIABLE_DEFINITION, \"<variable definition>\");\n r = Type(b, l + 1);\n r = r && consumeToken(b, IDENTIFIER);\n r = r && VariableDefinition_2(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }" ]
[ "0.71623015", "0.6594426", "0.6220007", "0.6219473", "0.6219473", "0.6130456", "0.6130456", "0.61097294", "0.61097294", "0.6101466", "0.5892732", "0.5805209", "0.5775638", "0.57541203", "0.5739854", "0.57175636", "0.5685663", "0.5685663", "0.56774455", "0.5671648", "0.5627482", "0.55721575", "0.556799", "0.556799", "0.5499872", "0.5455151", "0.5453355", "0.5424987", "0.53349936", "0.5323824", "0.531132", "0.5298583", "0.5290544", "0.52890086", "0.52783054", "0.5253981", "0.5252641", "0.5243166", "0.5228647", "0.5226252", "0.5221437", "0.5215512", "0.51852196", "0.51852196", "0.51516986", "0.51516986", "0.51516986", "0.5142003", "0.51242876", "0.5114739", "0.5097302", "0.50949186", "0.5084363", "0.50816095", "0.50769585", "0.505831", "0.50552213", "0.50462073", "0.50454617", "0.50440127", "0.5041421", "0.50376546", "0.5028826", "0.5014388", "0.50128746", "0.5009923", "0.5009485", "0.5007327", "0.5001978", "0.5000418", "0.49989668", "0.4998104", "0.4995382", "0.4992507", "0.49909154", "0.49903294", "0.4986136", "0.4984947", "0.49791396", "0.49786162", "0.49729598", "0.49668607", "0.49657816", "0.49617672", "0.4960349", "0.4958824", "0.49559447", "0.49559432", "0.4951354", "0.4951354", "0.4951354", "0.49493927", "0.4934533", "0.49281785", "0.49169284", "0.49030417", "0.4899623", "0.48987386", "0.48965728", "0.489638" ]
0.7588963
0
Creates a new instance of MinaIpFilter.
public MinaIpFilter(IpFilter filter) { this.filter = filter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setIp(int value) {\n bitField0_ |= 0x00000100;\n ip_ = value;\n onChanged();\n return this;\n }", "public void setVideoMulticastAddr(String ip);", "public Builder setInIp(int value) {\n copyOnWrite();\n instance.setInIp(value);\n return this;\n }", "public Builder setInIp(int value) {\n copyOnWrite();\n instance.setInIp(value);\n return this;\n }", "public Builder setIp(int value) {\n copyOnWrite();\n instance.setIp(value);\n return this;\n }", "public Builder setIp(int value) {\n copyOnWrite();\n instance.setIp(value);\n return this;\n }", "public EthernetStaticIP() {\n }", "public boolean isMipMapFilter() {\n switch (values[MIN_FILTER_INDEX]) {\n case LINEAR_MIPMAP_LINEAR:\n case NEAREST_MIPMAP_LINEAR:\n case LINEAR_MIPMAP_NEAREST:\n case NEAREST_MIPMAP_NEAREST:\n return true;\n default:\n return false;\n }\n }", "public void setAudioMulticastAddr(String ip);", "public IpRule() {\n this(DSL.name(\"ip_rule\"), null);\n }", "public static SMFMemoryMeshFilterType create(\n final SMFSchemaIdentifier in_schema,\n final Path in_file)\n {\n return new SMFMemoryMeshFilterMetadataAdd(in_schema, in_file);\n }", "public HttpFilter() { }", "public Builder clearIp() {\n bitField0_ = (bitField0_ & ~0x00000100);\n ip_ = 0;\n onChanged();\n return this;\n }", "public MorfologikFilter(final TokenStream in) {\n this(in, new PolishStemmer().getDictionary());\n }", "public final void loadIPFilter() {\n DBUtil.select(\n \"select ip, false as type from \"\n + ConfigUtil.getAntiFraudDatabaseSchema()\n + \".ip_whitelist union \"\n + \" select ip, true as type from \"\n + ConfigUtil.getAntiFraudDatabaseSchema()\n + \".ip_blacklist\",\n new ResultSetProcessor() {\n @Override\n public void process(ResultSet resultSet) throws SQLException {\n ArrayList<String> whiteList = new ArrayList<String>(10);\n ArrayList<String> blackList = new ArrayList<String>(500);\n while (resultSet.next() ) {\n String ip = resultSet.getString(\"ip\");\n boolean isBlackType = resultSet.getBoolean(\"type\");\n if ( isBlackType ) {\n blackList.add(ip);\n } else {\n whiteList.add(ip);\n }\n }\n _ipFilter.addToWhiteList(whiteList);\n _ipFilter.addToBlackList(blackList);\n }\n });\n }", "public LancasterFilterFactory(Map<String, String> args) {\n super(args);\n\n }", "private void setInIp(int value) {\n \n inIp_ = value;\n }", "private void setInIp(int value) {\n \n inIp_ = value;\n }", "public Builder setIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ip_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }", "public Builder setIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n ip_ = value;\n onChanged();\n return this;\n }", "public static String getIpFilter() {\r\n return OWNIP;\r\n }", "public SamFilterParams create() {\n return new SamFilterParams(this);\n }", "public Filter() {\n }", "public Builder setIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n ip_ = value;\n onChanged();\n return this;\n }", "public Builder setIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n ip_ = value;\n onChanged();\n return this;\n }", "public PopulationFilter(int nr)\n { \n super();\n inhabitants = nr;\n }", "public Builder clearIp() {\n ip_ = getDefaultInstance().getIp();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n return this;\n }", "public LogFilter() {}", "public ImcacheCacheManager() {\n this(CacheBuilder.heapCache());\n }", "public Builder clearIp() {\n bitField0_ = (bitField0_ & ~0x00000002);\n ip_ = getDefaultInstance().getIp();\n onChanged();\n return this;\n }", "public ValidatorFilter() {\n\n\t}", "public final AfIPFilter getIPFilter() {\n return _ipFilter;\n }", "public Builder clearIp() {\n bitField0_ = (bitField0_ & ~0x00000004);\n ip_ = getDefaultInstance().getIp();\n onChanged();\n return this;\n }", "public Builder clearIp() {\n bitField0_ = (bitField0_ & ~0x00000001);\n ip_ = getDefaultInstance().getIp();\n onChanged();\n return this;\n }", "public Builder setIp(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n ip_ = value;\n onChanged();\n return this;\n }", "protected static IPRange.RangeSet getIPFilter() {\n if (filterRanges == null) {\n try {\n filterRanges = IPRange.paraseRangeSet(ipFilter);\n } catch (Throwable e) {\n Exceptions.handle()\n .to(LOG)\n .error(e)\n .withSystemErrorMessage(\n \"Error parsing config value: 'http.firewall.filterIPs': %s (%s). Defaulting to localhost!\")\n .handle();\n filterRanges = IPRange.LOCALHOST;\n }\n }\n\n return filterRanges;\n }", "public Builder clearInIp() {\n copyOnWrite();\n instance.clearInIp();\n return this;\n }", "public Builder clearInIp() {\n copyOnWrite();\n instance.clearInIp();\n return this;\n }", "public Builder clearIp() {\n \n ip_ = getDefaultInstance().getIp();\n onChanged();\n return this;\n }", "public Builder clearIp() {\n \n ip_ = getDefaultInstance().getIp();\n onChanged();\n return this;\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "public Filter () {\n\t\tsuper();\n\t}", "public void setIp(String ip) {\n this.ip = ip;\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "public MlibMinFilterOpImage(RenderedImage source,\n BorderExtender extender,\n Map config,\n ImageLayout layout,\n MinFilterShape maskType,\n int maskSize) {\n\tsuper(source,\n layout,\n config,\n true,\n extender,\n (maskSize-1)/2,\n (maskSize-1)/2,\n (maskSize/2),\n (maskSize/2));\n\t//this.maskType = mapToMlibMaskType(maskType);\n this.maskSize = maskSize;\n }", "public Filters() {\n }", "public Builder setIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n ip_ = value;\n onChanged();\n return this;\n }", "public final native static AlphaMaskFilter create(BaseJso alphaMask) /*-{\r\n\t\treturn new createjs.AlphaMapFilter(alphaMask);\r\n\t}-*/;", "private void setIp(int value) {\n \n ip_ = value;\n }", "private void setIp(int value) {\n \n ip_ = value;\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "public NXTMMX(Port port) {\n this(port, DEFAULT_MMX_ADDRESS);\n }", "public T withIpAddress(final String ipAddress) {\n requireNonNull(ipAddress);\n with(Dbms.class, d -> d.mutator().setIpAddress(ipAddress));\n return self();\n }", "public SpecificIPAllowedWebActivityServlet() {\n super();\n }", "public Builder setIpBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n ip_ = value;\n onChanged();\n return this;\n }", "public Builder setIpBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ip_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }", "public IpConfigInfoExample() {\r\n oredCriteria = new ArrayList<>();\r\n }", "public Builder setIpBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n ip_ = value;\n onChanged();\n return this;\n }", "CompiledFilter() {\n }", "public Builder setS1Ip(int value) {\n copyOnWrite();\n instance.setS1Ip(value);\n return this;\n }", "public Filter() throws UnknownHostException {\n\n\t}", "public Builder clearIp() {\n copyOnWrite();\n instance.clearIp();\n return this;\n }", "public Builder clearIp() {\n copyOnWrite();\n instance.clearIp();\n return this;\n }", "public IpRule(Name alias) {\n this(alias, IP_RULE);\n }", "public void setIp(java.lang.String param){\r\n localIpTracker = true;\r\n \r\n this.localIp=param;\r\n \r\n\r\n }", "public void setIp(java.lang.String param){\r\n localIpTracker = true;\r\n \r\n this.localIp=param;\r\n \r\n\r\n }", "public void setIpfrom(java.lang.String ipfrom) {\n this.ipfrom = ipfrom;\n }", "public Builder setIpBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n ip_ = value;\n onChanged();\n return this;\n }", "public IpAddressMatcher(List<String> listIpAddress) {\n listnMaskBits= new ArrayList<Integer>();\n listrequiredAddress =new ArrayList<InetAddress>();\n\n for(String ipAddress : listIpAddress){\n int nMaskBits;\n if (ipAddress.indexOf('/') > 0) {\n String[] addressAndMask = ipAddress.split(\"/\");\n ipAddress = addressAndMask[0];\n nMaskBits = Integer.parseInt(addressAndMask[1]);\n }else {\n nMaskBits = -1;\n }\n listnMaskBits.add(nMaskBits);\n listrequiredAddress.add(parseAddress(ipAddress));\n }\n \n }", "protected IUIFilterable createFilterable() {\n \t\treturn new UIFilterable();\n \t}", "@SuppressWarnings(\"unused\")\n\tprivate Filter() {\n\n\t}", "public void setIp(java.lang.String ip) {\r\n this.ip = ip;\r\n }", "private Marinator() {\n }", "private Marinator() {\n }", "public native void setFilter(int filter) throws MagickException;", "public ExternalFilter() {\n\t\treset();\n\t\tenable_filter(true);\n\t\tset_sampling_parameter(15915.6);\n\t\tset_chip_model(ISIDDefs.chip_model.MOS6581);\n\t}", "public void setIp(final String ip) {\n this.ip = ip;\n }", "public IntentFilter createFilter()\n {\n IntentFilter filter = new IntentFilter();\n filter.addAction(UPDATE_TIME);\n\n return filter;\n }", "void setFilter(Filter f);", "private void clearInIp() {\n \n inIp_ = 0;\n }", "private void clearInIp() {\n \n inIp_ = 0;\n }", "public ObjectFilter()\n\t{\n\t}", "public VM(String name, String os, List<String> ipAddresses) {//passed from gui form\r\n\r\n this.name = name;\r\n this.os = os;\r\n\r\n int ethNumber = 0;\r\n for (String ipAddress : ipAddresses) { //for each valid ip address submitted in the form, add an interface\r\n String intrfcLabel = \"eth\" + ethNumber;\r\n this.intrfces.add(new VMinterface(intrfcLabel, ipAddress));\r\n ethNumber++;\r\n }\r\n\r\n //same version and src set for every vm: dependent on OS\r\n switch (os) {\r\n case \"WINDOWS\":\r\n this.setOs(\"WINDOWS\");\r\n break;\r\n case \"LINUX\":\r\n this.setOs(\"LINUX\");\r\n break;\r\n }\r\n if (this.getOs() == \"WINDOWS\") {\r\n this.setVer(\"7.0\");\r\n this.setSrc(\"/srv/VMLibrary/win7\");\r\n } else {\r\n this.setVer(\"7.3\");\r\n this.setSrc(\"/srv/VMLibrary/JeOS\");\r\n }\r\n\r\n\r\n }", "public PipelineFilter()\n {\n }", "int getInIp();", "int getInIp();", "public NXTMMX(I2CPort port) {\n this(port, DEFAULT_MMX_ADDRESS);\n }", "private static native long createAMFilter_0(double sigma_s, double sigma_r, boolean adjust_outliers);", "public FilterGUI(IMAPMailProcessorModel model){\n\t\tthis.model = model;\n\n\t}", "public void setIpAddress(String ipAddress) {\n this.ipAddress = ipAddress;\n }", "public MhsmNetworkRuleSet withIpRules(List<MhsmipRule> ipRules) {\n this.ipRules = ipRules;\n return this;\n }", "public IPAddressFormatter<I> build() {\n return constructor.create(style, upperCase, withIPv4End, encloseInBrackets);\n }", "public static ColorPresetsFragment newInstance(String ip, int color_nr) {\n ColorPresetsFragment fragment = new ColorPresetsFragment();\n Bundle args = new Bundle();\n args.putString(ROOM_IP, ip);\n args.putInt(COLOR_NR, color_nr);\n fragment.setArguments(args);\n return fragment;\n }", "public InvertFilter(String name)\n {\n super(name);\n }", "public KalmanFilter() {\n // This is a very trusting kalman filter; it just adds the\n // encoder offset to the current believed position.\n \n }", "public void setIP(String IP) {\n this.IP = IP;\n }", "public InMemoryLogAppender(String name, Filter filter, Layout<? extends Serializable> layout) {\r\n super(name, filter, layout);\r\n }", "public static void main(String[] args) throws UnknownHostException, IOException{\n\n \n InetAddress group = InetAddress.getByName(\"224.0.0.100\");\n MulticastSocket s = new MulticastSocket(5000);\ntry {\n \n\n s.joinGroup(group);\n \n //Abrimos a interfaz\n Interfaz interfaz = new Interfaz(s,group); \n interfaz.setVisible(true);\n\n}catch (SocketException e){System.out.println(\"Socket: \" + e.getMessage());\n}catch (IOException e){System.out.println(\"IO: \" + e.getMessage());\n}finally{\n }\n}", "public static SMFMemoryMeshFilterType create(\n final Optional<SMFSchemaName> in_schema_name,\n final Optional<Version> in_version)\n {\n return new SMFMemoryMeshFilterMetadataRemove(in_schema_name, in_version);\n }", "public MdsIp(final Provider provider, final MdsListener cl){\n this.addMdsListener(cl);\n this.provider = provider;\n }" ]
[ "0.5371051", "0.51613307", "0.51589453", "0.51589453", "0.511656", "0.511656", "0.49910268", "0.48639455", "0.4860461", "0.48366514", "0.48179728", "0.48053297", "0.47356135", "0.47278917", "0.47179818", "0.4668368", "0.46585378", "0.46585378", "0.465237", "0.46381235", "0.4632538", "0.4609594", "0.46009716", "0.4591369", "0.45674747", "0.45662665", "0.4551884", "0.45283976", "0.45277774", "0.4524038", "0.45230258", "0.45105997", "0.4498193", "0.4493755", "0.44865355", "0.4478114", "0.4440339", "0.4440339", "0.4438941", "0.4438941", "0.44327027", "0.44011435", "0.43941537", "0.43941537", "0.43812352", "0.43804374", "0.43747264", "0.43733165", "0.43632355", "0.43632355", "0.4351923", "0.43364888", "0.43181586", "0.43086436", "0.4304526", "0.42947772", "0.42830282", "0.428196", "0.42607912", "0.4259669", "0.4252936", "0.42229727", "0.42229727", "0.42223752", "0.42203203", "0.42203203", "0.42040852", "0.4197547", "0.41770542", "0.4174546", "0.41699374", "0.41439644", "0.41348994", "0.41348994", "0.41282254", "0.4127576", "0.4123068", "0.41084483", "0.41015014", "0.40886992", "0.40886992", "0.40788317", "0.40643248", "0.4057838", "0.40574354", "0.40574354", "0.40538937", "0.40429983", "0.40386215", "0.40301198", "0.40159386", "0.40072787", "0.40015107", "0.39887312", "0.39874992", "0.39856842", "0.39748755", "0.39736673", "0.3969894", "0.39693037" ]
0.8138422
0
Add custom extensions (for now features and plugins) to the current table if they're activated.
public void registerCustomExtensions(HtmlTable table) throws ExtensionLoadingException { if (StringUtils.isNotBlank(table.getTableConfiguration().getBasePackage())) { logger.debug("Scanning custom extensions..."); // Scanning custom extension based on the base.package property List<AbstractExtension> customExtensions = scanCustomExtensions(table.getTableConfiguration() .getBasePackage()); // Load custom extension if enabled if (customExtensions != null && !customExtensions.isEmpty() && table.getTableConfiguration().getExtraCustomExtensions() != null) { for (String extensionToRegister : table.getTableConfiguration().getExtraCustomExtensions()) { for (AbstractExtension customExtension : customExtensions) { if (extensionToRegister.equals(customExtension.getName().toLowerCase())) { table.getTableConfiguration().registerExtension(customExtension); logger.debug("Extension {} (version: {}) registered", customExtension.getName(), customExtension.getVersion()); continue; } } } } else { logger.warn("No custom extension found"); } } else{ logger.debug("The 'base.package' property is blank. Unable to scan any class."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCustExt() {\n String toAdd = customExt.getText();\n String[] extensions = toAdd.split(\",\");\n ExtensionsAdder.addExtensions(extensions);\n }", "public void registerCoreExtensions() {\n if (extensionsRegistered) {\n throw H2O.fail(\"Extensions already registered\");\n }\n\n long before = System.currentTimeMillis();\n ServiceLoader<AbstractH2OExtension> extensionsLoader = ServiceLoader.load(AbstractH2OExtension.class);\n for (AbstractH2OExtension ext : extensionsLoader) {\n if (isEnabled(ext)) {\n ext.init();\n coreExtensions.put(ext.getExtensionName(), ext);\n }\n }\n extensionsRegistered = true;\n registerCoreExtensionsMillis = System.currentTimeMillis() - before;\n }", "public final void registerExtensions(@NotNull List<? extends T> extensions) {\n for (ExtensionComponentAdapter adapter : adapters) {\n if (adapter instanceof ObjectComponentAdapter) {\n if (ContainerUtil.containsIdentity(extensions, adapter)) {\n LOG.error(\"Extension was already added: \" + ((ObjectComponentAdapter<?>)adapter).componentInstance);\n return;\n }\n }\n }\n\n List<ExtensionComponentAdapter> newAdapters = doRegisterExtensions(extensions);\n // do not call notifyListeners under lock\n ExtensionPointListener<T>[] listeners;\n synchronized (this) {\n listeners = this.listeners;\n }\n notifyListeners(false, newAdapters, listeners);\n }", "protected Item addExtensions(Item item) {\n // this can happen if the fields extension was used but properties were not included\n if (item.getProperties() == null) {\n return item;\n }\n\n Class propertiesClass = item.getProperties().getClass();\n if (cache.containsKey(propertiesClass)) {\n return item.stacExtensions(cache.get(propertiesClass));\n }\n\n Set<String> extensions = new HashSet<>();\n Class[] interfaces = propertiesClass.getInterfaces();\n for (Class clazz : interfaces) {\n try {\n Field prefixField = clazz.getDeclaredField(\"EXTENSION_PREFIX\");\n if (prefixField != null) {\n String prefix = (String) prefixField.get(item.getProperties());\n extensions.add(prefix);\n }\n } catch (Exception e) {\n // field doesn't exist, do nothing\n }\n }\n cache.put(propertiesClass, extensions);\n item.setStacExtensions(extensions);\n return item;\n }", "public void added(IExtensionPoint[] extensionPoints) {\r\n\r\n\t\t// Do nothing\r\n\t}", "public org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList addNewExtLst()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList)get_store().add_element_user(EXTLST$14);\n return target;\n }\n }", "@Override\r\n public void addExtension(String name, Class<? extends IExtension> cls) {\n this.DecoratedSortAlgo.addExtension(name, cls);\r\n }", "@objid (\"e20e1709-9e0b-4c6a-bf6c-3f3e7b57cdfe\")\n @Override\n boolean isExtension();", "public void setExtensions(String extensions)\n {\n this.ext = extensions;\n }", "Boolean supportsMultipleExtensions();", "@Override\n public String[] getExtensions() {\n return new String[]{};\n }", "AlgOptTable extend( List<AlgDataTypeField> extendedFields );", "protected void loadExtensions()\n {\n // Load local extension from repository\n\n if (this.rootFolder.exists()) {\n FilenameFilter descriptorFilter = new FilenameFilter()\n {\n public boolean accept(File dir, String name)\n {\n return name.endsWith(\".xed\");\n }\n };\n\n for (File child : this.rootFolder.listFiles(descriptorFilter)) {\n if (!child.isDirectory()) {\n try {\n LocalExtension localExtension = loadDescriptor(child);\n\n repository.addLocalExtension(localExtension);\n } catch (Exception e) {\n LOGGER.warn(\"Failed to load extension from file [\" + child + \"] in local repository\", e);\n }\n }\n }\n } else {\n this.rootFolder.mkdirs();\n }\n }", "public org.openxmlformats.schemas.drawingml.x2006.main.CTOfficeArtExtensionList addNewExtLst()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTOfficeArtExtensionList target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTOfficeArtExtensionList)get_store().add_element_user(EXTLST$28);\n return target;\n }\n }", "private void processAddons() {\r\n for (Addon addon : rows) {\r\n for (String tag : addon.getTags()) {\r\n if (!tags.containsKey(tag)) {\r\n tags.put(tag, new Tag(tag, listener));\r\n }\r\n tags.get(tag).addMember(addon);\r\n if (!tagNames.contains(tag)) {\r\n tagNames.add(tag);\r\n }\r\n }\r\n }\r\n }", "public boolean isExtension() {\n\t\treturn true;\n\t}", "ExtensionsType getExtensions();", "public void setExtensions(String listExtensions) {\n this.extensions = listExtensions;\n }", "Extensions getExtensions() {\n return this.extensions;\n }", "@Override\n public String[] getExtensions() {\n return EXTENSIONS.clone();\n }", "protected void initAvailableExtensions() {\n if (availableExtensionCache.isEmpty()) {\n GL gl = context.getGL();\n if (DEBUG) {\n System.err.println(\"!!! Pre-caching extension availability\");\n }\n String allAvailableExtensions =\n gl.glGetString(GL.GL_EXTENSIONS) + \" \" + context.getPlatformExtensionsString();\n if (DEBUG) {\n System.err.println(\"!!! Available extensions: \" + allAvailableExtensions);\n System.err.println(\"!!! GL vendor: \" + gl.glGetString(GL.GL_VENDOR));\n }\n StringTokenizer tok = new StringTokenizer(allAvailableExtensions);\n while (tok.hasMoreTokens()) {\n String availableExt = tok.nextToken().trim();\n availableExt = availableExt.intern();\n availableExtensionCache.add(availableExt);\n if (DEBUG) {\n System.err.println(\"!!! Available: \" + availableExt);\n }\n }\n \n // Put GL version strings in the table as well\n Version version = new Version(gl.glGetString(GL.GL_VERSION));\n int major = version.getMajor();\n int minor = version.getMinor();\n // FIXME: this needs to be adjusted when the major rev changes\n // beyond the known ones\n while (major > 0) {\n while (minor >= 0) {\n availableExtensionCache.add(\"GL_VERSION_\" + major + \"_\" + minor);\n if (DEBUG) {\n System.err.println(\"!!! Added GL_VERSION_\" + major + \"_\" + minor + \" to known extensions\");\n }\n --minor;\n }\n \n switch (major) {\n case 2:\n // Restart loop at version 1.5\n minor = 5;\n break;\n case 1:\n break;\n }\n \n --major;\n }\n \n // put a dummy var in here so that the cache is no longer empty even if\n // no extensions are in the GL_EXTENSIONS string\n availableExtensionCache.add(\"<INTERNAL_DUMMY_PLACEHOLDER>\");\n }\n }", "@Activate\n protected void activate(ComponentContext componentContext) {\n\n try {\n BundleContext bundleContext = componentContext.getBundleContext();\n\n bundleContext.registerService(ExtensionManager.class, new ExtensionManagerImpl(), null);\n\n // Load extension data from the file system.\n ExtensionManagerDataHolder.getInstance().setExtensionStore(new ExtensionStoreImpl());\n loadExtensionResources();\n\n if (log.isDebugEnabled()) {\n log.debug(\"Extension Manager bundle is activated.\");\n }\n } catch (Throwable e) {\n log.error(\"Error while activating ExtensionManagerComponent.\", e);\n }\n }", "public void setExtensions( String extensions[] )\n\t{\n\t\tthis.extensions = extensions;\n\t}", "public void registerUIExtension(UIExtension extension)\n {\n synchronized (_scorersAndLafs)\n {\n if (!_extensions.contains(extension))\n {\n _extensions.add(extension);\n\n // Register the extension on all existing LookAndFeels\n int lafCount = _lafs.size();\n\n for (int i = 0; i < lafCount; i++)\n {\n LookAndFeel laf = _lafs.get(i);\n extension.registerSelf(laf);\n }\n }\n }\n }", "public void addExtensionMethod(String extensionMethod) {\n \tif (extensionMethod.equals(Request.NOTIFY)) {\n \t\tif (LogWriter.needsLogging) \n \t\t\tLogWriter.logMessage(\"NOTIFY Supported Natively\");\n \t} else {\n this.dialogCreatingMethods.add(extensionMethod.trim().toUpperCase());\n \t}\n }", "private void _setExtension(XSTCtrl_extensionType ext) {\n\n\t}", "public void addExtension(String extension) {\n\t if(filters == null) {\n\t filters = new Hashtable(5);\n\t }\n\t filters.put(extension.toLowerCase(), this);\n\t fullDescription = null;\n }", "public io.envoyproxy.envoy.config.core.v3.Extension.Builder addExtensionsBuilder() {\n return getExtensionsFieldBuilder().addBuilder(\n io.envoyproxy.envoy.config.core.v3.Extension.getDefaultInstance());\n }", "public void setUserExtensions(String userExtensions) {\n this.userExtensions = userExtensions;\n }", "private void processExtensions() {\r\n converterDescriptors = new ArrayList<ConverterDescriptor>();\r\n IExtensionPoint point = Platform.getExtensionRegistry()\r\n .getExtensionPoint(PLUGIN_ID, CONVERTERS_EXTENSION_POINT_ID);\r\n\r\n if(point != null) {\r\n IExtension[] extensions = point.getExtensions();\r\n\r\n for(int i = 0; i < extensions.length; i++) {\r\n IConfigurationElement[] ces = extensions[i]\r\n .getConfigurationElements();\r\n for(int j = 0; j < ces.length; j++) {\r\n converterDescriptors.add(new ConverterDescriptor(ces[j]));\r\n }\r\n }\r\n }\r\n\r\n // Check if no extensions or empty extensions\r\n if(point == null || converterDescriptors.size() == 0) {\r\n // Write this fact to the log\r\n IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, 0,\r\n \"Failed to find any Converters.\", null);\r\n getDefault().getLog().log(status);\r\n SWTUtils.errMsgAsync(\"Failed to find any Converters\");\r\n }\r\n }", "void addExtension(String extension) {\n if (extensions == null) {\n extensions = Collections.singletonList(extension);\n } else if (extensions.size() == 1) {\n extensions = new ArrayList<>(extensions);\n }\n if (!extensions.contains(extension)) {\n extensions.add(extension);\n }\n }", "@Override\n\tpublic Map<String, FREFunction> getFunctions() \n\t{\n\t\tLog.d(TAG, \"Registering Extension Functions\");\n\t\tMap<String, FREFunction> functionMap = new HashMap<String, FREFunction>();\n\t\tfunctionMap.put(\"isInstalled\", new IsInstalledFunction());\n\t\tfunctionMap.put(\"shareText\", new ShareTextFunction());\n\t\tfunctionMap.put(\"shareImage\", new ShareImageFunction());\n\t\t// add other functions here\n\t\treturn functionMap;\t\n\t}", "private void extend() {\n for (Object o : table) {\n if (o == null)\n return;\n }\n\n TABLE_SIZE *= 2;\n Object[] entries = entrySet();\n this.table = new Object[TABLE_SIZE];\n\n rebuild(entries);\n }", "public String[] getExtensions()\n\t{\n\t\treturn extensions;\n\t}", "public List getInterfaceExtensions();", "@JsonProperty(\"extensions\")\n public Set<ToolComponent> getExtensions() {\n return extensions;\n }", "private void initExtensionNamesSet()\n {\n m_sysFuncs = getJexlFunctions(SYS_CONTEXT);\n Set<String> skeys = m_sysFuncs.keySet();\n for (String key : skeys)\n m_extNameSet.add(SYS + \".\" + key);\n m_userFuncs = getJexlFunctions(USER_CONTEXT);\n Set<String> ukeys = m_userFuncs.keySet();\n for (String key: ukeys)\n m_extNameSet.add(USER + \".\" + key); \n }", "public String[] getExtensions() {\r\n return extensions;\r\n }", "ListExtensionResponse listInstalledExtensions(ListExtensionRequest request);", "Registries createExtension();", "private void handleFeat() {\n sendMsgToClient(\"211-Extensions supported:\");\n sendMsgToClient(\"211 END\");\n }", "private static void includeInterfacesFromExtension(Environment result, Environment extEnv, Environment base)\n \t{\n \t\tfor(IInterfaceDefinition iDef : extEnv.getInterfaces())\n \t\t\tif (!willGenerateExtentionFor(iDef, base))\n \t\t\t\tresult.getInterfaces().add(iDef);\n \n \t}", "public void loadAllPlugins(final String extPointId);", "EnsureExtensionResponse ensureExtensions(EnsureExtensionRequest request);", "public void addExtension(String extension)\r\n {\r\n // Verifions que l'extension passe en argument ne soit pas null !\r\n if (extension != null)\r\n {\r\n // Verifier que le vecteur des extensions n'est pas null\r\n if (extensionFilters == null)\r\n {\r\n // Creation du vecteur des extensions\r\n extensionFilters = new ArrayList();\r\n }\r\n\r\n // Ajout de l'extension passe en argument dans le vecteur des extensions\r\n // Ne prendre que l'extension et pas le '.' (\"jpg\" mais pas \".jpg\")\r\n int i = extension.lastIndexOf('.');\r\n if (i > 0 && i < extension.length() - 1)\r\n extensionFilters.add(extension.substring(i + 1).toLowerCase());\r\n else\r\n extensionFilters.add(extension.toLowerCase());\r\n }\r\n }", "public void reInitialize() {\n lock.writeLock().lock();\n try {\n extensionPointPluginMap = HashBasedTable.create();\n final PluginRegistry registry = PluginRegistry.getInstance();\n List<IPlugin> extensionPointPlugins = registry.getPlugins(ExtensionPointPluginType.class);\n for (IPlugin extensionPointPlugin : extensionPointPlugins) {\n addExtensionPoint(extensionPointPlugin);\n }\n } finally {\n lock.writeLock().unlock();\n }\n }", "public Collection<Collection<T>> getExtensions();", "public String getExtensions() {\n return extensions;\n }", "@java.lang.Override\n public java.util.List<io.envoyproxy.envoy.config.core.v3.Extension> getExtensionsList() {\n return extensions_;\n }", "public void setExtension(java.lang.Object extension) {\r\n this.extension = extension;\r\n }", "public void addExtensionPoint(IPlugin extensionPointPlugin) {\n lock.writeLock().lock();\n try {\n for (String id : extensionPointPlugin.getIds()) {\n extensionPointPluginMap.put(\n extensionPointPlugin.getName(), id, createLazyLoader(extensionPointPlugin));\n }\n } finally {\n lock.writeLock().unlock();\n }\n }", "ListExtensionResponse listExtensions(ListExtensionRequest request);", "public boolean isExtensionListInDescription() {\n\t return useExtensionsInDescription;\n }", "public interface ICatalogExtension\r\n{\r\n /** Property changed keys */\r\n String PROPERTIES = \"properties\";\r\n\r\n /** Get title of extension */\r\n String getTitle();\r\n\r\n /** Get default alias of catalog */\r\n String getDefaultAlias();\r\n\r\n /**\r\n * Get properties for this extension. Is the properties that is stored/loaded ie. config/settings.\r\n */\r\n default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }\r\n\r\n /**\r\n * Load the extension with provided properties\r\n *\r\n * @param properties Propeties to load into extension\r\n */\r\n default void load(Map<String, Object> properties)\r\n {\r\n }\r\n\r\n /**\r\n * Setup session before query is executed. Ie. set selected database/index etc.\r\n *\r\n * @param catalogAlias Alias that this extension/catalog has been given\r\n * @param querySession Current query session\r\n **/\r\n default void setup(String catalogAlias, QuerySession querySession)\r\n {\r\n }\r\n\r\n /**\r\n * Update the extension based on the query session. Ie acting upon changed variables etc.\r\n *\r\n * @param catalogAlias Alias that this extension/catalog has been given\r\n * @param querySession Current query session\r\n **/\r\n default void update(String catalogAlias, QuerySession querySession)\r\n {\r\n }\r\n\r\n /**\r\n * Get configuration component. Will be showed in a dialog for setting up the extension\r\n */\r\n default Component getConfigComponent()\r\n {\r\n return null;\r\n }\r\n\r\n /**\r\n * Get quick properties component. Will be showed in extensions side bar with quick properties. Ie. selected. database/index.\r\n */\r\n default Component getQuickPropertiesComponent()\r\n {\r\n return null;\r\n }\r\n\r\n /** Get the actual catalog implementation for this extension */\r\n Catalog getCatalog();\r\n\r\n /** Handle provided exception\r\n * @param querySession Current query session\r\n * @param exception Exception to handle\r\n **/\r\n default ExceptionAction handleException(QuerySession querySession, CatalogException exception)\r\n {\r\n return ExceptionAction.NONE;\r\n }\r\n\r\n /**\r\n * Add property change listener\r\n *\r\n * @param listener Listener to add\r\n **/\r\n default void addPropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }\r\n\r\n /**\r\n * Remove property change listener\r\n *\r\n * @param listener Listener to remove\r\n **/\r\n default void removePropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }\r\n\r\n /** Action that should be performed after handling of an Exception */\r\n enum ExceptionAction\r\n {\r\n /** Do nothing action */\r\n NONE,\r\n /** Re-run query. */\r\n RERUN;\r\n }\r\n}", "void addPlugin(BaseComponentPlugin baseComponent);", "public boolean hasExtensions() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: sun.security.x509.X509CRLEntryImpl.hasExtensions():boolean, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.security.x509.X509CRLEntryImpl.hasExtensions():boolean\");\n }", "public String[] getExtensions()\r\n {\r\n return new String[] {\"\"};\r\n }", "public Object getExtension(){\n\t\treturn ext;\n\t}", "public void setLoadedBootstrapExtensions(BootstrapExtension...bootstrapExtensions) {\r\n \tthis.loadedBootstrapExtensions = bootstrapExtensions;\r\n }", "public void addZetaSQLFunctionsAndTypes(ZetaSQLBuiltinFunctionOptions options) {\n Preconditions.checkNotNull(options);\n Preconditions.checkState(builtinFunctionOptions == null);\n builtinFunctionOptions = options.serialize();\n\n try {\n GetBuiltinFunctionsResponse response =\n Client.getStub().getBuiltinFunctions(builtinFunctionOptions);\n\n processGetBuiltinFunctionsResponse(response);\n } catch (StatusRuntimeException e) {\n throw new SqlException(e);\n }\n }", "public String getExtensions()\n {\n return ext;\n }", "public List<String> getExtensions() {\n if (this.extensions == null) {\n // alias?\n if (this.aliasOf != null) {\n return this.aliasOf.getExtensions();\n }\n }\n return this.extensions;\n }", "public boolean getIsExtensionsUsed() {\r\n\t\treturn mIsExtensionsUsed;\r\n\t}", "@JsonProperty(\"extensions\")\n public void setExtensions(Set<ToolComponent> extensions) {\n this.extensions = extensions;\n }", "public List<String> getExtensions() {\n if (extensions != null) {\n return Collections.unmodifiableList(extensions);\n } else {\n return Collections.emptyList();\n }\n }", "public Builder addExtensions(io.envoyproxy.envoy.config.core.v3.Extension value) {\n if (extensionsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureExtensionsIsMutable();\n extensions_.add(value);\n onChanged();\n } else {\n extensionsBuilder_.addMessage(value);\n }\n return this;\n }", "@Override\n protected void register(ExtensionContext ctxt) {\n ctxt.insertProvider(sec);\n ctxt.insertProvider(prim);\n }", "private void addListeners() {\n table.addValueChangeListener((Property.ValueChangeListener) this);\n// selectedCustomer.comboBoxSelectCustomer.addValueChangeListener((Property.ValueChangeListener) this);\n }", "private boolean updateExtensionStatement(IASTBldInfExtensionBlockStatement extension, boolean test) {\r\n\t\tif (!test) {\r\n\t\t\treturn applyStructuredItemChange(bldInfView.getExtensions(),\r\n\t\t\t\t\textension,\r\n\t\t\t\t\tnew ExtensionListConverter(bldInfView, BldInfView.PRJ_EXTENSIONS_KEYWORD),\r\n\t\t\t\t\textensionToStatementMap,\r\n\t\t\t\t\tstatementToExtensionsMap) != null;\r\n\t\t} else {\r\n\t\t\treturn applyStructuredItemChange(bldInfView.getTestExtensions(),\r\n\t\t\t\t\textension,\r\n\t\t\t\t\tnew ExtensionListConverter(bldInfView, BldInfView.PRJ_TESTEXTENSIONS_KEYWORD),\r\n\t\t\t\t\ttestExtensionToStatementMap,\r\n\t\t\t\t\tstatementToTestExtensionsMap) != null;\r\n\t\t\t\r\n\t\t}\r\n\t}", "public Set<String> getExtensions() {\n return extensions;\n }", "private static void includeInterfacesFromExtension(Environment result,\n\t\t\tEnvironment extEnv, Environment base)\n\t{\n\t\tfor (IInterfaceDefinition iDef : extEnv.getInterfaces())\n\t\t{\n\t\t\tif (!willGenerateExtensionFor(iDef, base))\n\t\t\t{\n\t\t\t\tiDef.setIsExtTree(true);\n\t\t\t\tresult.getInterfaces().add(iDef);\n\t\t\t}\n\t\t}\n\t}", "public interface Extension {\r\n\r\n /**\r\n *\r\n * @return the extension name\r\n */\r\n String getName();\r\n}", "@Override\n \tpublic void OnPluginEnabled()\n \t{\n \t\tfor (CustomJukebox jukebox : this.repository.getJukeboxes())\n \t\t\tthis.jukeboxes.add(jukebox);\n \t}", "FileExtensions (String type, String ext) {\n this.filter = new ExtensionFilter(type, ext);\n }", "@java.lang.Override\n public io.envoyproxy.envoy.config.core.v3.Extension getExtensions(int index) {\n return extensions_.get(index);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "private static void loadExtensions( final File file,\n final ArrayList extensions )\n throws TaskException\n {\n try\n {\n final JarFile jarFile = new JarFile( file );\n final Extension[] extension =\n Extension.getAvailable( jarFile.getManifest() );\n for( int i = 0; i < extension.length; i++ )\n {\n extensions.add( extension[ i ] );\n }\n }\n catch( final Exception e )\n {\n throw new TaskException( e.getMessage(), e );\n }\n }", "public QuarkusCodestartTestBuilder extensions(Collection<ArtifactCoords> extensions) {\n this.extensions.addAll(extensions);\n return this;\n }", "void extend();", "private void addCustomColumnMethod(Vector<String> customColumns,String windowName2) {\r\n\t\tVector<WindowTableModelMapping> maps = getMapColumns(windowName2);\r\n\t\tfor (int i = 0; i < maps.size(); i++) {\r\n\t\t\tWindowTableModelMapping mp = maps.get(i);\r\n\t\t\tString methodName = \"\";\r\n\t\t\tif(mp.getColumnDataType().equalsIgnoreCase(WindowTableModelMappingConstants.COLUMNDATATYPE)) {\r\n\t\t\t//\tmethodName = methodName = \r\n\t\t\t}\r\n\t\t}\r\n\t}", "RegisterExtensionResponse registerExtension(RegisterExtensionRequest request);", "public void setNewExcludedExtensions(List<String> excludedExtenions) {\n\t\tthis.filter = new Filter(excludedExtenions);\n\t}", "@java.lang.Override\n public int getExtensionsCount() {\n return extensions_.size();\n }", "private void addActionListeners() {\r\n\t\tbuttonImport.addActionListener(this);\r\n\t\tbuttonCancel.addActionListener(this);\r\n\t\tcbContainsHeader.addActionListener(this);\r\n\t\tcbEnableLenCorrect.addActionListener(this);\r\n\t\ttextfieldDelimSymbol.addKeyListener(this);\r\n\t\ttextfieldLenCorrection.addKeyListener(this);\r\n\t\ttableSelectionPD.registerSelectedProfilesListener(this);\r\n\t}", "@Test\n public void testListExtensions() {\n FlumeBuilder.getSinkNames().contains(\"agentSink\");\n FlumeBuilder.getDecoratorNames().contains(\"regex\");\n FlumeBuilder.getSourceNames().contains(\"collectorSource\");\n }", "private void registerColumns() {\n\t\tTreeColumn[] columns = this.tree.getColumns();\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tcolumns[i].addSelectionListener(this);\n\t\t}\n\t}", "Map<String, Field> extensionFieldsMap() {\n Map<String, Field> extensionsForType = new LinkedHashMap<>();\n for (Field field : extensionFields) {\n extensionsForType.put(field.qualifiedName(), field);\n }\n return extensionsForType;\n }", "public void setExtensionClass(String extensionClass)\n {\n this.extensionClass = extensionClass;\n }", "public void add(Extension extension) {\n this.add(new SubMenuItem(extension));\n }", "Extension createExtension();", "protected void addExtendsPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Bean_extends_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Bean_extends_feature\", \"_UI_Bean_type\"),\n\t\t\t\t BeansPackage.Literals.BEAN__EXTENDS,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "void applyExtensions(ReaderContext context, Operation operation, Method method);", "void addCustomization(@NotNull EditorEx editor, @NotNull Feature feature);", "private void atualizar_tbl_pro_profs() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n//To change body of generated methods, choose Tools | Templates.\n }" ]
[ "0.6461874", "0.62783843", "0.54955333", "0.5402911", "0.5355572", "0.53361005", "0.53046465", "0.5263702", "0.5257727", "0.52512735", "0.5222978", "0.5219779", "0.52135247", "0.5203311", "0.51322776", "0.511552", "0.5092235", "0.50614053", "0.505111", "0.5035688", "0.5032191", "0.5010474", "0.5004313", "0.50030047", "0.49965855", "0.49579766", "0.49329093", "0.4931825", "0.49275976", "0.49091768", "0.4905173", "0.49004933", "0.48927516", "0.4851712", "0.48482466", "0.48442322", "0.48426047", "0.4838849", "0.48232284", "0.48055857", "0.48055464", "0.4798282", "0.47865778", "0.47735745", "0.4772195", "0.47719774", "0.47650138", "0.47580135", "0.475574", "0.47555983", "0.47477454", "0.47472185", "0.47458345", "0.47422987", "0.47419855", "0.47417453", "0.47405192", "0.47316194", "0.4730897", "0.47202018", "0.47015172", "0.46941322", "0.4688254", "0.46867833", "0.46859077", "0.4676914", "0.46721107", "0.46675795", "0.4660432", "0.46572852", "0.46538594", "0.4651866", "0.46512848", "0.46461454", "0.46390042", "0.46388263", "0.46388263", "0.46388263", "0.46388263", "0.46388263", "0.46388263", "0.46388263", "0.46155834", "0.46128872", "0.45955485", "0.4583714", "0.4579331", "0.45731974", "0.45703182", "0.4568392", "0.45676208", "0.45655006", "0.45630938", "0.4561864", "0.45598316", "0.45566767", "0.4556082", "0.45551002", "0.4551387", "0.4550641" ]
0.73026884
0
Length of the message
int length();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getFullMessageLength();", "public int getLength() {\r\n\t\treturn messageData.length;\r\n\t}", "public long getLength();", "public long getLength();", "Long payloadLength();", "public int get_length();", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "int getBodyLength();", "public int getLength() {\r\n\t\treturn length;\r\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n return length_;\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\n return length_;\n }", "public int getLength(){\n\t\treturn length;\n\t}", "public int getLength(){\n\t\treturn length;\n\t}", "public int getLength() {\n return length;\n }", "public int getLength() { return length;\t}", "public int getLength()\n\t{\n\t\treturn mLength;\n\t}", "public int getLength() {\n return length;\n }", "public int getLength() {\n return length;\n }", "public int getLength()\n {\n\treturn length;\n }", "public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }", "public int getLength() {return length;}", "public int length()\n\t{\n\t\treturn length;\n\t}", "public int getLength() {\n/* 301 */ return this.stream.getInt(COSName.LENGTH, 0);\n/* */ }", "private int length() { return length; }", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "protected int getLength() {\n return length;\n }", "public int getLength()\n {\n return length;\n }", "public int getLength() {\n\t\treturn length & 0xffff;\n\t}", "public int length() {\n \treturn length;\n }", "public int getLength() {\n return mySize.getLength();\n }", "public long length() {\n return length;\n }", "public int getLength();", "public int getLength();", "public int getLength();", "public final int getMessageSize() {\n if (length == UNKNOWN_LENGTH) {\n throw new ProtocolException();\n }\n\n return length;\n }", "public int length();", "public int length();", "public int length();", "public int length();", "public int length();", "public long getLength() { \n return length; \n }", "public int length() {\n return length;\n }", "public int length() {\n return length;\n }", "public int length() {\n return length;\n }", "public int getLength()\n {\n return stream.getInt(COSName.LENGTH, 0);\n }", "public int getLength() {\n\t\treturn this.length;\n\t}", "public int length() {\n \t \n \t //return the length\n \t return(len);\n }", "int length()\n\t{\n\t\treturn length;\n\t}", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "public abstract long getLength();", "public abstract long getLength();", "public int getLength() {\n return this.length;\n }", "public int getLength() {\n return this.length;\n }", "public abstract int getMessageSize();", "public int getProtocolDelimitedLength();", "public int getLength() {\n\t\treturn data.length;\n\t\t\n\t}", "public Integer getLength() {\n return _length;\n }", "public Integer getLength() {\n return _length;\n }", "@Override\n public int getLength(){\n \n int count = 0;\n count += super.getLength();\n \n //Add the function\n count += handlerId.length;\n \n //Add the options\n count += socksBytes.length;\n \n //Set the length\n SocketUtilities.intToByteArray(length, count );\n \n return count;\n }", "public int length() {\r\n int length = 1 + 2 + deviceToken.length + 2 + payload.length;\r\n final int marshalledLength = marshall().length;\r\n assert marshalledLength == length;\r\n return length;\r\n }", "public int getLength(){\n\t\treturn data.length;\n\t}", "public long getLength() {\n try {\n Long temp = (Long)replyHeaders.getHeader(HeaderSet.LENGTH);\n\n if (temp == null) {\n return -1;\n } else {\n return temp.longValue();\n }\n } catch (IOException e) {\n return -1;\n }\n }", "public int getLength() {\n\t\t\treturn this.text.length();\n\t}", "public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}", "public int getLengthInBytes()\n {\n return lengthInBytes;\n }", "public int getSubjectLength()\n\t{\n\t\treturn mySubjectLength;\n\t}", "protected int getLength() {\n\t\treturn this.length;\n\t}", "public int getLength() { return dataLength; }", "public int length(){\n\t\treturn this.tamanho;\n\t}", "public long length() {\r\n return 1 + 4 + buffer.length;\r\n }", "public byte getLength() {\n return this.length;\n }", "public int getLength()\n {return length;}", "@Override\n public Integer length() {\n return myLength;\n }", "private int length() {\n\t\treturn this.lenght;\n\t}", "long countMessageLengthTill(long maxLength) throws IllegalStateException;", "public abstract int length();", "public abstract int length();", "protected abstract int getLength();", "public int length() {\n return 0; // REPLACE THIS LINE WITH THE RIGHT ANSWER.\n }", "public String getlength()\n\t{\n\t\treturn length.getText();\n\t}" ]
[ "0.8547448", "0.84940356", "0.77184504", "0.77184504", "0.7712888", "0.76430196", "0.76292175", "0.76292175", "0.7621476", "0.7601998", "0.7573837", "0.7573837", "0.7573837", "0.7573837", "0.7573837", "0.7573837", "0.7525709", "0.7523501", "0.7523501", "0.7523501", "0.7507933", "0.75051314", "0.75051314", "0.75043446", "0.74845135", "0.7480237", "0.7475279", "0.7475279", "0.74717283", "0.74715984", "0.7457194", "0.74481744", "0.74316704", "0.74306506", "0.7411621", "0.7397959", "0.7397959", "0.7395585", "0.73841995", "0.73755604", "0.73740816", "0.7369756", "0.73513937", "0.7331246", "0.7331246", "0.7331246", "0.73279536", "0.7322926", "0.7322926", "0.7322926", "0.7322926", "0.7322926", "0.72831535", "0.72798526", "0.72798526", "0.72798526", "0.7278844", "0.7276482", "0.72629195", "0.7237212", "0.72364104", "0.72364104", "0.72364104", "0.72364104", "0.72364104", "0.72364104", "0.72364104", "0.72364104", "0.72364104", "0.72364104", "0.72305346", "0.72305346", "0.72102726", "0.72102726", "0.7198198", "0.7172696", "0.716929", "0.7167332", "0.7167332", "0.7158182", "0.71534294", "0.71415627", "0.713482", "0.71296", "0.7117121", "0.71138376", "0.71112216", "0.71067375", "0.7105777", "0.7088615", "0.7069221", "0.70600456", "0.7047592", "0.7042216", "0.7037059", "0.7027519", "0.7016355", "0.7016355", "0.70127046", "0.70061326", "0.6982954" ]
0.0
-1
nonpublic, no parameter constructor
ImageComponent3D() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "private Rekenhulp()\n\t{\n\t}", "private MApi() {}", "public Constructor(){\n\t\t\n\t}", "Reproducible newInstance();", "public Pitonyak_09_02() {\r\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private TMCourse() {\n\t}", "private Instantiation(){}", "private SingleObject()\r\n {\r\n }", "public Clade() {}", "private SingleObject(){}", "public lo() {}", "protected abstract void construct();", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "public CyanSus() {\n\n }", "private Params()\n {\n }", "public Curso() {\r\n }", "public Implementor(){}", "public CSSTidier() {\n\t}", "public SgaexpedbultoImpl()\n {\n }", "public Pasien() {\r\n }", "public SlanjePoruke() {\n }", "private stendhal() {\n\t}", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "public Cgg_jur_anticipo(){}", "public MethodEx2() {\n \n }", "public Data() {}", "public Mannschaft() {\n }", "public PSRelation()\n {\n }", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "public Method() {\n }", "public Basic() {}", "private SIModule(){}", "public Orbiter() {\n }", "public AntrianPasien() {\r\n\r\n }", "private void __sep__Constructors__() {}", "private IndexBitmapObject() {\n\t}", "public Pleasure() {\r\n\t\t}", "public Libro() {\r\n }", "private UsineJoueur() {}", "public Odontologo() {\n }", "private NaturePackage() {}", "private Public() {\n super(\"public\", null);\n }", "public TTau() {}", "O() { super(null); }", "public TCubico(){}", "private Converter()\n\t{\n\t\tsuper();\n\t}", "private Ex() {\n }", "defaultConstructor(){}", "private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}", "private OMUtil() { }", "public Parameters() {\n\t}", "private SingleObject(){\n }", "public OOP_207(){\n\n }", "public Anschrift() {\r\n }", "private Ognl() {\n }", "public JSFOla() {\n }", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private R() {\n\n }", "private TypicalPersons() {}", "private TypicalPersons() {}", "private Node() {\n\n }", "public God() {}", "private SystemInfo() {\r\n // forbid object construction \r\n }", "MyEncodeableWithoutPublicNoArgConstructor() {}", "public API() {}", "public Lanceur() {\n\t}", "public RngObject() {\n\t\t\n\t}", "private Road()\n\t{\n\t\t\n\t}", "private Request() {}", "private Request() {}", "protected Asignatura()\r\n\t{}", "protected Problem() {/* intentionally empty block */}", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "public Chauffeur() {\r\n\t}", "private DarthSidious(){\n }", "void DefaultConstructor(){}", "public Alojamiento() {\r\n\t}", "public Mitarbeit() {\r\n }", "public Genret() {\r\n }", "Member() {}", "public Chick() {\n\t}", "public _355() {\n\n }", "public Data() {\n \n }", "public Member() {}", "private Marinator() {\n }", "private Marinator() {\n }", "protected Approche() {\n }", "public Data() {\n }", "public Data() {\n }", "public no() {}", "public Person() {\n\t\t\n\t}", "public Rol() {}", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "private TbusRoadGraph() {}", "private Infer() {\n\n }", "private SolutionsPackage() {}", "public Coche() {\n super();\n }", "private Connection () {}" ]
[ "0.7433363", "0.7265101", "0.72034687", "0.71762174", "0.7137859", "0.70926625", "0.7075587", "0.70738196", "0.70704186", "0.70232624", "0.70116967", "0.7009138", "0.7002133", "0.6973808", "0.69518936", "0.6868347", "0.68325514", "0.6807074", "0.679055", "0.6788554", "0.678093", "0.6778583", "0.6778361", "0.67600167", "0.6745339", "0.67411494", "0.6708268", "0.6707231", "0.6706288", "0.66960996", "0.66753757", "0.6661194", "0.6659033", "0.66565514", "0.6645228", "0.66421324", "0.66404873", "0.6638876", "0.6634765", "0.6630976", "0.6617773", "0.6614071", "0.66124076", "0.66117394", "0.66066337", "0.6606549", "0.6598539", "0.6598407", "0.65972865", "0.6596921", "0.65940267", "0.65908355", "0.6590167", "0.65866834", "0.6575903", "0.65743315", "0.65742815", "0.6572367", "0.65688354", "0.65586805", "0.6555279", "0.65538776", "0.65538776", "0.65523547", "0.6546392", "0.65383255", "0.65342903", "0.6532999", "0.6532371", "0.65277135", "0.652577", "0.6520352", "0.6520352", "0.6519528", "0.6517476", "0.6516519", "0.651337", "0.6510205", "0.6510176", "0.6508996", "0.65067357", "0.64966106", "0.64929366", "0.6492571", "0.64920115", "0.6489867", "0.64882106", "0.64849985", "0.64849985", "0.64846134", "0.6483979", "0.6483979", "0.64807975", "0.6479122", "0.64751744", "0.64747447", "0.6472745", "0.64711744", "0.64703774", "0.64673364", "0.6466845" ]
0.0
-1
Constructs a 3D image component object using the specified format, width, height, and depth. Default values are used for all other parameters. The default values are as follows: array of images : null imageClass : ImageClass.BUFFERED_IMAGE
public ImageComponent3D(int format, int width, int height, int depth) { ((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "ImageComponent3D() {}", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth,\n\t\t\t boolean\tbyReference,\n\t\t\t boolean\tyUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "public Tile3D(Context context, int id, float w, float h) {\n\t // Setup vertex array buffer. Vertices in float. A float has 4 bytes\n\t ByteBuffer vbb = ByteBuffer.allocateDirect(12 * 4);\n\t vbb.order(ByteOrder.nativeOrder()); // Use native byte order\n\t vertexBuffer = vbb.asFloatBuffer(); // Convert from byte to float\n\t \n\t imageFileID = id;\n\t bitmap = BitmapFactory.decodeStream(context.getResources().openRawResource(imageFileID));\n\t //bitmap \n\t /*InputStream is= context.getResources().openRawResource(imageFileIDs);\n\t try {\n\t bitmap = BitmapFactory.decodeStream(is);\n\n\t } finally {\n\t //Always clear and close\n\t try {\n\t is.close();\n\t is = null;\n\t } catch (IOException e) {\n\t }\n\t }*/\n\t int imgWidth = bitmap.getWidth();\n\t int imgHeight = bitmap.getHeight();\n\t float faceWidth = w;\n\t float faceHeight = h;\n\t // Adjust for aspect ratio\n\t if (imgWidth > imgHeight) {\n\t faceHeight = faceHeight * imgHeight / imgWidth; \n\t }\n\t else {\n\t faceWidth = faceWidth * imgWidth / imgHeight;\n\t }\n\t float faceLeft = -faceWidth / 2;\n\t float faceRight = -faceLeft;\n\t float faceTop = faceHeight / 2;\n\t float faceBottom = -faceTop;\n\t \n\t \n\t \n\t // Define the vertices for this face\n\t float[] vertices = {\n\t faceLeft, faceBottom, 0.0f, // 0. left-bottom-front\n\t faceRight, faceBottom, 0.0f, // 1. right-bottom-front\n\t faceLeft, faceTop, 0.0f, // 2. left-top-front\n\t faceRight, faceTop, 0.0f, // 3. right-top-front\n\t };\n\t vertexBuffer.put(vertices); // Copy data into buffer\n\t\t vertexBuffer.position(0); // Rewind\n\t \n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t \n\t texBuffer.put(texCoords);\n\t \n\t texBuffer.position(0); // Rewind\n\t \n\t }", "public Surface(int var1, int var2, int var3, Component var4) {\n super();\n this.interlace = false;\n this.loggedIn = false;\n this.field_731 = var4;\n this.field_744 = var2;\n this.field_746 = var1;\n this.field_726 = this.field_723 = var1;\n this.field_727 = this.field_724 = var2;\n this.field_725 = var1 * var2;\n this.pixels = new int[var1 * var2];\n this.spritePixels = new int[var3][];\n this.field_742 = new boolean[var3];\n this.spriteColoursUsed = new byte[var3][];\n this.spriteColourList = new int[var3][];\n this.field_736 = new int[var3];\n this.field_737 = new int[var3];\n this.spriteWidthFull = new int[var3];\n this.field_741 = new int[var3];\n this.field_738 = new int[var3];\n this.field_739 = new int[var3];\n if(var1 > 1 && var2 > 1 && var4 != null) {\n this.field_728 = new DirectColorModel(32, 16711680, '\\uff00', 255);\n int var5 = this.field_723 * this.field_724;\n int var6 = 0;\n if(field_759 || var6 < var5) {\n do {\n this.pixels[var6] = 0;\n ++var6;\n } while(var6 < var5);\n }\n\n this.field_732 = var4.createImage(this);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n }\n\n }", "private void run3DC() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, 0, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, 0, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, 0, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) /\r\n (numIterations - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude3D(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude3D(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude3D(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage3D(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage3D(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage3D(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1, 0, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2, 0, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3, 0, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n destImage.calcMinMax();\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "public FramebufferObject(GL2 gl, Texture2D.Format format, Texture2D.Datatype datatype, int width, int height, int colorTextureCount, boolean makeDepthTexture, boolean rectTextures) throws OpenGLException\n\t{\n\t\t/* Sanity check. */\n\t\tif (colorTextureCount == 0 && !makeDepthTexture)\n\t\t{\n\t\t\tthrow new OpenGLException(\"It is not valid to make an FBO with no color buffers and no depth buffer.\");\n\t\t}\n\t\t\n\t\tint maxColorTextures[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_MAX_COLOR_ATTACHMENTS, maxColorTextures, 0);\n\t\tif (colorTextureCount > maxColorTextures[0])\n\t\t{\n\t\t\tthrow new OpenGLException(\"Cannot create an FBO with \" + colorTextureCount + \" render targets. Your graphics card only supports \" + maxColorTextures[0] + \".\");\n\t\t}\n\t\t\n\t\tmWidth = width;\n\t\tmHeight = height;\n\t\t\n\t\t/* Create OpenGL FBO. */\n\t\tint names[] = new int[1];\n\t\tgl.glGenFramebuffers(1, names, 0);\n\t\tmHandle = names[0];\n\t\t\n\t\t/* Remember previous FBO binding, and then bind this one. */\n\t\tint previousBinding[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING, previousBinding, 0);\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, mHandle);\n\t\t\n\t\t/* Create and attach color textures. */\n\t\tmColorTextures = new Texture2D[colorTextureCount];\n\t\t\n\t\tfor (int i = 0; i < colorTextureCount; ++i)\n\t\t{\n\t\t\tmColorTextures[i] = new Texture2D(gl, format, datatype, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_COLOR_ATTACHMENT0 + i, mColorTextures[i].getTextureTarget(), mColorTextures[i].getHandle(), 0);\n\t\t}\n\t\t\n\t\t/* Create and attach depth texture, if requested. */\n\t\tif (makeDepthTexture)\n\t\t{\n\t\t\tmDepthTexture = new Texture2D(gl, Format.DEPTH, Datatype.INT32, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_DEPTH_ATTACHMENT, mDepthTexture.getTextureTarget(), mDepthTexture.getHandle(), 0);\n\t\t}\n\n\t\t/* Make sure everything is set up properly. */\n\t\tint status = gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER);\n\t\tif (status != GL2.GL_FRAMEBUFFER_COMPLETE)\n\t\t{\n\t\t\tthrow new OpenGLException(\"Framebuffer incomplete: \" + status + \".\");\n\t\t}\n\t\t\n\t\t/* Restore whatever FBO was bound before this function was called. */\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, previousBinding[0]);\n\t}", "public static com.jme.image.Image loadImage(InputStream fis, boolean flip, boolean exp32) throws\n IOException {\n byte red = 0;\n byte green = 0;\n byte blue = 0;\n byte alpha = 0;\n //open a stream to the file\n BufferedInputStream bis = new BufferedInputStream(fis, 8192);\n DataInputStream dis = new DataInputStream(bis);\n //Read the TGA header\n idLength = (short) dis.read();\n colorMapType = (short) dis.read();\n imageType = (short) dis.read();\n cMapStart = flipEndian(dis.readShort());\n cMapLength = flipEndian(dis.readShort());\n cMapDepth = (short) dis.read();\n xOffset = flipEndian(dis.readShort());\n yOffset = flipEndian(dis.readShort());\n width = flipEndian(dis.readShort());\n height = flipEndian(dis.readShort());\n pixelDepth = (short) dis.read();\n imageDescriptor = (short) dis.read();\n //Skip image ID\n if (idLength > 0)\n bis.skip(idLength);\n // Allocate image data array\n byte[] rawData = null;\n int dl;\n if ((pixelDepth == 32)||(exp32)) {\n rawData = new byte[width * height * 4];\n dl=4;\n } else {\n rawData = new byte[width * height * 3];\n dl=3;\n }\n int rawDataIndex = 0;\n \n // Faster than doing a 24-or-32 check on each individual pixel,\n // just make a seperate loop for each.\n if (pixelDepth == 24)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n if(dl==4) {\n // create an alpha channel\n rawData[rawDataIndex++] = (byte)255;\n }\n \n }\n }\n else if (pixelDepth == 32)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n alpha = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n rawData[rawDataIndex++] = alpha;\n }\n }\n fis.close();\n //Get a pointer to the image memory\n ByteBuffer scratch = ByteBuffer.allocateDirect(rawData.length);\n scratch.clear();\n scratch.put(rawData);\n scratch.rewind();\n // Create the jme.image.Image object\n com.jme.image.Image textureImage = new com.jme.image.Image();\n if (dl == 4)\n textureImage.setType(com.jme.image.Image.RGBA8888);\n else\n textureImage.setType(com.jme.image.Image.RGB888);\n textureImage.setWidth(width);\n textureImage.setHeight(height);\n textureImage.setData(scratch);\n return textureImage;\n }", "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "private void run3D() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBuffer[];\r\n float resultBuffer[];\r\n float gaussianBuffer[];\r\n float gradientBuffer[];\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n sourceBuffer = new float[length];\r\n resultBuffer = new float[length];\r\n gaussianBuffer = new float[length];\r\n gradientBuffer = new float[length];\r\n } catch (OutOfMemoryError e){\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n srcImage.exportData(0, length, sourceBuffer);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n algoSepConvolver = new AlgorithmSeparableConvolver(gaussianBuffer, sourceBuffer,\r\n extents, xDataRound, yDataRound, zDataRound, srcImage.isColorImage());\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) / (numIterations - 1) * 100)), activeImage);\r\n }\r\n\r\n algoSepConvolver.run();\r\n gradientMagnitude3D(gaussianBuffer, gradientBuffer);\r\n upDateImage3D(resultBuffer, sourceBuffer, gradientBuffer);\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n for (int i = 0; i < length; i++) { sourceBuffer[i] = resultBuffer[i]; }\r\n }\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n algoSepConvolver.finalize();\r\n algoSepConvolver = null;\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n destImage.importData(0, resultBuffer, true);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public r3inputlayer(double[] inputarray, int depth){\r\n double[][][] newarray = new double[inputarray.length][1][depth + 2];\r\n for(int i = 0; i < inputarray.length; i++){\r\n newarray[i][0][0] = inputarray[i];\r\n }\r\n this.state = newarray;\r\n this.width = inputarray.length;\r\n }", "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public NativeImageFormat(Object imgData, int nChannels, int nRows, int nCols) {\r\n if (imgData instanceof short[]) {\r\n cmmFormat |= bytesSh(2);\r\n }\r\n else if (imgData instanceof byte[]) {\r\n cmmFormat |= bytesSh(1);\r\n }\r\n else\r\n // awt.47=First argument should be byte or short array\r\n throw new IllegalArgumentException(Messages.getString(\"awt.47\")); //$NON-NLS-1$\r\n\r\n cmmFormat |= channelsSh(nChannels);\r\n\r\n rows = nRows;\r\n cols = nCols;\r\n\r\n imageData = imgData;\r\n\r\n dataOffset = 0;\r\n }", "private static DataCube generateDataCubeFromMonochromeImages(String filenameSpecifier) throws IOException {\n\t\t// Check the format of the string\n\t\tif (!filenameSpecifier.contains(\"%\") || \n\t\t\t\tfilenameSpecifier.indexOf(\"%\") != filenameSpecifier.lastIndexOf(\"%\")) {\n\t\t\tthrow new IllegalArgumentException(\"Filename specifier must contain exactly one '%'.\");\n\t\t}\n\t\t\n\t\t// Find the dimension (number of monochrome images) of the hyperspectral image\n\t\tint noImages = 0;\n\t\tFile file = new File(filenameSpecifier.replace(\"%\", Integer.toString(noImages+1)));\n\t\twhile (file.exists() && !file.isDirectory()) {\n\t\t\tnoImages++;\n\t\t\tfile = new File(filenameSpecifier.replace(\"%\", Integer.toString(noImages+1)));\n\t\t}\n\t\t\n\t\t// Check that we loaded at least one image\n\t\tif (noImages == 0) {\n\t\t\tthrow new FileNotFoundException(\"No images were found using the specifier provided.\");\n\t\t}\n\t\t\n\t\t// Get the width and height of the first image, to check that they have consistent dimensions\n\t\tfile = new File(filenameSpecifier.replace(\"%\", Integer.toString(1)));\n\t\tBufferedImage bi = ImageIO.read(file);\n\t\tint height = bi.getHeight();\n\t\tint width = bi.getWidth();\n\t\t\n\t\t// Create a data cube and load the images into the structure\n\t\tDataCube dc = new DataCube();\n\t\tdc.width = width;\n\t\tdc.height = height;\n\t\tdc.depth = noImages;\n\t\tdc.dataCube = new short[width][height][noImages];\n\t\t\n\t\t// Loop through each image, and add its contents to the data cube\n\t\t// We loop through images as our outer loop because we want to optimise memory management\n\t\t// (Avoid loading all images into memory at once)\n\t\tfor (int k = 0; k < noImages; k++) {\n\t\t\tFile imageFile = new File(filenameSpecifier.replace(\"%\", Integer.toString(k+1))); // images indexed from 1\n\t\t\tBufferedImage image = ImageIO.read(imageFile);\n\t\t\n\t\t\t// Check for consistent image dimension\n\t\t\tif (image.getHeight() != height || image.getWidth() != width) {\n\t\t\t\tthrow new IOException(\"Images have inconsistent dimensions.\");\n\t\t\t}\n\t\t\t\n\t\t\t// Iterate through image adding its data to the datacube\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\t\tint colour = image.getRGB(i, j);\n\t\t\t\t\tdc.dataCube[i][j][k] = (short) (colour & 0xFF);\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t// Return the data cube\n\t\treturn dc;\n\t}", "public Texture build() {\n FrameBuffer buffer = new FrameBuffer(Format.RGB565, maxWidth, maxHeight, false);\n buffer.begin();\n for (TextureRegion texture : textures) {\n \t// TODO Créer la texture dynamiquement\n }\n buffer.end();\n Texture result = buffer.getColorBufferTexture();\n buffer.dispose();\n return result;\n }", "void setFormat(ImageFormat format);", "public Bitmap3DColor(\n float v1Red, float v1Green, float v1Blue, float v1Alpha,\n float v2Red, float v2Green, float v2Blue, float v2Alpha,\n float v3Red, float v3Green, float v3Blue, float v3Alpha,\n float v4Red, float v4Green, float v4Blue, float v4Alpha\n ) {\n if(\n v1Red < 0 || v1Red > 1 || v2Red < 0 || v2Red > 1 || v3Red < 0 || v3Red > 1 || v4Red < 0 || v4Red > 1 ||\n v1Green < 0 || v1Green > 1 || v2Green < 0 || v2Green > 1 || v3Green < 0 || v3Green > 1 || v4Green < 0 || v4Green > 1 ||\n v1Blue < 0 || v1Blue > 1 || v2Blue < 0 || v2Blue > 1 || v3Blue < 0 || v3Blue > 1 || v4Blue < 0 || v4Blue > 1 ||\n v1Alpha < 0 || v1Alpha > 1 || v2Alpha < 0 || v2Alpha> 1 || v3Alpha < 0 || v3Alpha > 1 || v4Alpha < 0 || v4Alpha > 1\n ) {\n throw new IllegalArgumentException(\"Values should be between 0 and 1\");\n }\n\n float[] colors = {\n v1Red, v1Green, v1Blue, v1Alpha,\n v2Red, v2Green, v2Blue, v2Alpha,\n v3Red, v3Green, v3Blue, v3Alpha,\n v4Red, v4Green, v4Blue, v4Alpha\n };\n\n ByteBuffer clb = ByteBuffer.allocateDirect(colors.length * 4);\n clb.order(ByteOrder.nativeOrder());\n this.colorBuffer = clb.asFloatBuffer();\n this.colorBuffer.put(colors);\n this.colorBuffer.position(0);\n }", "ImageProcessor(int width, int height) {\n this.width = width;\n this.height = height;\n centroids = new LinkedList<>();\n centroids.add(0);\n foregroundMovement = new LinkedList<>();\n foregroundMovement.add(0);\n foregroundMovement.add(0);\n tempForegroundMovement = new LinkedList<>();\n tempForegroundMovement.add(0);\n tempForegroundMovement.add(0);\n boxMovement = new LinkedList<>();\n boxMovement.add(0);\n boxMovement.add(0);\n\n // Used to communicate with game engine\n change = new PropertyChangeSupport(this);\n }", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public synchronized static void initialiseImages() \n {\n if (images == null) {\n GreenfootImage baseImage = new GreenfootImage(\"explosion-big.png\");\n int maxSize = baseImage.getWidth()/3;\n int delta = maxSize / IMAGE_COUNT;\n int size = 0;\n images = new GreenfootImage[IMAGE_COUNT];\n for (int i=0; i < IMAGE_COUNT; i++) {\n size = size + delta;\n images[i] = new GreenfootImage(baseImage);\n images[i].scale(size, size);\n }\n }\n }", "public MultiShape3D( Geometry geometry )\n {\n this( geometry, (Appearance)null );\n }", "void imageData(int width, int height, int[] rgba);", "public Cube() {\n\t\t// a float is 4 bytes, therefore we multiply the number if\n\t\t// vertices with 4.\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tvbb.order(ByteOrder.nativeOrder());\n\t\tvertexBuffer = vbb.asFloatBuffer();\n\t\tvertexBuffer.put(vertices);\n\t\tvertexBuffer.position(0);\n\t\t\n\t\t// Setup texture-coords-array buffer, in float. An float has 4 bytes (NEW)\n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t texBuffer.put(texCoords);\n\t texBuffer.position(0);\n\t\t\n\t\t// short is 2 bytes, therefore we multiply the number if\n\t\t// vertices with 2.\n//\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\n//\t\tibb.order(ByteOrder.nativeOrder());\n//\t\tindexBuffer = ibb.asShortBuffer();\n//\t\tindexBuffer.put(indices);\n//\t\tindexBuffer.position(0);\n\t}", "public RenderedImage create(ParameterBlock args,\n RenderingHints renderHints) {\n \n // Get the source image and the data type parameter.\n RenderedImage src = args.getRenderedSource(0);\n Integer datatype = (Integer)args.getObjectParameter(0);\n int type = datatype.intValue();\n\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);\n\n // If there is no change return the source image directly.\n if(layout == null && type == src.getSampleModel().getDataType()) {\n return src;\n }\n\n // Create or clone the ImageLayout.\n if(layout == null) {\n layout = new ImageLayout(src);\n } else {\n layout = (ImageLayout)layout.clone();\n }\n\n\tboolean isDataTypeChange = false;\n\n // Get prospective destination SampleModel.\n SampleModel sampleModel = layout.getSampleModel(src);\n\n // Create a new SampleModel if the type is not as desired.\n if (sampleModel.getDataType() != type) {\n int tileWidth = layout.getTileWidth(src);\n int tileHeight = layout.getTileHeight(src);\n int numBands = src.getSampleModel().getNumBands();\n\n SampleModel csm =\n RasterFactory.createComponentSampleModel(sampleModel,\n type,\n tileWidth,\n tileHeight,\n numBands);\n\n layout.setSampleModel(csm);\n\t isDataTypeChange = true;\n }\n\n\n // Check ColorModel.\n ColorModel colorModel = layout.getColorModel(null);\n if(colorModel != null &&\n !JDKWorkarounds.areCompatibleDataModels(layout.getSampleModel(src),\n colorModel)) {\n // Clear the mask bit if incompatible.\n layout.unsetValid(ImageLayout.COLOR_MODEL_MASK);\n }\n\n // Check whether anything but the ColorModel is changing.\n if (layout.getSampleModel(src) == src.getSampleModel() &&\n layout.getMinX(src) == src.getMinX() &&\n layout.getMinY(src) == src.getMinY() &&\n layout.getWidth(src) == src.getWidth() &&\n layout.getHeight(src) == src.getHeight() &&\n layout.getTileWidth(src) == src.getTileWidth() &&\n layout.getTileHeight(src) == src.getTileHeight() &&\n layout.getTileGridXOffset(src) == src.getTileGridXOffset() &&\n layout.getTileGridYOffset(src) == src.getTileGridYOffset()) {\n\n if(layout.getColorModel(src) == src.getColorModel()) {\n // Nothing changed: return the source directly.\n return src;\n } else {\n // Remove TileCache hint from RenderingHints if present.\n RenderingHints hints = renderHints;\n if(hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) {\n hints = new RenderingHints((Map)renderHints);\n hints.remove(JAI.KEY_TILE_CACHE);\n }\n\n // Only the ColorModel is changing.\n return new NullOpImage(src, layout, hints,\n OpImage.OP_IO_BOUND);\n }\n }\n\n\tif (isDataTypeChange == true) {\n\n\t // Add JAI.KEY_REPLACE_INDEX_COLOR_MODEL hint to renderHints\n\t if (renderHints == null) {\n\t\trenderHints = \n\t\t new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,\n\t\t\t\t Boolean.TRUE);\n\t\t\n\t } else if (!renderHints.containsKey(\n\t\t\t\t\tJAI.KEY_REPLACE_INDEX_COLOR_MODEL)) {\n\t\t// If the user specified a value for this hint, we don't\n\t\t// want to change that\n\t\trenderHints.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, \n\t\t\t\tBoolean.TRUE);\n\t }\n\t}\n\n return new CopyOpImage(src, renderHints, layout);\n }", "public static void experimentThree(boolean reuse) {\n System.out.println(\"EXPERIMENT THREE: cache=\" + reuse);\n ArrayList<BufferedImage> images = new ArrayList<BufferedImage>();\n\n images.add(new BufferedImage(2048, 2048, BufferedImage.TYPE_INT_ARGB));\n\n System.out.println(\"--> Objects Initialized!\");\n\n long timeBefore = System.nanoTime();\n\n for (int i = 0; i < 10000; i++) {\n BufferedImage img = null;\n\n if (reuse) {\n img = images.get(0).getSubimage(0, 0, 640, 480);\n\n // THIS TAKES SO MUCH TIME!!!\n clearImage(img);\n } else {\n img = new BufferedImage(640, 480, BufferedImage.TYPE_INT_ARGB);\n }\n\n Graphics2D g2 = img.createGraphics();\n\n g2.fillRect(10, 10, 600, 400);\n\n g2.dispose();\n }\n\n long timeAfter = System.nanoTime();\n\n System.out.println(\"--> Duration: \" + (timeAfter - timeBefore) * 1E-9);\n }", "public FrameBuffer(Texture texture, boolean hasDepth) {\r\n this.width = texture.getWidth();\r\n this.height = texture.getHeight();\r\n this.hasDepth = hasDepth;\r\n colorTexture = texture;\r\n// build();\r\n\r\n }", "public FloatImage(int cWidth, int cHeight) {\n super(cWidth, cHeight);\n this.pixels = new float[getWidth()*getHeight()];\n }", "public Image getThree();", "@Nonnull\n private BufferedImage createImage() {\n return new BufferedImage(getWidth(), getHeight(), getImageType().getType());\n }", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "public Card(String type, int number, BufferedImage backImage, \n BufferedImage turnedImage, BufferedImage overImage, int w, int h){\n\tthis.type = type;\n\tthis.number = number;\n\tthis.backImage = backImage;\n this.image = backImage;\n\tthis.turnedImage = turnedImage;\n this.overImage = overImage;\n\tthis.w = w;\n\tthis.h = h;\n \n // Create the VolatileImages\n try{\n backVimImage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n vimage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n turnedVimImage = VolatileImageLoader.loadFromBufferedImage(\n turnedImage, Transparency.TRANSLUCENT);\n overVimImage = VolatileImageLoader.loadFromBufferedImage(\n overImage, Transparency.TRANSLUCENT);\n }\n catch(IOException ioe){\n System.err.println(\"Could not convert from BufferedImage \" +\n \"to VolatileImage\");\n }\n }", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "private native void initMultiImage(MagickImage[] images)\n\t\t\tthrows MagickException;", "public ImageProperties setFormat(ImageFormatProperties format) {\n this.format = format;\n return this;\n }", "public ImageConfigThree(){\n\t\tsetup();\n\t\tsetMinPos(100);\n\t}", "@Override\r\n\tpublic void init() {\n\t\timg = new ImageClass();\r\n\t\timg.Init(imgPath);\r\n\t}", "public void set(RenderedImage[] images) {\n\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "Image createImage();", "private Images() {}", "public imageAlphaClass()\n {\n array_lineas = new ArrayList<>();\n array_modelos = new ArrayList<>();\n array_productos = new ArrayList<>();\n }", "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "public CUDA_RESOURCE_VIEW_DESC set(\n int format,\n long width,\n long height,\n long depth,\n int firstMipmapLevel,\n int lastMipmapLevel,\n int firstLayer,\n int lastLayer,\n IntBuffer reserved\n ) {\n format(format);\n width(width);\n height(height);\n depth(depth);\n firstMipmapLevel(firstMipmapLevel);\n lastMipmapLevel(lastMipmapLevel);\n firstLayer(firstLayer);\n lastLayer(lastLayer);\n reserved(reserved);\n\n return this;\n }", "ImageFormat getFormat();", "private void createImage(BufferedImage image) {\n texId.setId(glGenTextures());\n loaded = true;\n\n try {\n int[] pixels = new int[image.getHeight() * image.getWidth()];\n\n image.getRGB(0, 0, image.getWidth(), image.getHeight(), pixels, 0, image.getWidth());\n\n Window.console.println(\"Texture num : \" + texId.getId() + \" , loaded with path : \" + texId.getPath());\n\n ByteBuffer buffer = BufferUtils.createByteBuffer(image.getHeight() * image.getWidth() * 4);\n\n for (int i = 0; i < image.getHeight(); i++) {\n for (int j = 0; j < image.getWidth(); j++) {\n int pixel = pixels[i * image.getWidth() + j];\n buffer.put((byte) ((pixel >> 16) & 0xFF)); // RED\n buffer.put((byte) ((pixel >> 8) & 0xFF)); // GREEN\n buffer.put((byte) (pixel & 0xFF)); // BLUE\n buffer.put((byte) ((pixel >> 24) & 0xFF)); // ALPHA\n }\n }\n\n buffer.flip();\n\n this.width = image.getWidth();\n this.height = image.getHeight();\n\n setParam(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n setParam(GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n\n upload(buffer);\n GameManager.texManager.add(texId);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }", "public BufferedImage open(String id, int no)\n throws FormatException, IOException\n {\n if (!id.equals(currentId)) initFile(id);\n \n if (no < 0 || no >= getImageCount(id)) {\n throw new FormatException(\"Invalid image number: \" + no);\n }\n \n // First initialize:\n in.seek(offsets[no] + 12);\n byte[] toRead = new byte[4];\n in.read(toRead);\n int blockSize = batoi(toRead);\n toRead = new byte[1];\n in.read(toRead);\n // right now I'm gonna skip all the header info\n // check to see whether or not this is v2 data\n if (toRead[0] == 1) {\n in.skipBytes(128);\n }\n in.skipBytes(169);\n // read in the block of data\n toRead = new byte[blockSize];\n int read = 0;\n int left = blockSize;\n while (left > 0) {\n int i = in.read(toRead, read, left);\n read += i;\n left -= i;\n }\n byte[] pixelData = new byte[blockSize];\n int pixPos = 0;\n \n Dimension dim;\n try { dim = pictReader.getDimensions(toRead); }\n catch (Exception e) { dim = new Dimension(0, 0); }\n \n int length = toRead.length;\n int num, size, blockEnd;\n int totalBlocks = -1; // set to allow loop to start.\n int expectedBlock = 0;\n int pos = 0;\n int imagePos = 0;\n int imageSize = dim.width * dim.height;\n short[] flatSamples = new short[imageSize];\n byte[] temp;\n boolean skipflag;\n \n // read in deep grey pixel data into an array, and create a\n // BufferedImage out of it\n //\n // First, checks the existence of a deep gray block. If it doesn't exist,\n // assume it is PICT data, and attempt to read it.\n \n // check whether or not there is deep gray data\n while (expectedBlock != totalBlocks) {\n skipflag = false;\n while (pos + 7 < length &&\n (toRead[pos] != 73 || toRead[pos + 1] != 86 ||\n toRead[pos + 2] != 69 || toRead[pos + 3] != 65 ||\n toRead[pos + 4] != 100 || toRead[pos + 5] != 98 ||\n toRead[pos + 6] != 112 || toRead[pos + 7] != 113))\n {\n pos++;\n }\n if (pos + 32 > length) { // The header is 32 bytes long.\n if (expectedBlock == 0 && imageType[no] < 9) {\n // there has been no deep gray data, and it is supposed\n // to be a pict... *crosses fingers*\n try { return pictReader.openBytes(toRead); }\n catch (Exception e) {\n e.printStackTrace();\n throw new FormatException(\"No iPic comment block found\", e);\n }\n }\n else {\n throw new FormatException(\"Expected iPic comment block not found\");\n }\n }\n \n pos += 8; // skip the block type we just found\n \n // Read info from the iPic comment. This serves as a\n // starting point to read the rest.\n temp = new byte[] {\n toRead[pos], toRead[pos+1], toRead[pos+2], toRead[pos+3]\n };\n num = batoi(temp);\n if (num != expectedBlock) {\n throw new FormatException(\"Expected iPic block not found\");\n }\n expectedBlock++;\n temp = new byte[] {\n toRead[pos+4], toRead[pos+5], toRead[pos+6], toRead[pos+7]\n };\n if (totalBlocks == -1) {\n totalBlocks = batoi(temp);\n }\n else {\n if (batoi(temp) != totalBlocks) {\n throw new FormatException(\"Unexpected totalBlocks numbein.read\");\n }\n }\n \n // skip to size\n pos += 16;\n temp = new byte[] {\n toRead[pos], toRead[pos+1], toRead[pos+2], toRead[pos+3]\n };\n size = batoi(temp);\n pos += 8;\n blockEnd = pos + size;\n \n // copy into our data array.\n System.arraycopy(toRead, pos, pixelData, pixPos, size);\n pixPos += size;\n }\n int pixelValue = 0;\n pos = 0;\n \n // Now read the data and wrap it in a BufferedImage\n \n while (true) {\n if (pos + 1 < pixelData.length) {\n pixelValue = pixelData[pos] < 0 ? 256 + pixelData[pos] :\n (int) pixelData[pos] << 8;\n pixelValue += pixelData[pos + 1] < 0 ? 256 + pixelData[pos + 1] :\n (int) pixelData[pos + 1];\n }\n else throw new FormatException(\"Malformed LIFF data\");\n flatSamples[imagePos] = (short) pixelValue;\n imagePos++;\n if (imagePos == imageSize) { // done, return it\n return ImageTools.makeImage(flatSamples,\n dim.width, dim.height, 1, false);\n }\n }\n }", "public final PS3 init(VIDEO_MODE mode, COLOR_MODE color_mode, int frameRate){\n if( guid_ == null){\n return null;\n }\n if( camera_ != null){\n destroy();\n }\n \n mode_ = mode;\n color_mode_ = color_mode;\n frameRate_ = frameRate;\n\n camera_= LIBRARY.CLEyeCreateCamera(\n guid_, \n color_mode_.getIndex(), \n mode_.getIndex(), \n frameRate_\n );\n PS3_Library.Dimension width = new PS3_Library.Dimension(); \n PS3_Library.Dimension height = new PS3_Library.Dimension(); ;\n LIBRARY.CLEyeCameraGetFrameDimensions (camera_, width, height);\n width_ = width.getValue();\n height_ = height.getValue();\n pixels_ = new int[width_*height_];\n pixel_buffer_ = ByteBuffer.allocateDirect(width_*height_*color_mode_.getSize());\n setLed(true);\n// System.out.println(\"guid_.Data1 = \"+guid_.Data1);\n// System.out.println(\"VIDEOMODE = \"+mode);\n// System.out.println(\"COLORMODE = \"+color_mode);\n// System.out.println(\"frameRate = \"+frameRate);\n// System.out.println(\"width_ = \"+width_);\n// System.out.println(\"height_ = \"+height_);\n PS3_LIST_.add(this);\n return this;\n }", "public Image createImage() {\n if (source == null) {\n source = new MemoryImageSource(width, height, cModel, pixels, 0, width);\n source.setAnimated(true);\n }\n Image img = Toolkit.getDefaultToolkit().createImage(source);\n return img;\n }", "IMG createIMG();", "private void initImage() {\n this.image = (BufferedImage)this.createImage(DisplayPanel.COLS, DisplayPanel.ROWS);\n this.r.setRect(0, 0, DisplayPanel.ROWS, DisplayPanel.COLS);\n this.paint = new TexturePaint(this.image,\n this.r);\n }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public BranchGroup InitPj3d(int mWinWidth, int mWinHeight)\r\n\t{\t\r\n\t\t//toolbox = new PJ3DToolbox();\r\n\t\tsetLayout( new BorderLayout( ) );\r\n\t\t//parent.width = 640;\r\n\t\t//parent.resize(640, 480);\r\n\r\n\t\t//Frame frame = new Frame(\"pj3d\");\r\n\t frame.pack();\r\n\t frame.show();\r\n\t frame.setSize(mWinWidth, mWinHeight);\r\n\r\n\t GraphicsConfiguration gc = parent.getGraphicsConfiguration();\r\n\t \r\n\t // default colors\r\n\t backgroundColor = new Color3f(0f, 0f, 0f);\r\n\t ambientColor = new Color3f(0.2f, 0.2f, 0.2f);\r\n\t diffuseColor = new Color3f(0.8f, 0.8f, 0.8f);\r\n\t emissiveColor = new Color3f(0.5f, 0.5f, 0.5f);\r\n\t specularColor = new Color3f(1.0f, 1.0f, 1.0f);\r\n\t textColor = new Color3f(0.5f, 0.5f, 0.5f);\r\n\t shininess = DEFAULTCOLOR;\r\n\t alpha = 0.0f;\r\n\t \r\n\t // default background um spaeter drauf zugreifen zu koennen\r\n\t //bg = new Background();\r\n\t bg = InitBackground();\r\n\t \r\n\t mb = new Pj3dScene(frame, gc, bg);\r\n\t branch = mb.InitBranch();\r\n\t \r\n\t // get the canvas3d to add the mouse and keylisteners\r\n\t canvas = mb.getMBCanvas3D();\r\n\t canvas.addKeyListener(this);\r\n\t canvas.addMouseListener(this);\r\n\t canvas.addMouseMotionListener(this);\r\n\t frame.add( \"Center\", canvas );\r\n\t \r\n\t frame.show( );\r\n\t frame.addWindowListener(new Pj3dWindowClosingAdapter(true));\r\n\t \r\n\t return branch;\r\n\t}", "public abstract void setImageFormat(String format);", "private static DataCube generateDataCubeFromColourImage(String filename) throws IOException {\n\t\t// Get an image from the filename\n\t\tBufferedImage image = ImageIO.read(new File(filename));\n\t\t\n\t\t// Read meta data from image and create a data cube\n\t\tint width = image.getWidth();\n\t\tint height = image.getHeight();\n\t\tDataCube dc = new DataCube();\n\t\tdc.width = width;\n\t\tdc.height = height;\n\t\tdc.depth = 3;\n\t\tdc.dataCube = new short[width][height][3];\n\t\t\n\t\t// Read all of the data from the image into the datacube data\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tint colour = image.getRGB(i, j);\n\t\t\t\tdc.dataCube[i][j][0] = (short) ((colour >> 16) & 0xFF);\n\t\t\t\tdc.dataCube[i][j][1] = (short) ((colour >> 8) & 0xFF);\n\t\t\t\tdc.dataCube[i][j][2] = (short) ((colour >> 0) & 0xFF);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// We've loaded all the data, so return the data cube\n\t\treturn dc;\n\t}", "public OutputImageManager(PImage img, Tile[] tiles, int tileSize, int pdfScale, float evenRowShift, float oddRowShift, int background)\n {\n this.mosaic = null;\n this.background = background;\n this.tiles = tiles;\n this.evenRowShift = evenRowShift;\n this.oddRowShift = oddRowShift;\n this.tileSize = tileSize;\n this.pdfScale = pdfScale;\n this.infoGraphics = loadImage(\"keys.png\");\n toRerender = true;\n }", "private BufferedImage initImg() throws IOException {\n\t\tint h = 256, w = 256;\n\t\tBufferedImage img = new BufferedImage(h, w, BufferedImage.TYPE_INT_ARGB);\n\t\t\n\t\t//int red = 0xff000000 + 0x00ff0000 + 0x00000000 + 0x00000000;\n\t\tshort max = 0, min = 255, c = max;\n\t\tint color = SimpleImageViewer.getIntPixel(c, c, c);\n\t\t\n\t\tfor (int y = 0; y < h; y++) {\n\t\t\tfor (int x = 0; x < w; x++) {\n\t\t\t\timg.setRGB(x, y, color);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn img;\n\t}", "public ImageLoader(int threadCount, Type type) {\r\n init(threadCount,type);\r\n }", "public interface MultiLayerModel extends ReadOnlyModel {\n\n /**\n * filters image based on operation given.\n *\n * @param img the image\n * @param multiplier the number of times to filter\n * @param operation operation to do\n * @return array of pixels\n */\n List<List<Pixel>> filter(Image img, int multiplier, String operation);\n\n /**\n * transforms image based on operation given.\n *\n * @param img the image\n * @param operation operation to do\n * @return array of pixels\n */\n List<List<Pixel>> transform(Image img, String operation);\n\n /**\n * creates a layer in the model.\n */\n Layer createLayer();\n\n /**\n * A method used to set the given image.\n *\n * @param image the image\n * @param layer the layer\n */\n void setImage(Layer layer, Image image);\n\n /**\n * A method meant to determine the visibility of the layer, determined by the user; is true unless\n * the user specifies that the layer should be invisible.\n *\n * @param visibility the visibility\n * @param layer the layer\n */\n void setVisibility(Layer layer, boolean visibility);\n\n\n /**\n * Adds a layer to this model.\n *\n * @param whichLayer where to add layer\n * @param layer the layer\n */\n\n void addLayer(Layer layer, int whichLayer);\n\n\n /**\n * Creates an image from a pixelArray.\n *\n * @param pixelArray the array\n * @return the created Image\n */\n Image createImage(List<List<Pixel>> pixelArray);\n\n\n /**\n * Removes a layer from this model.\n *\n * @param whichLayer the layer to remove\n */\n void removeLayer(int whichLayer);\n\n\n /**\n * Determines if the layers all have same dimensions.\n *\n * @param layers the layers\n * @return the boolean true or false\n */\n boolean sameDimensions(List<Layer> layers);\n\n /**\n * Determines if the pixelArray as equal dimensions.\n *\n * @param pixelArray the pixelArray\n * @return the boolean true or false\n */\n boolean equalPixelArrayDim(List<List<Pixel>> pixelArray);\n\n /**\n * Gets top most visible layer.\n *\n * @return the top most visible layer\n */\n Layer getTopMostVisible();\n\n\n}", "public CanvasComponent(FloatProperty video_source_ratio_property,WritableImage writable_image,WritablePixelFormat<ByteBuffer> pixel_format,int width,int height) {\r\n super(new CanvasBuffer(video_source_ratio_property, width, height));\r\n this.writable_image = writable_image;\r\n this.pixel_format = pixel_format;\r\n\r\n }", "public CubeGL2(double width, double height, double depth) {\n // Define points for a cube.\n // X, Y, Z\n mCubeVertexData = new float[]\n {\n // Front face\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n // Right face\n 1.0f, 1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, -1.0f,\n 1.0f, 1.0f, -1.0f,\n // Back face\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n // Left face\n -1.0f, 1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, 1.0f, 1.0f,\n // Top face\n -1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n // Bottom face\n 1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n };\n\n for (int i = 0; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) width;\n }\n for (int i = 1; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) height;\n }\n for (int i = 2; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) depth;\n }\n\n // R, G, B, A\n mCubeColourData = new float[]\n {\n // Front face\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n // Right face\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n // Back face\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n // Left face\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n // Top face\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n // Bottom face\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f\n };\n // X, Y, Z\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Right face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Left face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n // Bottom face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f\n };\n // X, Y\n // Texture coordinate data.\n mCubeTextureCoordinateData = new float[]\n {\n // Front face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Right face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Back face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Left face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Top face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Bottom face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f\n };\n // Initialize the buffers.\n mCubeVertices = ByteBuffer.allocateDirect(mCubeVertexData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeVertices.put(mCubeVertexData).position(0);\n mCubeColours = ByteBuffer.allocateDirect(mCubeColourData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeColours.put(mCubeColourData).position(0);\n mCubeNormals = ByteBuffer.allocateDirect(mCubeNormalData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeNormals.put(mCubeNormalData).position(0);\n mCubeTextureCoordinates = ByteBuffer.allocateDirect(mCubeTextureCoordinateData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeTextureCoordinates.put(mCubeTextureCoordinateData).position(0);\n Matrix.setIdentityM(mModelMatrix, 0);\n }", "public PngImageDataReader() {\n this(null);\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "public static final PS3 create(int index){\n if( !libraryLoaded() ){\n System.out.println(\"PS3-ERROR: cannot create camera, dll not loaded\");\n return null;\n }\n \n PS3_Library.GUID guid = LIBRARY.CLEyeGetCameraUUID( index );\n if( guid.Data1 == 0){\n System.out.println(\"PS3-ERROR: index(\"+index+\") is not valid\");\n return null;\n }\n return new PS3(index, guid);\n }", "public FloatImage(int width, int height, double[] pixels) {\n\t\tthis(width, height);\n\t\tfor (int i=0; i<pixels.length; i++) {\n\t\t\tthis.pixels[i] = (float) pixels[i];\n\t\t}\n\t}", "public interface Model {\n /**\n * Generate a image of checker board pattern (8 X 8) of the given size.\n *\n * @param size the size of the image\n * @return the 3D array of the generated checkerboard.\n */\n int[][][] generateChecker(int size);\n\n /**\n * Generate a image if rainbow stripes (7 colors) with the given size.\n *\n * @param height the height of the image\n * @param width the width of the image\n * @param vOrH the stripes should be vertical of horizontal.\n * @return the 3D array of the generated rainbow stripes.\n */\n int[][][] generateRainbow(int height, int width, VOrH vOrH);\n\n /**\n * Generate the appropriate-sized flags of a country with the given ratio.\n *\n * @param ratio the given ratio of the flag.\n * @param country the country whose flag will be generated.\n * @return the 3D array of the generated flag.\n */\n int[][][] generateFlags(int ratio, String country);\n\n /**\n * Blur the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array of the blurred image\n */\n int[][][] blurImage(int[][][] imageArray, int height, int width);\n\n /**\n * Sharpen the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array the sharpened image\n */\n int[][][] sharpenImage(int[][][] imageArray, int height, int width);\n\n /**\n * Grey scale the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return 3D array of the greyscale image\n */\n int[][][] greyscaleImage(int[][][] imageArray, int height, int width);\n\n /**\n * Sepia- tone the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array of the sepia-tone image\n */\n int[][][] sepiaToneImage(int[][][] imageArray, int height, int width);\n\n /**\n * Dither the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return 3D array of the dithered image\n */\n int[][][] ditheringImage(int[][][] imageArray, int height, int width);\n\n /**\n * Mosaic the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image.\n * @param width the width of the image.\n * @param seedNum the number of seeds.\n * @return the 3D array of mosaic image.\n */\n int[][][] mosaicingImage(int[][][] imageArray, int height, int width, int seedNum);\n\n /**\n * Undo. Return a previous result before the operation.\n *\n * @return a previous result.\n * @throws EmptyStackException when there is no previous one.\n */\n int[][][] undo() throws EmptyStackException;\n\n /**\n * Redo. Return a previous result before an undo.\n *\n * @return a previous result before an undo.\n * @throws EmptyStackException when there is no previous one.\n */\n int[][][] redo() throws EmptyStackException;\n\n /**\n * Set the stacks for undo and redo. Add a new element to the undo stack, and clear the redo\n * stack.\n * @param add the image in 3D array to be added to the stack.\n */\n void setStack(int[][][] add);\n}", "public ImageFile(String filename) throws ImageException, FileNotFoundException, IOException {\r\n\tFile file = new File(filename);\r\n\tif (!file.exists()){\r\n\t\tthrow new ImageException(\"image file '\"+filename+\"' not found\");\r\n\t}\r\n\ttry {\r\n\t\t//\r\n\t\t// try native format\r\n\t\t//\r\n\t\tloadNativeFormat(filename);\r\n\t\tSystem.out.println(\"ImageFile.ImageFile(\"+filename+\"), read successfully as native format\");\r\n\t}catch (Exception e){\r\n\t\tSystem.out.println(\"ImageFile.ImageFile(\"+filename+\"), exception loading native format, trying TIFF, exception=\"+e.getMessage());\r\n\t\ttry {\t\t\t\t\r\n\t\t\t// try TIFF format\r\n\t\t\tloadTIFFFormat(new FileTiffInputSource(filename));\r\n\t\t\tSystem.out.println(\"ImageFile.ImageFile(\"+filename+\"), read successfully as TIFF\");\r\n\t\t\treturn;\r\n\t\t}catch (Exception e2){\r\n\t\t\tSystem.out.println(\"ImageFile:ImageFile(\"+filename+\"), exception loading TIFF, trying zip format, exception=\"+e2.getMessage());\r\n\t\t\tbyte buffer[] = new byte[65536];\r\n\t\t\tFileInputStream fis = new FileInputStream(filename);\r\n\t\t\ttry {\r\n\t\t\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\r\n\t\t\t\tint numBytesRead = 0;\r\n\t\t\t\twhile ((numBytesRead = fis.read(buffer)) > 0){\r\n\t\t\t\t\tbos.write(buffer,0,numBytesRead);\r\n\t\t\t\t}\r\n\t\t\t\tbyte imageData[] = bos.toByteArray();\r\n\t\t\t\tbyte entries[][] = getZipFileEntries(imageData);\r\n\t\t\t\tif (entries!=null){\r\n\t\t\t\t\tVCImage vcImage = getVCImageFromZSeries(entries);\r\n\t\t\t\t\tcreateFromVCImage(vcImage);\r\n\t\t\t\t\tSystem.out.println(\"ImageFile.ImageFile(\"+filename+\"), read successfully\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new ImageException(\"Image format not recognized for file '\"+filename+\"'\");\r\n\t\t\t\t}\r\n\t\t\t}finally {\r\n\t\t\t\tif (fis!=null){\r\n\t\t\t\t\tfis.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n}", "private GDIWindowSurfaceData(WComponentPeer paramWComponentPeer, SurfaceType paramSurfaceType) {\n/* 242 */ super(paramSurfaceType, paramWComponentPeer.getDeviceColorModel()); int m;\n/* 243 */ ColorModel colorModel = paramWComponentPeer.getDeviceColorModel();\n/* 244 */ this.peer = paramWComponentPeer;\n/* 245 */ int i = 0, j = 0, k = 0;\n/* */ \n/* 247 */ switch (colorModel.getPixelSize()) {\n/* */ case 24:\n/* */ case 32:\n/* 250 */ if (colorModel instanceof DirectColorModel) {\n/* 251 */ byte b = 32; break;\n/* */ } \n/* 253 */ m = 24;\n/* */ break;\n/* */ \n/* */ default:\n/* 257 */ m = colorModel.getPixelSize(); break;\n/* */ } \n/* 259 */ if (colorModel instanceof DirectColorModel) {\n/* 260 */ DirectColorModel directColorModel = (DirectColorModel)colorModel;\n/* 261 */ i = directColorModel.getRedMask();\n/* 262 */ j = directColorModel.getGreenMask();\n/* 263 */ k = directColorModel.getBlueMask();\n/* */ } \n/* 265 */ this\n/* 266 */ .graphicsConfig = (Win32GraphicsConfig)paramWComponentPeer.getGraphicsConfiguration();\n/* 267 */ this.solidloops = this.graphicsConfig.getSolidLoops(paramSurfaceType);\n/* */ \n/* */ \n/* 270 */ Win32GraphicsDevice win32GraphicsDevice = (Win32GraphicsDevice)this.graphicsConfig.getDevice();\n/* 271 */ initOps(paramWComponentPeer, m, i, j, k, win32GraphicsDevice.getScreen());\n/* 272 */ setBlitProxyKey(this.graphicsConfig.getProxyKey());\n/* */ }", "public static JTensor newWithStorage3d(\n JStorage storage, long storageOffset,\n long size0, long stride0,\n long size1, long stride1,\n long size2, long stride2) {\n return new JTensor(\n TH.THTensor_(newWithStorage3d)(storage, storageOffset,\n size0, stride0, size1, stride1, size2, stride2)\n );\n }", "@JsonCreator\r\n\tpublic ImageStyle (\r\n\t\t\tfinal @JsonProperty (\"type\") String type,\r\n\t\t\tfinal @JsonProperty (\"opacity\") Double opacity,\r\n\t\t\tfinal @JsonProperty (\"rotateWithView\") Boolean rotateWithView,\r\n\t\t\tfinal @JsonProperty (\"rotation\") Double rotation,\r\n\t\t\tfinal @JsonProperty (\"scale\") Double scale,\r\n\t\t\tfinal @JsonProperty (\"snapToPixel\") Boolean snapToPixel,\r\n\t\t\tfinal @JsonProperty (\"radius\") Double radius,\r\n\t\t\tfinal @JsonProperty (\"fill\") FillStyle fill,\r\n\t\t\tfinal @JsonProperty (\"stroke\") StrokeStyle stroke) {\r\n\t\t\r\n\t\tthis.type = type;\r\n\t\tthis.opacity = opacity;\r\n\t\tthis.rotateWithView = rotateWithView;\r\n\t\tthis.rotation = rotation;\r\n\t\tthis.scale = scale;\r\n\t\tthis.snapToPixel = snapToPixel;\r\n\t\tthis.radius = radius;\r\n\t\tthis.fill = fill;\r\n\t\tthis.stroke = stroke;\r\n\t}", "public SXRRenderTextureArray(SXRContext ctx, int width, int height, int samples, int layers)\n {\n super(ctx, NativeRenderTexture.ctorArray(width, height, samples, layers));\n }", "@Override\n protected void putImageBuffer(BufferedImage input) \n {\n // Load data in. \n for (int y = 0; y < height; y++) \n {\n for (int x = 0; x < width; x++) \n {\n\t\tdouble h = getHeight(input, x, y);\n\t\tdouble du = 0;\n\t\tdouble dv = 0;\n\t\t\n\t\tif(x > 0)\n\t\t{\t\n\t\t du += h - getHeight(input, x-1, y);\n\t\t}\n\t\tif(x < width - 1)\n\t\t{\n\t\t du += getHeight(input, x+1, y) - h;\n\t\t}\n\t\tif(y > 0)\n\t\t{\n\t\t dv += h - getHeight(input, x , y-1);\n\t\t}\n\t\tif(y < height - 1)\n\t\t{\n\t\t dv += getHeight(input, x, y+1) - h;\n\t\t}\n\t\t\n\t\tdouble u = -du;\n\t\tdouble v = -dv;\n\t\tdouble w = 0.25;\n \n\t\tdouble n = Math.sqrt(u*u + v*v + w*w);\n\n byte a = (byte)(h * 255.0);\n byte r = (byte)((u / n + 1.0) / 2.0 * 255.0);\n byte g = (byte)((v / n + 1.0) / 2.0 * 255.0);\n byte b = (byte)((w / n + 1.0) / 2.0 * 255.0);\n \n int index = (x + y * allocatedWidth) * 4;\n pixelData.put(index++, r);\n pixelData.put(index++, g);\n pixelData.put(index++, b);\n pixelData.put(index , a);\n }\n }\n }", "Image createImage(List<List<Pixel>> pixelArray);", "@SuppressWarnings(\"OverridableMethodCallInConstructor\")\n public Model(BufferedImage image) {\n this.image = image;\n resetcontrols();\n }", "private void run2DC(int numImages) {\r\n\r\n this.buildProgressBar();\r\n int totalComputation = numImages * numIterations;\r\n int computationCount = 0;\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = new int[2];\r\n extents[0] = srcImage.getExtents()[0];\r\n extents[1] = srcImage.getExtents()[1];\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n length = xDim * yDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 2.5D image set\r\n sigmas = new float[2];\r\n sigmas[0] = sigmas[1] = stdDev;\r\n\r\n makeKernels1D(false);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n\r\n int startIndex;\r\n for (int imgNumber = 0; imgNumber < numImages; imgNumber++) {\r\n startIndex = 4 * imgNumber * length;\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, startIndex, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, startIndex, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, startIndex, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (computationCount) /\r\n (totalComputation - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n computationCount++;\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1,startIndex, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2,startIndex, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3,startIndex, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n } // end for (imgNumber = 0; ...)\r\n destImage.calcMinMax();\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public Texture createTexture(int width, int height, int filter) throws IOException {\n/* 372 */ ImageData ds = new EmptyImageData(width, height);\n/* */ \n/* 374 */ return getTexture(ds, filter);\n/* */ }", "public static BufferedImage fromArray(float[] data, int width, int height) {\n int[] convertedData = new int[width * height];\n int colorValue;\n for (int i = 0; i < convertedData.length; i++) {\n colorValue = Math.round(data[i]);\n convertedData[i] = ((colorValue << 16) & 0xff0000)\n + ((colorValue << 8) & 0x00ff00) + (colorValue & 0xff);\n }\n BufferedImage image = new BufferedImage(width, height,\n BufferedImage.TYPE_INT_RGB);\n image.setRGB(0, 0, width, height, convertedData, 0, width);\n return image;\n }", "public ImageBuffer(int w, int h, int[] p, ColorModel cm, String s) {\n width = w;\n height = h;\n pixels = p;\n cModel = cm;\n name = s;\n }", "public Texture(String filename) {\n\t\ttry {\n\t\t\tfileIn = new FileInputStream(filename);\n\t\t\tdecoder = new PNGDecoder(fileIn);\n\t\t\tbuff = ByteBuffer.allocateDirect(4*decoder.getWidth()*4*decoder.getWidth());\n\t\t\tdecoder.decode(buff, decoder.getWidth(), Format.RGBA);\n\t\t\tbuff.flip();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Error occurred. Exiting...\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tdims = new Point2D(decoder.getWidth(), decoder.getHeight());\n\t}", "protected AbstractMatrix3D() {}", "public BoundingBox3d(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) {\n this.xmin = xmin;\n this.xmax = xmax;\n this.ymin = ymin;\n this.ymax = ymax;\n this.zmin = zmin;\n this.zmax = zmax;\n }", "public Element(final int type, final int count, final int size, final int materialId, final int[][] inputs, final int handle, final float[][] values) {\n\t\t\t\t//android.util.Log.d(TAG+\".Geometry.Element\",\"NEW\");\n\t\t\t\tthis.type = type;\n\t\t\t\tthis.count = count;\n\t\t\t\tthis.size = size;\n\t\t\t\tthis.materialId = materialId;\n\t\t\t\tthis.inputs = inputs;\n\t\t\t\tthis.values = values;\n\t\t\t\tthis.handle = handle;\n\t\t\t\tfor(int[]input : inputs) this.stride += input[SIZE];\n\t\t\t\tthis.stride *= GlBuffer.SIZEOF_JAVA_FLOAT;\n\t\t\t}", "public BufferedImage create() {\n checkDimensions();\n final BufferedImage image = createImage();\n getImagePainter().paint(image);\n return image;\n }", "public void Load(String filename)\n\t{\n\t\tTF3D_PARSER PARSER = new TF3D_PARSER();\n\t\tTF3D_Material mat;\n\t\tint BLOCK_ID;\n\t\tString tmp_str;\n\n\t\tSystem.out.println(\"Loading config... \" + filename);\n\t\tBoolean Exist = F3D.AbstractFiles.ExistFile(filename);\n\n\t\tif (!Exist)\n\t\t{\n\t\t\tSystem.out.print(\"Can't load file:\" + filename);\t\t\t\n\t\t}\n\n\t\tPARSER.ParseFile(F3D.AbstractFiles.GetFullPath(filename));\n\n\t\tfor (BLOCK_ID = 0; BLOCK_ID < PARSER.GetBlocksCount(); BLOCK_ID++)\n\t\t{\n\t\t\tPARSER.SetBlock(BLOCK_ID);\n\t\t\tmat = new TF3D_Material();\n\n\t\t\t// get type\n\t\t\ttmp_str = PARSER.GetAs_STRING(\"type\");\n\n\t\t\tif (tmp_str.equalsIgnoreCase(\"MAT_TEXTURE\"))\n\t\t\t{\n\t\t\t\tmat.typ = F3D.MAT_TYPE_TEXTURE;\n\t\t\t}\n\n\t\t\tif (tmp_str.equalsIgnoreCase(\"MAT_SHADER\"))\n\t\t\t{\n\t\t\t\tmat.typ = F3D.MAT_TYPE_SHADER;\n\t\t\t\t// get Shader name\n\t\t\t\tmat.shader_name = PARSER.GetAs_STRING(\"shader\");\n\t\t\t\tmat.shader_id = F3D.Shaders.FindByName(mat.shader_name);\n\t\t\t\tif (mat.shader_id >= 0)\n\t\t\t\t{\n\t\t\t\t\tmat.use_shader = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// get name\n\t\t\tmat.name = PARSER.GetAs_STRING(\"name\");\n\n\t\t\t// get material colors deinition\t\t\t \n\n\t\t\tmat.colors.SetDiffuse(PARSER.GetAs_VECTOR4F(\"diffuse\"));\n\t\t\tmat.colors.SetAmbient(PARSER.GetAs_VECTOR4F(\"ambient\"));\n\t\t\tmat.colors.SetSpecular(PARSER.GetAs_VECTOR4F(\"specular\"));\n\t\t\tmat.colors.SetEmissive(PARSER.GetAs_VECTOR4F(\"emissive\"));\n\t\t\tmat.colors.shinisess = PARSER.GetAs_FLOAT(\"shinisess\");\n\t\t\t\n\t\t\tif (mat.colors.shinisess>128.0f)\n\t\t\t{\n\t\t\t\tmat.colors.shinisess=127.0f;\n\t\t\t}\n\t\t\t\n\t\t\t// get texture 0 .. 3\n\t\t\tmat.texture_unit[0].texture_name = PARSER.GetAs_STRING(\"texture_0\");\n\t\t\tmat.texture_unit[1].texture_name = PARSER.GetAs_STRING(\"texture_1\");\n\t\t\tmat.texture_unit[2].texture_name = PARSER.GetAs_STRING(\"texture_2\");\n\t\t\tmat.texture_unit[3].texture_name = PARSER.GetAs_STRING(\"texture_3\");\n\n\t\t\t// get event 0 .. 3\n\t\t\tmat.texture_unit[0].event_name = PARSER.GetAs_STRING(\"event_0\");\n\t\t\tmat.texture_unit[1].event_name = PARSER.GetAs_STRING(\"event_1\");\n\t\t\tmat.texture_unit[2].event_name = PARSER.GetAs_STRING(\"event_2\");\n\t\t\tmat.texture_unit[3].event_name = PARSER.GetAs_STRING(\"event_3\");\n\n\t\t\t// get depthtest\n\t\t\tmat.bDepthTest = PARSER.GetAs_BOOLEAN(\"depthtest\");\n\n\t\t\t// get alphatest\n\t\t\tmat.bAlphaTest = PARSER.GetAs_BOOLEAN(\"alphatest\");\n\n\t\t\t// get faceculling\n\t\t\tmat.bFaceCulling = PARSER.GetAs_BOOLEAN(\"faceculling\");\n\t\t\tF3D.Log.warning(\"Culling\", mat.name + \" \" + mat.bFaceCulling.toString());\n\n\t\t\t// prepare textures\n\t\t\tfor (int t = 0; t < F3D.MAX_TMU; t++)\n\t\t\t{\n\t\t\t\tif (mat.texture_unit[t].texture_name.equals(\"none\"))\n\t\t\t\t{\n\t\t\t\t\tmat.texture_unit[t].bTexture = false;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tBoolean exist = F3D.Textures.Exist(mat.texture_unit[t].texture_name);\n\n\t\t\t\t\tif (exist)\n\t\t\t\t\t{\n\t\t\t\t\t\tmat.texture_unit[t].texture_id = F3D.Textures.FindByName(mat.texture_unit[t].texture_name);\n\t\t\t\t\t\tmat.texture_unit[t].bTexture = true;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tF3D.Log.error(\"TF3D_SurfaceManager\", \"Texture name: '\" + mat.texture_unit[t].texture_name + \"' missing (texture you have to load first !)\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (mat.texture_unit[t].event_name.equalsIgnoreCase(\"none\"))\n\t\t\t\t{\n\t\t\t\t\tmat.texture_unit[t].bEvent = false;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tBoolean exist = F3D.MaterialEvents.Exist(mat.texture_unit[t].event_name);\n\n\t\t\t\t\tif (exist)\n\t\t\t\t\t{\n\t\t\t\t\t\tmat.texture_unit[t].event_id = F3D.MaterialEvents.FindByName(mat.texture_unit[t].event_name);\n\t\t\t\t\t\tmat.texture_unit[t].bEvent = true;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tF3D.Log.error(\"TF3D_SurfaceManager\", \"Event name: '\" + mat.texture_unit[t].event_name + \"' missing (events you have to load first !)\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.Add(mat);\n\t\t}\n\n\t}", "public static DeformableMesh3D createTestBlock(double w, double h, double depth){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n\n pts.add(new double[]{-w/2, -h/2, depth/2});\n pts.add(new double[]{-w/2, h/2, depth/2});\n pts.add(new double[]{w/2, h/2, depth/2});\n pts.add(new double[]{w/2, -h/2, depth/2});\n\n pts.add(new double[]{-w/2, -h/2, -depth/2});\n pts.add(new double[]{-w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, -h/2, -depth/2});\n\n //back face\n connections.add(new int[]{0, 4});\n connections.add(new int[]{0, 1});\n connections.add(new int[]{1, 5});\n connections.add(new int[]{5, 4});\n\n //front face\n connections.add(new int[]{3, 7});\n connections.add(new int[]{2, 3});\n connections.add(new int[]{2, 6});\n connections.add(new int[]{6, 7});\n\n //front-back connections.\n connections.add(new int[]{3, 0});\n connections.add(new int[]{1, 2});\n connections.add(new int[]{5, 6});\n connections.add(new int[]{7, 4});\n\n //top\n triangles.add(new int[]{0, 2, 1});\n triangles.add(new int[]{0,3,2});\n //top-diagonal\n connections.add(new int[]{0, 2});\n\n //back\n triangles.add(new int[]{0, 1, 5});\n triangles.add(new int[]{0,5,4});\n connections.add(new int[]{0, 5});\n\n //right\n triangles.add(new int[]{1,2,5});\n triangles.add(new int[]{5,2,6});\n connections.add(new int[]{5, 2});\n\n //front\n triangles.add(new int[]{2,3,6});\n triangles.add(new int[]{6,3,7});\n connections.add(new int[]{3, 6});\n\n //left\n triangles.add(new int[]{3,0,4});\n triangles.add(new int[]{3,4,7});\n connections.add(new int[]{3, 4});\n\n //bottom\n triangles.add(new int[]{4,5,6});\n triangles.add(new int[]{4,6,7});\n connections.add(new int[]{4, 6});\n return new DeformableMesh3D(pts, connections, triangles);\n\n }", "public void setBfImageByData(int [][][] data){\r\n\t\tBfImage = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);\r\n\t\tfor (int i = 0; i < width; i++) {\r\n\t\t\tfor (int j = 0; j < height; j++) {\r\n\t\t\t\tint [] rgb = data[j][i];\r\n\t\t\t\tif (rgb[0] == -1){\t//is transparent\r\n\t\t\t\t\tBfImage.setRGB(i, j, Transparency.TRANSLUCENT);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tBfImage.setRGB(i, j, Utils.getRGB(rgb[0], rgb[1], rgb[2]));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void divideImage() {\n\n int chunkWidth = 70;\n int chunkHeight = 70;\n int count = 0;\n imgs = new BufferedImage[100];\n for (int x = 0; x < 10; x++)\n for (int y = 0; y < 10; y++) {\n\n try{\n\n imgs[count] = new BufferedImage(chunkWidth, chunkHeight, img.getType());\n Graphics2D gr = imgs[count++].createGraphics();\n gr.drawImage(img, 0, 0, chunkWidth, chunkHeight, chunkWidth * y, chunkHeight * x, chunkWidth * y + chunkWidth, chunkHeight * x + chunkHeight, null);\n gr.dispose();\n\n } catch (Exception e){\n\n // e.printStackTrace();\n\n }\n\n }\n\n }", "public PgmImageInfo(String filename)\n throws PgmReadException, IOException\n {\n BufferedReader reader = new BufferedReader(new FileReader(new File(filename)));\n\n // read in the file type\n String fileType = reader.readLine();\n\n if(fileType == null || !fileType.equalsIgnoreCase(\"P2\")) {\n System.out.println(\"readPgmFile: Wrong file type!\");\n throw new PgmReadException(\"readPgmFile: Wrong file type!\");\n }\n\n\n // read in the dimensions of the image\n String imageSizeString = reader.readLine();\n\n if(imageSizeString == null) {\n System.out.println(\"readPgmFile: No Image Dimensions!\");\n throw new PgmReadException(\"readPgmFile: No Image Dimensions!\");\n }\n\n // bypass any comments\n while(imageSizeString.startsWith(\"#\")) {\n comments.add(imageSizeString);\n imageSizeString = reader.readLine();\n }\n\n // done with comments, so image size string is actually the image size\n\n // split the string up to get the dimensions\n String[] tokens = imageSizeString.split(\"\\\\s+\");\n\n if(tokens.length != 2) {\n System.out.println(\"readPgmFile: Incorrrect Image Dimension Definitions!\");\n throw new PgmReadException(\"readPgmFile: Incorrrect Image Dimension Definitions!\");\n }\n\n // create and populate the image array\n int[][] pgmArray = new int[Integer.parseInt(tokens[1])][Integer.parseInt(tokens[0])];\n\n // get the max value\n maxValue = Integer.parseInt(reader.readLine());\n\n String imageRow = reader.readLine();\n int row = 0;\n while(imageRow != null) {\n\n tokens = imageRow.split(\"\\\\s+\");\n\n for(int rowIndex = 0; rowIndex < tokens.length; ++rowIndex)\n pgmArray[row][rowIndex] = Integer.parseInt(tokens[rowIndex]);\n\n imageRow = reader.readLine();\n ++row;\n }\n\n img = pgmArray;\n\n // set width and height\n height = img.length;\n width = img[0].length;\n }", "public MagickImage(MagickImage[] images) throws MagickException {\n\t\tinitMultiImage(images);\n\t}", "public BufferedImage buildBufferedImage(Dimension size) {\n/* 101 */ return new BufferedImage(size.width, size.height, 1);\n/* */ }", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "public J3DAttribute () {}", "public FloatImage(int cWidth, int cHeight, float nValue) {\n super(cWidth, cHeight);\n this.pixels = new float[getWidth()*getHeight()];\n for (int i=0; i<this.getWidth()*this.getHeight();i++) {\n this.pixels[i] = nValue;\n }\n }", "public ImageExtractor(String filename, RtpTypeRepository typeRepository)\r\n throws UnsupportedFormatException, IOException {\r\n super(filename,typeRepository);\r\n processor = new SimpleProcessor(getFormat(), new RGBFormat(null,\r\n Format.NOT_SPECIFIED, // maxDataLength\r\n Format.intArray, // type\r\n Format.NOT_SPECIFIED,\r\n 32, // bpp\r\n Format.NOT_SPECIFIED, Format.NOT_SPECIFIED,\r\n Format.NOT_SPECIFIED, // masks\r\n Format.NOT_SPECIFIED, Format.NOT_SPECIFIED, // strides\r\n RGBFormat.FALSE, // flipped\r\n Format.NOT_SPECIFIED)); // endian);\r\n }", "private void createLayers(boolean bl, int[] arrn) {\n ILayer[] arriLayer = this.mLayers;\n if (bl) {\n for (int i = -1 + this.mLayerCount; i >= 0; --i) {\n arriLayer[i] = new FixedCapacityLayer(arrn[i]);\n }\n return;\n }\n for (int i = -1 + this.mLayerCount; i >= 0; --i) {\n arriLayer[i] = new DynamicCapacityLayer(arrn[i]);\n }\n }", "public void build_buffers(float[] color /*RGBA*/) {\n int i;\n int offset = 0;\n final float[] vertexData = new float[\n mVertices.size() / 3\n * STRIDE_IN_FLOATS];\n\n float vx, vy, vz;\n\n /*\n * loop to generate vertices.\n */\n for (i = 0; i < mVertices.size(); i += 3) {\n\n vertexData[offset++] = mVertices.get(i + 0);\n vertexData[offset++] = mVertices.get(i + 1);\n vertexData[offset++] = mVertices.get(i + 2);\n\n vertexData[offset++] = 0.0f; // set normal to zero for now\n vertexData[offset++] = 0.0f;\n vertexData[offset++] = 0.0f;\n\n if (mHaveMaterialColor) {\n vertexData[offset++] = mColors.get(i + 0);\n vertexData[offset++] = mColors.get(i + 1);\n vertexData[offset++] = mColors.get(i + 2);\n vertexData[offset++] = 1.0f; // TODO: unwire the alpha?\n } else {\n // color value\n vertexData[offset++] = color[0];\n vertexData[offset++] = color[1];\n vertexData[offset++] = color[2];\n vertexData[offset++] = color[3];\n }\n }\n\n // calculate the normal,\n // set it in the packed VBO.\n // If current normal is non-zero, average it with previous value.\n\n int v1i, v2i, v3i;\n for (i = 0; i < mIndices.size(); i += 3) {\n v1i = mIndices.get(i + 0) - 1;\n v2i = mIndices.get(i + 1) - 1;\n v3i = mIndices.get(i + 2) - 1;\n\n v1[0] = mVertices.get(v1i * 3 + 0);\n v1[1] = mVertices.get(v1i * 3 + 1);\n v1[2] = mVertices.get(v1i * 3 + 2);\n\n v2[0] = mVertices.get(v2i * 3 + 0);\n v2[1] = mVertices.get(v2i * 3 + 1);\n v2[2] = mVertices.get(v2i * 3 + 2);\n\n v3[0] = mVertices.get(v3i * 3 + 0);\n v3[1] = mVertices.get(v3i * 3 + 1);\n v3[2] = mVertices.get(v3i * 3 + 2);\n\n n = XYZ.getNormal(v1, v2, v3);\n\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n }\n\n /*\n * debug - print out list of formated vertex data\n */\n// for (i = 0; i < vertexData.length; i+= STRIDE_IN_FLOATS) {\n// vx = vertexData[i + 0];\n// vy = vertexData[i + 1];\n// vz = vertexData[i + 2];\n// String svx = String.format(\"%6.2f\", vx);\n// String svy = String.format(\"%6.2f\", vy);\n// String svz = String.format(\"%6.2f\", vz);\n//\n// Log.w(\"data \", i + \" x y z \"\n// + svx + \" \" + svy + \" \" + svz + \" and color = \"\n// + vertexData[i + 6] + \" \" + vertexData[i + 7] + \" \" + vertexData[i + 8]);\n// }\n\n final FloatBuffer vertexDataBuffer = ByteBuffer\n .allocateDirect(vertexData.length * BYTES_PER_FLOAT)\n .order(ByteOrder.nativeOrder())\n .asFloatBuffer();\n vertexDataBuffer.put(vertexData).position(0);\n\n if (vbo[0] > 0) {\n GLES20.glDeleteBuffers(1, vbo, 0);\n }\n GLES20.glGenBuffers(1, vbo, 0);\n\n if (vbo[0] > 0) {\n GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vbo[0]);\n GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER, vertexDataBuffer.capacity() * BYTES_PER_FLOAT,\n vertexDataBuffer, GLES20.GL_STATIC_DRAW);\n\n // GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);\n } else {\n // errorHandler.handleError(ErrorHandler.ErrorType.BUFFER_CREATION_ERROR, \"glGenBuffers\");\n throw new RuntimeException(\"error on buffer gen\");\n }\n\n /*\n * create the buffer for the indices\n */\n offset = 0;\n int x;\n final short[] indexData = new short[mIndices.size()];\n for (x = 0; x < mIndices.size(); x++) {\n\n short index = mIndices.get(x).shortValue();\n indexData[offset++] = --index;\n }\n mTriangleIndexCount = indexData.length;\n\n /*\n * debug - print out list of formated vertex data\n */\n// short ix, iy, iz;\n// for (i = 0; i < indexData.length; i += 3) {\n// ix = indexData[i + 0];\n// iy = indexData[i + 1];\n// iz = indexData[i + 2];\n//\n// Log.w(\"data \", i + \" i1 i2 i3 \"\n// + ix + \" \" + iy + \" \" + iz );\n// }\n\n final ShortBuffer indexDataBuffer = ByteBuffer\n .allocateDirect(indexData.length * BYTES_PER_SHORT).order(ByteOrder.nativeOrder())\n .asShortBuffer();\n indexDataBuffer.put(indexData).position(0);\n\n if (ibo[0] > 0) {\n GLES20.glDeleteBuffers(1, ibo, 0);\n }\n GLES20.glGenBuffers(1, ibo, 0);\n if (ibo[0] > 0) {\n GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, ibo[0]);\n GLES20.glBufferData(GLES20.GL_ELEMENT_ARRAY_BUFFER,\n indexDataBuffer.capacity()\n * BYTES_PER_SHORT, indexDataBuffer, GLES20.GL_STATIC_DRAW);\n GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, 0);\n GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);\n } else {\n // errorHandler.handleError(ErrorHandler.ErrorType.BUFFER_CREATION_ERROR, \"glGenBuffers\");\n throw new RuntimeException(\"error on buffer gen\");\n }\n }" ]
[ "0.7079169", "0.70469934", "0.68360776", "0.6714423", "0.6563682", "0.6562966", "0.6455756", "0.52635086", "0.5250456", "0.52494353", "0.5217552", "0.5198906", "0.51747066", "0.5169584", "0.5156716", "0.50953186", "0.5088857", "0.50596803", "0.5009067", "0.49761504", "0.49692976", "0.4965217", "0.49620527", "0.49430743", "0.49167252", "0.49157673", "0.4875649", "0.48747423", "0.4871952", "0.48536688", "0.48480254", "0.48371187", "0.48308057", "0.47994438", "0.4798473", "0.47922224", "0.47875386", "0.4783264", "0.4782156", "0.47345614", "0.4733685", "0.47330305", "0.47233668", "0.47062975", "0.46995828", "0.46905166", "0.46848074", "0.46815386", "0.46764863", "0.46708557", "0.46689668", "0.46627647", "0.46580222", "0.4640583", "0.46340802", "0.4619149", "0.46176457", "0.45928153", "0.45911348", "0.45898333", "0.45736614", "0.45724246", "0.45624462", "0.45594049", "0.4557387", "0.45532176", "0.4552334", "0.45520633", "0.45507112", "0.45464674", "0.4524889", "0.45146853", "0.4502", "0.44973332", "0.4494608", "0.44829315", "0.44823432", "0.44709083", "0.44671455", "0.4465731", "0.44598997", "0.4459434", "0.44554618", "0.44544584", "0.44517088", "0.4440104", "0.44372153", "0.44366482", "0.44331163", "0.4428887", "0.44239557", "0.4422017", "0.4421478", "0.44186535", "0.44171113", "0.44060183", "0.44033143", "0.43863177", "0.43825138", "0.43812683" ]
0.7194676
0
Constructs a 3D image component object using the specified format, and the BufferedImage array. The image class is set to ImageClass.BUFFERED_IMAGE. Default values are used for all other parameters.
public ImageComponent3D(int format, BufferedImage[] images) { ((ImageComponent3DRetained)this.retained).processParams(format, images[0].getWidth(null), images[0].getHeight(null), images.length); for (int i=0; i<images.length; i++) { ((ImageComponent3DRetained)this.retained).set(i, images[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "ImageComponent3D() {}", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth,\n\t\t\t boolean\tbyReference,\n\t\t\t boolean\tyUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "private void run3D() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBuffer[];\r\n float resultBuffer[];\r\n float gaussianBuffer[];\r\n float gradientBuffer[];\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n sourceBuffer = new float[length];\r\n resultBuffer = new float[length];\r\n gaussianBuffer = new float[length];\r\n gradientBuffer = new float[length];\r\n } catch (OutOfMemoryError e){\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n srcImage.exportData(0, length, sourceBuffer);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n algoSepConvolver = new AlgorithmSeparableConvolver(gaussianBuffer, sourceBuffer,\r\n extents, xDataRound, yDataRound, zDataRound, srcImage.isColorImage());\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) / (numIterations - 1) * 100)), activeImage);\r\n }\r\n\r\n algoSepConvolver.run();\r\n gradientMagnitude3D(gaussianBuffer, gradientBuffer);\r\n upDateImage3D(resultBuffer, sourceBuffer, gradientBuffer);\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n for (int i = 0; i < length; i++) { sourceBuffer[i] = resultBuffer[i]; }\r\n }\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n algoSepConvolver.finalize();\r\n algoSepConvolver = null;\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n destImage.importData(0, resultBuffer, true);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "private void run3DC() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, 0, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, 0, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, 0, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) /\r\n (numIterations - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude3D(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude3D(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude3D(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage3D(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage3D(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage3D(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1, 0, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2, 0, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3, 0, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n destImage.calcMinMax();\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "@Override\n protected void putImageBuffer(BufferedImage input) \n {\n // Load data in. \n for (int y = 0; y < height; y++) \n {\n for (int x = 0; x < width; x++) \n {\n\t\tdouble h = getHeight(input, x, y);\n\t\tdouble du = 0;\n\t\tdouble dv = 0;\n\t\t\n\t\tif(x > 0)\n\t\t{\t\n\t\t du += h - getHeight(input, x-1, y);\n\t\t}\n\t\tif(x < width - 1)\n\t\t{\n\t\t du += getHeight(input, x+1, y) - h;\n\t\t}\n\t\tif(y > 0)\n\t\t{\n\t\t dv += h - getHeight(input, x , y-1);\n\t\t}\n\t\tif(y < height - 1)\n\t\t{\n\t\t dv += getHeight(input, x, y+1) - h;\n\t\t}\n\t\t\n\t\tdouble u = -du;\n\t\tdouble v = -dv;\n\t\tdouble w = 0.25;\n \n\t\tdouble n = Math.sqrt(u*u + v*v + w*w);\n\n byte a = (byte)(h * 255.0);\n byte r = (byte)((u / n + 1.0) / 2.0 * 255.0);\n byte g = (byte)((v / n + 1.0) / 2.0 * 255.0);\n byte b = (byte)((w / n + 1.0) / 2.0 * 255.0);\n \n int index = (x + y * allocatedWidth) * 4;\n pixelData.put(index++, r);\n pixelData.put(index++, g);\n pixelData.put(index++, b);\n pixelData.put(index , a);\n }\n }\n }", "public NativeImageFormat(Object imgData, int nChannels, int nRows, int nCols) {\r\n if (imgData instanceof short[]) {\r\n cmmFormat |= bytesSh(2);\r\n }\r\n else if (imgData instanceof byte[]) {\r\n cmmFormat |= bytesSh(1);\r\n }\r\n else\r\n // awt.47=First argument should be byte or short array\r\n throw new IllegalArgumentException(Messages.getString(\"awt.47\")); //$NON-NLS-1$\r\n\r\n cmmFormat |= channelsSh(nChannels);\r\n\r\n rows = nRows;\r\n cols = nCols;\r\n\r\n imageData = imgData;\r\n\r\n dataOffset = 0;\r\n }", "public static JTensor newWithStorage3d(\n JStorage storage, long storageOffset,\n long size0, long stride0,\n long size1, long stride1,\n long size2, long stride2) {\n return new JTensor(\n TH.THTensor_(newWithStorage3d)(storage, storageOffset,\n size0, stride0, size1, stride1, size2, stride2)\n );\n }", "public static BufferedImage fromArray(float[] data, int width, int height) {\n int[] convertedData = new int[width * height];\n int colorValue;\n for (int i = 0; i < convertedData.length; i++) {\n colorValue = Math.round(data[i]);\n convertedData[i] = ((colorValue << 16) & 0xff0000)\n + ((colorValue << 8) & 0x00ff00) + (colorValue & 0xff);\n }\n BufferedImage image = new BufferedImage(width, height,\n BufferedImage.TYPE_INT_RGB);\n image.setRGB(0, 0, width, height, convertedData, 0, width);\n return image;\n }", "public static VImage toVImage(BufferedImage image) {\n if (image.getType() != BufferedImage.TYPE_3BYTE_BGR) {\n throw new IllegalArgumentException(\"Only BufferedImages of type TYPE_3BYTE_BGR can currently be converted to VImage\");\n }\n\n byte[] buffer = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();\n return ValueFactory.newVImage(image.getHeight(), image.getWidth(), buffer);\n }", "public static BufferedImage bytes2RGB(int width, byte[] buffer) {\r\n int height = buffer.length / width / 3;\r\n ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);\r\n ColorModel cm = new ComponentColorModel(cs, false, false,\r\n Transparency.OPAQUE, DataBuffer.TYPE_BYTE);\r\n SampleModel sm = cm.createCompatibleSampleModel(width, height);\r\n DataBufferByte db = new DataBufferByte(buffer, width * height);\r\n WritableRaster raster = Raster.createWritableRaster(sm, db, null);\r\n BufferedImage result = new BufferedImage(cm, raster, false, null);\r\n\r\n return result;\r\n }", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "void imageData(int width, int height, int[] rgba);", "public r3inputlayer(double[] inputarray, int depth){\r\n double[][][] newarray = new double[inputarray.length][1][depth + 2];\r\n for(int i = 0; i < inputarray.length; i++){\r\n newarray[i][0][0] = inputarray[i];\r\n }\r\n this.state = newarray;\r\n this.width = inputarray.length;\r\n }", "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "public Bitmap3DColor(\n float v1Red, float v1Green, float v1Blue, float v1Alpha,\n float v2Red, float v2Green, float v2Blue, float v2Alpha,\n float v3Red, float v3Green, float v3Blue, float v3Alpha,\n float v4Red, float v4Green, float v4Blue, float v4Alpha\n ) {\n if(\n v1Red < 0 || v1Red > 1 || v2Red < 0 || v2Red > 1 || v3Red < 0 || v3Red > 1 || v4Red < 0 || v4Red > 1 ||\n v1Green < 0 || v1Green > 1 || v2Green < 0 || v2Green > 1 || v3Green < 0 || v3Green > 1 || v4Green < 0 || v4Green > 1 ||\n v1Blue < 0 || v1Blue > 1 || v2Blue < 0 || v2Blue > 1 || v3Blue < 0 || v3Blue > 1 || v4Blue < 0 || v4Blue > 1 ||\n v1Alpha < 0 || v1Alpha > 1 || v2Alpha < 0 || v2Alpha> 1 || v3Alpha < 0 || v3Alpha > 1 || v4Alpha < 0 || v4Alpha > 1\n ) {\n throw new IllegalArgumentException(\"Values should be between 0 and 1\");\n }\n\n float[] colors = {\n v1Red, v1Green, v1Blue, v1Alpha,\n v2Red, v2Green, v2Blue, v2Alpha,\n v3Red, v3Green, v3Blue, v3Alpha,\n v4Red, v4Green, v4Blue, v4Alpha\n };\n\n ByteBuffer clb = ByteBuffer.allocateDirect(colors.length * 4);\n clb.order(ByteOrder.nativeOrder());\n this.colorBuffer = clb.asFloatBuffer();\n this.colorBuffer.put(colors);\n this.colorBuffer.position(0);\n }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public static com.jme.image.Image loadImage(InputStream fis, boolean flip, boolean exp32) throws\n IOException {\n byte red = 0;\n byte green = 0;\n byte blue = 0;\n byte alpha = 0;\n //open a stream to the file\n BufferedInputStream bis = new BufferedInputStream(fis, 8192);\n DataInputStream dis = new DataInputStream(bis);\n //Read the TGA header\n idLength = (short) dis.read();\n colorMapType = (short) dis.read();\n imageType = (short) dis.read();\n cMapStart = flipEndian(dis.readShort());\n cMapLength = flipEndian(dis.readShort());\n cMapDepth = (short) dis.read();\n xOffset = flipEndian(dis.readShort());\n yOffset = flipEndian(dis.readShort());\n width = flipEndian(dis.readShort());\n height = flipEndian(dis.readShort());\n pixelDepth = (short) dis.read();\n imageDescriptor = (short) dis.read();\n //Skip image ID\n if (idLength > 0)\n bis.skip(idLength);\n // Allocate image data array\n byte[] rawData = null;\n int dl;\n if ((pixelDepth == 32)||(exp32)) {\n rawData = new byte[width * height * 4];\n dl=4;\n } else {\n rawData = new byte[width * height * 3];\n dl=3;\n }\n int rawDataIndex = 0;\n \n // Faster than doing a 24-or-32 check on each individual pixel,\n // just make a seperate loop for each.\n if (pixelDepth == 24)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n if(dl==4) {\n // create an alpha channel\n rawData[rawDataIndex++] = (byte)255;\n }\n \n }\n }\n else if (pixelDepth == 32)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n alpha = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n rawData[rawDataIndex++] = alpha;\n }\n }\n fis.close();\n //Get a pointer to the image memory\n ByteBuffer scratch = ByteBuffer.allocateDirect(rawData.length);\n scratch.clear();\n scratch.put(rawData);\n scratch.rewind();\n // Create the jme.image.Image object\n com.jme.image.Image textureImage = new com.jme.image.Image();\n if (dl == 4)\n textureImage.setType(com.jme.image.Image.RGBA8888);\n else\n textureImage.setType(com.jme.image.Image.RGB888);\n textureImage.setWidth(width);\n textureImage.setHeight(height);\n textureImage.setData(scratch);\n return textureImage;\n }", "void setFormat(ImageFormat format);", "public void setBfImageByData(int [][][] data){\r\n\t\tBfImage = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);\r\n\t\tfor (int i = 0; i < width; i++) {\r\n\t\t\tfor (int j = 0; j < height; j++) {\r\n\t\t\t\tint [] rgb = data[j][i];\r\n\t\t\t\tif (rgb[0] == -1){\t//is transparent\r\n\t\t\t\t\tBfImage.setRGB(i, j, Transparency.TRANSLUCENT);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tBfImage.setRGB(i, j, Utils.getRGB(rgb[0], rgb[1], rgb[2]));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void readBuffer(int slice, float buffer[]) throws IOException {\r\n int i = 0;\r\n int b1,b2;\r\n int j;\r\n int nBytes;\r\n long progress, progressLength, mod;\r\n\r\n switch (dataType) {\r\n case ModelStorageBase.UBYTE:\r\n nBytes = xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n for ( j = 0; j < nBytes; j++, i++) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), false);\r\n buffer[i] = byteBuffer[j] & 0xff;\r\n }\r\n break;\r\n case ModelStorageBase.SHORT:\r\n nBytes = 2*xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n for (j = 0; j < nBytes; j+=2, i++ ) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), false);\r\n b1 = getUnsignedByte(byteBuffer, j);\r\n b2 = getUnsignedByte(byteBuffer, j+1);\r\n buffer[i] = (short)((b2 << 8) + b1); // little endian\r\n }\r\n break;\r\n case ModelStorageBase.ARGB:\r\n // from 2 color merged psuedocolor\r\n nBytes = 2*xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n //For the moment I compress RGB images to unsigned bytes.\r\n for (j = 0; j < nBytes; j+=2, i+=4 ) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), true);\r\n buffer[i] = 255;\r\n buffer[i+1] = getUnsignedByte(byteBuffer, j);\r\n buffer[i+2] = getUnsignedByte(byteBuffer, j+1);\r\n buffer[i+3] = 0;\r\n }\r\n break;\r\n } // switch(dataType)\r\n }", "public BufferedImage convertToBimage(int[][][] TmpArray) {\n\n int width = TmpArray.length;\n int height = TmpArray[0].length;\n\n BufferedImage tmpimg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int a = TmpArray[x][y][0];\n int r = TmpArray[x][y][1];\n int g = TmpArray[x][y][2];\n int b = TmpArray[x][y][3];\n\n //set RGB value\n\n int p = (a << 24) | (r << 16) | (g << 8) | b;\n tmpimg.setRGB(x, y, p);\n\n }\n }\n return tmpimg;\n }", "public FloatSampleBuffer(byte[] buffer, int offset, int byteCount,\n\t\t\tAudioFormat format) {\n\t\tthis(format.getChannels(), byteCount\n\t\t\t\t/ (format.getSampleSizeInBits() / 8 * format.getChannels()),\n\t\t\t\tformat.getSampleRate());\n\t\tinitFromByteArray(buffer, offset, byteCount, format);\n\t}", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public static Texture readTexture(BufferedImage img) {\n\t\tint bytesPerPixel = -1, pix;\n\t\t\n\t\t// 3 or 4 bytes per pixel?\n\t\tif( img.getColorModel().hasAlpha() )\n\t\t\tbytesPerPixel = 4;\n\t\telse\n\t\t\tbytesPerPixel = 3;\n\t\n\t\t// Allocate a ByteBuffer\n\t\tByteBuffer unpackedPixels = \n\t\t\tByteBuffer.allocateDirect(img.getWidth() * img.getHeight() * bytesPerPixel);\n\t\t\n\t\t// Pack the pixels into the ByteBuffer in RGBA, 4 byte format.\n\t\tfor(int row = img.getHeight() - 1; row >= 0; row--) {\n\t\t\tfor (int col = 0; col < img.getWidth(); col++) {\n\t\t\t\tpix = img.getRGB(col,row); // Should return the pixel in format TYPE_INT_ARGB \n\t\t\t\tunpackedPixels.put((byte) ((pix >> 16) & 0xFF)); // red\n\t\t\t\tunpackedPixels.put((byte) ((pix >> 8 ) & 0xFF)); // green\n\t\t\t\tunpackedPixels.put((byte) ((pix ) & 0xFF)); // blue\n\t\t\t\tif (bytesPerPixel == 4) {\n\t\t\t\t\tunpackedPixels.put((byte) ((pix >> 24) & 0xFF)); // alpha\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(bytesPerPixel == 4 ) {\n\t\t\treturn new Texture(unpackedPixels,img.getWidth(), img.getHeight(), \n\t\t\t\t\tTexture.TEXTURE_4BYTE_RGBA);\n\t\t} else {\n\t\t\treturn new Texture(unpackedPixels,img.getWidth(), img.getHeight(), \n\t\t\t\t\tTexture.TEXTURE_3BYTE_RGB);\n\t\t}\n\t}", "public static BufferedImage sharpenByMatrix3(BufferedImage img) {\n\t\tint width = img.getWidth();\n\t\tint height = img.getHeight();\n\t\tint[] pixels = new int[width*height];\n\t\timg.getRGB(0, 0, width, height, pixels, 0, width);\n\t\tint[][] pixelArr = quantize.changeDimension2(pixels, width);\n\t\tint[][] newArr = new int[height][width];\n\t\tfor (int i = 0 ;i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tnewArr[j][i] = getNewData(pixelArr, coefficient9, i, j);\n\t\t\t}\n\t\t}\n\t\tBufferedImage image = new BufferedImage(width, height, img.getType());\n\t\timage.setRGB(0, 0, width, height, quantize.changeDimension1(newArr), 0, width);\n\t\treturn image;\n\t}", "public BufferedImgBase(byte[] byteimg) throws IOException{\n // convert byte[] back to a BufferedImage\n InputStream is = new ByteArrayInputStream(byteimg);\n BufferedImage newBi = ImageIO.read(is);\n //this.img --> BufferedImage\n this.img = newBi;\n }", "public Surface(int var1, int var2, int var3, Component var4) {\n super();\n this.interlace = false;\n this.loggedIn = false;\n this.field_731 = var4;\n this.field_744 = var2;\n this.field_746 = var1;\n this.field_726 = this.field_723 = var1;\n this.field_727 = this.field_724 = var2;\n this.field_725 = var1 * var2;\n this.pixels = new int[var1 * var2];\n this.spritePixels = new int[var3][];\n this.field_742 = new boolean[var3];\n this.spriteColoursUsed = new byte[var3][];\n this.spriteColourList = new int[var3][];\n this.field_736 = new int[var3];\n this.field_737 = new int[var3];\n this.spriteWidthFull = new int[var3];\n this.field_741 = new int[var3];\n this.field_738 = new int[var3];\n this.field_739 = new int[var3];\n if(var1 > 1 && var2 > 1 && var4 != null) {\n this.field_728 = new DirectColorModel(32, 16711680, '\\uff00', 255);\n int var5 = this.field_723 * this.field_724;\n int var6 = 0;\n if(field_759 || var6 < var5) {\n do {\n this.pixels[var6] = 0;\n ++var6;\n } while(var6 < var5);\n }\n\n this.field_732 = var4.createImage(this);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n }\n\n }", "public static native PointerByReference OpenMM_3D_DoubleArray_create(int size1, int size2, int size3);", "public Pixmap(ByteBuffer buffer, int width, int height){\n if(!buffer.isDirect()) throw new ArcRuntimeException(\"Pixmaps may only use direct/native ByteBuffers!\");\n\n this.width = width;\n this.height = height;\n this.pixels = buffer;\n this.handle = -1;\n\n buffer.position(0).limit(buffer.capacity());\n }", "private BufferedImage user_space(BufferedImage image) {\n // create new_img with the attributes of image\n BufferedImage new_img = new BufferedImage(image.getWidth(),\n image.getHeight(), BufferedImage.TYPE_3BYTE_BGR);\n Graphics2D graphics = new_img.createGraphics();\n graphics.drawRenderedImage(image, null);\n graphics.dispose(); // release all allocated memory for this image\n return new_img;\n }", "public Card(String type, int number, BufferedImage backImage, \n BufferedImage turnedImage, BufferedImage overImage, int w, int h){\n\tthis.type = type;\n\tthis.number = number;\n\tthis.backImage = backImage;\n this.image = backImage;\n\tthis.turnedImage = turnedImage;\n this.overImage = overImage;\n\tthis.w = w;\n\tthis.h = h;\n \n // Create the VolatileImages\n try{\n backVimImage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n vimage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n turnedVimImage = VolatileImageLoader.loadFromBufferedImage(\n turnedImage, Transparency.TRANSLUCENT);\n overVimImage = VolatileImageLoader.loadFromBufferedImage(\n overImage, Transparency.TRANSLUCENT);\n }\n catch(IOException ioe){\n System.err.println(\"Could not convert from BufferedImage \" +\n \"to VolatileImage\");\n }\n }", "public Image(MyColor [][] myImage) {\n originalImage = myImage; \n }", "public static JTensor newWithSize3d(long size0, long size1, long size2) {\n return new JTensor(\n TH.THTensor_(newWithSize3d)(size0, size1, size2)\n );\n }", "public FramebufferObject(GL2 gl, Texture2D.Format format, Texture2D.Datatype datatype, int width, int height, int colorTextureCount, boolean makeDepthTexture, boolean rectTextures) throws OpenGLException\n\t{\n\t\t/* Sanity check. */\n\t\tif (colorTextureCount == 0 && !makeDepthTexture)\n\t\t{\n\t\t\tthrow new OpenGLException(\"It is not valid to make an FBO with no color buffers and no depth buffer.\");\n\t\t}\n\t\t\n\t\tint maxColorTextures[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_MAX_COLOR_ATTACHMENTS, maxColorTextures, 0);\n\t\tif (colorTextureCount > maxColorTextures[0])\n\t\t{\n\t\t\tthrow new OpenGLException(\"Cannot create an FBO with \" + colorTextureCount + \" render targets. Your graphics card only supports \" + maxColorTextures[0] + \".\");\n\t\t}\n\t\t\n\t\tmWidth = width;\n\t\tmHeight = height;\n\t\t\n\t\t/* Create OpenGL FBO. */\n\t\tint names[] = new int[1];\n\t\tgl.glGenFramebuffers(1, names, 0);\n\t\tmHandle = names[0];\n\t\t\n\t\t/* Remember previous FBO binding, and then bind this one. */\n\t\tint previousBinding[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING, previousBinding, 0);\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, mHandle);\n\t\t\n\t\t/* Create and attach color textures. */\n\t\tmColorTextures = new Texture2D[colorTextureCount];\n\t\t\n\t\tfor (int i = 0; i < colorTextureCount; ++i)\n\t\t{\n\t\t\tmColorTextures[i] = new Texture2D(gl, format, datatype, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_COLOR_ATTACHMENT0 + i, mColorTextures[i].getTextureTarget(), mColorTextures[i].getHandle(), 0);\n\t\t}\n\t\t\n\t\t/* Create and attach depth texture, if requested. */\n\t\tif (makeDepthTexture)\n\t\t{\n\t\t\tmDepthTexture = new Texture2D(gl, Format.DEPTH, Datatype.INT32, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_DEPTH_ATTACHMENT, mDepthTexture.getTextureTarget(), mDepthTexture.getHandle(), 0);\n\t\t}\n\n\t\t/* Make sure everything is set up properly. */\n\t\tint status = gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER);\n\t\tif (status != GL2.GL_FRAMEBUFFER_COMPLETE)\n\t\t{\n\t\t\tthrow new OpenGLException(\"Framebuffer incomplete: \" + status + \".\");\n\t\t}\n\t\t\n\t\t/* Restore whatever FBO was bound before this function was called. */\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, previousBinding[0]);\n\t}", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "public void set(RenderedImage[] images) {\n\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public static NativeImageFormat createNativeImageFormat(BufferedImage bi) {\r\n NativeImageFormat fmt = new NativeImageFormat();\r\n\r\n switch (bi.getType()) {\r\n case BufferedImage.TYPE_INT_RGB: {\r\n fmt.cmmFormat = INT_RGB_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_INT_ARGB:\r\n case BufferedImage.TYPE_INT_ARGB_PRE: {\r\n fmt.cmmFormat = INT_ARGB_LCMS_FMT;\r\n fmt.alphaOffset = 3;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_INT_BGR: {\r\n fmt.cmmFormat = INT_BGR_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_3BYTE_BGR: {\r\n fmt.cmmFormat = THREE_BYTE_BGR_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_4BYTE_ABGR_PRE:\r\n case BufferedImage.TYPE_4BYTE_ABGR: {\r\n fmt.cmmFormat = FOUR_BYTE_ABGR_LCMS_FMT;\r\n fmt.alphaOffset = 0;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_BYTE_GRAY: {\r\n fmt.cmmFormat = BYTE_GRAY_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_USHORT_GRAY: {\r\n fmt.cmmFormat = USHORT_GRAY_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_BYTE_BINARY:\r\n case BufferedImage.TYPE_USHORT_565_RGB:\r\n case BufferedImage.TYPE_USHORT_555_RGB:\r\n case BufferedImage.TYPE_BYTE_INDEXED: {\r\n // A bunch of unsupported formats\r\n return null;\r\n }\r\n\r\n default:\r\n break; // Try to look at sample model and color model\r\n }\r\n\r\n\r\n if (fmt.cmmFormat == 0) {\r\n ColorModel cm = bi.getColorModel();\r\n SampleModel sm = bi.getSampleModel();\r\n\r\n if (sm instanceof ComponentSampleModel) {\r\n ComponentSampleModel csm = (ComponentSampleModel) sm;\r\n fmt.cmmFormat = getFormatFromComponentModel(csm, cm.hasAlpha());\r\n fmt.scanlineStride = calculateScanlineStrideCSM(csm, bi.getRaster());\r\n } else if (sm instanceof SinglePixelPackedSampleModel) {\r\n SinglePixelPackedSampleModel sppsm = (SinglePixelPackedSampleModel) sm;\r\n fmt.cmmFormat = getFormatFromSPPSampleModel(sppsm, cm.hasAlpha());\r\n fmt.scanlineStride = calculateScanlineStrideSPPSM(sppsm, bi.getRaster());\r\n }\r\n\r\n if (cm.hasAlpha())\r\n fmt.alphaOffset = calculateAlphaOffset(sm, bi.getRaster());\r\n }\r\n\r\n if (fmt.cmmFormat == 0)\r\n return null;\r\n\r\n if (!fmt.setImageData(bi.getRaster().getDataBuffer())) {\r\n return null;\r\n }\r\n\r\n fmt.rows = bi.getHeight();\r\n fmt.cols = bi.getWidth();\r\n\r\n fmt.dataOffset = bi.getRaster().getDataBuffer().getOffset();\r\n\r\n return fmt;\r\n }", "public Cube() {\n\t\t// a float is 4 bytes, therefore we multiply the number if\n\t\t// vertices with 4.\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tvbb.order(ByteOrder.nativeOrder());\n\t\tvertexBuffer = vbb.asFloatBuffer();\n\t\tvertexBuffer.put(vertices);\n\t\tvertexBuffer.position(0);\n\t\t\n\t\t// Setup texture-coords-array buffer, in float. An float has 4 bytes (NEW)\n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t texBuffer.put(texCoords);\n\t texBuffer.position(0);\n\t\t\n\t\t// short is 2 bytes, therefore we multiply the number if\n\t\t// vertices with 2.\n//\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\n//\t\tibb.order(ByteOrder.nativeOrder());\n//\t\tindexBuffer = ibb.asShortBuffer();\n//\t\tindexBuffer.put(indices);\n//\t\tindexBuffer.position(0);\n\t}", "public BufferedImage buildBufferedImage(Dimension size) {\n/* 101 */ return new BufferedImage(size.width, size.height, 1);\n/* */ }", "public CMLVector3(double[] array) {\r\n this.setXYZ3(array);\r\n }", "public Tile3D(Context context, int id, float w, float h) {\n\t // Setup vertex array buffer. Vertices in float. A float has 4 bytes\n\t ByteBuffer vbb = ByteBuffer.allocateDirect(12 * 4);\n\t vbb.order(ByteOrder.nativeOrder()); // Use native byte order\n\t vertexBuffer = vbb.asFloatBuffer(); // Convert from byte to float\n\t \n\t imageFileID = id;\n\t bitmap = BitmapFactory.decodeStream(context.getResources().openRawResource(imageFileID));\n\t //bitmap \n\t /*InputStream is= context.getResources().openRawResource(imageFileIDs);\n\t try {\n\t bitmap = BitmapFactory.decodeStream(is);\n\n\t } finally {\n\t //Always clear and close\n\t try {\n\t is.close();\n\t is = null;\n\t } catch (IOException e) {\n\t }\n\t }*/\n\t int imgWidth = bitmap.getWidth();\n\t int imgHeight = bitmap.getHeight();\n\t float faceWidth = w;\n\t float faceHeight = h;\n\t // Adjust for aspect ratio\n\t if (imgWidth > imgHeight) {\n\t faceHeight = faceHeight * imgHeight / imgWidth; \n\t }\n\t else {\n\t faceWidth = faceWidth * imgWidth / imgHeight;\n\t }\n\t float faceLeft = -faceWidth / 2;\n\t float faceRight = -faceLeft;\n\t float faceTop = faceHeight / 2;\n\t float faceBottom = -faceTop;\n\t \n\t \n\t \n\t // Define the vertices for this face\n\t float[] vertices = {\n\t faceLeft, faceBottom, 0.0f, // 0. left-bottom-front\n\t faceRight, faceBottom, 0.0f, // 1. right-bottom-front\n\t faceLeft, faceTop, 0.0f, // 2. left-top-front\n\t faceRight, faceTop, 0.0f, // 3. right-top-front\n\t };\n\t vertexBuffer.put(vertices); // Copy data into buffer\n\t\t vertexBuffer.position(0); // Rewind\n\t \n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t \n\t texBuffer.put(texCoords);\n\t \n\t texBuffer.position(0); // Rewind\n\t \n\t }", "protected AbstractMatrix3D() {}", "public void initFromByteArray(byte[] buffer, int offset, int byteCount,\n\t\t\tAudioFormat format, boolean lazy) {\n\t\tif (offset + byteCount > buffer.length) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"FloatSampleBuffer.initFromByteArray: buffer too small.\");\n\t\t}\n\n\t\tint thisSampleCount = byteCount / format.getFrameSize();\n\t\tinit(format.getChannels(), thisSampleCount, format.getSampleRate(),\n\t\t\t\tlazy);\n\n\t\t// save format for automatic dithering mode\n\t\toriginalFormatType = FloatSampleTools.getFormatType(format);\n\n\t\tFloatSampleTools.byte2float(buffer, offset, channels, 0, sampleCount,\n\t\t\t\tformat);\n\t}", "public ComponentSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride,\n int bandOffsets[]) {\n super(dataType, w, h, bandOffsets.length);\n this.dataType = dataType;\n this.pixelStride = pixelStride;\n this.scanlineStride = scanlineStride;\n this.bandOffsets = (int[]) bandOffsets.clone();\n numBands = this.bandOffsets.length;\n if (pixelStride < 0) {\n throw new IllegalArgumentException(\"Pixel stride must be >= 0\");\n }\n // TODO - bug 4296691 - remove this check\n if (scanlineStride < 0) {\n throw new IllegalArgumentException(\"Scanline stride must be >= 0\");\n }\n if (numBands < 1) {\n throw new IllegalArgumentException(\"Must have at least one band.\");\n }\n if ((dataType < DataBuffer.TYPE_BYTE) || (dataType > DataBuffer.TYPE_DOUBLE)) {\n throw new IllegalArgumentException(\"Unsupported dataType.\");\n }\n bankIndices = new int[numBands];\n for (int i = 0; i < numBands; i++) {\n bankIndices[i] = 0;\n }\n verify();\n }", "public ImageBuffer(int w, int h, int[] p, ColorModel cm, String s) {\n width = w;\n height = h;\n pixels = p;\n cModel = cm;\n name = s;\n }", "public BoundingBox3d(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) {\n this.xmin = xmin;\n this.xmax = xmax;\n this.ymin = ymin;\n this.ymax = ymax;\n this.zmin = zmin;\n this.zmax = zmax;\n }", "private void createImage(BufferedImage image) {\n texId.setId(glGenTextures());\n loaded = true;\n\n try {\n int[] pixels = new int[image.getHeight() * image.getWidth()];\n\n image.getRGB(0, 0, image.getWidth(), image.getHeight(), pixels, 0, image.getWidth());\n\n Window.console.println(\"Texture num : \" + texId.getId() + \" , loaded with path : \" + texId.getPath());\n\n ByteBuffer buffer = BufferUtils.createByteBuffer(image.getHeight() * image.getWidth() * 4);\n\n for (int i = 0; i < image.getHeight(); i++) {\n for (int j = 0; j < image.getWidth(); j++) {\n int pixel = pixels[i * image.getWidth() + j];\n buffer.put((byte) ((pixel >> 16) & 0xFF)); // RED\n buffer.put((byte) ((pixel >> 8) & 0xFF)); // GREEN\n buffer.put((byte) (pixel & 0xFF)); // BLUE\n buffer.put((byte) ((pixel >> 24) & 0xFF)); // ALPHA\n }\n }\n\n buffer.flip();\n\n this.width = image.getWidth();\n this.height = image.getHeight();\n\n setParam(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n setParam(GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n\n upload(buffer);\n GameManager.texManager.add(texId);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }", "public BufferedImage toBufferedImage() {\n double[][] yData = decompress(yChannel);\n double[][] cBData = upsample(decompress(cBChannel));\n double[][] cRData = upsample(decompress(cRChannel));\n\n BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);\n for (int x = 0; x < width; ++x) {\n for (int y = 0; y < height; ++y) {\n double[] aYCbCr = {alphaChannel[y][x], yData[y][x], cBData[y][x], cRData[y][x]};\n int aRGB = ImageUtils.channelInt(ImageUtils.toRGB(aYCbCr));\n image.setRGB(x, y, aRGB);\n }\n }\n return image;\n }", "public RenderedImage create(ParameterBlock args,\n RenderingHints renderHints) {\n \n // Get the source image and the data type parameter.\n RenderedImage src = args.getRenderedSource(0);\n Integer datatype = (Integer)args.getObjectParameter(0);\n int type = datatype.intValue();\n\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);\n\n // If there is no change return the source image directly.\n if(layout == null && type == src.getSampleModel().getDataType()) {\n return src;\n }\n\n // Create or clone the ImageLayout.\n if(layout == null) {\n layout = new ImageLayout(src);\n } else {\n layout = (ImageLayout)layout.clone();\n }\n\n\tboolean isDataTypeChange = false;\n\n // Get prospective destination SampleModel.\n SampleModel sampleModel = layout.getSampleModel(src);\n\n // Create a new SampleModel if the type is not as desired.\n if (sampleModel.getDataType() != type) {\n int tileWidth = layout.getTileWidth(src);\n int tileHeight = layout.getTileHeight(src);\n int numBands = src.getSampleModel().getNumBands();\n\n SampleModel csm =\n RasterFactory.createComponentSampleModel(sampleModel,\n type,\n tileWidth,\n tileHeight,\n numBands);\n\n layout.setSampleModel(csm);\n\t isDataTypeChange = true;\n }\n\n\n // Check ColorModel.\n ColorModel colorModel = layout.getColorModel(null);\n if(colorModel != null &&\n !JDKWorkarounds.areCompatibleDataModels(layout.getSampleModel(src),\n colorModel)) {\n // Clear the mask bit if incompatible.\n layout.unsetValid(ImageLayout.COLOR_MODEL_MASK);\n }\n\n // Check whether anything but the ColorModel is changing.\n if (layout.getSampleModel(src) == src.getSampleModel() &&\n layout.getMinX(src) == src.getMinX() &&\n layout.getMinY(src) == src.getMinY() &&\n layout.getWidth(src) == src.getWidth() &&\n layout.getHeight(src) == src.getHeight() &&\n layout.getTileWidth(src) == src.getTileWidth() &&\n layout.getTileHeight(src) == src.getTileHeight() &&\n layout.getTileGridXOffset(src) == src.getTileGridXOffset() &&\n layout.getTileGridYOffset(src) == src.getTileGridYOffset()) {\n\n if(layout.getColorModel(src) == src.getColorModel()) {\n // Nothing changed: return the source directly.\n return src;\n } else {\n // Remove TileCache hint from RenderingHints if present.\n RenderingHints hints = renderHints;\n if(hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) {\n hints = new RenderingHints((Map)renderHints);\n hints.remove(JAI.KEY_TILE_CACHE);\n }\n\n // Only the ColorModel is changing.\n return new NullOpImage(src, layout, hints,\n OpImage.OP_IO_BOUND);\n }\n }\n\n\tif (isDataTypeChange == true) {\n\n\t // Add JAI.KEY_REPLACE_INDEX_COLOR_MODEL hint to renderHints\n\t if (renderHints == null) {\n\t\trenderHints = \n\t\t new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,\n\t\t\t\t Boolean.TRUE);\n\t\t\n\t } else if (!renderHints.containsKey(\n\t\t\t\t\tJAI.KEY_REPLACE_INDEX_COLOR_MODEL)) {\n\t\t// If the user specified a value for this hint, we don't\n\t\t// want to change that\n\t\trenderHints.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, \n\t\t\t\tBoolean.TRUE);\n\t }\n\t}\n\n return new CopyOpImage(src, renderHints, layout);\n }", "BufferedImage buildImgBuf(Dimension d)\n\t{\n\tBufferedImage gBufImg= ImgFactory.getImg(500, 600); //new BufferedImage(dmX, dmY, BufferedImage.TYPE_INT_ARGB);\n\tGraphics2D g2=gBufImg.createGraphics();\n\tif (drawGraphics(g2, d, samples))\n\t\treturn gBufImg;\n\t\treturn null;\n\n\t}", "public FloatImage(int cWidth, int cHeight) {\n super(cWidth, cHeight);\n this.pixels = new float[getWidth()*getHeight()];\n }", "private BufferedImage initImg() throws IOException {\n\t\tint h = 256, w = 256;\n\t\tBufferedImage img = new BufferedImage(h, w, BufferedImage.TYPE_INT_ARGB);\n\t\t\n\t\t//int red = 0xff000000 + 0x00ff0000 + 0x00000000 + 0x00000000;\n\t\tshort max = 0, min = 255, c = max;\n\t\tint color = SimpleImageViewer.getIntPixel(c, c, c);\n\t\t\n\t\tfor (int y = 0; y < h; y++) {\n\t\t\tfor (int x = 0; x < w; x++) {\n\t\t\t\timg.setRGB(x, y, color);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn img;\n\t}", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "public MultiShape3D( Geometry geometry )\n {\n this( geometry, (Appearance)null );\n }", "public ImageBuffer(int w, int h, short[] r, short[] g, short[] b, String s) {\n width = w;\n height = h;\n pixels = new int[w * h];\n cModel = ColorModel.getRGBdefault();\n name = s;\n setPixels(r, g, b);\n }", "private BufferedImage CreateBuffedImage(WinFileMappingBuffer fm, boolean bWithAlphaChanle) {\n BitmapFileBuffer bitmap = new BitmapFileBuffer();\n if (!bitmap.Load(fm.getBuffer())) {\n return null;\n }\n return bitmap.GetBuffedImage(bWithAlphaChanle);\n }", "public static void experimentThree(boolean reuse) {\n System.out.println(\"EXPERIMENT THREE: cache=\" + reuse);\n ArrayList<BufferedImage> images = new ArrayList<BufferedImage>();\n\n images.add(new BufferedImage(2048, 2048, BufferedImage.TYPE_INT_ARGB));\n\n System.out.println(\"--> Objects Initialized!\");\n\n long timeBefore = System.nanoTime();\n\n for (int i = 0; i < 10000; i++) {\n BufferedImage img = null;\n\n if (reuse) {\n img = images.get(0).getSubimage(0, 0, 640, 480);\n\n // THIS TAKES SO MUCH TIME!!!\n clearImage(img);\n } else {\n img = new BufferedImage(640, 480, BufferedImage.TYPE_INT_ARGB);\n }\n\n Graphics2D g2 = img.createGraphics();\n\n g2.fillRect(10, 10, 600, 400);\n\n g2.dispose();\n }\n\n long timeAfter = System.nanoTime();\n\n System.out.println(\"--> Duration: \" + (timeAfter - timeBefore) * 1E-9);\n }", "Image createImage(List<List<Pixel>> pixelArray);", "public JPEGImage(BufferedImage image) {\n double[][][] yCbCrData = new double[image.getHeight()][image.getWidth()][];\n for (int x = 0; x < image.getWidth(); ++x) {\n for (int y = 0; y < image.getHeight(); ++y) {\n yCbCrData[y][x] = ImageUtils.toYCbCr(ImageUtils.channelArray(image.getRGB(x, y)));\n }\n }\n read(yCbCrData);\n }", "@Nonnull\n private BufferedImage createImage() {\n return new BufferedImage(getWidth(), getHeight(), getImageType().getType());\n }", "private void createBackBuffer() {\r\n GraphicsConfiguration gc = getGraphicsConfiguration();\r\n volatileImg = gc.createCompatibleVolatileImage(getWidth(), getHeight());\r\n// volatileImg.setAccelerationPriority(1);\r\n }", "public abstract void setImageFormat(String format);", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public ComponentSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride,\n int bankIndices[], int bandOffsets[]) {\n super(dataType, w, h, bandOffsets.length);\n this.dataType = dataType;\n this.pixelStride = pixelStride;\n this.scanlineStride = scanlineStride;\n this.bandOffsets = (int[]) bandOffsets.clone();\n this.bankIndices = (int[]) bankIndices.clone();\n if (pixelStride < 0) {\n throw new IllegalArgumentException(\"Pixel stride must be >= 0\");\n }\n // TODO - bug 4296691 - remove this check\n if (scanlineStride < 0) {\n throw new IllegalArgumentException(\"Scanline stride must be >= 0\");\n }\n if ((dataType < DataBuffer.TYPE_BYTE) || (dataType > DataBuffer.TYPE_DOUBLE)) {\n throw new IllegalArgumentException(\"Unsupported dataType.\");\n }\n int maxBank = this.bankIndices[0];\n if (maxBank < 0) {\n throw new IllegalArgumentException(\"Index of bank 0 is less than \" + \"0 (\" + maxBank + \")\");\n }\n for (int i = 1; i < this.bankIndices.length; i++) {\n if (this.bankIndices[i] > maxBank) {\n maxBank = this.bankIndices[i];\n } else if (this.bankIndices[i] < 0) {\n throw new IllegalArgumentException(\"Index of bank \" + i + \" is less than 0 (\" + maxBank\n + \")\");\n }\n }\n numBanks = maxBank + 1;\n numBands = this.bandOffsets.length;\n if (this.bandOffsets.length != this.bankIndices.length) {\n throw new IllegalArgumentException(\"Length of bandOffsets must \"\n + \"equal length of bankIndices.\");\n }\n verify();\n }", "private byte[] composeJPG(BufferedImage[] rgbBufferedImages) {\r\n\t\t// blue (index 2) is always available\r\n\t\tint width = rgbBufferedImages[BLUE_INDEX].getWidth();\r\n\t\tint height = rgbBufferedImages[BLUE_INDEX].getHeight();\r\n\t\tBufferedImage rgbImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\r\n\t\tint alpha = 0xFF;\r\n\t\tfor (int x = 0; x < width; x++) {\r\n\t\t\tfor(int y = 0; y < height; y++) {\r\n\t\t\t\tint red = rgbBufferedImages[RED_INDEX] != null ? rgbBufferedImages[RED_INDEX].getRGB(x, y) & 0xFF : 0;\r\n\t\t\t\tint green = rgbBufferedImages[GREEN_INDEX] != null ? rgbBufferedImages[GREEN_INDEX].getRGB(x, y) & 0xFF : 0;\r\n\t\t\t\tint blue = rgbBufferedImages[BLUE_INDEX].getRGB(x, y) & 0xFF;\r\n\t\t\t\trgbImage.setRGB(x, y, (alpha << 24) | (red << 16) | (green << 8) | blue);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbyte[] imageByteArray;\r\n\t\ttry(ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {\r\n\t\t\tImageIO.write( rgbImage, \"jpg\", byteArrayOutputStream );\r\n\t\t\tbyteArrayOutputStream.flush();\r\n\t\t\timageByteArray = byteArrayOutputStream.toByteArray();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new ImageNotFoundException(\"Output image could not be created.\");\r\n\t\t}\r\n\t\treturn imageByteArray;\r\n\t}", "public void initFromByteArray(byte[] buffer, int offset, int byteCount,\n\t\t\tAudioFormat format) {\n\t\tinitFromByteArray(buffer, offset, byteCount, format, LAZY_DEFAULT);\n\t}", "private static DataCube generateDataCubeFromColourImage(String filename) throws IOException {\n\t\t// Get an image from the filename\n\t\tBufferedImage image = ImageIO.read(new File(filename));\n\t\t\n\t\t// Read meta data from image and create a data cube\n\t\tint width = image.getWidth();\n\t\tint height = image.getHeight();\n\t\tDataCube dc = new DataCube();\n\t\tdc.width = width;\n\t\tdc.height = height;\n\t\tdc.depth = 3;\n\t\tdc.dataCube = new short[width][height][3];\n\t\t\n\t\t// Read all of the data from the image into the datacube data\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tint colour = image.getRGB(i, j);\n\t\t\t\tdc.dataCube[i][j][0] = (short) ((colour >> 16) & 0xFF);\n\t\t\t\tdc.dataCube[i][j][1] = (short) ((colour >> 8) & 0xFF);\n\t\t\t\tdc.dataCube[i][j][2] = (short) ((colour >> 0) & 0xFF);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// We've loaded all the data, so return the data cube\n\t\treturn dc;\n\t}", "public void divideImage() {\n\n int chunkWidth = 70;\n int chunkHeight = 70;\n int count = 0;\n imgs = new BufferedImage[100];\n for (int x = 0; x < 10; x++)\n for (int y = 0; y < 10; y++) {\n\n try{\n\n imgs[count] = new BufferedImage(chunkWidth, chunkHeight, img.getType());\n Graphics2D gr = imgs[count++].createGraphics();\n gr.drawImage(img, 0, 0, chunkWidth, chunkHeight, chunkWidth * y, chunkHeight * x, chunkWidth * y + chunkWidth, chunkHeight * x + chunkHeight, null);\n gr.dispose();\n\n } catch (Exception e){\n\n // e.printStackTrace();\n\n }\n\n }\n\n }", "public SeamCarver(Picture inputPicture) {\n if (input_picture == null) { throw new NullPointerException(\"picture can't be null\"); }\n this.picture = new Picture(inputPicture);\n height = picture.height();\n width = picture.width();\n colorArray = new int[height()][width()];\n for (int col = 0; col < width(); col++) {\n for (int row = 0; row < height(); row++) {\n colorArray[row][col] = picture.get(col, row).getRGB();\n }\n }\n }", "public J3DAttribute () {}", "public static BufferedImage createRGB32Image(int w, int h) {\n int transferType = DataBuffer.TYPE_INT;\n ColorModel colorModel = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), \n false, false, Transparency.OPAQUE, transferType);\n WritableRaster raster = colorModel.createCompatibleWritableRaster(w, h);\n\n int[] destData = ((DataBufferInt) raster.getDataBuffer()).getData();\n final int imgDataCount = w * h * 3;\n if (destData.length != imgDataCount) {\n throw new RuntimeException(\"\");\n }\n return new BufferedImage(colorModel, raster, false, null);\n }", "public static BufferedImage toBufferedImage(final Image img, final int type) {\n if (img == null || img instanceof BufferedImage) {\n return (BufferedImage) img;\n }\n\n // Create a buffered image with transparency\n final BufferedImage bimage = new BufferedImage(img.getWidth(null), img.getHeight(null), type);\n\n // Draw the image on to the buffered image\n final Graphics2D bGr = bimage.createGraphics();\n bGr.drawImage(img, 0, 0, null);\n bGr.dispose();\n\n // Return the buffered image\n return bimage;\n }", "public static BufferedImage[] createByteABGRFrames(Image img,int num) {\n\t\tBufferedImage[] bi = new BufferedImage[num];\n\t\tfor(int i=0; i<num; i++){\n\t\t\tbi[i] = new BufferedImage(img.getWidth(null)/num,img.getHeight(null),BufferedImage.TYPE_4BYTE_ABGR);\n\t\t\tGraphics g = bi[i].createGraphics();\n\t\t\tg.drawImage(img,-i*img.getWidth(null)/num,0,null);\n\t\t\tg.dispose();\n\t\t\t}\n\t\treturn bi;\n\t}", "public void build_buffers(float[] color /*RGBA*/) {\n int i;\n int offset = 0;\n final float[] vertexData = new float[\n mVertices.size() / 3\n * STRIDE_IN_FLOATS];\n\n float vx, vy, vz;\n\n /*\n * loop to generate vertices.\n */\n for (i = 0; i < mVertices.size(); i += 3) {\n\n vertexData[offset++] = mVertices.get(i + 0);\n vertexData[offset++] = mVertices.get(i + 1);\n vertexData[offset++] = mVertices.get(i + 2);\n\n vertexData[offset++] = 0.0f; // set normal to zero for now\n vertexData[offset++] = 0.0f;\n vertexData[offset++] = 0.0f;\n\n if (mHaveMaterialColor) {\n vertexData[offset++] = mColors.get(i + 0);\n vertexData[offset++] = mColors.get(i + 1);\n vertexData[offset++] = mColors.get(i + 2);\n vertexData[offset++] = 1.0f; // TODO: unwire the alpha?\n } else {\n // color value\n vertexData[offset++] = color[0];\n vertexData[offset++] = color[1];\n vertexData[offset++] = color[2];\n vertexData[offset++] = color[3];\n }\n }\n\n // calculate the normal,\n // set it in the packed VBO.\n // If current normal is non-zero, average it with previous value.\n\n int v1i, v2i, v3i;\n for (i = 0; i < mIndices.size(); i += 3) {\n v1i = mIndices.get(i + 0) - 1;\n v2i = mIndices.get(i + 1) - 1;\n v3i = mIndices.get(i + 2) - 1;\n\n v1[0] = mVertices.get(v1i * 3 + 0);\n v1[1] = mVertices.get(v1i * 3 + 1);\n v1[2] = mVertices.get(v1i * 3 + 2);\n\n v2[0] = mVertices.get(v2i * 3 + 0);\n v2[1] = mVertices.get(v2i * 3 + 1);\n v2[2] = mVertices.get(v2i * 3 + 2);\n\n v3[0] = mVertices.get(v3i * 3 + 0);\n v3[1] = mVertices.get(v3i * 3 + 1);\n v3[2] = mVertices.get(v3i * 3 + 2);\n\n n = XYZ.getNormal(v1, v2, v3);\n\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n }\n\n /*\n * debug - print out list of formated vertex data\n */\n// for (i = 0; i < vertexData.length; i+= STRIDE_IN_FLOATS) {\n// vx = vertexData[i + 0];\n// vy = vertexData[i + 1];\n// vz = vertexData[i + 2];\n// String svx = String.format(\"%6.2f\", vx);\n// String svy = String.format(\"%6.2f\", vy);\n// String svz = String.format(\"%6.2f\", vz);\n//\n// Log.w(\"data \", i + \" x y z \"\n// + svx + \" \" + svy + \" \" + svz + \" and color = \"\n// + vertexData[i + 6] + \" \" + vertexData[i + 7] + \" \" + vertexData[i + 8]);\n// }\n\n final FloatBuffer vertexDataBuffer = ByteBuffer\n .allocateDirect(vertexData.length * BYTES_PER_FLOAT)\n .order(ByteOrder.nativeOrder())\n .asFloatBuffer();\n vertexDataBuffer.put(vertexData).position(0);\n\n if (vbo[0] > 0) {\n GLES20.glDeleteBuffers(1, vbo, 0);\n }\n GLES20.glGenBuffers(1, vbo, 0);\n\n if (vbo[0] > 0) {\n GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vbo[0]);\n GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER, vertexDataBuffer.capacity() * BYTES_PER_FLOAT,\n vertexDataBuffer, GLES20.GL_STATIC_DRAW);\n\n // GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);\n } else {\n // errorHandler.handleError(ErrorHandler.ErrorType.BUFFER_CREATION_ERROR, \"glGenBuffers\");\n throw new RuntimeException(\"error on buffer gen\");\n }\n\n /*\n * create the buffer for the indices\n */\n offset = 0;\n int x;\n final short[] indexData = new short[mIndices.size()];\n for (x = 0; x < mIndices.size(); x++) {\n\n short index = mIndices.get(x).shortValue();\n indexData[offset++] = --index;\n }\n mTriangleIndexCount = indexData.length;\n\n /*\n * debug - print out list of formated vertex data\n */\n// short ix, iy, iz;\n// for (i = 0; i < indexData.length; i += 3) {\n// ix = indexData[i + 0];\n// iy = indexData[i + 1];\n// iz = indexData[i + 2];\n//\n// Log.w(\"data \", i + \" i1 i2 i3 \"\n// + ix + \" \" + iy + \" \" + iz );\n// }\n\n final ShortBuffer indexDataBuffer = ByteBuffer\n .allocateDirect(indexData.length * BYTES_PER_SHORT).order(ByteOrder.nativeOrder())\n .asShortBuffer();\n indexDataBuffer.put(indexData).position(0);\n\n if (ibo[0] > 0) {\n GLES20.glDeleteBuffers(1, ibo, 0);\n }\n GLES20.glGenBuffers(1, ibo, 0);\n if (ibo[0] > 0) {\n GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, ibo[0]);\n GLES20.glBufferData(GLES20.GL_ELEMENT_ARRAY_BUFFER,\n indexDataBuffer.capacity()\n * BYTES_PER_SHORT, indexDataBuffer, GLES20.GL_STATIC_DRAW);\n GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, 0);\n GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);\n } else {\n // errorHandler.handleError(ErrorHandler.ErrorType.BUFFER_CREATION_ERROR, \"glGenBuffers\");\n throw new RuntimeException(\"error on buffer gen\");\n }\n }", "public Texture createTexture(int width, int height, int filter) throws IOException {\n/* 372 */ ImageData ds = new EmptyImageData(width, height);\n/* */ \n/* 374 */ return getTexture(ds, filter);\n/* */ }", "public VectorFieldSliceRenderer2D(ImageData img,\r\n\t\t\tVisualizationProcessing applet) {\r\n\t\tsuper(img, applet);\r\n\t\tif (img.getComponents() < 2) {\r\n\t\t\tslices = 1;\r\n\t\t} else {\r\n\t\t\tslice = slices / 2;\r\n\t\t}\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public @NotNull Image reformat(ColorFormat format)\n {\n if (format != ColorFormat.GRAY &&\n format != ColorFormat.GRAY_ALPHA &&\n format != ColorFormat.RGB &&\n format != ColorFormat.RGBA) {throw new UnsupportedOperationException(\"invalid format: \" + format);}\n \n if (this.data != null && this.format != format)\n {\n Color.Buffer output = this.data.copy(format);\n \n this.data.free();\n \n this.data = output;\n this.format = format;\n this.mipmaps = 1;\n }\n return this;\n }", "public Image readImage() throws IOException\n {\n int width = readInt();\n int height = readInt();\n int[] rgbData = new int[width*height];\n for (int ii = 0; ii < rgbData.length; ii++)\n {\n rgbData[ii] = readInt();\n }\n return Image.createRGBImage(rgbData, width, height, true);\n }", "public Picture(BufferedImage image)\n {\n super(image);\n }", "public Picture(BufferedImage image)\n {\n super(image);\n }", "public BufferedImage create() {\n checkDimensions();\n final BufferedImage image = createImage();\n getImagePainter().paint(image);\n return image;\n }", "public ImageProperties setFormat(ImageFormatProperties format) {\n this.format = format;\n return this;\n }", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "public IntBuffer getData(BufferedImage img)\n\t{\n\t\tIntBuffer buf = IntBuffer.allocate(img.getWidth()*img.getHeight());\n\t\t//ByteBuffer b = ByteBuffer.allocate(buf.capacity()*4);\n\n\t\tfor(int i=0; i<img.getHeight(); i++)\n\t\t{\n\t\t\tfor(int j=0; j<img.getWidth(); j++)\n\t\t\t{\n\t\t\t\t// We need to shuffle the RGB values to pass them correctly to OpenGL. \n\t\t\t\tint in = img.getRGB(j,i);\n\t\t\t\tint out = ((in & 0x000000FF) << 16) | (in & 0x0000FF00) | ((in & 0x00FF0000) >> 16);\n\t\t\t\tbuf.put((img.getHeight()-i-1)*img.getWidth()+j, out);\n\t\t\t}\n\t\t}\n\t\t//b.asIntBuffer().put(buf);\n\t\treturn buf;\n\t}", "private native void initMultiImage(MagickImage[] images)\n\t\t\tthrows MagickException;", "public BufferedImage makeBufferedImage()\r\n {\r\n\treturn makeRGBImage().makeBufferedImage();\r\n }", "private void initImage() {\n this.image = (BufferedImage)this.createImage(DisplayPanel.COLS, DisplayPanel.ROWS);\n this.r.setRect(0, 0, DisplayPanel.ROWS, DisplayPanel.COLS);\n this.paint = new TexturePaint(this.image,\n this.r);\n }", "public FloatImage(int width, int height, double[] pixels) {\n\t\tthis(width, height);\n\t\tfor (int i=0; i<pixels.length; i++) {\n\t\t\tthis.pixels[i] = (float) pixels[i];\n\t\t}\n\t}", "public BufferedImage open(String id, int no)\n throws FormatException, IOException\n {\n if (!id.equals(currentId)) initFile(id);\n \n if (no < 0 || no >= getImageCount(id)) {\n throw new FormatException(\"Invalid image number: \" + no);\n }\n \n // First initialize:\n in.seek(offsets[no] + 12);\n byte[] toRead = new byte[4];\n in.read(toRead);\n int blockSize = batoi(toRead);\n toRead = new byte[1];\n in.read(toRead);\n // right now I'm gonna skip all the header info\n // check to see whether or not this is v2 data\n if (toRead[0] == 1) {\n in.skipBytes(128);\n }\n in.skipBytes(169);\n // read in the block of data\n toRead = new byte[blockSize];\n int read = 0;\n int left = blockSize;\n while (left > 0) {\n int i = in.read(toRead, read, left);\n read += i;\n left -= i;\n }\n byte[] pixelData = new byte[blockSize];\n int pixPos = 0;\n \n Dimension dim;\n try { dim = pictReader.getDimensions(toRead); }\n catch (Exception e) { dim = new Dimension(0, 0); }\n \n int length = toRead.length;\n int num, size, blockEnd;\n int totalBlocks = -1; // set to allow loop to start.\n int expectedBlock = 0;\n int pos = 0;\n int imagePos = 0;\n int imageSize = dim.width * dim.height;\n short[] flatSamples = new short[imageSize];\n byte[] temp;\n boolean skipflag;\n \n // read in deep grey pixel data into an array, and create a\n // BufferedImage out of it\n //\n // First, checks the existence of a deep gray block. If it doesn't exist,\n // assume it is PICT data, and attempt to read it.\n \n // check whether or not there is deep gray data\n while (expectedBlock != totalBlocks) {\n skipflag = false;\n while (pos + 7 < length &&\n (toRead[pos] != 73 || toRead[pos + 1] != 86 ||\n toRead[pos + 2] != 69 || toRead[pos + 3] != 65 ||\n toRead[pos + 4] != 100 || toRead[pos + 5] != 98 ||\n toRead[pos + 6] != 112 || toRead[pos + 7] != 113))\n {\n pos++;\n }\n if (pos + 32 > length) { // The header is 32 bytes long.\n if (expectedBlock == 0 && imageType[no] < 9) {\n // there has been no deep gray data, and it is supposed\n // to be a pict... *crosses fingers*\n try { return pictReader.openBytes(toRead); }\n catch (Exception e) {\n e.printStackTrace();\n throw new FormatException(\"No iPic comment block found\", e);\n }\n }\n else {\n throw new FormatException(\"Expected iPic comment block not found\");\n }\n }\n \n pos += 8; // skip the block type we just found\n \n // Read info from the iPic comment. This serves as a\n // starting point to read the rest.\n temp = new byte[] {\n toRead[pos], toRead[pos+1], toRead[pos+2], toRead[pos+3]\n };\n num = batoi(temp);\n if (num != expectedBlock) {\n throw new FormatException(\"Expected iPic block not found\");\n }\n expectedBlock++;\n temp = new byte[] {\n toRead[pos+4], toRead[pos+5], toRead[pos+6], toRead[pos+7]\n };\n if (totalBlocks == -1) {\n totalBlocks = batoi(temp);\n }\n else {\n if (batoi(temp) != totalBlocks) {\n throw new FormatException(\"Unexpected totalBlocks numbein.read\");\n }\n }\n \n // skip to size\n pos += 16;\n temp = new byte[] {\n toRead[pos], toRead[pos+1], toRead[pos+2], toRead[pos+3]\n };\n size = batoi(temp);\n pos += 8;\n blockEnd = pos + size;\n \n // copy into our data array.\n System.arraycopy(toRead, pos, pixelData, pixPos, size);\n pixPos += size;\n }\n int pixelValue = 0;\n pos = 0;\n \n // Now read the data and wrap it in a BufferedImage\n \n while (true) {\n if (pos + 1 < pixelData.length) {\n pixelValue = pixelData[pos] < 0 ? 256 + pixelData[pos] :\n (int) pixelData[pos] << 8;\n pixelValue += pixelData[pos + 1] < 0 ? 256 + pixelData[pos + 1] :\n (int) pixelData[pos + 1];\n }\n else throw new FormatException(\"Malformed LIFF data\");\n flatSamples[imagePos] = (short) pixelValue;\n imagePos++;\n if (imagePos == imageSize) { // done, return it\n return ImageTools.makeImage(flatSamples,\n dim.width, dim.height, 1, false);\n }\n }\n }", "public FloatBuffer putInBufferC(FloatBuffer buffer) {\n\t\tbuffer.clear();\n\t\tbuffer.put(x).put(y).put(z).put(w);\n\t\tbuffer.flip();\n\t\treturn buffer;\n\t}", "public three_d_object(int ob_x, int ob_y, int ob_z, int new_ob_size, int new_ob_rotation_X,\n\t\t\t\t\tint new_ob_rotation_Y) {\n\t\t\t\tx = ob_x;\n\t\t\t\ty = ob_y;\n\t\t\t\tz = ob_z;\n\t\t\t\tob_size = new_ob_size;\n\t\t\t\trotation_X = new_ob_rotation_X;\n\t\t\t\trotation_Y = new_ob_rotation_Y;\n\n\t\t\t}", "@Override\n public void init(float[] data) {\n this.data = data;\n\n //\n shapeArr = new Rectangle2D.Float[data.length];\n colorArr = new Color[data.length];\n pointArr = new Point2D.Float[data.length];\n }" ]
[ "0.7188846", "0.7014678", "0.68379927", "0.6650885", "0.64795285", "0.62980306", "0.5950797", "0.5156751", "0.51553744", "0.51211375", "0.5119534", "0.5112684", "0.5090272", "0.505085", "0.5001335", "0.4992092", "0.4936212", "0.4925317", "0.49194992", "0.4912774", "0.48992345", "0.4882876", "0.48307896", "0.48171213", "0.4799305", "0.47991696", "0.4778795", "0.4751774", "0.47439823", "0.47277874", "0.4709267", "0.4705593", "0.47002885", "0.46801785", "0.46603492", "0.46572033", "0.46293253", "0.46226838", "0.46017733", "0.45934203", "0.45764267", "0.4574445", "0.4572047", "0.4570046", "0.45630226", "0.45436507", "0.45257753", "0.451922", "0.45169905", "0.45145577", "0.4497627", "0.4492497", "0.4479014", "0.44774163", "0.44763127", "0.44749433", "0.44694692", "0.4464114", "0.44586462", "0.44547415", "0.44214067", "0.44118398", "0.4411422", "0.43971825", "0.4397044", "0.43959987", "0.4386296", "0.43862164", "0.43837586", "0.43828592", "0.43824968", "0.4378122", "0.437716", "0.43720827", "0.4369443", "0.43598735", "0.43595436", "0.4353165", "0.43499082", "0.4336088", "0.43191692", "0.43144256", "0.4301755", "0.4300417", "0.4294893", "0.42932755", "0.4290992", "0.4290992", "0.42878464", "0.42837387", "0.42808947", "0.42804652", "0.4278902", "0.4271348", "0.42672637", "0.42663836", "0.42600438", "0.4256191", "0.42488292", "0.42342466" ]
0.7321845
0
Constructs a 3D image component object using the specified format, and the RenderedImage array. The image class is set to ImageClass.BUFFERED_IMAGE. Default values are used for all other parameters.
public ImageComponent3D(int format, RenderedImage[] images) { ((ImageComponent3DRetained)this.retained).processParams(format, images[0].getWidth(), images[0].getHeight(), images.length); for (int i=0; i<images.length; i++) { ((ImageComponent3DRetained)this.retained).set(i, images[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "ImageComponent3D() {}", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth,\n\t\t\t boolean\tbyReference,\n\t\t\t boolean\tyUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "RenderedImage createRendering(Long id, \n\t\t\t\t SerializableState renderContextState) \n\tthrows RemoteException;", "public RenderedImage create(ParameterBlock args,\n RenderingHints renderHints) {\n \n // Get the source image and the data type parameter.\n RenderedImage src = args.getRenderedSource(0);\n Integer datatype = (Integer)args.getObjectParameter(0);\n int type = datatype.intValue();\n\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);\n\n // If there is no change return the source image directly.\n if(layout == null && type == src.getSampleModel().getDataType()) {\n return src;\n }\n\n // Create or clone the ImageLayout.\n if(layout == null) {\n layout = new ImageLayout(src);\n } else {\n layout = (ImageLayout)layout.clone();\n }\n\n\tboolean isDataTypeChange = false;\n\n // Get prospective destination SampleModel.\n SampleModel sampleModel = layout.getSampleModel(src);\n\n // Create a new SampleModel if the type is not as desired.\n if (sampleModel.getDataType() != type) {\n int tileWidth = layout.getTileWidth(src);\n int tileHeight = layout.getTileHeight(src);\n int numBands = src.getSampleModel().getNumBands();\n\n SampleModel csm =\n RasterFactory.createComponentSampleModel(sampleModel,\n type,\n tileWidth,\n tileHeight,\n numBands);\n\n layout.setSampleModel(csm);\n\t isDataTypeChange = true;\n }\n\n\n // Check ColorModel.\n ColorModel colorModel = layout.getColorModel(null);\n if(colorModel != null &&\n !JDKWorkarounds.areCompatibleDataModels(layout.getSampleModel(src),\n colorModel)) {\n // Clear the mask bit if incompatible.\n layout.unsetValid(ImageLayout.COLOR_MODEL_MASK);\n }\n\n // Check whether anything but the ColorModel is changing.\n if (layout.getSampleModel(src) == src.getSampleModel() &&\n layout.getMinX(src) == src.getMinX() &&\n layout.getMinY(src) == src.getMinY() &&\n layout.getWidth(src) == src.getWidth() &&\n layout.getHeight(src) == src.getHeight() &&\n layout.getTileWidth(src) == src.getTileWidth() &&\n layout.getTileHeight(src) == src.getTileHeight() &&\n layout.getTileGridXOffset(src) == src.getTileGridXOffset() &&\n layout.getTileGridYOffset(src) == src.getTileGridYOffset()) {\n\n if(layout.getColorModel(src) == src.getColorModel()) {\n // Nothing changed: return the source directly.\n return src;\n } else {\n // Remove TileCache hint from RenderingHints if present.\n RenderingHints hints = renderHints;\n if(hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) {\n hints = new RenderingHints((Map)renderHints);\n hints.remove(JAI.KEY_TILE_CACHE);\n }\n\n // Only the ColorModel is changing.\n return new NullOpImage(src, layout, hints,\n OpImage.OP_IO_BOUND);\n }\n }\n\n\tif (isDataTypeChange == true) {\n\n\t // Add JAI.KEY_REPLACE_INDEX_COLOR_MODEL hint to renderHints\n\t if (renderHints == null) {\n\t\trenderHints = \n\t\t new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,\n\t\t\t\t Boolean.TRUE);\n\t\t\n\t } else if (!renderHints.containsKey(\n\t\t\t\t\tJAI.KEY_REPLACE_INDEX_COLOR_MODEL)) {\n\t\t// If the user specified a value for this hint, we don't\n\t\t// want to change that\n\t\trenderHints.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, \n\t\t\t\tBoolean.TRUE);\n\t }\n\t}\n\n return new CopyOpImage(src, renderHints, layout);\n }", "public Surface(int var1, int var2, int var3, Component var4) {\n super();\n this.interlace = false;\n this.loggedIn = false;\n this.field_731 = var4;\n this.field_744 = var2;\n this.field_746 = var1;\n this.field_726 = this.field_723 = var1;\n this.field_727 = this.field_724 = var2;\n this.field_725 = var1 * var2;\n this.pixels = new int[var1 * var2];\n this.spritePixels = new int[var3][];\n this.field_742 = new boolean[var3];\n this.spriteColoursUsed = new byte[var3][];\n this.spriteColourList = new int[var3][];\n this.field_736 = new int[var3];\n this.field_737 = new int[var3];\n this.spriteWidthFull = new int[var3];\n this.field_741 = new int[var3];\n this.field_738 = new int[var3];\n this.field_739 = new int[var3];\n if(var1 > 1 && var2 > 1 && var4 != null) {\n this.field_728 = new DirectColorModel(32, 16711680, '\\uff00', 255);\n int var5 = this.field_723 * this.field_724;\n int var6 = 0;\n if(field_759 || var6 < var5) {\n do {\n this.pixels[var6] = 0;\n ++var6;\n } while(var6 < var5);\n }\n\n this.field_732 = var4.createImage(this);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n }\n\n }", "public RenderedImage[] getRenderedImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getRenderedImage();\n }", "private void run3DC() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, 0, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, 0, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, 0, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) /\r\n (numIterations - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude3D(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude3D(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude3D(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage3D(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage3D(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage3D(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1, 0, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2, 0, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3, 0, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n destImage.calcMinMax();\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "@Override\n protected void putImageBuffer(BufferedImage input) \n {\n // Load data in. \n for (int y = 0; y < height; y++) \n {\n for (int x = 0; x < width; x++) \n {\n\t\tdouble h = getHeight(input, x, y);\n\t\tdouble du = 0;\n\t\tdouble dv = 0;\n\t\t\n\t\tif(x > 0)\n\t\t{\t\n\t\t du += h - getHeight(input, x-1, y);\n\t\t}\n\t\tif(x < width - 1)\n\t\t{\n\t\t du += getHeight(input, x+1, y) - h;\n\t\t}\n\t\tif(y > 0)\n\t\t{\n\t\t dv += h - getHeight(input, x , y-1);\n\t\t}\n\t\tif(y < height - 1)\n\t\t{\n\t\t dv += getHeight(input, x, y+1) - h;\n\t\t}\n\t\t\n\t\tdouble u = -du;\n\t\tdouble v = -dv;\n\t\tdouble w = 0.25;\n \n\t\tdouble n = Math.sqrt(u*u + v*v + w*w);\n\n byte a = (byte)(h * 255.0);\n byte r = (byte)((u / n + 1.0) / 2.0 * 255.0);\n byte g = (byte)((v / n + 1.0) / 2.0 * 255.0);\n byte b = (byte)((w / n + 1.0) / 2.0 * 255.0);\n \n int index = (x + y * allocatedWidth) * 4;\n pixelData.put(index++, r);\n pixelData.put(index++, g);\n pixelData.put(index++, b);\n pixelData.put(index , a);\n }\n }\n }", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "private final void \n renderIt( ) {\n \t\n \tif( this.mImageCount > 0 || this.mLineCount > 0 || this.mRectCount > 0 || this.mTriangleCount > 0 ) {\n\t \n \t\tthis.mVertexBuffer.clear(); //clearing the buffer\n\t GLES11.glEnableClientState( GLES11.GL_VERTEX_ARRAY );\n\n\t //if there are images to render\n\t if( this.mImageCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mImageCount * 16 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glEnableClientState( GLES11.GL_TEXTURE_COORD_ARRAY ); //copy the texture coordinates into the GPU\n\t\t GLES11.glEnable(GLES11.GL_TEXTURE_2D);\n\t\t this.mVertexBuffer.position( 2 ); //put buffer position to the texture coordinates\n\t\t GLES11.glTexCoordPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer );\n\t\t this.mIndexBuffer.limit(this.mImageCount * 6); //DESKTOP VERSION ONLY\n\t\t GLES11.glDrawElements( GLES11.GL_TRIANGLES, this.mImageCount * BitsGLImage.INDICES_PER_SPRITE, GLES11.GL_UNSIGNED_SHORT, this.mIndexBuffer );\n\t \tGLES11.glDisable(GLES11.GL_TEXTURE_2D);\n\t\t GLES11.glDisableClientState( GLES11.GL_TEXTURE_COORD_ARRAY );\n\t }\n\t \n\t //if there are lines to render\n\t if( this.mLineCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mLineCount * 4 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 0, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glDrawArrays( GLES11.GL_LINES, 0, this.mLineCount * 2 ); //* 2 because every line got 2 points\n\t }\n\n\t //if there are rects to render\n\t if( this.mRectCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mRectCount * 8 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t this.mIndexBuffer.limit(this.mRectCount * 6); //DESKTOP VERSION ONLY\n\t \t GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, this.mVertexBuffer); //copy the vertices into the GPU\t \t \n\t \t \tGLES11.glDrawElements( GLES11.GL_TRIANGLES, this.mRectCount * BitsGLImage.INDICES_PER_SPRITE, GLES11.GL_UNSIGNED_SHORT, this.mIndexBuffer );\n\t }\n\t \n\t //if there are triangles to render\n\t if( this.mTriangleCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mTriangleCount * 12 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glEnableClientState( GLES11.GL_TEXTURE_COORD_ARRAY ); //copy the texture coordinates into the GPU\n\t\t GLES11.glEnable(GLES11.GL_TEXTURE_2D);\n\t\t this.mVertexBuffer.position( 2 ); //put buffer position to the texture coordinates\n\t\t GLES11.glTexCoordPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //16 == byteoffset -> es liegen 2 werte dazwischen\n\t\t GLES11.glDrawArrays( GLES11.GL_TRIANGLES, 0, this.mTriangleCount * 3 ); //* 2 because every line got 2 points\t \t\n\t\t GLES11.glDisable(GLES11.GL_TEXTURE_2D);\n\t\t GLES11.glDisableClientState( GLES11.GL_TEXTURE_COORD_ARRAY );\n\t }\n\t \n\t GLES11.glDisableClientState( GLES11.GL_VERTEX_ARRAY );\n \t\t\n\t //resetting counters\n\t this.mBufferIndex = 0;\n\t \tthis.mImageCount = 0;\n\t \tthis.mLineCount = 0;\n\t \tthis.mRectCount = 0;\n\t \tthis.mTriangleCount = 0;\n \t}\n }", "public Bitmap3DColor(\n float v1Red, float v1Green, float v1Blue, float v1Alpha,\n float v2Red, float v2Green, float v2Blue, float v2Alpha,\n float v3Red, float v3Green, float v3Blue, float v3Alpha,\n float v4Red, float v4Green, float v4Blue, float v4Alpha\n ) {\n if(\n v1Red < 0 || v1Red > 1 || v2Red < 0 || v2Red > 1 || v3Red < 0 || v3Red > 1 || v4Red < 0 || v4Red > 1 ||\n v1Green < 0 || v1Green > 1 || v2Green < 0 || v2Green > 1 || v3Green < 0 || v3Green > 1 || v4Green < 0 || v4Green > 1 ||\n v1Blue < 0 || v1Blue > 1 || v2Blue < 0 || v2Blue > 1 || v3Blue < 0 || v3Blue > 1 || v4Blue < 0 || v4Blue > 1 ||\n v1Alpha < 0 || v1Alpha > 1 || v2Alpha < 0 || v2Alpha> 1 || v3Alpha < 0 || v3Alpha > 1 || v4Alpha < 0 || v4Alpha > 1\n ) {\n throw new IllegalArgumentException(\"Values should be between 0 and 1\");\n }\n\n float[] colors = {\n v1Red, v1Green, v1Blue, v1Alpha,\n v2Red, v2Green, v2Blue, v2Alpha,\n v3Red, v3Green, v3Blue, v3Alpha,\n v4Red, v4Green, v4Blue, v4Alpha\n };\n\n ByteBuffer clb = ByteBuffer.allocateDirect(colors.length * 4);\n clb.order(ByteOrder.nativeOrder());\n this.colorBuffer = clb.asFloatBuffer();\n this.colorBuffer.put(colors);\n this.colorBuffer.position(0);\n }", "public Tile3D(Context context, int id, float w, float h) {\n\t // Setup vertex array buffer. Vertices in float. A float has 4 bytes\n\t ByteBuffer vbb = ByteBuffer.allocateDirect(12 * 4);\n\t vbb.order(ByteOrder.nativeOrder()); // Use native byte order\n\t vertexBuffer = vbb.asFloatBuffer(); // Convert from byte to float\n\t \n\t imageFileID = id;\n\t bitmap = BitmapFactory.decodeStream(context.getResources().openRawResource(imageFileID));\n\t //bitmap \n\t /*InputStream is= context.getResources().openRawResource(imageFileIDs);\n\t try {\n\t bitmap = BitmapFactory.decodeStream(is);\n\n\t } finally {\n\t //Always clear and close\n\t try {\n\t is.close();\n\t is = null;\n\t } catch (IOException e) {\n\t }\n\t }*/\n\t int imgWidth = bitmap.getWidth();\n\t int imgHeight = bitmap.getHeight();\n\t float faceWidth = w;\n\t float faceHeight = h;\n\t // Adjust for aspect ratio\n\t if (imgWidth > imgHeight) {\n\t faceHeight = faceHeight * imgHeight / imgWidth; \n\t }\n\t else {\n\t faceWidth = faceWidth * imgWidth / imgHeight;\n\t }\n\t float faceLeft = -faceWidth / 2;\n\t float faceRight = -faceLeft;\n\t float faceTop = faceHeight / 2;\n\t float faceBottom = -faceTop;\n\t \n\t \n\t \n\t // Define the vertices for this face\n\t float[] vertices = {\n\t faceLeft, faceBottom, 0.0f, // 0. left-bottom-front\n\t faceRight, faceBottom, 0.0f, // 1. right-bottom-front\n\t faceLeft, faceTop, 0.0f, // 2. left-top-front\n\t faceRight, faceTop, 0.0f, // 3. right-top-front\n\t };\n\t vertexBuffer.put(vertices); // Copy data into buffer\n\t\t vertexBuffer.position(0); // Rewind\n\t \n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t \n\t texBuffer.put(texCoords);\n\t \n\t texBuffer.position(0); // Rewind\n\t \n\t }", "private void initImage() {\n this.image = (BufferedImage)this.createImage(DisplayPanel.COLS, DisplayPanel.ROWS);\n this.r.setRect(0, 0, DisplayPanel.ROWS, DisplayPanel.COLS);\n this.paint = new TexturePaint(this.image,\n this.r);\n }", "private void run3D() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBuffer[];\r\n float resultBuffer[];\r\n float gaussianBuffer[];\r\n float gradientBuffer[];\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n sourceBuffer = new float[length];\r\n resultBuffer = new float[length];\r\n gaussianBuffer = new float[length];\r\n gradientBuffer = new float[length];\r\n } catch (OutOfMemoryError e){\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n srcImage.exportData(0, length, sourceBuffer);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n algoSepConvolver = new AlgorithmSeparableConvolver(gaussianBuffer, sourceBuffer,\r\n extents, xDataRound, yDataRound, zDataRound, srcImage.isColorImage());\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) / (numIterations - 1) * 100)), activeImage);\r\n }\r\n\r\n algoSepConvolver.run();\r\n gradientMagnitude3D(gaussianBuffer, gradientBuffer);\r\n upDateImage3D(resultBuffer, sourceBuffer, gradientBuffer);\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n for (int i = 0; i < length; i++) { sourceBuffer[i] = resultBuffer[i]; }\r\n }\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n algoSepConvolver.finalize();\r\n algoSepConvolver = null;\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n destImage.importData(0, resultBuffer, true);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "private void createImage(BufferedImage image) {\n texId.setId(glGenTextures());\n loaded = true;\n\n try {\n int[] pixels = new int[image.getHeight() * image.getWidth()];\n\n image.getRGB(0, 0, image.getWidth(), image.getHeight(), pixels, 0, image.getWidth());\n\n Window.console.println(\"Texture num : \" + texId.getId() + \" , loaded with path : \" + texId.getPath());\n\n ByteBuffer buffer = BufferUtils.createByteBuffer(image.getHeight() * image.getWidth() * 4);\n\n for (int i = 0; i < image.getHeight(); i++) {\n for (int j = 0; j < image.getWidth(); j++) {\n int pixel = pixels[i * image.getWidth() + j];\n buffer.put((byte) ((pixel >> 16) & 0xFF)); // RED\n buffer.put((byte) ((pixel >> 8) & 0xFF)); // GREEN\n buffer.put((byte) (pixel & 0xFF)); // BLUE\n buffer.put((byte) ((pixel >> 24) & 0xFF)); // ALPHA\n }\n }\n\n buffer.flip();\n\n this.width = image.getWidth();\n this.height = image.getHeight();\n\n setParam(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n setParam(GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n\n upload(buffer);\n GameManager.texManager.add(texId);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }", "public FramebufferObject(GL2 gl, Texture2D.Format format, Texture2D.Datatype datatype, int width, int height, int colorTextureCount, boolean makeDepthTexture, boolean rectTextures) throws OpenGLException\n\t{\n\t\t/* Sanity check. */\n\t\tif (colorTextureCount == 0 && !makeDepthTexture)\n\t\t{\n\t\t\tthrow new OpenGLException(\"It is not valid to make an FBO with no color buffers and no depth buffer.\");\n\t\t}\n\t\t\n\t\tint maxColorTextures[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_MAX_COLOR_ATTACHMENTS, maxColorTextures, 0);\n\t\tif (colorTextureCount > maxColorTextures[0])\n\t\t{\n\t\t\tthrow new OpenGLException(\"Cannot create an FBO with \" + colorTextureCount + \" render targets. Your graphics card only supports \" + maxColorTextures[0] + \".\");\n\t\t}\n\t\t\n\t\tmWidth = width;\n\t\tmHeight = height;\n\t\t\n\t\t/* Create OpenGL FBO. */\n\t\tint names[] = new int[1];\n\t\tgl.glGenFramebuffers(1, names, 0);\n\t\tmHandle = names[0];\n\t\t\n\t\t/* Remember previous FBO binding, and then bind this one. */\n\t\tint previousBinding[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING, previousBinding, 0);\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, mHandle);\n\t\t\n\t\t/* Create and attach color textures. */\n\t\tmColorTextures = new Texture2D[colorTextureCount];\n\t\t\n\t\tfor (int i = 0; i < colorTextureCount; ++i)\n\t\t{\n\t\t\tmColorTextures[i] = new Texture2D(gl, format, datatype, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_COLOR_ATTACHMENT0 + i, mColorTextures[i].getTextureTarget(), mColorTextures[i].getHandle(), 0);\n\t\t}\n\t\t\n\t\t/* Create and attach depth texture, if requested. */\n\t\tif (makeDepthTexture)\n\t\t{\n\t\t\tmDepthTexture = new Texture2D(gl, Format.DEPTH, Datatype.INT32, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_DEPTH_ATTACHMENT, mDepthTexture.getTextureTarget(), mDepthTexture.getHandle(), 0);\n\t\t}\n\n\t\t/* Make sure everything is set up properly. */\n\t\tint status = gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER);\n\t\tif (status != GL2.GL_FRAMEBUFFER_COMPLETE)\n\t\t{\n\t\t\tthrow new OpenGLException(\"Framebuffer incomplete: \" + status + \".\");\n\t\t}\n\t\t\n\t\t/* Restore whatever FBO was bound before this function was called. */\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, previousBinding[0]);\n\t}", "public Texture build() {\n FrameBuffer buffer = new FrameBuffer(Format.RGB565, maxWidth, maxHeight, false);\n buffer.begin();\n for (TextureRegion texture : textures) {\n \t// TODO Créer la texture dynamiquement\n }\n buffer.end();\n Texture result = buffer.getColorBufferTexture();\n buffer.dispose();\n return result;\n }", "public RenderedImage create(ParameterBlock paramBlock,\n RenderingHints renderHints) {\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);\n\n\n // Get BorderExtender from renderHints if any.\n BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);\n\n KernelJAI unRotatedKernel =\n (KernelJAI)paramBlock.getObjectParameter(0);\n KernelJAI kJAI = unRotatedKernel.getRotatedKernel();\n\n\tRenderedImage source = paramBlock.getRenderedSource(0);\n\n return new LCErodeOpImage(source,\n extender,\n renderHints,\n layout,\n kJAI);\n }", "public NativeImageFormat(Object imgData, int nChannels, int nRows, int nCols) {\r\n if (imgData instanceof short[]) {\r\n cmmFormat |= bytesSh(2);\r\n }\r\n else if (imgData instanceof byte[]) {\r\n cmmFormat |= bytesSh(1);\r\n }\r\n else\r\n // awt.47=First argument should be byte or short array\r\n throw new IllegalArgumentException(Messages.getString(\"awt.47\")); //$NON-NLS-1$\r\n\r\n cmmFormat |= channelsSh(nChannels);\r\n\r\n rows = nRows;\r\n cols = nCols;\r\n\r\n imageData = imgData;\r\n\r\n dataOffset = 0;\r\n }", "void imageData(int width, int height, int[] rgba);", "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "public interface ImageRenderer {\n /** Set displayed image from ImageProvider. This method is recommended,\n * because it allows the Rendered to choose the most efficient transfer\n * format. \n */\n void setImageFromSpec(ImageProvider spec);\n\n /** Set displayed image from buffered image. */\n void setImage(BufferedImage i);\n \n /** \n * Specify whether rendering should keep the aspect ratio of the image. \n * If no, it well be stretched to the display surface. If yes, borders\n * may occur, if the aspect ratio of surface and source image are different.\n * The default is false.\n */\n public void setKeepAspectRatio(boolean keepAspect);\n \n /**\n * Setter for property imageLocation.\n * @param imageLocation New value of property imageLocation.\n */\n void setImageLocation(URL imageLocation) throws IOException;\n\n /**\n * Setter for property imageResource.\n * @param imageResource New value of property imageResource.\n */\n void setImageResource(String imageResource) throws IOException;\n\n}", "public void build_buffers(float[] color /*RGBA*/) {\n int i;\n int offset = 0;\n final float[] vertexData = new float[\n mVertices.size() / 3\n * STRIDE_IN_FLOATS];\n\n float vx, vy, vz;\n\n /*\n * loop to generate vertices.\n */\n for (i = 0; i < mVertices.size(); i += 3) {\n\n vertexData[offset++] = mVertices.get(i + 0);\n vertexData[offset++] = mVertices.get(i + 1);\n vertexData[offset++] = mVertices.get(i + 2);\n\n vertexData[offset++] = 0.0f; // set normal to zero for now\n vertexData[offset++] = 0.0f;\n vertexData[offset++] = 0.0f;\n\n if (mHaveMaterialColor) {\n vertexData[offset++] = mColors.get(i + 0);\n vertexData[offset++] = mColors.get(i + 1);\n vertexData[offset++] = mColors.get(i + 2);\n vertexData[offset++] = 1.0f; // TODO: unwire the alpha?\n } else {\n // color value\n vertexData[offset++] = color[0];\n vertexData[offset++] = color[1];\n vertexData[offset++] = color[2];\n vertexData[offset++] = color[3];\n }\n }\n\n // calculate the normal,\n // set it in the packed VBO.\n // If current normal is non-zero, average it with previous value.\n\n int v1i, v2i, v3i;\n for (i = 0; i < mIndices.size(); i += 3) {\n v1i = mIndices.get(i + 0) - 1;\n v2i = mIndices.get(i + 1) - 1;\n v3i = mIndices.get(i + 2) - 1;\n\n v1[0] = mVertices.get(v1i * 3 + 0);\n v1[1] = mVertices.get(v1i * 3 + 1);\n v1[2] = mVertices.get(v1i * 3 + 2);\n\n v2[0] = mVertices.get(v2i * 3 + 0);\n v2[1] = mVertices.get(v2i * 3 + 1);\n v2[2] = mVertices.get(v2i * 3 + 2);\n\n v3[0] = mVertices.get(v3i * 3 + 0);\n v3[1] = mVertices.get(v3i * 3 + 1);\n v3[2] = mVertices.get(v3i * 3 + 2);\n\n n = XYZ.getNormal(v1, v2, v3);\n\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n }\n\n /*\n * debug - print out list of formated vertex data\n */\n// for (i = 0; i < vertexData.length; i+= STRIDE_IN_FLOATS) {\n// vx = vertexData[i + 0];\n// vy = vertexData[i + 1];\n// vz = vertexData[i + 2];\n// String svx = String.format(\"%6.2f\", vx);\n// String svy = String.format(\"%6.2f\", vy);\n// String svz = String.format(\"%6.2f\", vz);\n//\n// Log.w(\"data \", i + \" x y z \"\n// + svx + \" \" + svy + \" \" + svz + \" and color = \"\n// + vertexData[i + 6] + \" \" + vertexData[i + 7] + \" \" + vertexData[i + 8]);\n// }\n\n final FloatBuffer vertexDataBuffer = ByteBuffer\n .allocateDirect(vertexData.length * BYTES_PER_FLOAT)\n .order(ByteOrder.nativeOrder())\n .asFloatBuffer();\n vertexDataBuffer.put(vertexData).position(0);\n\n if (vbo[0] > 0) {\n GLES20.glDeleteBuffers(1, vbo, 0);\n }\n GLES20.glGenBuffers(1, vbo, 0);\n\n if (vbo[0] > 0) {\n GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vbo[0]);\n GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER, vertexDataBuffer.capacity() * BYTES_PER_FLOAT,\n vertexDataBuffer, GLES20.GL_STATIC_DRAW);\n\n // GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);\n } else {\n // errorHandler.handleError(ErrorHandler.ErrorType.BUFFER_CREATION_ERROR, \"glGenBuffers\");\n throw new RuntimeException(\"error on buffer gen\");\n }\n\n /*\n * create the buffer for the indices\n */\n offset = 0;\n int x;\n final short[] indexData = new short[mIndices.size()];\n for (x = 0; x < mIndices.size(); x++) {\n\n short index = mIndices.get(x).shortValue();\n indexData[offset++] = --index;\n }\n mTriangleIndexCount = indexData.length;\n\n /*\n * debug - print out list of formated vertex data\n */\n// short ix, iy, iz;\n// for (i = 0; i < indexData.length; i += 3) {\n// ix = indexData[i + 0];\n// iy = indexData[i + 1];\n// iz = indexData[i + 2];\n//\n// Log.w(\"data \", i + \" i1 i2 i3 \"\n// + ix + \" \" + iy + \" \" + iz );\n// }\n\n final ShortBuffer indexDataBuffer = ByteBuffer\n .allocateDirect(indexData.length * BYTES_PER_SHORT).order(ByteOrder.nativeOrder())\n .asShortBuffer();\n indexDataBuffer.put(indexData).position(0);\n\n if (ibo[0] > 0) {\n GLES20.glDeleteBuffers(1, ibo, 0);\n }\n GLES20.glGenBuffers(1, ibo, 0);\n if (ibo[0] > 0) {\n GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, ibo[0]);\n GLES20.glBufferData(GLES20.GL_ELEMENT_ARRAY_BUFFER,\n indexDataBuffer.capacity()\n * BYTES_PER_SHORT, indexDataBuffer, GLES20.GL_STATIC_DRAW);\n GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, 0);\n GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);\n } else {\n // errorHandler.handleError(ErrorHandler.ErrorType.BUFFER_CREATION_ERROR, \"glGenBuffers\");\n throw new RuntimeException(\"error on buffer gen\");\n }\n }", "public Cube() {\n\t\t// a float is 4 bytes, therefore we multiply the number if\n\t\t// vertices with 4.\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tvbb.order(ByteOrder.nativeOrder());\n\t\tvertexBuffer = vbb.asFloatBuffer();\n\t\tvertexBuffer.put(vertices);\n\t\tvertexBuffer.position(0);\n\t\t\n\t\t// Setup texture-coords-array buffer, in float. An float has 4 bytes (NEW)\n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t texBuffer.put(texCoords);\n\t texBuffer.position(0);\n\t\t\n\t\t// short is 2 bytes, therefore we multiply the number if\n\t\t// vertices with 2.\n//\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\n//\t\tibb.order(ByteOrder.nativeOrder());\n//\t\tindexBuffer = ibb.asShortBuffer();\n//\t\tindexBuffer.put(indices);\n//\t\tindexBuffer.position(0);\n\t}", "private BufferedImage user_space(BufferedImage image) {\n // create new_img with the attributes of image\n BufferedImage new_img = new BufferedImage(image.getWidth(),\n image.getHeight(), BufferedImage.TYPE_3BYTE_BGR);\n Graphics2D graphics = new_img.createGraphics();\n graphics.drawRenderedImage(image, null);\n graphics.dispose(); // release all allocated memory for this image\n return new_img;\n }", "public RenderedImage createRendering(RenderContext renderContext) {\n/* 245 */ AffineTransform gn2dev, usr2dev = renderContext.getTransform();\n/* */ \n/* */ \n/* 248 */ if (usr2dev == null) {\n/* 249 */ usr2dev = new AffineTransform();\n/* 250 */ gn2dev = usr2dev;\n/* */ } else {\n/* 252 */ gn2dev = (AffineTransform)usr2dev.clone();\n/* */ } \n/* */ \n/* */ \n/* 256 */ AffineTransform gn2usr = this.node.getTransform();\n/* 257 */ if (gn2usr != null) {\n/* 258 */ gn2dev.concatenate(gn2usr);\n/* */ }\n/* */ \n/* 261 */ Rectangle2D bounds2D = getBounds2D();\n/* */ \n/* 263 */ if (this.cachedBounds != null && this.cachedGn2dev != null && this.cachedBounds.equals(bounds2D) && gn2dev.getScaleX() == this.cachedGn2dev.getScaleX() && gn2dev.getScaleY() == this.cachedGn2dev.getScaleY() && gn2dev.getShearX() == this.cachedGn2dev.getShearX() && gn2dev.getShearY() == this.cachedGn2dev.getShearY()) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 272 */ double deltaX = usr2dev.getTranslateX() - this.cachedUsr2dev.getTranslateX();\n/* */ \n/* 274 */ double deltaY = usr2dev.getTranslateY() - this.cachedUsr2dev.getTranslateY();\n/* */ \n/* */ \n/* */ \n/* */ \n/* 279 */ if (deltaX == 0.0D && deltaY == 0.0D)\n/* */ {\n/* 281 */ return (RenderedImage)this.cachedRed;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 286 */ if (deltaX == (int)deltaX && deltaY == (int)deltaY)\n/* */ {\n/* 288 */ return (RenderedImage)new TranslateRed(this.cachedRed, (int)Math.round(this.cachedRed.getMinX() + deltaX), (int)Math.round(this.cachedRed.getMinY() + deltaY));\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 301 */ if (bounds2D.getWidth() > 0.0D && bounds2D.getHeight() > 0.0D) {\n/* */ \n/* 303 */ this.cachedUsr2dev = (AffineTransform)usr2dev.clone();\n/* 304 */ this.cachedGn2dev = gn2dev;\n/* 305 */ this.cachedBounds = bounds2D;\n/* 306 */ this.cachedRed = (CachableRed)new GraphicsNodeRed8Bit(this.node, usr2dev, this.usePrimitivePaint, renderContext.getRenderingHints());\n/* */ \n/* */ \n/* 309 */ return (RenderedImage)this.cachedRed;\n/* */ } \n/* */ \n/* 312 */ this.cachedUsr2dev = null;\n/* 313 */ this.cachedGn2dev = null;\n/* 314 */ this.cachedBounds = null;\n/* 315 */ this.cachedRed = null;\n/* 316 */ return null;\n/* */ }", "public static VImage toVImage(BufferedImage image) {\n if (image.getType() != BufferedImage.TYPE_3BYTE_BGR) {\n throw new IllegalArgumentException(\"Only BufferedImages of type TYPE_3BYTE_BGR can currently be converted to VImage\");\n }\n\n byte[] buffer = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();\n return ValueFactory.newVImage(image.getHeight(), image.getWidth(), buffer);\n }", "@Nonnull\n private BufferedImage createImage() {\n return new BufferedImage(getWidth(), getHeight(), getImageType().getType());\n }", "public \n\tBitsGLRenderer( \n\t\t\tfinal Context context ) {\n\t\t\n\t\tsuper( context );\n\t\t\n\t\tthis.mBitsGame = BitsGame.getInstance( );\n\n\t\tthis.setRenderer( this );\n\t\tthis.setFocusable(true);\n\t\tthis.setFocusableInTouchMode(true);\n\t\t\n\t\tthis.mVertexBufferSize = BitsApp.sRenderBufferSize;\n\t\tthis.mIndexBufferSize = BitsApp.sRenderBufferSize / 16 * BitsGLImage.INDICES_PER_SPRITE;\n\n\t\t//init the rotation array\n\t\tthis.mLastRotation[0] = 0f;\n\t\tthis.mLastRotation[1] = -1f;\n\t\tthis.mLastRotation[2] = -1f;\t\t\n\t\t\n\t\tthis.mVertices = new float[this.mVertexBufferSize];\n\t\tByteBuffer buffer = ByteBuffer.allocateDirect( this.mVertices.length * 16 ); //16 -> (X,Y,U,V) are 4 Float values -> Float is 4 Bytes long\n\t buffer.order( ByteOrder.nativeOrder() );\n\t this.mVertexBuffer = buffer.asFloatBuffer();\n\t \n\t //Pre-Filling the index buffer. The buffer content will never change.\n\t //This buffer always contains a sequence of 0,1,2,2,3,0 values that are used to render BitsImages efficiently.\n\t final short[] indices = new short[this.mIndexBufferSize];\n\t final int len = indices.length;\n\t short j = 0;\n\t for ( int i = 0; i < len; i+= BitsGLImage.INDICES_PER_SPRITE, j += BitsGLImage.VERTICES_PER_SPRITE ) {\n\t \tindices[i + 0] = (short)( j + 0 ); // Calculate Index 0 (first Triangle)\n\t indices[i + 1] = (short)( j + 1 ); // Calculate Index 1 (first Triangle)\n\t indices[i + 2] = (short)( j + 2 ); // Calculate Index 2 (first Triangle)\n\t indices[i + 3] = (short)( j + 2 ); // Calculate Index 3 (second Triangle)\n\t indices[i + 4] = (short)( j + 3 ); // Calculate Index 4 (second Triangle)\n\t indices[i + 5] = (short)( j + 0 ); // Calculate Index 5 (second Triangle)\n\t }\n buffer = ByteBuffer.allocateDirect( indices.length * (Short.SIZE / 8) ); //Short == 2 Bytes\n buffer.order( ByteOrder.nativeOrder() );\n this.mIndexBuffer = buffer.asShortBuffer();\n this.mIndexBuffer.clear();\n this.mIndexBuffer.put( indices );\n this.mIndexBuffer.flip();\n\t}", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "public void render () {\n image (img, xC, yC, xLength * getPixelSize(), yLength * getPixelSize());\n }", "public BufferedImage doInBackground() {\n \t \tsynchronized(v2d)\r\n \t \t{\r\n \t \tv2d.simulate();\r\n \t \t\r\n \t \t//developers can use this functuon of 2d viwers to skip long renderings that are not actually updating the image\r\n \t \tif (v2d.skipRendering())\r\n \t \t\treturn finalImage;\r\n \t \t\r\n \t \t//this if is for the first time the two buffers are initialized and for when the user changes the size of the container; in this case a new image of the good size needs to be created.\r\n \t \tif (image == null || image.getWidth() != thisContainer.getWidth() || image.getHeight() != thisContainer.getHeight())\r\n \t \t\t\r\n \t \t\tif (thisContainer.getWidth() < 0 || thisContainer.getHeight() < 0)\r\n \t \t\t\treturn finalImage;\r\n \t \t\t\r\n \t \t\t//image = thisPanel.getGraphicsConfiguration().createCompatibleImage(thisPanel.getWidth(),thisPanel.getHeight());\r\n \t \t\timage = new BufferedImage(thisContainer.getWidth(), thisContainer.getHeight(),BufferedImage.TYPE_INT_ARGB);\r\n \t \t\t\r\n \t \t \t \t \t \t\r\n \t \t\tGraphics2D gc = image.createGraphics();\r\n \t \t\t\r\n \t \t\tgc.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);\r\n \t \t\t\r\n\t gc.setColor(v2d.backgroundColor());\r\n\t gc.fillRect(0, 0, thisContainer.getWidth(), thisContainer.getHeight()); // fill in background\r\n\t \r\n\t if (!v2d.antialiasingSet)\r\n\t {\r\n\t \tif (v2d.antialiasing)\r\n\t \t{\t \t\t\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_ANTIALIAS_ON);\r\n\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_ANTIALIAS_OFF);\r\n\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);\r\n\t \t}\r\n\t }\r\n\t \r\n\t zoomOriginX = this.thisContainer.getWidth()/2;\r\n\t zoomOriginY = this.thisContainer.getHeight()/2;\r\n\t \r\n\t //sets the proper transformation for the Graphics context that will passed into the rendering function\t \r\n\t \r\n\t \r\n\t gc.setTransform(AffineTransform.getTranslateInstance(zoomOriginX, zoomOriginY));\t \r\n\t gc.transform(AffineTransform.getScaleInstance(zoom,zoom));\t\t \r\n\t gc.transform(AffineTransform.getTranslateInstance(translatex-zoomOriginX, translatey-zoomOriginY));\r\n\t \r\n\t \r\n\t transform = gc.getTransform();\r\n \t \t\t \t\t\r\n \t \t\t\t\r\n\t v2d.render(gc);\r\n\t gc.setColor(Color.black);\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t gc.setTransform(AffineTransform.getTranslateInstance(0, 0));\r\n\t \t\r\n\t if ((new Date().getTime()- lastMouseMove) > v2d.getTooltipDelay())\r\n\t \tif (v2d.getToolTipEnabled() && v2d.getToolTipText().length() > 0)\r\n\t \t\tv2d.renderTooltip(gc);\r\n \t \t}\r\n\t \r\n \t return image;\r\n \t }", "protected ImageRenderer createRenderer() {\n\t\tImageRendererFactory rendFactory = new ConcreteImageRendererFactory();\n\t\t// ImageRenderer renderer = rendFactory.createDynamicImageRenderer();\n\t\treturn rendFactory.createStaticImageRenderer();\n\t}", "public CUDA_RESOURCE_VIEW_DESC set(\n int format,\n long width,\n long height,\n long depth,\n int firstMipmapLevel,\n int lastMipmapLevel,\n int firstLayer,\n int lastLayer,\n IntBuffer reserved\n ) {\n format(format);\n width(width);\n height(height);\n depth(depth);\n firstMipmapLevel(firstMipmapLevel);\n lastMipmapLevel(lastMipmapLevel);\n firstLayer(firstLayer);\n lastLayer(lastLayer);\n reserved(reserved);\n\n return this;\n }", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public Card(String type, int number, BufferedImage backImage, \n BufferedImage turnedImage, BufferedImage overImage, int w, int h){\n\tthis.type = type;\n\tthis.number = number;\n\tthis.backImage = backImage;\n this.image = backImage;\n\tthis.turnedImage = turnedImage;\n this.overImage = overImage;\n\tthis.w = w;\n\tthis.h = h;\n \n // Create the VolatileImages\n try{\n backVimImage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n vimage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n turnedVimImage = VolatileImageLoader.loadFromBufferedImage(\n turnedImage, Transparency.TRANSLUCENT);\n overVimImage = VolatileImageLoader.loadFromBufferedImage(\n overImage, Transparency.TRANSLUCENT);\n }\n catch(IOException ioe){\n System.err.println(\"Could not convert from BufferedImage \" +\n \"to VolatileImage\");\n }\n }", "public void set(RenderedImage[] images) {\n\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public static Texture readTexture(BufferedImage img) {\n\t\tint bytesPerPixel = -1, pix;\n\t\t\n\t\t// 3 or 4 bytes per pixel?\n\t\tif( img.getColorModel().hasAlpha() )\n\t\t\tbytesPerPixel = 4;\n\t\telse\n\t\t\tbytesPerPixel = 3;\n\t\n\t\t// Allocate a ByteBuffer\n\t\tByteBuffer unpackedPixels = \n\t\t\tByteBuffer.allocateDirect(img.getWidth() * img.getHeight() * bytesPerPixel);\n\t\t\n\t\t// Pack the pixels into the ByteBuffer in RGBA, 4 byte format.\n\t\tfor(int row = img.getHeight() - 1; row >= 0; row--) {\n\t\t\tfor (int col = 0; col < img.getWidth(); col++) {\n\t\t\t\tpix = img.getRGB(col,row); // Should return the pixel in format TYPE_INT_ARGB \n\t\t\t\tunpackedPixels.put((byte) ((pix >> 16) & 0xFF)); // red\n\t\t\t\tunpackedPixels.put((byte) ((pix >> 8 ) & 0xFF)); // green\n\t\t\t\tunpackedPixels.put((byte) ((pix ) & 0xFF)); // blue\n\t\t\t\tif (bytesPerPixel == 4) {\n\t\t\t\t\tunpackedPixels.put((byte) ((pix >> 24) & 0xFF)); // alpha\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(bytesPerPixel == 4 ) {\n\t\t\treturn new Texture(unpackedPixels,img.getWidth(), img.getHeight(), \n\t\t\t\t\tTexture.TEXTURE_4BYTE_RGBA);\n\t\t} else {\n\t\t\treturn new Texture(unpackedPixels,img.getWidth(), img.getHeight(), \n\t\t\t\t\tTexture.TEXTURE_3BYTE_RGB);\n\t\t}\n\t}", "RenderedImage createDefaultRendering(Long id) throws RemoteException;", "@Override\n\tpublic final IRenderable load() {\n\t\tImage img = loadImage();\n\t\tassertImageIsValid(img);\n\t\treturn new ImageRenderable(img);\n\t}", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public void set(int index, RenderedImage image) {\n\n checkForLiveOrCompiled();\n // For RenderedImage the width and height checking is done in the retained.\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public static com.jme.image.Image loadImage(InputStream fis, boolean flip, boolean exp32) throws\n IOException {\n byte red = 0;\n byte green = 0;\n byte blue = 0;\n byte alpha = 0;\n //open a stream to the file\n BufferedInputStream bis = new BufferedInputStream(fis, 8192);\n DataInputStream dis = new DataInputStream(bis);\n //Read the TGA header\n idLength = (short) dis.read();\n colorMapType = (short) dis.read();\n imageType = (short) dis.read();\n cMapStart = flipEndian(dis.readShort());\n cMapLength = flipEndian(dis.readShort());\n cMapDepth = (short) dis.read();\n xOffset = flipEndian(dis.readShort());\n yOffset = flipEndian(dis.readShort());\n width = flipEndian(dis.readShort());\n height = flipEndian(dis.readShort());\n pixelDepth = (short) dis.read();\n imageDescriptor = (short) dis.read();\n //Skip image ID\n if (idLength > 0)\n bis.skip(idLength);\n // Allocate image data array\n byte[] rawData = null;\n int dl;\n if ((pixelDepth == 32)||(exp32)) {\n rawData = new byte[width * height * 4];\n dl=4;\n } else {\n rawData = new byte[width * height * 3];\n dl=3;\n }\n int rawDataIndex = 0;\n \n // Faster than doing a 24-or-32 check on each individual pixel,\n // just make a seperate loop for each.\n if (pixelDepth == 24)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n if(dl==4) {\n // create an alpha channel\n rawData[rawDataIndex++] = (byte)255;\n }\n \n }\n }\n else if (pixelDepth == 32)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n alpha = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n rawData[rawDataIndex++] = alpha;\n }\n }\n fis.close();\n //Get a pointer to the image memory\n ByteBuffer scratch = ByteBuffer.allocateDirect(rawData.length);\n scratch.clear();\n scratch.put(rawData);\n scratch.rewind();\n // Create the jme.image.Image object\n com.jme.image.Image textureImage = new com.jme.image.Image();\n if (dl == 4)\n textureImage.setType(com.jme.image.Image.RGBA8888);\n else\n textureImage.setType(com.jme.image.Image.RGB888);\n textureImage.setWidth(width);\n textureImage.setHeight(height);\n textureImage.setData(scratch);\n return textureImage;\n }", "@Override\n void createRetained() {\n this.retained = new ImageComponent3DRetained();\n this.retained.setSource(this);\n }", "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "void setFormat(ImageFormat format);", "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "public Image(Renderer renderer, int width, int height) throws RenderException {\r\n\t\tthis(renderer, renderer.createEmptyTexture(width, height));\r\n\t}", "public @NotNull Image reformat(ColorFormat format)\n {\n if (format != ColorFormat.GRAY &&\n format != ColorFormat.GRAY_ALPHA &&\n format != ColorFormat.RGB &&\n format != ColorFormat.RGBA) {throw new UnsupportedOperationException(\"invalid format: \" + format);}\n \n if (this.data != null && this.format != format)\n {\n Color.Buffer output = this.data.copy(format);\n \n this.data.free();\n \n this.data = output;\n this.format = format;\n this.mipmaps = 1;\n }\n return this;\n }", "public static JTensor newWithStorage3d(\n JStorage storage, long storageOffset,\n long size0, long stride0,\n long size1, long stride1,\n long size2, long stride2) {\n return new JTensor(\n TH.THTensor_(newWithStorage3d)(storage, storageOffset,\n size0, stride0, size1, stride1, size2, stride2)\n );\n }", "public BufferedImage create() {\n checkDimensions();\n final BufferedImage image = createImage();\n getImagePainter().paint(image);\n return image;\n }", "public CanvasComponent(FloatProperty video_source_ratio_property,WritableImage writable_image,WritablePixelFormat<ByteBuffer> pixel_format,int width,int height) {\r\n super(new CanvasBuffer(video_source_ratio_property, width, height));\r\n this.writable_image = writable_image;\r\n this.pixel_format = pixel_format;\r\n\r\n }", "public BufferedImage toBufferedImage() {\n double[][] yData = decompress(yChannel);\n double[][] cBData = upsample(decompress(cBChannel));\n double[][] cRData = upsample(decompress(cRChannel));\n\n BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);\n for (int x = 0; x < width; ++x) {\n for (int y = 0; y < height; ++y) {\n double[] aYCbCr = {alphaChannel[y][x], yData[y][x], cBData[y][x], cRData[y][x]};\n int aRGB = ImageUtils.channelInt(ImageUtils.toRGB(aYCbCr));\n image.setRGB(x, y, aRGB);\n }\n }\n return image;\n }", "public AlternateImageRenderer() {\r\n super(\"\");\r\n images = new Image[2];\r\n try {\r\n Resources imageRes = UIDemoMain.getResource(\"images\");\r\n images[0] = imageRes.getImage(\"sady.png\");\r\n images[1] = imageRes.getImage(\"smily.png\");\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n setUIID(\"ListRenderer\");\r\n }", "public void setBufferImage(Image bufferImage) {\n this.bufferImage = bufferImage;\n }", "private void readBuffer(int slice, float buffer[]) throws IOException {\r\n int i = 0;\r\n int b1,b2;\r\n int j;\r\n int nBytes;\r\n long progress, progressLength, mod;\r\n\r\n switch (dataType) {\r\n case ModelStorageBase.UBYTE:\r\n nBytes = xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n for ( j = 0; j < nBytes; j++, i++) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), false);\r\n buffer[i] = byteBuffer[j] & 0xff;\r\n }\r\n break;\r\n case ModelStorageBase.SHORT:\r\n nBytes = 2*xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n for (j = 0; j < nBytes; j+=2, i++ ) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), false);\r\n b1 = getUnsignedByte(byteBuffer, j);\r\n b2 = getUnsignedByte(byteBuffer, j+1);\r\n buffer[i] = (short)((b2 << 8) + b1); // little endian\r\n }\r\n break;\r\n case ModelStorageBase.ARGB:\r\n // from 2 color merged psuedocolor\r\n nBytes = 2*xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n //For the moment I compress RGB images to unsigned bytes.\r\n for (j = 0; j < nBytes; j+=2, i+=4 ) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), true);\r\n buffer[i] = 255;\r\n buffer[i+1] = getUnsignedByte(byteBuffer, j);\r\n buffer[i+2] = getUnsignedByte(byteBuffer, j+1);\r\n buffer[i+3] = 0;\r\n }\r\n break;\r\n } // switch(dataType)\r\n }", "FloatBuffer getInterleavedBuffers(float[] posDat, float[] colDat, float[]\n normDat, float[] texDat) {\n if (colDat == null && texDat == null) {\n throw new IllegalArgumentException(\"no color or texture\");\n }\n // interleaving pX,pY,pZ,r,g,b,a,nX,nY,nZ,u,v // 12*4 = 48bytes\n int posIndx = 0;\n int colIndx = 0;\n int norIndx = 0;\n int texIndx = 0;\n int size = posDat.length + normDat.length;\n size += (colDat != null) ? colDat.length : 0;\n size += (texDat != null) ? texDat.length : 0;\n int step = 3 + 3 + ((colDat != null) ? 4 : 0) + ((texDat != null) ? 2 : 0);\n float[] interleavedData = new float[size];\n// Log.e(\"InterleavedBuffers\", \"size=\" + size + \", step=\" + step);\n int i = 0;\n while(i < size){\n interleavedData[i + 0] = posDat[posIndx + 0];\n interleavedData[i + 1] = posDat[posIndx + 1];\n interleavedData[i + 2] = posDat[posIndx + 2];\n posIndx += 3;\n i += 3;\n if (colDat != null) {\n interleavedData[i + 0] = colDat[colIndx + 0];\n interleavedData[i + 1] = colDat[colIndx + 1];\n interleavedData[i + 2] = colDat[colIndx + 2];\n interleavedData[i + 3] = colDat[colIndx + 3];\n colIndx += 4;\n i += 4;\n }\n interleavedData[i + 0] = normDat[norIndx + 0];\n interleavedData[i + 1] = normDat[norIndx + 1];\n interleavedData[i + 2] = normDat[norIndx + 2];\n norIndx += 3;\n i += 3;\n if (texDat != null) {\n interleavedData[i + 0] = texDat[texIndx + 0];\n interleavedData[i + 1] = texDat[texIndx + 1];\n texIndx += 2;\n i += 2;\n }\n }\n final FloatBuffer buffer;\n\n buffer = floatArrayToFloatBuffer(interleavedData);\n\n return buffer;\n }", "public Renderer() {\r\n renderables = new ArrayList<>();\r\n renderables.add(null); //The first background\r\n renderables.add(TextBox.blankText); //The first text box\r\n rendered = new BufferedImage(Main.WIDTH,Main.HEIGHT,BufferedImage.TYPE_INT_ARGB);\r\n focused = -1;\r\n }", "public Image createImage() {\n if (source == null) {\n source = new MemoryImageSource(width, height, cModel, pixels, 0, width);\n source.setAnimated(true);\n }\n Image img = Toolkit.getDefaultToolkit().createImage(source);\n return img;\n }", "public ComponentSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride,\n int bandOffsets[]) {\n super(dataType, w, h, bandOffsets.length);\n this.dataType = dataType;\n this.pixelStride = pixelStride;\n this.scanlineStride = scanlineStride;\n this.bandOffsets = (int[]) bandOffsets.clone();\n numBands = this.bandOffsets.length;\n if (pixelStride < 0) {\n throw new IllegalArgumentException(\"Pixel stride must be >= 0\");\n }\n // TODO - bug 4296691 - remove this check\n if (scanlineStride < 0) {\n throw new IllegalArgumentException(\"Scanline stride must be >= 0\");\n }\n if (numBands < 1) {\n throw new IllegalArgumentException(\"Must have at least one band.\");\n }\n if ((dataType < DataBuffer.TYPE_BYTE) || (dataType > DataBuffer.TYPE_DOUBLE)) {\n throw new IllegalArgumentException(\"Unsupported dataType.\");\n }\n bankIndices = new int[numBands];\n for (int i = 0; i < numBands; i++) {\n bankIndices[i] = 0;\n }\n verify();\n }", "public void Render() {\n\t\tbufferStrat = getBufferStrategy();\n\t\tif (bufferStrat == null) {\n\t\t\tcreateBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tstylus = bufferStrat.getDrawGraphics();\n\t\t\n\t\tstylus.drawImage(buffer, 0, 0, getWidth(), getHeight(), null);\n\t\t\n\t\tstylus.dispose();\n\t\tbufferStrat.show();\n\t}", "public ImageBuffer(int w, int h, int[] p, ColorModel cm, String s) {\n width = w;\n height = h;\n pixels = p;\n cModel = cm;\n name = s;\n }", "public static NativeImageFormat createNativeImageFormat(BufferedImage bi) {\r\n NativeImageFormat fmt = new NativeImageFormat();\r\n\r\n switch (bi.getType()) {\r\n case BufferedImage.TYPE_INT_RGB: {\r\n fmt.cmmFormat = INT_RGB_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_INT_ARGB:\r\n case BufferedImage.TYPE_INT_ARGB_PRE: {\r\n fmt.cmmFormat = INT_ARGB_LCMS_FMT;\r\n fmt.alphaOffset = 3;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_INT_BGR: {\r\n fmt.cmmFormat = INT_BGR_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_3BYTE_BGR: {\r\n fmt.cmmFormat = THREE_BYTE_BGR_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_4BYTE_ABGR_PRE:\r\n case BufferedImage.TYPE_4BYTE_ABGR: {\r\n fmt.cmmFormat = FOUR_BYTE_ABGR_LCMS_FMT;\r\n fmt.alphaOffset = 0;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_BYTE_GRAY: {\r\n fmt.cmmFormat = BYTE_GRAY_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_USHORT_GRAY: {\r\n fmt.cmmFormat = USHORT_GRAY_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_BYTE_BINARY:\r\n case BufferedImage.TYPE_USHORT_565_RGB:\r\n case BufferedImage.TYPE_USHORT_555_RGB:\r\n case BufferedImage.TYPE_BYTE_INDEXED: {\r\n // A bunch of unsupported formats\r\n return null;\r\n }\r\n\r\n default:\r\n break; // Try to look at sample model and color model\r\n }\r\n\r\n\r\n if (fmt.cmmFormat == 0) {\r\n ColorModel cm = bi.getColorModel();\r\n SampleModel sm = bi.getSampleModel();\r\n\r\n if (sm instanceof ComponentSampleModel) {\r\n ComponentSampleModel csm = (ComponentSampleModel) sm;\r\n fmt.cmmFormat = getFormatFromComponentModel(csm, cm.hasAlpha());\r\n fmt.scanlineStride = calculateScanlineStrideCSM(csm, bi.getRaster());\r\n } else if (sm instanceof SinglePixelPackedSampleModel) {\r\n SinglePixelPackedSampleModel sppsm = (SinglePixelPackedSampleModel) sm;\r\n fmt.cmmFormat = getFormatFromSPPSampleModel(sppsm, cm.hasAlpha());\r\n fmt.scanlineStride = calculateScanlineStrideSPPSM(sppsm, bi.getRaster());\r\n }\r\n\r\n if (cm.hasAlpha())\r\n fmt.alphaOffset = calculateAlphaOffset(sm, bi.getRaster());\r\n }\r\n\r\n if (fmt.cmmFormat == 0)\r\n return null;\r\n\r\n if (!fmt.setImageData(bi.getRaster().getDataBuffer())) {\r\n return null;\r\n }\r\n\r\n fmt.rows = bi.getHeight();\r\n fmt.cols = bi.getWidth();\r\n\r\n fmt.dataOffset = bi.getRaster().getDataBuffer().getOffset();\r\n\r\n return fmt;\r\n }", "public BufferedImage buildBufferedImage(Dimension size) {\n/* 101 */ return new BufferedImage(size.width, size.height, 1);\n/* */ }", "BufferedImage buildImgBuf(Dimension d)\n\t{\n\tBufferedImage gBufImg= ImgFactory.getImg(500, 600); //new BufferedImage(dmX, dmY, BufferedImage.TYPE_INT_ARGB);\n\tGraphics2D g2=gBufImg.createGraphics();\n\tif (drawGraphics(g2, d, samples))\n\t\treturn gBufImg;\n\t\treturn null;\n\n\t}", "public Render0(BufferedImage a)\n\t{\n\t\tsuper(a, new Vector2f(0, 0));\n\t}", "public SXRRenderTextureArray(SXRContext ctx, int width, int height, int samples, int layers)\n {\n super(ctx, NativeRenderTexture.ctorArray(width, height, samples, layers));\n }", "public Image(Renderer renderer, TextureReference texture, float texture_x, float texture_y, float texture_w,\r\n\t\t\tfloat texture_h, float width, float height) {\r\n\t\tsuper();\r\n\t\tthis.renderer = renderer;\r\n\t\tthis.texture = texture;\r\n\t\tthis.textureX = texture_x;\r\n\t\tthis.textureY = texture_y;\r\n\t\tthis.textureWidth = texture_w;\r\n\t\tthis.textureHeight = texture_h;\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t}", "public static BufferedImage fromArray(float[] data, int width, int height) {\n int[] convertedData = new int[width * height];\n int colorValue;\n for (int i = 0; i < convertedData.length; i++) {\n colorValue = Math.round(data[i]);\n convertedData[i] = ((colorValue << 16) & 0xff0000)\n + ((colorValue << 8) & 0x00ff00) + (colorValue & 0xff);\n }\n BufferedImage image = new BufferedImage(width, height,\n BufferedImage.TYPE_INT_RGB);\n image.setRGB(0, 0, width, height, convertedData, 0, width);\n return image;\n }", "private BufferedImage CreateBuffedImage(WinFileMappingBuffer fm, boolean bWithAlphaChanle) {\n BitmapFileBuffer bitmap = new BitmapFileBuffer();\n if (!bitmap.Load(fm.getBuffer())) {\n return null;\n }\n return bitmap.GetBuffedImage(bWithAlphaChanle);\n }", "public void setBfImageByData(int [][][] data){\r\n\t\tBfImage = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);\r\n\t\tfor (int i = 0; i < width; i++) {\r\n\t\t\tfor (int j = 0; j < height; j++) {\r\n\t\t\t\tint [] rgb = data[j][i];\r\n\t\t\t\tif (rgb[0] == -1){\t//is transparent\r\n\t\t\t\t\tBfImage.setRGB(i, j, Transparency.TRANSLUCENT);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tBfImage.setRGB(i, j, Utils.getRGB(rgb[0], rgb[1], rgb[2]));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private byte[] composeJPG(BufferedImage[] rgbBufferedImages) {\r\n\t\t// blue (index 2) is always available\r\n\t\tint width = rgbBufferedImages[BLUE_INDEX].getWidth();\r\n\t\tint height = rgbBufferedImages[BLUE_INDEX].getHeight();\r\n\t\tBufferedImage rgbImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\r\n\t\tint alpha = 0xFF;\r\n\t\tfor (int x = 0; x < width; x++) {\r\n\t\t\tfor(int y = 0; y < height; y++) {\r\n\t\t\t\tint red = rgbBufferedImages[RED_INDEX] != null ? rgbBufferedImages[RED_INDEX].getRGB(x, y) & 0xFF : 0;\r\n\t\t\t\tint green = rgbBufferedImages[GREEN_INDEX] != null ? rgbBufferedImages[GREEN_INDEX].getRGB(x, y) & 0xFF : 0;\r\n\t\t\t\tint blue = rgbBufferedImages[BLUE_INDEX].getRGB(x, y) & 0xFF;\r\n\t\t\t\trgbImage.setRGB(x, y, (alpha << 24) | (red << 16) | (green << 8) | blue);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbyte[] imageByteArray;\r\n\t\ttry(ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {\r\n\t\t\tImageIO.write( rgbImage, \"jpg\", byteArrayOutputStream );\r\n\t\t\tbyteArrayOutputStream.flush();\r\n\t\t\timageByteArray = byteArrayOutputStream.toByteArray();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new ImageNotFoundException(\"Output image could not be created.\");\r\n\t\t}\r\n\t\treturn imageByteArray;\r\n\t}", "private void render() {\n\t\tBufferStrategy bs = this.getBufferStrategy();\r\n\t\tif (bs == null) {\r\n\t\t\tcreateBufferStrategy(3);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//Initiates Graphics class using bufferStrategy\r\n\t\tGraphics g = bs.getDrawGraphics();\r\n\t\t\r\n\t\t//displays img on screen\r\n\t\tg.drawImage(img, 0, 0, null);\r\n\t\t\r\n\t\tg.setColor(Color.CYAN);\r\n\t\tg.drawString(fps + \" FPS\", 10, 10);\r\n\t\tg.setFont(new Font(\"Arial\", 0, 45));\r\n\r\n\t\tg.dispose();//clears graphics\r\n\t\tbs.show();//shows graphics\r\n\t}", "public interface RenderMesh extends NvDisposeable{\n\n void initlize(MeshParams params);\n\n void draw();\n\n public static class MeshParams{\n public int posAttribLoc;\n public int norAttribLoc;\n public int texAttribLoc;\n public int tanAttribLoc = -1; // tangent attribution is diabled default.\n }\n}", "private void createBackBuffer() {\r\n GraphicsConfiguration gc = getGraphicsConfiguration();\r\n volatileImg = gc.createCompatibleVolatileImage(getWidth(), getHeight());\r\n// volatileImg.setAccelerationPriority(1);\r\n }", "public BufferedImage convertToBimage(int[][][] TmpArray) {\n\n int width = TmpArray.length;\n int height = TmpArray[0].length;\n\n BufferedImage tmpimg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int a = TmpArray[x][y][0];\n int r = TmpArray[x][y][1];\n int g = TmpArray[x][y][2];\n int b = TmpArray[x][y][3];\n\n //set RGB value\n\n int p = (a << 24) | (r << 16) | (g << 8) | b;\n tmpimg.setRGB(x, y, p);\n\n }\n }\n return tmpimg;\n }", "public three_d_object(int ob_x, int ob_y, int ob_z, int new_ob_size, int new_ob_rotation_X,\n\t\t\t\t\tint new_ob_rotation_Y) {\n\t\t\t\tx = ob_x;\n\t\t\t\ty = ob_y;\n\t\t\t\tz = ob_z;\n\t\t\t\tob_size = new_ob_size;\n\t\t\t\trotation_X = new_ob_rotation_X;\n\t\t\t\trotation_Y = new_ob_rotation_Y;\n\n\t\t\t}", "public void buildImageStyle( IImageContent image, StringBuffer styleBuffer,\n\t\t\tint display )\n \t{\n \t\t// image size\n \t\tbuildSize( styleBuffer, HTMLTags.ATTR_WIDTH, image.getWidth( ) ); //$NON-NLS-1$\n \t\tbuildSize( styleBuffer, HTMLTags.ATTR_HEIGHT, image.getHeight( ) ); //$NON-NLS-1$\n\t\t// build the none value of display\n\t\tsetDisplayProperty( display, 0, styleBuffer );\n \t\tbuildStyle( image, styleBuffer );\n \t}", "Image createImage();", "public abstract void setImageFormat(String format);", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "private GDIWindowSurfaceData(WComponentPeer paramWComponentPeer, SurfaceType paramSurfaceType) {\n/* 242 */ super(paramSurfaceType, paramWComponentPeer.getDeviceColorModel()); int m;\n/* 243 */ ColorModel colorModel = paramWComponentPeer.getDeviceColorModel();\n/* 244 */ this.peer = paramWComponentPeer;\n/* 245 */ int i = 0, j = 0, k = 0;\n/* */ \n/* 247 */ switch (colorModel.getPixelSize()) {\n/* */ case 24:\n/* */ case 32:\n/* 250 */ if (colorModel instanceof DirectColorModel) {\n/* 251 */ byte b = 32; break;\n/* */ } \n/* 253 */ m = 24;\n/* */ break;\n/* */ \n/* */ default:\n/* 257 */ m = colorModel.getPixelSize(); break;\n/* */ } \n/* 259 */ if (colorModel instanceof DirectColorModel) {\n/* 260 */ DirectColorModel directColorModel = (DirectColorModel)colorModel;\n/* 261 */ i = directColorModel.getRedMask();\n/* 262 */ j = directColorModel.getGreenMask();\n/* 263 */ k = directColorModel.getBlueMask();\n/* */ } \n/* 265 */ this\n/* 266 */ .graphicsConfig = (Win32GraphicsConfig)paramWComponentPeer.getGraphicsConfiguration();\n/* 267 */ this.solidloops = this.graphicsConfig.getSolidLoops(paramSurfaceType);\n/* */ \n/* */ \n/* 270 */ Win32GraphicsDevice win32GraphicsDevice = (Win32GraphicsDevice)this.graphicsConfig.getDevice();\n/* 271 */ initOps(paramWComponentPeer, m, i, j, k, win32GraphicsDevice.getScreen());\n/* 272 */ setBlitProxyKey(this.graphicsConfig.getProxyKey());\n/* */ }", "public static BufferedImage createRGB32Image(int w, int h) {\n int transferType = DataBuffer.TYPE_INT;\n ColorModel colorModel = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), \n false, false, Transparency.OPAQUE, transferType);\n WritableRaster raster = colorModel.createCompatibleWritableRaster(w, h);\n\n int[] destData = ((DataBufferInt) raster.getDataBuffer()).getData();\n final int imgDataCount = w * h * 3;\n if (destData.length != imgDataCount) {\n throw new RuntimeException(\"\");\n }\n return new BufferedImage(colorModel, raster, false, null);\n }", "public ComponentSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride,\n int bankIndices[], int bandOffsets[]) {\n super(dataType, w, h, bandOffsets.length);\n this.dataType = dataType;\n this.pixelStride = pixelStride;\n this.scanlineStride = scanlineStride;\n this.bandOffsets = (int[]) bandOffsets.clone();\n this.bankIndices = (int[]) bankIndices.clone();\n if (pixelStride < 0) {\n throw new IllegalArgumentException(\"Pixel stride must be >= 0\");\n }\n // TODO - bug 4296691 - remove this check\n if (scanlineStride < 0) {\n throw new IllegalArgumentException(\"Scanline stride must be >= 0\");\n }\n if ((dataType < DataBuffer.TYPE_BYTE) || (dataType > DataBuffer.TYPE_DOUBLE)) {\n throw new IllegalArgumentException(\"Unsupported dataType.\");\n }\n int maxBank = this.bankIndices[0];\n if (maxBank < 0) {\n throw new IllegalArgumentException(\"Index of bank 0 is less than \" + \"0 (\" + maxBank + \")\");\n }\n for (int i = 1; i < this.bankIndices.length; i++) {\n if (this.bankIndices[i] > maxBank) {\n maxBank = this.bankIndices[i];\n } else if (this.bankIndices[i] < 0) {\n throw new IllegalArgumentException(\"Index of bank \" + i + \" is less than 0 (\" + maxBank\n + \")\");\n }\n }\n numBanks = maxBank + 1;\n numBands = this.bandOffsets.length;\n if (this.bandOffsets.length != this.bankIndices.length) {\n throw new IllegalArgumentException(\"Length of bandOffsets must \"\n + \"equal length of bankIndices.\");\n }\n verify();\n }", "public ImageBuffer(int w, int h, short[] r, short[] g, short[] b, String s) {\n width = w;\n height = h;\n pixels = new int[w * h];\n cModel = ColorModel.getRGBdefault();\n name = s;\n setPixels(r, g, b);\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public RImage(final TImgTools.HasDimensions dummyDataset, final int iimageType,\n\t\t\t\tfinal int x, final int y, final int z) {\n\t\t\t// templateData=dummyDataset;\n\t\t\t// imageType=iimageType;\n\t\t\tsuper(dummyDataset, iimageType, new SphR(x, y, z));\n\t\t}", "private void createFromVCImage(VCImage vcImage) throws ImageException {\r\n\tsizeX = vcImage.getNumX();\r\n\tsizeY = vcImage.getNumY();\r\n\tsizeZ = vcImage.getNumZ();\r\n\tif (sizeX*sizeY*sizeZ!=vcImage.getPixels().length){\r\n\t\tthrow new ImageException(\"pixelData not properly formed\");\r\n\t}\r\n\toriginalRGB = new int[sizeX*sizeY*sizeZ];\r\n\tfor (int i=0;i<vcImage.getPixels().length;i++){\r\n\t\tint pixel = ((int)vcImage.getPixels()[i])&0xff;\r\n\t\toriginalRGB[i] = new java.awt.Color(pixel,pixel,pixel).getRGB();\r\n\t}\r\n\tbValid = true;\r\n\timageName = (vcImage.getVersion()!=null)?vcImage.getVersion().getName():\"unnamedImage\";\t\r\n}", "public void divideImage() {\n\n int chunkWidth = 70;\n int chunkHeight = 70;\n int count = 0;\n imgs = new BufferedImage[100];\n for (int x = 0; x < 10; x++)\n for (int y = 0; y < 10; y++) {\n\n try{\n\n imgs[count] = new BufferedImage(chunkWidth, chunkHeight, img.getType());\n Graphics2D gr = imgs[count++].createGraphics();\n gr.drawImage(img, 0, 0, chunkWidth, chunkHeight, chunkWidth * y, chunkHeight * x, chunkWidth * y + chunkWidth, chunkHeight * x + chunkHeight, null);\n gr.dispose();\n\n } catch (Exception e){\n\n // e.printStackTrace();\n\n }\n\n }\n\n }", "public FloatImage(int cWidth, int cHeight) {\n super(cWidth, cHeight);\n this.pixels = new float[getWidth()*getHeight()];\n }", "private void mkMesh()\n\t{\n\t\t/* this initialises the the two FloatBuffer objects */\n\t\n\t\tfloat vertices[] = {\n\t\t\t-0.5f, -0.5f, 0.0f,\t\t// V1 - bottom left\n\t\t\t-0.5f, 0.5f, 0.0f,\t\t// V2 - top left\n\t\t\t 0.5f, -0.5f, 0.0f,\t\t// V3 - bottom right\n\t\t\t 0.5f, 0.5f, 0.0f\t\t\t// V4 - top right\n\t\t\t};\n\t\tfloat texture[] = { \t\t\n\t\t\t// Mapping coordinates for the vertices\n\t\t\t0.0f, 1.0f,\t\t// top left\t\t(V2)\n\t\t\t0.0f, 0.0f,\t\t// bottom left\t(V1)\n\t\t\t1.0f, 1.0f,\t\t// top right\t(V4)\n\t\t\t1.0f, 0.0f\t\t// bottom right\t(V3)\n\t\t\t};\n\t\t/* cache the number of floats in the vertices data */\n\t\tvertexCount = vertices.length;\n\t\t\n\t\t// a float has 4 bytes so we allocate for each coordinate 4 bytes\n\t\tByteBuffer byteBuffer = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\t\n\t\t// allocates the memory from the byte buffer\n\t\tvertexBuffer = byteBuffer.asFloatBuffer();\n\t\t\n\t\t// fill the vertexBuffer with the vertices\n\t\tvertexBuffer.put(vertices);\n\t\t\n\t\t// set the cursor position to the beginning of the buffer\n\t\tvertexBuffer.position(0);\n\t\t\n\t\tbyteBuffer = ByteBuffer.allocateDirect(texture.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\ttextureBuffer = byteBuffer.asFloatBuffer();\n\t\ttextureBuffer.put(texture);\n\t\ttextureBuffer.position(0);\n\t}", "public static BufferedImage toImage(VImage vImage) {\n BufferedImage image = new BufferedImage(vImage.getWidth(), vImage.getHeight(), BufferedImage.TYPE_3BYTE_BGR);\n System.arraycopy(vImage.getData(), 0, ((DataBufferByte) image.getRaster().getDataBuffer()).getData(), 0,\n vImage.getWidth() * vImage.getHeight() * 3);\n return image;\n }", "public static BufferedImage bytes2RGB(int width, byte[] buffer) {\r\n int height = buffer.length / width / 3;\r\n ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);\r\n ColorModel cm = new ComponentColorModel(cs, false, false,\r\n Transparency.OPAQUE, DataBuffer.TYPE_BYTE);\r\n SampleModel sm = cm.createCompatibleSampleModel(width, height);\r\n DataBufferByte db = new DataBufferByte(buffer, width * height);\r\n WritableRaster raster = Raster.createWritableRaster(sm, db, null);\r\n BufferedImage result = new BufferedImage(cm, raster, false, null);\r\n\r\n return result;\r\n }" ]
[ "0.6697731", "0.66890174", "0.6674275", "0.64998657", "0.6343609", "0.6234746", "0.6106364", "0.5183259", "0.5157768", "0.51433897", "0.51191014", "0.5093659", "0.50932837", "0.5088378", "0.50252396", "0.49921238", "0.4986345", "0.4976685", "0.49629527", "0.49540696", "0.49495602", "0.49409822", "0.4931044", "0.4929", "0.48982644", "0.48537695", "0.48427996", "0.48343658", "0.47813293", "0.47670248", "0.47609553", "0.47599962", "0.47428963", "0.47290012", "0.472475", "0.47204804", "0.471452", "0.47073367", "0.46814206", "0.4678146", "0.46778694", "0.46758723", "0.46727517", "0.4667332", "0.4662228", "0.4661551", "0.46599525", "0.46571442", "0.46448508", "0.46398085", "0.46361881", "0.46280882", "0.4612514", "0.46121302", "0.4611003", "0.46109462", "0.46081424", "0.45774895", "0.45583442", "0.45574418", "0.45563176", "0.45441988", "0.4531828", "0.45296407", "0.452632", "0.4516929", "0.45153412", "0.45035017", "0.44979683", "0.44926906", "0.44877142", "0.44846895", "0.44783008", "0.4474725", "0.44701043", "0.445026", "0.44487408", "0.4439806", "0.44393462", "0.4434181", "0.4432104", "0.4431851", "0.44124392", "0.44070435", "0.4404579", "0.44040543", "0.43937427", "0.4392548", "0.43910214", "0.43872422", "0.43868056", "0.43842664", "0.4378344", "0.43721494", "0.43715942", "0.4357298", "0.43431625", "0.43426", "0.43334422", "0.43318498" ]
0.6988363
0
Constructs a 3D image component object using the specified format, width, height, depth, byReference flag, and yUp flag. Default values are used for all other parameters.
public ImageComponent3D(int format, int width, int height, int depth, boolean byReference, boolean yUp) { ((ImageComponentRetained)this.retained).setByReference(byReference); ((ImageComponentRetained)this.retained).setYUp(yUp); ((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "ImageComponent3D() {}", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public Tile3D(Context context, int id, float w, float h) {\n\t // Setup vertex array buffer. Vertices in float. A float has 4 bytes\n\t ByteBuffer vbb = ByteBuffer.allocateDirect(12 * 4);\n\t vbb.order(ByteOrder.nativeOrder()); // Use native byte order\n\t vertexBuffer = vbb.asFloatBuffer(); // Convert from byte to float\n\t \n\t imageFileID = id;\n\t bitmap = BitmapFactory.decodeStream(context.getResources().openRawResource(imageFileID));\n\t //bitmap \n\t /*InputStream is= context.getResources().openRawResource(imageFileIDs);\n\t try {\n\t bitmap = BitmapFactory.decodeStream(is);\n\n\t } finally {\n\t //Always clear and close\n\t try {\n\t is.close();\n\t is = null;\n\t } catch (IOException e) {\n\t }\n\t }*/\n\t int imgWidth = bitmap.getWidth();\n\t int imgHeight = bitmap.getHeight();\n\t float faceWidth = w;\n\t float faceHeight = h;\n\t // Adjust for aspect ratio\n\t if (imgWidth > imgHeight) {\n\t faceHeight = faceHeight * imgHeight / imgWidth; \n\t }\n\t else {\n\t faceWidth = faceWidth * imgWidth / imgHeight;\n\t }\n\t float faceLeft = -faceWidth / 2;\n\t float faceRight = -faceLeft;\n\t float faceTop = faceHeight / 2;\n\t float faceBottom = -faceTop;\n\t \n\t \n\t \n\t // Define the vertices for this face\n\t float[] vertices = {\n\t faceLeft, faceBottom, 0.0f, // 0. left-bottom-front\n\t faceRight, faceBottom, 0.0f, // 1. right-bottom-front\n\t faceLeft, faceTop, 0.0f, // 2. left-top-front\n\t faceRight, faceTop, 0.0f, // 3. right-top-front\n\t };\n\t vertexBuffer.put(vertices); // Copy data into buffer\n\t\t vertexBuffer.position(0); // Rewind\n\t \n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t \n\t texBuffer.put(texCoords);\n\t \n\t texBuffer.position(0); // Rewind\n\t \n\t }", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "public MultiShape3D( Geometry geometry )\n {\n this( geometry, (Appearance)null );\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public ImageConfigThree(){\n\t\tsetup();\n\t\tsetMinPos(100);\n\t}", "public Surface(int var1, int var2, int var3, Component var4) {\n super();\n this.interlace = false;\n this.loggedIn = false;\n this.field_731 = var4;\n this.field_744 = var2;\n this.field_746 = var1;\n this.field_726 = this.field_723 = var1;\n this.field_727 = this.field_724 = var2;\n this.field_725 = var1 * var2;\n this.pixels = new int[var1 * var2];\n this.spritePixels = new int[var3][];\n this.field_742 = new boolean[var3];\n this.spriteColoursUsed = new byte[var3][];\n this.spriteColourList = new int[var3][];\n this.field_736 = new int[var3];\n this.field_737 = new int[var3];\n this.spriteWidthFull = new int[var3];\n this.field_741 = new int[var3];\n this.field_738 = new int[var3];\n this.field_739 = new int[var3];\n if(var1 > 1 && var2 > 1 && var4 != null) {\n this.field_728 = new DirectColorModel(32, 16711680, '\\uff00', 255);\n int var5 = this.field_723 * this.field_724;\n int var6 = 0;\n if(field_759 || var6 < var5) {\n do {\n this.pixels[var6] = 0;\n ++var6;\n } while(var6 < var5);\n }\n\n this.field_732 = var4.createImage(this);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n }\n\n }", "public BranchGroup InitPj3d(int mWinWidth, int mWinHeight)\r\n\t{\t\r\n\t\t//toolbox = new PJ3DToolbox();\r\n\t\tsetLayout( new BorderLayout( ) );\r\n\t\t//parent.width = 640;\r\n\t\t//parent.resize(640, 480);\r\n\r\n\t\t//Frame frame = new Frame(\"pj3d\");\r\n\t frame.pack();\r\n\t frame.show();\r\n\t frame.setSize(mWinWidth, mWinHeight);\r\n\r\n\t GraphicsConfiguration gc = parent.getGraphicsConfiguration();\r\n\t \r\n\t // default colors\r\n\t backgroundColor = new Color3f(0f, 0f, 0f);\r\n\t ambientColor = new Color3f(0.2f, 0.2f, 0.2f);\r\n\t diffuseColor = new Color3f(0.8f, 0.8f, 0.8f);\r\n\t emissiveColor = new Color3f(0.5f, 0.5f, 0.5f);\r\n\t specularColor = new Color3f(1.0f, 1.0f, 1.0f);\r\n\t textColor = new Color3f(0.5f, 0.5f, 0.5f);\r\n\t shininess = DEFAULTCOLOR;\r\n\t alpha = 0.0f;\r\n\t \r\n\t // default background um spaeter drauf zugreifen zu koennen\r\n\t //bg = new Background();\r\n\t bg = InitBackground();\r\n\t \r\n\t mb = new Pj3dScene(frame, gc, bg);\r\n\t branch = mb.InitBranch();\r\n\t \r\n\t // get the canvas3d to add the mouse and keylisteners\r\n\t canvas = mb.getMBCanvas3D();\r\n\t canvas.addKeyListener(this);\r\n\t canvas.addMouseListener(this);\r\n\t canvas.addMouseMotionListener(this);\r\n\t frame.add( \"Center\", canvas );\r\n\t \r\n\t frame.show( );\r\n\t frame.addWindowListener(new Pj3dWindowClosingAdapter(true));\r\n\t \r\n\t return branch;\r\n\t}", "public three_d_object(int ob_x, int ob_y, int ob_z, int new_ob_size, int new_ob_rotation_X,\n\t\t\t\t\tint new_ob_rotation_Y) {\n\t\t\t\tx = ob_x;\n\t\t\t\ty = ob_y;\n\t\t\t\tz = ob_z;\n\t\t\t\tob_size = new_ob_size;\n\t\t\t\trotation_X = new_ob_rotation_X;\n\t\t\t\trotation_Y = new_ob_rotation_Y;\n\n\t\t\t}", "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "public FrameBuffer(Texture texture, boolean hasDepth) {\r\n this.width = texture.getWidth();\r\n this.height = texture.getHeight();\r\n this.hasDepth = hasDepth;\r\n colorTexture = texture;\r\n// build();\r\n\r\n }", "public J3DAttribute () {}", "ImageTranscoder mo28916a(ImageFormat cVar, boolean z);", "public Cube() {\n\t\t// a float is 4 bytes, therefore we multiply the number if\n\t\t// vertices with 4.\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tvbb.order(ByteOrder.nativeOrder());\n\t\tvertexBuffer = vbb.asFloatBuffer();\n\t\tvertexBuffer.put(vertices);\n\t\tvertexBuffer.position(0);\n\t\t\n\t\t// Setup texture-coords-array buffer, in float. An float has 4 bytes (NEW)\n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t texBuffer.put(texCoords);\n\t texBuffer.position(0);\n\t\t\n\t\t// short is 2 bytes, therefore we multiply the number if\n\t\t// vertices with 2.\n//\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\n//\t\tibb.order(ByteOrder.nativeOrder());\n//\t\tindexBuffer = ibb.asShortBuffer();\n//\t\tindexBuffer.put(indices);\n//\t\tindexBuffer.position(0);\n\t}", "public FloatVector3D(float x, float y, float z)\n {\n fx = x;\n fy = y;\n fz = z;\n setMagnitude();\n }", "public FramebufferObject(GL2 gl, Texture2D.Format format, Texture2D.Datatype datatype, int width, int height, int colorTextureCount, boolean makeDepthTexture, boolean rectTextures) throws OpenGLException\n\t{\n\t\t/* Sanity check. */\n\t\tif (colorTextureCount == 0 && !makeDepthTexture)\n\t\t{\n\t\t\tthrow new OpenGLException(\"It is not valid to make an FBO with no color buffers and no depth buffer.\");\n\t\t}\n\t\t\n\t\tint maxColorTextures[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_MAX_COLOR_ATTACHMENTS, maxColorTextures, 0);\n\t\tif (colorTextureCount > maxColorTextures[0])\n\t\t{\n\t\t\tthrow new OpenGLException(\"Cannot create an FBO with \" + colorTextureCount + \" render targets. Your graphics card only supports \" + maxColorTextures[0] + \".\");\n\t\t}\n\t\t\n\t\tmWidth = width;\n\t\tmHeight = height;\n\t\t\n\t\t/* Create OpenGL FBO. */\n\t\tint names[] = new int[1];\n\t\tgl.glGenFramebuffers(1, names, 0);\n\t\tmHandle = names[0];\n\t\t\n\t\t/* Remember previous FBO binding, and then bind this one. */\n\t\tint previousBinding[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING, previousBinding, 0);\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, mHandle);\n\t\t\n\t\t/* Create and attach color textures. */\n\t\tmColorTextures = new Texture2D[colorTextureCount];\n\t\t\n\t\tfor (int i = 0; i < colorTextureCount; ++i)\n\t\t{\n\t\t\tmColorTextures[i] = new Texture2D(gl, format, datatype, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_COLOR_ATTACHMENT0 + i, mColorTextures[i].getTextureTarget(), mColorTextures[i].getHandle(), 0);\n\t\t}\n\t\t\n\t\t/* Create and attach depth texture, if requested. */\n\t\tif (makeDepthTexture)\n\t\t{\n\t\t\tmDepthTexture = new Texture2D(gl, Format.DEPTH, Datatype.INT32, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_DEPTH_ATTACHMENT, mDepthTexture.getTextureTarget(), mDepthTexture.getHandle(), 0);\n\t\t}\n\n\t\t/* Make sure everything is set up properly. */\n\t\tint status = gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER);\n\t\tif (status != GL2.GL_FRAMEBUFFER_COMPLETE)\n\t\t{\n\t\t\tthrow new OpenGLException(\"Framebuffer incomplete: \" + status + \".\");\n\t\t}\n\t\t\n\t\t/* Restore whatever FBO was bound before this function was called. */\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, previousBinding[0]);\n\t}", "public CubeGL2(double width, double height, double depth) {\n // Define points for a cube.\n // X, Y, Z\n mCubeVertexData = new float[]\n {\n // Front face\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n // Right face\n 1.0f, 1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, -1.0f,\n 1.0f, 1.0f, -1.0f,\n // Back face\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n // Left face\n -1.0f, 1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, 1.0f, 1.0f,\n // Top face\n -1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n // Bottom face\n 1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n };\n\n for (int i = 0; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) width;\n }\n for (int i = 1; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) height;\n }\n for (int i = 2; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) depth;\n }\n\n // R, G, B, A\n mCubeColourData = new float[]\n {\n // Front face\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n // Right face\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n // Back face\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n // Left face\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n // Top face\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n // Bottom face\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f\n };\n // X, Y, Z\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Right face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Left face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n // Bottom face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f\n };\n // X, Y\n // Texture coordinate data.\n mCubeTextureCoordinateData = new float[]\n {\n // Front face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Right face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Back face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Left face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Top face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Bottom face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f\n };\n // Initialize the buffers.\n mCubeVertices = ByteBuffer.allocateDirect(mCubeVertexData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeVertices.put(mCubeVertexData).position(0);\n mCubeColours = ByteBuffer.allocateDirect(mCubeColourData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeColours.put(mCubeColourData).position(0);\n mCubeNormals = ByteBuffer.allocateDirect(mCubeNormalData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeNormals.put(mCubeNormalData).position(0);\n mCubeTextureCoordinates = ByteBuffer.allocateDirect(mCubeTextureCoordinateData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeTextureCoordinates.put(mCubeTextureCoordinateData).position(0);\n Matrix.setIdentityM(mModelMatrix, 0);\n }", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "public static com.jme.image.Image loadImage(InputStream fis, boolean flip, boolean exp32) throws\n IOException {\n byte red = 0;\n byte green = 0;\n byte blue = 0;\n byte alpha = 0;\n //open a stream to the file\n BufferedInputStream bis = new BufferedInputStream(fis, 8192);\n DataInputStream dis = new DataInputStream(bis);\n //Read the TGA header\n idLength = (short) dis.read();\n colorMapType = (short) dis.read();\n imageType = (short) dis.read();\n cMapStart = flipEndian(dis.readShort());\n cMapLength = flipEndian(dis.readShort());\n cMapDepth = (short) dis.read();\n xOffset = flipEndian(dis.readShort());\n yOffset = flipEndian(dis.readShort());\n width = flipEndian(dis.readShort());\n height = flipEndian(dis.readShort());\n pixelDepth = (short) dis.read();\n imageDescriptor = (short) dis.read();\n //Skip image ID\n if (idLength > 0)\n bis.skip(idLength);\n // Allocate image data array\n byte[] rawData = null;\n int dl;\n if ((pixelDepth == 32)||(exp32)) {\n rawData = new byte[width * height * 4];\n dl=4;\n } else {\n rawData = new byte[width * height * 3];\n dl=3;\n }\n int rawDataIndex = 0;\n \n // Faster than doing a 24-or-32 check on each individual pixel,\n // just make a seperate loop for each.\n if (pixelDepth == 24)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n if(dl==4) {\n // create an alpha channel\n rawData[rawDataIndex++] = (byte)255;\n }\n \n }\n }\n else if (pixelDepth == 32)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n alpha = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n rawData[rawDataIndex++] = alpha;\n }\n }\n fis.close();\n //Get a pointer to the image memory\n ByteBuffer scratch = ByteBuffer.allocateDirect(rawData.length);\n scratch.clear();\n scratch.put(rawData);\n scratch.rewind();\n // Create the jme.image.Image object\n com.jme.image.Image textureImage = new com.jme.image.Image();\n if (dl == 4)\n textureImage.setType(com.jme.image.Image.RGBA8888);\n else\n textureImage.setType(com.jme.image.Image.RGB888);\n textureImage.setWidth(width);\n textureImage.setHeight(height);\n textureImage.setData(scratch);\n return textureImage;\n }", "public ViewerPosition3D()\n {\n }", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "public Vector3D(float x, float y, float z)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.z = z;\r\n\t}", "public BoundingBox3d(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) {\n this.xmin = xmin;\n this.xmax = xmax;\n this.ymin = ymin;\n this.ymax = ymax;\n this.zmin = zmin;\n this.zmax = zmax;\n }", "public Vertex3D() {\n this(0.0, 0.0, 0.0);\n }", "public Vec3D() {\n\t\tx = y = z = 0.0f;\n\t}", "@Override\n\tpublic boolean is3D() {\n\t\treturn true;\n\t}", "public FloatVector3D(){}", "private void createCube(float x, float y, float z){\r\n\t\tboolean[] sides = checkCubeSides((int)x,(int)y,(int)z);\r\n\t\tfloat[] color = BlockType.color(blocks[(int)x][(int)y][(int)z]);\r\n\t\t\r\n//\t\t gl.glNormal3f(0.0f, 1.0f, 0.0f);\r\n\t\tif(sides[0]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n//\t // Bottom-face\r\n//\t gl.glNormal3f(0.0f, -1.0f, 0.0f);\r\n\t\t\r\n\t\tif(sides[1]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Back-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, -1.0f);\r\n\t\tif(sides[2]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Front-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, 1.0f);\r\n\t\tif(sides[3]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t \r\n//\t // Left-face\r\n//\t gl.glNormal3f(-1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[4]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t // Right-face\r\n//\t gl.glNormal3f(1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[5]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static FixedFrameVector3DBasics newXZOnlyFixedFrameVector3DBasics(ReferenceFrame referenceFrame)\n {\n return new FixedFrameVector3DBasics()\n {\n private double x, z;\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return referenceFrame;\n }\n\n @Override\n public double getX()\n {\n return x;\n }\n\n @Override\n public double getY()\n {\n return 0.0;\n }\n\n @Override\n public double getZ()\n {\n return z;\n }\n\n @Override\n public void setX(double x)\n {\n this.x = x;\n }\n\n @Override\n public void setY(double y)\n {\n }\n\n @Override\n public void setZ(double z)\n {\n this.z = z;\n }\n\n @Override\n public String toString()\n {\n return EuclidCoreIOTools.getTuple3DString(this);\n }\n };\n }", "public SoCubeWithoutTop()\n//\n////////////////////////////////////////////////////////////////////////\n{\n nodeHeader.SO_NODE_CONSTRUCTOR();\n\n nodeHeader.SO_NODE_ADD_SFIELD(width,\"width\", (2.0f));\n nodeHeader.SO_NODE_ADD_SFIELD(height,\"height\", (2.0f));\n nodeHeader.SO_NODE_ADD_SFIELD(depth,\"depth\", (2.0f));\n\n isBuiltIn = true;\n\n if (nodeHeader.SO_NODE_IS_FIRST_INSTANCE()) {\n // Initialize corner coordinate values\n coords[0].setValue(-1.0f, 1.0f, -1.0f); // Left Top Back\n coords[1].setValue( 1.0f, 1.0f, -1.0f); // Right Top Back\n coords[2].setValue(-1.0f, -1.0f, -1.0f); // Left Bottom Back\n coords[3].setValue( 1.0f, -1.0f, -1.0f); // Right Bottom Back\n coords[4].setValue(-1.0f, 1.0f, 1.0f); // Left Top Front\n coords[5].setValue( 1.0f, 1.0f, 1.0f); // Right Top Front\n coords[6].setValue(-1.0f, -1.0f, 1.0f); // Left Bottom Front\n coords[7].setValue( 1.0f, -1.0f, 1.0f); // Right Bottom Front\n\n // Initialize face vertices to point into coords. The order of\n // vertices around the faces is chosen so that the texture\n // coordinates match up: texture coord (0,0) is at the first\n // vertex and (1,1) is at the third. The vertices obey the\n // right-hand rule for each face.\n verts[1][2] = verts[2][3] = verts[4][3] = coords[0];\n verts[1][3] = verts[3][2] = verts[4][2] = coords[1];\n verts[1][1] = verts[2][0] = verts[5][0] = coords[2];\n verts[1][0] = verts[3][1] = verts[5][1] = coords[3];\n verts[0][3] = verts[2][2] = verts[4][0] = coords[4];\n verts[0][2] = verts[3][3] = verts[4][1] = coords[5];\n verts[0][0] = verts[2][1] = verts[5][3] = coords[6];\n verts[0][1] = verts[3][0] = verts[5][2] = coords[7];\n\n // Initialize texture coordinates. These are for the 4 corners of\n // each face, starting at the lower left corner\n texCoords[0].setValue(0.0f, 0.0f);\n texCoords[1].setValue(1.0f, 0.0f);\n texCoords[2].setValue(1.0f, 1.0f);\n texCoords[3].setValue(0.0f, 1.0f);\n\n // Initialize face normals\n normals[0].setValue( 0.0f, 0.0f, 1.0f); // Front\n normals[1].setValue( 0.0f, 0.0f, -1.0f); // Back\n normals[2].setValue(-1.0f, 0.0f, 0.0f); // Left\n normals[3].setValue( 1.0f, 0.0f, 0.0f); // Right\n normals[4].setValue( 0.0f, 1.0f, 0.0f); // Top\n normals[5].setValue( 0.0f, -1.0f, 0.0f); // Bottom\n\n }\n}", "public Image getThree();", "public boolean is3D() {\n return _is3D;\n }", "public r3inputlayer(double[] inputarray, int depth){\r\n double[][][] newarray = new double[inputarray.length][1][depth + 2];\r\n for(int i = 0; i < inputarray.length; i++){\r\n newarray[i][0][0] = inputarray[i];\r\n }\r\n this.state = newarray;\r\n this.width = inputarray.length;\r\n }", "public Point3D(double x,double y,double z)\n {\n _x=x;\n _y=y;\n _z=z;\n }", "public static DeformableMesh3D createTestBlock(double w, double h, double depth){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n\n pts.add(new double[]{-w/2, -h/2, depth/2});\n pts.add(new double[]{-w/2, h/2, depth/2});\n pts.add(new double[]{w/2, h/2, depth/2});\n pts.add(new double[]{w/2, -h/2, depth/2});\n\n pts.add(new double[]{-w/2, -h/2, -depth/2});\n pts.add(new double[]{-w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, -h/2, -depth/2});\n\n //back face\n connections.add(new int[]{0, 4});\n connections.add(new int[]{0, 1});\n connections.add(new int[]{1, 5});\n connections.add(new int[]{5, 4});\n\n //front face\n connections.add(new int[]{3, 7});\n connections.add(new int[]{2, 3});\n connections.add(new int[]{2, 6});\n connections.add(new int[]{6, 7});\n\n //front-back connections.\n connections.add(new int[]{3, 0});\n connections.add(new int[]{1, 2});\n connections.add(new int[]{5, 6});\n connections.add(new int[]{7, 4});\n\n //top\n triangles.add(new int[]{0, 2, 1});\n triangles.add(new int[]{0,3,2});\n //top-diagonal\n connections.add(new int[]{0, 2});\n\n //back\n triangles.add(new int[]{0, 1, 5});\n triangles.add(new int[]{0,5,4});\n connections.add(new int[]{0, 5});\n\n //right\n triangles.add(new int[]{1,2,5});\n triangles.add(new int[]{5,2,6});\n connections.add(new int[]{5, 2});\n\n //front\n triangles.add(new int[]{2,3,6});\n triangles.add(new int[]{6,3,7});\n connections.add(new int[]{3, 6});\n\n //left\n triangles.add(new int[]{3,0,4});\n triangles.add(new int[]{3,4,7});\n connections.add(new int[]{3, 4});\n\n //bottom\n triangles.add(new int[]{4,5,6});\n triangles.add(new int[]{4,6,7});\n connections.add(new int[]{4, 6});\n return new DeformableMesh3D(pts, connections, triangles);\n\n }", "public final PS3 init(VIDEO_MODE mode, COLOR_MODE color_mode, int frameRate){\n if( guid_ == null){\n return null;\n }\n if( camera_ != null){\n destroy();\n }\n \n mode_ = mode;\n color_mode_ = color_mode;\n frameRate_ = frameRate;\n\n camera_= LIBRARY.CLEyeCreateCamera(\n guid_, \n color_mode_.getIndex(), \n mode_.getIndex(), \n frameRate_\n );\n PS3_Library.Dimension width = new PS3_Library.Dimension(); \n PS3_Library.Dimension height = new PS3_Library.Dimension(); ;\n LIBRARY.CLEyeCameraGetFrameDimensions (camera_, width, height);\n width_ = width.getValue();\n height_ = height.getValue();\n pixels_ = new int[width_*height_];\n pixel_buffer_ = ByteBuffer.allocateDirect(width_*height_*color_mode_.getSize());\n setLed(true);\n// System.out.println(\"guid_.Data1 = \"+guid_.Data1);\n// System.out.println(\"VIDEOMODE = \"+mode);\n// System.out.println(\"COLORMODE = \"+color_mode);\n// System.out.println(\"frameRate = \"+frameRate);\n// System.out.println(\"width_ = \"+width_);\n// System.out.println(\"height_ = \"+height_);\n PS3_LIST_.add(this);\n return this;\n }", "public static final PS3 create(int index){\n if( !libraryLoaded() ){\n System.out.println(\"PS3-ERROR: cannot create camera, dll not loaded\");\n return null;\n }\n \n PS3_Library.GUID guid = LIBRARY.CLEyeGetCameraUUID( index );\n if( guid.Data1 == 0){\n System.out.println(\"PS3-ERROR: index(\"+index+\") is not valid\");\n return null;\n }\n return new PS3(index, guid);\n }", "private Vector3D(int x, int y, int z) {\n this(x, y, z, null);\n }", "public MultiShape3D( Geometry geometry, Appearance appearance )\n {\n super();\n \n this.setGeometry( geometry );\n this.setAppearance( appearance );\n }", "private void run3DC() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, 0, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, 0, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, 0, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) /\r\n (numIterations - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude3D(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude3D(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude3D(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage3D(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage3D(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage3D(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1, 0, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2, 0, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3, 0, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n destImage.calcMinMax();\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public Point3F(float x, float y, float z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "@Override\n void createRetained() {\n this.retained = new ImageComponent3DRetained();\n this.retained.setSource(this);\n }", "private Vect3() {\n\t\tthis(0.0,0.0,0.0);\n\t}", "public ImageProperties setFormat(ImageFormatProperties format) {\n this.format = format;\n return this;\n }", "public Vertex3D(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public static JTensor newWithStorage3d(\n JStorage storage, long storageOffset,\n long size0, long stride0,\n long size1, long stride1,\n long size2, long stride2) {\n return new JTensor(\n TH.THTensor_(newWithStorage3d)(storage, storageOffset,\n size0, stride0, size1, stride1, size2, stride2)\n );\n }", "void setFormat(ImageFormat format);", "public RenderedImage create(ParameterBlock args,\n RenderingHints renderHints) {\n \n // Get the source image and the data type parameter.\n RenderedImage src = args.getRenderedSource(0);\n Integer datatype = (Integer)args.getObjectParameter(0);\n int type = datatype.intValue();\n\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);\n\n // If there is no change return the source image directly.\n if(layout == null && type == src.getSampleModel().getDataType()) {\n return src;\n }\n\n // Create or clone the ImageLayout.\n if(layout == null) {\n layout = new ImageLayout(src);\n } else {\n layout = (ImageLayout)layout.clone();\n }\n\n\tboolean isDataTypeChange = false;\n\n // Get prospective destination SampleModel.\n SampleModel sampleModel = layout.getSampleModel(src);\n\n // Create a new SampleModel if the type is not as desired.\n if (sampleModel.getDataType() != type) {\n int tileWidth = layout.getTileWidth(src);\n int tileHeight = layout.getTileHeight(src);\n int numBands = src.getSampleModel().getNumBands();\n\n SampleModel csm =\n RasterFactory.createComponentSampleModel(sampleModel,\n type,\n tileWidth,\n tileHeight,\n numBands);\n\n layout.setSampleModel(csm);\n\t isDataTypeChange = true;\n }\n\n\n // Check ColorModel.\n ColorModel colorModel = layout.getColorModel(null);\n if(colorModel != null &&\n !JDKWorkarounds.areCompatibleDataModels(layout.getSampleModel(src),\n colorModel)) {\n // Clear the mask bit if incompatible.\n layout.unsetValid(ImageLayout.COLOR_MODEL_MASK);\n }\n\n // Check whether anything but the ColorModel is changing.\n if (layout.getSampleModel(src) == src.getSampleModel() &&\n layout.getMinX(src) == src.getMinX() &&\n layout.getMinY(src) == src.getMinY() &&\n layout.getWidth(src) == src.getWidth() &&\n layout.getHeight(src) == src.getHeight() &&\n layout.getTileWidth(src) == src.getTileWidth() &&\n layout.getTileHeight(src) == src.getTileHeight() &&\n layout.getTileGridXOffset(src) == src.getTileGridXOffset() &&\n layout.getTileGridYOffset(src) == src.getTileGridYOffset()) {\n\n if(layout.getColorModel(src) == src.getColorModel()) {\n // Nothing changed: return the source directly.\n return src;\n } else {\n // Remove TileCache hint from RenderingHints if present.\n RenderingHints hints = renderHints;\n if(hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) {\n hints = new RenderingHints((Map)renderHints);\n hints.remove(JAI.KEY_TILE_CACHE);\n }\n\n // Only the ColorModel is changing.\n return new NullOpImage(src, layout, hints,\n OpImage.OP_IO_BOUND);\n }\n }\n\n\tif (isDataTypeChange == true) {\n\n\t // Add JAI.KEY_REPLACE_INDEX_COLOR_MODEL hint to renderHints\n\t if (renderHints == null) {\n\t\trenderHints = \n\t\t new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,\n\t\t\t\t Boolean.TRUE);\n\t\t\n\t } else if (!renderHints.containsKey(\n\t\t\t\t\tJAI.KEY_REPLACE_INDEX_COLOR_MODEL)) {\n\t\t// If the user specified a value for this hint, we don't\n\t\t// want to change that\n\t\trenderHints.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, \n\t\t\t\tBoolean.TRUE);\n\t }\n\t}\n\n return new CopyOpImage(src, renderHints, layout);\n }", "public Card(String type, int number, BufferedImage backImage, \n BufferedImage turnedImage, BufferedImage overImage, int w, int h){\n\tthis.type = type;\n\tthis.number = number;\n\tthis.backImage = backImage;\n this.image = backImage;\n\tthis.turnedImage = turnedImage;\n this.overImage = overImage;\n\tthis.w = w;\n\tthis.h = h;\n \n // Create the VolatileImages\n try{\n backVimImage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n vimage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n turnedVimImage = VolatileImageLoader.loadFromBufferedImage(\n turnedImage, Transparency.TRANSLUCENT);\n overVimImage = VolatileImageLoader.loadFromBufferedImage(\n overImage, Transparency.TRANSLUCENT);\n }\n catch(IOException ioe){\n System.err.println(\"Could not convert from BufferedImage \" +\n \"to VolatileImage\");\n }\n }", "Point3D (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Bitmap3DColor(\n float v1Red, float v1Green, float v1Blue, float v1Alpha,\n float v2Red, float v2Green, float v2Blue, float v2Alpha,\n float v3Red, float v3Green, float v3Blue, float v3Alpha,\n float v4Red, float v4Green, float v4Blue, float v4Alpha\n ) {\n if(\n v1Red < 0 || v1Red > 1 || v2Red < 0 || v2Red > 1 || v3Red < 0 || v3Red > 1 || v4Red < 0 || v4Red > 1 ||\n v1Green < 0 || v1Green > 1 || v2Green < 0 || v2Green > 1 || v3Green < 0 || v3Green > 1 || v4Green < 0 || v4Green > 1 ||\n v1Blue < 0 || v1Blue > 1 || v2Blue < 0 || v2Blue > 1 || v3Blue < 0 || v3Blue > 1 || v4Blue < 0 || v4Blue > 1 ||\n v1Alpha < 0 || v1Alpha > 1 || v2Alpha < 0 || v2Alpha> 1 || v3Alpha < 0 || v3Alpha > 1 || v4Alpha < 0 || v4Alpha > 1\n ) {\n throw new IllegalArgumentException(\"Values should be between 0 and 1\");\n }\n\n float[] colors = {\n v1Red, v1Green, v1Blue, v1Alpha,\n v2Red, v2Green, v2Blue, v2Alpha,\n v3Red, v3Green, v3Blue, v3Alpha,\n v4Red, v4Green, v4Blue, v4Alpha\n };\n\n ByteBuffer clb = ByteBuffer.allocateDirect(colors.length * 4);\n clb.order(ByteOrder.nativeOrder());\n this.colorBuffer = clb.asFloatBuffer();\n this.colorBuffer.put(colors);\n this.colorBuffer.position(0);\n }", "private void run3D() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBuffer[];\r\n float resultBuffer[];\r\n float gaussianBuffer[];\r\n float gradientBuffer[];\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n sourceBuffer = new float[length];\r\n resultBuffer = new float[length];\r\n gaussianBuffer = new float[length];\r\n gradientBuffer = new float[length];\r\n } catch (OutOfMemoryError e){\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n srcImage.exportData(0, length, sourceBuffer);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n algoSepConvolver = new AlgorithmSeparableConvolver(gaussianBuffer, sourceBuffer,\r\n extents, xDataRound, yDataRound, zDataRound, srcImage.isColorImage());\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) / (numIterations - 1) * 100)), activeImage);\r\n }\r\n\r\n algoSepConvolver.run();\r\n gradientMagnitude3D(gaussianBuffer, gradientBuffer);\r\n upDateImage3D(resultBuffer, sourceBuffer, gradientBuffer);\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n for (int i = 0; i < length; i++) { sourceBuffer[i] = resultBuffer[i]; }\r\n }\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n algoSepConvolver.finalize();\r\n algoSepConvolver = null;\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n destImage.importData(0, resultBuffer, true);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public Pixel(int xPos, int yPos, int zPos){\n\t\t\n\t\tthis.x = new Integer(xPos);\n\t\tthis.y = new Integer(yPos);\n\t\tthis.z = new Integer(zPos);\n\t\tthis.intensity = null;\n\t\tthis.type = \"3Dposition\";\n\t}", "public FMOD_OUTPUT_OBJECT3DINFO set(FMOD_OUTPUT_OBJECT3DINFO src) {\n memCopy(src.address(), address(), SIZEOF);\n return this;\n }", "public BranchGroup cubo3(){\n\t\t\tBranchGroup objRoot = new BranchGroup();\n\n\n\t TransformGroup objScale = new TransformGroup();\n\t Transform3D t3d = new Transform3D();\n\n\t Transform3D rotate = new Transform3D();\n Transform3D tempRotate = new Transform3D();\n\t \t rotate.rotX(Math.PI/1.0d);\n tempRotate.rotY(Math.PI/1.80d);\n Matrix3d n = new Matrix3d();\n Vector3d op = new Vector3d(.01,1,1);\n tempRotate.setScale(op);\n Vector3d op2 = new Vector3d(-.01,-.5,2);\n tempRotate.setTranslation(op2);\n rotate.mul(tempRotate);\n // rotate.mul(objScale);\n TransformGroup objRotate = new TransformGroup(rotate);\n \n //objRotate.addChild(new ColorCube(0.4));\n objRoot.addChild(objRotate);\n\t \n t3d.mul(rotate);\n\t objScale.setTransform(t3d);\n\t \n\t objRoot.addChild(objScale);\n\n\tTransformGroup objTrans = new TransformGroup();\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);\n\t\t\t\t\t\n\t\t\n\t\tobjScale.addChild(objTrans);\n\n\t\tint flags = ObjectFile.RESIZE;\n\t\tif (!noTriangulate) flags |= ObjectFile.TRIANGULATE;\n\t\tif (!noStripify) flags |= ObjectFile.STRIPIFY;\n\t\tObjectFile f = new ObjectFile(flags, \n\t\t (float)(creaseAngle * Math.PI / 180.0));\n\t\tScene s = null;\n\t\ttry {\n\t\t s = f.load(filename);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (ParsingErrorException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (IncorrectFormatException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\t \n\t\tobjTrans.addChild(s.getSceneGroup());\n\t\t\n \n\n\t\tBoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);\n\n\n\t \n\t // Set up the background\n\t Color3f bgColor = new Color3f(0.05f, 0.05f, 0.5f);\n\t Background bgNode = new Background(bgColor);\n\t bgNode.setApplicationBounds(bounds);\n\t objRoot.addChild(bgNode);\n\n\t\treturn objRoot;\n\t\t \n\t }", "public FMOD_OUTPUT_OBJECT3DINFO set(\n FloatBuffer buffer,\n FMOD_VECTOR position$,\n float gain,\n float spread,\n float priority\n ) {\n buffer(buffer);\n position$(position$);\n gain(gain);\n spread(spread);\n priority(priority);\n\n return this;\n }", "public Vector3D(double x, double y, double z) {\n this.xCoord = x;\n this.yCoord = y;\n this.zCoord = z;\n }", "Layer createLayer();", "@Override\n\tprotected void createFrameOrbit( String frameColor )\n\t{\n\t\t\n AlgebraicField hf = this .mField;\n\n AlgebraicNumber one = hf .one();\n AlgebraicNumber s = hf .getAffineScalar().reciprocal(); // reciprocal of sigma\n AlgebraicNumber R = hf .createPower( 1 ) .times( s ); // rho / sigma\n\n // (-s,1) Y\n // +---+------ [2] ---------+-----------+--------+---+\n // / / / (s,R) / /\n // +---+--------+-----------+--------- [1] ------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / /\n // (-1,s) [3] -+--------+-----------+-----------+--------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / / /\n // / / / / / \n // +---+--------+--------- O ---------+--------+- [0] (1,0) X\n // / / / / / \n // / / / /<--- s --->/ / /\n // / / / /<-------- R ------->/ /\n // / / /<---------- 1 --------->/\n // +- [4| ------+-----------+-----------+--------+---+\n // / (-R,-s) / / / / /\n // / / / / / / /\n // / / / / / (R,-R) /\n // +---+--------+-----------+-----------+------ [6] -+\n // / / / / /\n // +---+--------+--------- [5] ---------+--------+---+\n // (0,-1)\n \n AlgebraicVector zAxis = hf .basisVector( 3, AlgebraicVector.Z );\n AlgebraicVector zAxisNeg = zAxis .negate();\n AlgebraicVector axis0 = hf .basisVector( 3, AlgebraicVector.X );\n AlgebraicVector axis1 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R );\n AlgebraicVector axis2 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one );\n AlgebraicVector axis3 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, one .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s );\n AlgebraicVector axis4 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s .negate() );\n AlgebraicVector axis5 = hf .origin( 3 )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one .negate() );\n AlgebraicVector axis6 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R .negate() );\n\n // all mMatrices are mappings of [X,Y,Z] = [ axis0, -axis5, zAxis ]\n mMatrices[ 0 ] = hf .identityMatrix( 3 );\n mMatrices[ 1 ] = new AlgebraicMatrix( axis1, axis6 .negate(), zAxis );\n mMatrices[ 2 ] = new AlgebraicMatrix( axis2, axis0 .negate(), zAxis );\n mMatrices[ 3 ] = new AlgebraicMatrix( axis3, axis1 .negate(), zAxis );\n mMatrices[ 4 ] = new AlgebraicMatrix( axis4, axis2 .negate(), zAxis );\n mMatrices[ 5 ] = new AlgebraicMatrix( axis5, axis3 .negate(), zAxis );\n mMatrices[ 6 ] = new AlgebraicMatrix( axis6, axis4 .negate(), zAxis );\n \n mMatrices[ 7 ] = new AlgebraicMatrix( axis0, axis2 .negate(), zAxisNeg );\n mMatrices[ 8 ] = mMatrices[ 1 ] .times( mMatrices[ 7 ] );\n mMatrices[ 9 ] = mMatrices[ 2 ] .times( mMatrices[ 7 ] );\n mMatrices[ 10 ] = mMatrices[ 3 ] .times( mMatrices[ 7 ] );\n mMatrices[ 11 ] = mMatrices[ 4 ] .times( mMatrices[ 7 ] );\n mMatrices[ 12 ] = mMatrices[ 5 ] .times( mMatrices[ 7 ] );\n mMatrices[ 13 ] = mMatrices[ 6 ] .times( mMatrices[ 7 ] );\n\t}", "public static Coordinate create3D(double x, double y, double z) {\r\n return new Coordinate(x, y, z, Double.NaN);\r\n }", "public CanvasComponent(FloatProperty video_source_ratio_property,WritableImage writable_image,WritablePixelFormat<ByteBuffer> pixel_format,int width,int height) {\r\n super(new CanvasBuffer(video_source_ratio_property, width, height));\r\n this.writable_image = writable_image;\r\n this.pixel_format = pixel_format;\r\n\r\n }", "public BoundingBox3d() {\n reset();\n }", "public Texture build() {\n FrameBuffer buffer = new FrameBuffer(Format.RGB565, maxWidth, maxHeight, false);\n buffer.begin();\n for (TextureRegion texture : textures) {\n \t// TODO Créer la texture dynamiquement\n }\n buffer.end();\n Texture result = buffer.getColorBufferTexture();\n buffer.dispose();\n return result;\n }", "public Vec3(){\n\t\tthis(0,0,0);\n\t}", "public FloatVector3D(float[] f)\n {\n fx = f[0];\n fy = f[1];\n fz = f[2];\n setMagnitude();\n }", "public static Vect3 make(double x, double y, double z) {\n\t\treturn new Vect3(Units.from(\"NM\",x),Units.from(\"NM\",y),Units.from(\"ft\",z));\n\t}", "@Override\n\tpublic void create() {\n\t\tGdx.gl20.glClearColor(1, 1, 1, 1);\n\n\t\t// instancia batch, asset manager e ambiente 3D\n\t\tmodelBatch = new ModelBatch();\n\t\tassets = new AssetManager();\n\t\tambiente = new Environment();\n\t\tambiente.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tambiente.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// configura a câmera\n\t\tfloat razaoAspecto = ((float) Gdx.graphics.getWidth()) / Gdx.graphics.getHeight();\n\t\tcamera = new PerspectiveCamera(67, 480f * razaoAspecto, 480f);\n\t\tcamera.position.set(1f, 1.75f, 3f);\n\t\tcamera.lookAt(0, 0.35f, 0);\n\t\tcamera.near = 1f;\n\t\tcamera.far = 300f;\n\t\tcamera.update();\n\t\tcameraController = new CameraInputController(camera);\n\t\tGdx.input.setInputProcessor(cameraController);\n\n\t\t// solicita carregamento dos 2 modelos 3D da cena\n\t\tassets.load(\"caldeirao.obj\", Model.class);\n\t\tassets.load(\"caldeirao-jogos.obj\", Model.class);\n\t\tassets.load(\"caldeirao-love.obj\", Model.class);\n\t\tassets.load(\"fogueira.obj\", Model.class);\n\n\t\t// instancia e configura 2 tipos de renderizadores de partículas:\n\t\t// 1. Billboards (para fogo)\n\t\t// 2. PointSprites (para bolhas)\n\t\tBillboardParticleBatch billboardBatch = new BillboardParticleBatch(ParticleShader.AlignMode.Screen, true, 500);\n\t\tPointSpriteParticleBatch pointSpriteBatch = new PointSpriteParticleBatch();\n\t\tsistemaParticulas = new ParticleSystem();\n\t\tbillboardBatch.setCamera(camera);\n\t\tpointSpriteBatch.setCamera(camera);\n\t\tsistemaParticulas.add(billboardBatch);\n\t\tsistemaParticulas.add(pointSpriteBatch);\n\n\t\t// solicita o carregamento dos efeitos de partículas\n\t\tParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(\n\t\t\t\tsistemaParticulas.getBatches());\n\t\tassets.load(\"fogo.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-love.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-love.pfx\", ParticleEffect.class, loadParam);\n\n\t\t// solicita carregamento da música\n\t\tmusica = Gdx.audio.newMusic(Gdx.files.internal(\"zelda-potion-shop.mp3\"));\n\n\t\taindaEstaCarregando = true;\n\t}", "ImageProcessor(int width, int height) {\n this.width = width;\n this.height = height;\n centroids = new LinkedList<>();\n centroids.add(0);\n foregroundMovement = new LinkedList<>();\n foregroundMovement.add(0);\n foregroundMovement.add(0);\n tempForegroundMovement = new LinkedList<>();\n tempForegroundMovement.add(0);\n tempForegroundMovement.add(0);\n boxMovement = new LinkedList<>();\n boxMovement.add(0);\n boxMovement.add(0);\n\n // Used to communicate with game engine\n change = new PropertyChangeSupport(this);\n }", "public Vector3D(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public interface Model {\n /**\n * Generate a image of checker board pattern (8 X 8) of the given size.\n *\n * @param size the size of the image\n * @return the 3D array of the generated checkerboard.\n */\n int[][][] generateChecker(int size);\n\n /**\n * Generate a image if rainbow stripes (7 colors) with the given size.\n *\n * @param height the height of the image\n * @param width the width of the image\n * @param vOrH the stripes should be vertical of horizontal.\n * @return the 3D array of the generated rainbow stripes.\n */\n int[][][] generateRainbow(int height, int width, VOrH vOrH);\n\n /**\n * Generate the appropriate-sized flags of a country with the given ratio.\n *\n * @param ratio the given ratio of the flag.\n * @param country the country whose flag will be generated.\n * @return the 3D array of the generated flag.\n */\n int[][][] generateFlags(int ratio, String country);\n\n /**\n * Blur the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array of the blurred image\n */\n int[][][] blurImage(int[][][] imageArray, int height, int width);\n\n /**\n * Sharpen the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array the sharpened image\n */\n int[][][] sharpenImage(int[][][] imageArray, int height, int width);\n\n /**\n * Grey scale the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return 3D array of the greyscale image\n */\n int[][][] greyscaleImage(int[][][] imageArray, int height, int width);\n\n /**\n * Sepia- tone the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array of the sepia-tone image\n */\n int[][][] sepiaToneImage(int[][][] imageArray, int height, int width);\n\n /**\n * Dither the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return 3D array of the dithered image\n */\n int[][][] ditheringImage(int[][][] imageArray, int height, int width);\n\n /**\n * Mosaic the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image.\n * @param width the width of the image.\n * @param seedNum the number of seeds.\n * @return the 3D array of mosaic image.\n */\n int[][][] mosaicingImage(int[][][] imageArray, int height, int width, int seedNum);\n\n /**\n * Undo. Return a previous result before the operation.\n *\n * @return a previous result.\n * @throws EmptyStackException when there is no previous one.\n */\n int[][][] undo() throws EmptyStackException;\n\n /**\n * Redo. Return a previous result before an undo.\n *\n * @return a previous result before an undo.\n * @throws EmptyStackException when there is no previous one.\n */\n int[][][] redo() throws EmptyStackException;\n\n /**\n * Set the stacks for undo and redo. Add a new element to the undo stack, and clear the redo\n * stack.\n * @param add the image in 3D array to be added to the stack.\n */\n void setStack(int[][][] add);\n}", "public Pj3dPlane Pj3dPlane(int x, int z)\r\n\t{\r\n \tPj3dPlane plane = new Pj3dPlane(this, x, z);\r\n\t\treturn plane;\r\n\t}", "public AbstractCube7Idx3D() {\n super(7, 8, 5 * 12, 5 * 5 * 6, 1);\n init();\n }", "public Vect3(double xx, double yy, double zz) {\n\t\tx = xx;\n\t\ty = yy;\n\t\tz = zz;\n\t}", "public interface RenderMesh extends NvDisposeable{\n\n void initlize(MeshParams params);\n\n void draw();\n\n public static class MeshParams{\n public int posAttribLoc;\n public int norAttribLoc;\n public int texAttribLoc;\n public int tanAttribLoc = -1; // tangent attribution is diabled default.\n }\n}", "public AffineTransform3D() {\r\n\t\tthis.M11 = 1;\r\n\t\tthis.M12 = 0;\r\n\t\tthis.M13 = 0;\r\n\t\tthis.M14 = 0;\r\n\t\tthis.M21 = 0;\r\n\t\tthis.M22 = 1;\r\n\t\tthis.M23 = 0;\r\n\t\tthis.M24 = 0;\r\n\t\tthis.M31 = 0;\r\n\t\tthis.M32 = 0;\r\n\t\tthis.M33 = 1;\r\n\t\tthis.M34 = 0;\r\n\t\tthis.M41 = 0;\r\n\t\tthis.M42 = 0;\r\n\t\tthis.M43 = 0;\r\n\t\tthis.M44 = 1;\r\n\t}", "public CUDA_RESOURCE_VIEW_DESC set(\n int format,\n long width,\n long height,\n long depth,\n int firstMipmapLevel,\n int lastMipmapLevel,\n int firstLayer,\n int lastLayer,\n IntBuffer reserved\n ) {\n format(format);\n width(width);\n height(height);\n depth(depth);\n firstMipmapLevel(firstMipmapLevel);\n lastMipmapLevel(lastMipmapLevel);\n firstLayer(firstLayer);\n lastLayer(lastLayer);\n reserved(reserved);\n\n return this;\n }", "public Pixel(int x, int y, int z) {\r\n this.x = (short) x;\r\n this.y = (short) y;\r\n this.z = (short) z;\r\n }", "public Vec3(float[] init){\n\t\tif(init.length >= 3){\n\t\t\tx = init[0];\n\t\t\ty = init[1];\n\t\t\tz = init[2];\n\t\t\ttrunc();\n\t\t}\n\t}", "public SmoothData3D(int nX, int nY){\n\tsuper(nX,nY);\n }", "private void initialize(int api, int width, int height)\n \tthrows VisADException\n {\n mode = new GraphicsModeControlJ2D(this);\n addControl(mode);\n // a ProjectionControl always exists\n projection = new ProjectionControlJ2D(this);\n addControl(projection);\n \n if (api == JPANEL) {\n Component component = new DisplayPanelJ2D(this);\n setComponent(component);\n apiValue = JPANEL;\n }\n else if (api == OFFSCREEN) {\n Component component = null;\n DisplayRendererJ2D renderer = (DisplayRendererJ2D )getDisplayRenderer();\n VisADCanvasJ2D canvas = new VisADCanvasJ2D(renderer, width, height);\n VisADGroup scene = renderer.createSceneGraph(canvas);\n apiValue = OFFSCREEN;\n }\n else {\n throw new DisplayException(\"DisplayImplJ2D: bad graphics API\");\n }\n \n // a GraphicsModeControl always exists\n mode = new GraphicsModeControlJ2D(this);\n addControl(mode);\n // a ProjectionControl always exists\n projection = new ProjectionControlJ2D(this);\n addControl(projection);\n\n }", "public Vector3 (float x, float y, float z) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.z = z;\r\n\t}", "public Point3D(Point3D point) {\n\t this.x = point.x;\n\t this.y = point.y;\n\t this.z = point.z;\n }", "public Project3() {\n\t\tcreateComponent();\n\t\twireComponent();\n\t}", "public Plane3(Plane3 p) {\n this.a = p.a; this.b = p.b; this.c = p.c; this.v = p.v; this.d = p.d;\n }", "public CMLVector3() {\r\n }", "public static interface Updater {\n\t/**\n\t * Updates image data that is accessed by reference.\n\t * This method is called by the updateData method of an\n\t * ImageComponent object to effect\n\t * safe updates to image data that\n\t * is referenced by that object. Applications that wish to modify\n\t * such data must implement this method and perform all updates\n\t * within it.\n\t * <br>\n\t * NOTE: Applications should <i>not</i> call this method directly.\n\t *\n\t * @param imageComponent the ImageComponent object being updated.\n\t * @param index index of the image to be modified.\n\t * @param x starting X offset of the subregion.\n\t * @param y starting Y offset of the subregion.\n\t * @param width width of the subregion.\n\t * @param height height of the subregion.\n\t *\n\t * @see ImageComponent3D#updateData\n\t */\n\tpublic void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);\n }", "public static Vect3 mk(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "public static Vect3 makeXYZ(double x, String ux, double y, String uy, double z, String uz) {\n\t\treturn new Vect3(Units.from(ux,x),Units.from(uy,y),Units.from(uz,z));\n\t}", "@LargeTest\n public void testColorCube3DIntrinsic() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE_3D_INTRINSIC);\n runTest(ta, TestName.COLOR_CUBE_3D_INTRINSIC.name());\n }", "public Vector3D(double x, double y, double z) {\r\n super(x, y, z);\r\n\t}", "public DynamicModelPart(DynamicModel dynamicModel, float[] x, float[] y, float[] z, int[] sizeX,\n int[] sizeY, int[] sizeZ, float[] extra, int[] u, int[] v, float[] rotation,\n ObjectList<DynamicModelPart.DynamicPart[]> seeds, SpriteIdentifier spriteId,\n Function<Identifier, RenderLayer> layerFactory, boolean UV_SHIFT_APPLY_SYNC,\n boolean UV_SHIFTABLE, int UV_SHIFT_AMOUNT, boolean UV_SHIFT_EVERY_X_TICK,\n boolean UV_SHIFT_EVERY_TICK, int UV_SHIFT_EVERY_X_TICKS,\n boolean UV_SHIFT_EVERY_DELTA_TICK, boolean UV_SHIFT_EVERY_X_DELTA_TICK,\n int UV_SHIFT_EVERY_X_DELTA_TICKS, boolean UPDATE_DYNAMICS_EVERY_TICK,\n boolean UPDATE_DYNAMICS_EVERY_X_TICK, int UPDATE_DYNAMICS_EVERY_X_TICKS,\n boolean UPDATE_DYNAMICS_EVERY_DELTA_TICK, boolean UPDATE_DYNAMICS_EVERY_X_DELTA_TICK,\n int UPDATE_DYNAMICS_EVERY_X_DELTA_TICKS) {\n super(dynamicModel);\n this.dynamicModel = dynamicModel;\n this.cuboids = new ObjectArrayList<DynamicModelPart.DynamicCuboid>();\n this.children = new ObjectArrayList<DynamicModelPart>();\n this.with(UV_SHIFT_APPLY_SYNC, UV_SHIFTABLE, UV_SHIFT_AMOUNT, UV_SHIFT_EVERY_X_TICK,\n UV_SHIFT_EVERY_TICK, UV_SHIFT_EVERY_X_TICKS, UV_SHIFT_EVERY_DELTA_TICK,\n UV_SHIFT_EVERY_X_DELTA_TICK, UV_SHIFT_EVERY_X_DELTA_TICKS,\n UPDATE_DYNAMICS_EVERY_TICK, UPDATE_DYNAMICS_EVERY_X_TICK,\n UPDATE_DYNAMICS_EVERY_X_TICKS, UPDATE_DYNAMICS_EVERY_DELTA_TICK,\n UPDATE_DYNAMICS_EVERY_X_DELTA_TICK, UPDATE_DYNAMICS_EVERY_X_DELTA_TICKS).setX(x)\n .setY(y).setZ(z).setSizeX(sizeX).setSizeY(sizeY).setSizeZ(sizeZ).setExtra(extra)\n .setU(u).setV(v).setRotation(rotation).seeds(seeds).spriteId(spriteId)\n .layerFactory(layerFactory).buildUsingSeeds().buildChildrenUsingSeeds();\n }", "public static Vect3 mkXYZ(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "protected AbstractMatrix3D() {}" ]
[ "0.7719624", "0.7604591", "0.75604445", "0.73185223", "0.67073125", "0.63318086", "0.63067234", "0.5592755", "0.53838325", "0.53482175", "0.53385794", "0.5317159", "0.5299075", "0.5188119", "0.5186971", "0.51717544", "0.5164273", "0.51381487", "0.5116339", "0.51150835", "0.5067974", "0.5015533", "0.50086564", "0.4997415", "0.49866992", "0.49856824", "0.4919877", "0.4916226", "0.4896824", "0.48922905", "0.4882455", "0.4850352", "0.4845783", "0.4844576", "0.48439604", "0.4831595", "0.48285088", "0.48285052", "0.48126224", "0.4804211", "0.47792485", "0.4761148", "0.47516748", "0.47494438", "0.474652", "0.4732397", "0.47170216", "0.4705029", "0.47007027", "0.46829155", "0.4681593", "0.46749", "0.4663291", "0.46628076", "0.4661827", "0.46601582", "0.46411538", "0.46405974", "0.46403325", "0.46292773", "0.46232006", "0.4622743", "0.4608278", "0.46054083", "0.46026626", "0.4602531", "0.45848066", "0.4584171", "0.45787606", "0.4574817", "0.45702565", "0.4560854", "0.4555614", "0.45555267", "0.45543545", "0.45493323", "0.45405525", "0.45360592", "0.4522292", "0.4519882", "0.45196435", "0.4514487", "0.4512856", "0.45043293", "0.4503869", "0.45024425", "0.44990492", "0.44981024", "0.44908902", "0.448867", "0.4479429", "0.44703844", "0.44688818", "0.44666043", "0.44641608", "0.44435623", "0.44428328", "0.44373956", "0.4432128", "0.4431632" ]
0.83104897
0
Constructs a 3D image component object using the specified format, BufferedImage array, byReference flag, and yUp flag. The image class is set to ImageClass.BUFFERED_IMAGE.
public ImageComponent3D(int format, BufferedImage[] images, boolean byReference, boolean yUp) { ((ImageComponentRetained)this.retained).setByReference(byReference); ((ImageComponentRetained)this.retained).setYUp(yUp); ((ImageComponent3DRetained)this.retained).processParams(format, images[0].getWidth(null), images[0].getHeight(null), images.length); for (int i=0; i<images.length; i++) { ((ImageComponent3DRetained)this.retained).set(i, images[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth,\n\t\t\t boolean\tbyReference,\n\t\t\t boolean\tyUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "ImageComponent3D() {}", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "private void createBackBuffer() {\r\n GraphicsConfiguration gc = getGraphicsConfiguration();\r\n volatileImg = gc.createCompatibleVolatileImage(getWidth(), getHeight());\r\n// volatileImg.setAccelerationPriority(1);\r\n }", "private void run3DC() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, 0, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, 0, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, 0, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) /\r\n (numIterations - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude3D(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude3D(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude3D(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage3D(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage3D(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage3D(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1, 0, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2, 0, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3, 0, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n destImage.calcMinMax();\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public static com.jme.image.Image loadImage(InputStream fis, boolean flip, boolean exp32) throws\n IOException {\n byte red = 0;\n byte green = 0;\n byte blue = 0;\n byte alpha = 0;\n //open a stream to the file\n BufferedInputStream bis = new BufferedInputStream(fis, 8192);\n DataInputStream dis = new DataInputStream(bis);\n //Read the TGA header\n idLength = (short) dis.read();\n colorMapType = (short) dis.read();\n imageType = (short) dis.read();\n cMapStart = flipEndian(dis.readShort());\n cMapLength = flipEndian(dis.readShort());\n cMapDepth = (short) dis.read();\n xOffset = flipEndian(dis.readShort());\n yOffset = flipEndian(dis.readShort());\n width = flipEndian(dis.readShort());\n height = flipEndian(dis.readShort());\n pixelDepth = (short) dis.read();\n imageDescriptor = (short) dis.read();\n //Skip image ID\n if (idLength > 0)\n bis.skip(idLength);\n // Allocate image data array\n byte[] rawData = null;\n int dl;\n if ((pixelDepth == 32)||(exp32)) {\n rawData = new byte[width * height * 4];\n dl=4;\n } else {\n rawData = new byte[width * height * 3];\n dl=3;\n }\n int rawDataIndex = 0;\n \n // Faster than doing a 24-or-32 check on each individual pixel,\n // just make a seperate loop for each.\n if (pixelDepth == 24)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n if(dl==4) {\n // create an alpha channel\n rawData[rawDataIndex++] = (byte)255;\n }\n \n }\n }\n else if (pixelDepth == 32)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n alpha = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n rawData[rawDataIndex++] = alpha;\n }\n }\n fis.close();\n //Get a pointer to the image memory\n ByteBuffer scratch = ByteBuffer.allocateDirect(rawData.length);\n scratch.clear();\n scratch.put(rawData);\n scratch.rewind();\n // Create the jme.image.Image object\n com.jme.image.Image textureImage = new com.jme.image.Image();\n if (dl == 4)\n textureImage.setType(com.jme.image.Image.RGBA8888);\n else\n textureImage.setType(com.jme.image.Image.RGB888);\n textureImage.setWidth(width);\n textureImage.setHeight(height);\n textureImage.setData(scratch);\n return textureImage;\n }", "private void run3D() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBuffer[];\r\n float resultBuffer[];\r\n float gaussianBuffer[];\r\n float gradientBuffer[];\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n sourceBuffer = new float[length];\r\n resultBuffer = new float[length];\r\n gaussianBuffer = new float[length];\r\n gradientBuffer = new float[length];\r\n } catch (OutOfMemoryError e){\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n srcImage.exportData(0, length, sourceBuffer);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n algoSepConvolver = new AlgorithmSeparableConvolver(gaussianBuffer, sourceBuffer,\r\n extents, xDataRound, yDataRound, zDataRound, srcImage.isColorImage());\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) / (numIterations - 1) * 100)), activeImage);\r\n }\r\n\r\n algoSepConvolver.run();\r\n gradientMagnitude3D(gaussianBuffer, gradientBuffer);\r\n upDateImage3D(resultBuffer, sourceBuffer, gradientBuffer);\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n for (int i = 0; i < length; i++) { sourceBuffer[i] = resultBuffer[i]; }\r\n }\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n algoSepConvolver.finalize();\r\n algoSepConvolver = null;\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n destImage.importData(0, resultBuffer, true);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "@Override\n protected void putImageBuffer(BufferedImage input) \n {\n // Load data in. \n for (int y = 0; y < height; y++) \n {\n for (int x = 0; x < width; x++) \n {\n\t\tdouble h = getHeight(input, x, y);\n\t\tdouble du = 0;\n\t\tdouble dv = 0;\n\t\t\n\t\tif(x > 0)\n\t\t{\t\n\t\t du += h - getHeight(input, x-1, y);\n\t\t}\n\t\tif(x < width - 1)\n\t\t{\n\t\t du += getHeight(input, x+1, y) - h;\n\t\t}\n\t\tif(y > 0)\n\t\t{\n\t\t dv += h - getHeight(input, x , y-1);\n\t\t}\n\t\tif(y < height - 1)\n\t\t{\n\t\t dv += getHeight(input, x, y+1) - h;\n\t\t}\n\t\t\n\t\tdouble u = -du;\n\t\tdouble v = -dv;\n\t\tdouble w = 0.25;\n \n\t\tdouble n = Math.sqrt(u*u + v*v + w*w);\n\n byte a = (byte)(h * 255.0);\n byte r = (byte)((u / n + 1.0) / 2.0 * 255.0);\n byte g = (byte)((v / n + 1.0) / 2.0 * 255.0);\n byte b = (byte)((w / n + 1.0) / 2.0 * 255.0);\n \n int index = (x + y * allocatedWidth) * 4;\n pixelData.put(index++, r);\n pixelData.put(index++, g);\n pixelData.put(index++, b);\n pixelData.put(index , a);\n }\n }\n }", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "ImageTranscoder mo28916a(ImageFormat cVar, boolean z);", "public Tile3D(Context context, int id, float w, float h) {\n\t // Setup vertex array buffer. Vertices in float. A float has 4 bytes\n\t ByteBuffer vbb = ByteBuffer.allocateDirect(12 * 4);\n\t vbb.order(ByteOrder.nativeOrder()); // Use native byte order\n\t vertexBuffer = vbb.asFloatBuffer(); // Convert from byte to float\n\t \n\t imageFileID = id;\n\t bitmap = BitmapFactory.decodeStream(context.getResources().openRawResource(imageFileID));\n\t //bitmap \n\t /*InputStream is= context.getResources().openRawResource(imageFileIDs);\n\t try {\n\t bitmap = BitmapFactory.decodeStream(is);\n\n\t } finally {\n\t //Always clear and close\n\t try {\n\t is.close();\n\t is = null;\n\t } catch (IOException e) {\n\t }\n\t }*/\n\t int imgWidth = bitmap.getWidth();\n\t int imgHeight = bitmap.getHeight();\n\t float faceWidth = w;\n\t float faceHeight = h;\n\t // Adjust for aspect ratio\n\t if (imgWidth > imgHeight) {\n\t faceHeight = faceHeight * imgHeight / imgWidth; \n\t }\n\t else {\n\t faceWidth = faceWidth * imgWidth / imgHeight;\n\t }\n\t float faceLeft = -faceWidth / 2;\n\t float faceRight = -faceLeft;\n\t float faceTop = faceHeight / 2;\n\t float faceBottom = -faceTop;\n\t \n\t \n\t \n\t // Define the vertices for this face\n\t float[] vertices = {\n\t faceLeft, faceBottom, 0.0f, // 0. left-bottom-front\n\t faceRight, faceBottom, 0.0f, // 1. right-bottom-front\n\t faceLeft, faceTop, 0.0f, // 2. left-top-front\n\t faceRight, faceTop, 0.0f, // 3. right-top-front\n\t };\n\t vertexBuffer.put(vertices); // Copy data into buffer\n\t\t vertexBuffer.position(0); // Rewind\n\t \n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t \n\t texBuffer.put(texCoords);\n\t \n\t texBuffer.position(0); // Rewind\n\t \n\t }", "public Surface(int var1, int var2, int var3, Component var4) {\n super();\n this.interlace = false;\n this.loggedIn = false;\n this.field_731 = var4;\n this.field_744 = var2;\n this.field_746 = var1;\n this.field_726 = this.field_723 = var1;\n this.field_727 = this.field_724 = var2;\n this.field_725 = var1 * var2;\n this.pixels = new int[var1 * var2];\n this.spritePixels = new int[var3][];\n this.field_742 = new boolean[var3];\n this.spriteColoursUsed = new byte[var3][];\n this.spriteColourList = new int[var3][];\n this.field_736 = new int[var3];\n this.field_737 = new int[var3];\n this.spriteWidthFull = new int[var3];\n this.field_741 = new int[var3];\n this.field_738 = new int[var3];\n this.field_739 = new int[var3];\n if(var1 > 1 && var2 > 1 && var4 != null) {\n this.field_728 = new DirectColorModel(32, 16711680, '\\uff00', 255);\n int var5 = this.field_723 * this.field_724;\n int var6 = 0;\n if(field_759 || var6 < var5) {\n do {\n this.pixels[var6] = 0;\n ++var6;\n } while(var6 < var5);\n }\n\n this.field_732 = var4.createImage(this);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n }\n\n }", "@Override\n void createRetained() {\n this.retained = new ImageComponent3DRetained();\n this.retained.setSource(this);\n }", "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "private BufferedImage CreateBuffedImage(WinFileMappingBuffer fm, boolean bWithAlphaChanle) {\n BitmapFileBuffer bitmap = new BitmapFileBuffer();\n if (!bitmap.Load(fm.getBuffer())) {\n return null;\n }\n return bitmap.GetBuffedImage(bWithAlphaChanle);\n }", "public FramebufferObject(GL2 gl, Texture2D.Format format, Texture2D.Datatype datatype, int width, int height, int colorTextureCount, boolean makeDepthTexture, boolean rectTextures) throws OpenGLException\n\t{\n\t\t/* Sanity check. */\n\t\tif (colorTextureCount == 0 && !makeDepthTexture)\n\t\t{\n\t\t\tthrow new OpenGLException(\"It is not valid to make an FBO with no color buffers and no depth buffer.\");\n\t\t}\n\t\t\n\t\tint maxColorTextures[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_MAX_COLOR_ATTACHMENTS, maxColorTextures, 0);\n\t\tif (colorTextureCount > maxColorTextures[0])\n\t\t{\n\t\t\tthrow new OpenGLException(\"Cannot create an FBO with \" + colorTextureCount + \" render targets. Your graphics card only supports \" + maxColorTextures[0] + \".\");\n\t\t}\n\t\t\n\t\tmWidth = width;\n\t\tmHeight = height;\n\t\t\n\t\t/* Create OpenGL FBO. */\n\t\tint names[] = new int[1];\n\t\tgl.glGenFramebuffers(1, names, 0);\n\t\tmHandle = names[0];\n\t\t\n\t\t/* Remember previous FBO binding, and then bind this one. */\n\t\tint previousBinding[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING, previousBinding, 0);\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, mHandle);\n\t\t\n\t\t/* Create and attach color textures. */\n\t\tmColorTextures = new Texture2D[colorTextureCount];\n\t\t\n\t\tfor (int i = 0; i < colorTextureCount; ++i)\n\t\t{\n\t\t\tmColorTextures[i] = new Texture2D(gl, format, datatype, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_COLOR_ATTACHMENT0 + i, mColorTextures[i].getTextureTarget(), mColorTextures[i].getHandle(), 0);\n\t\t}\n\t\t\n\t\t/* Create and attach depth texture, if requested. */\n\t\tif (makeDepthTexture)\n\t\t{\n\t\t\tmDepthTexture = new Texture2D(gl, Format.DEPTH, Datatype.INT32, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_DEPTH_ATTACHMENT, mDepthTexture.getTextureTarget(), mDepthTexture.getHandle(), 0);\n\t\t}\n\n\t\t/* Make sure everything is set up properly. */\n\t\tint status = gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER);\n\t\tif (status != GL2.GL_FRAMEBUFFER_COMPLETE)\n\t\t{\n\t\t\tthrow new OpenGLException(\"Framebuffer incomplete: \" + status + \".\");\n\t\t}\n\t\t\n\t\t/* Restore whatever FBO was bound before this function was called. */\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, previousBinding[0]);\n\t}", "void imageData(int width, int height, int[] rgba);", "private BufferedImage user_space(BufferedImage image) {\n // create new_img with the attributes of image\n BufferedImage new_img = new BufferedImage(image.getWidth(),\n image.getHeight(), BufferedImage.TYPE_3BYTE_BGR);\n Graphics2D graphics = new_img.createGraphics();\n graphics.drawRenderedImage(image, null);\n graphics.dispose(); // release all allocated memory for this image\n return new_img;\n }", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public static native PointerByReference OpenMM_3D_DoubleArray_create(int size1, int size2, int size3);", "private void readBuffer(int slice, float buffer[]) throws IOException {\r\n int i = 0;\r\n int b1,b2;\r\n int j;\r\n int nBytes;\r\n long progress, progressLength, mod;\r\n\r\n switch (dataType) {\r\n case ModelStorageBase.UBYTE:\r\n nBytes = xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n for ( j = 0; j < nBytes; j++, i++) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), false);\r\n buffer[i] = byteBuffer[j] & 0xff;\r\n }\r\n break;\r\n case ModelStorageBase.SHORT:\r\n nBytes = 2*xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n for (j = 0; j < nBytes; j+=2, i++ ) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), false);\r\n b1 = getUnsignedByte(byteBuffer, j);\r\n b2 = getUnsignedByte(byteBuffer, j+1);\r\n buffer[i] = (short)((b2 << 8) + b1); // little endian\r\n }\r\n break;\r\n case ModelStorageBase.ARGB:\r\n // from 2 color merged psuedocolor\r\n nBytes = 2*xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n //For the moment I compress RGB images to unsigned bytes.\r\n for (j = 0; j < nBytes; j+=2, i+=4 ) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), true);\r\n buffer[i] = 255;\r\n buffer[i+1] = getUnsignedByte(byteBuffer, j);\r\n buffer[i+2] = getUnsignedByte(byteBuffer, j+1);\r\n buffer[i+3] = 0;\r\n }\r\n break;\r\n } // switch(dataType)\r\n }", "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "public void setBfImageByData(int [][][] data){\r\n\t\tBfImage = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);\r\n\t\tfor (int i = 0; i < width; i++) {\r\n\t\t\tfor (int j = 0; j < height; j++) {\r\n\t\t\t\tint [] rgb = data[j][i];\r\n\t\t\t\tif (rgb[0] == -1){\t//is transparent\r\n\t\t\t\t\tBfImage.setRGB(i, j, Transparency.TRANSLUCENT);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tBfImage.setRGB(i, j, Utils.getRGB(rgb[0], rgb[1], rgb[2]));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void invoke(@NativeType(\"bgfx_callback_interface_t *\") long _this, @NativeType(\"uint32_t\") int _width, @NativeType(\"uint32_t\") int _height, @NativeType(\"uint32_t\") int _pitch, @NativeType(\"bgfx_texture_format_t\") int _format, @NativeType(\"bool\") boolean _yflip);", "public Bitmap3DColor(\n float v1Red, float v1Green, float v1Blue, float v1Alpha,\n float v2Red, float v2Green, float v2Blue, float v2Alpha,\n float v3Red, float v3Green, float v3Blue, float v3Alpha,\n float v4Red, float v4Green, float v4Blue, float v4Alpha\n ) {\n if(\n v1Red < 0 || v1Red > 1 || v2Red < 0 || v2Red > 1 || v3Red < 0 || v3Red > 1 || v4Red < 0 || v4Red > 1 ||\n v1Green < 0 || v1Green > 1 || v2Green < 0 || v2Green > 1 || v3Green < 0 || v3Green > 1 || v4Green < 0 || v4Green > 1 ||\n v1Blue < 0 || v1Blue > 1 || v2Blue < 0 || v2Blue > 1 || v3Blue < 0 || v3Blue > 1 || v4Blue < 0 || v4Blue > 1 ||\n v1Alpha < 0 || v1Alpha > 1 || v2Alpha < 0 || v2Alpha> 1 || v3Alpha < 0 || v3Alpha > 1 || v4Alpha < 0 || v4Alpha > 1\n ) {\n throw new IllegalArgumentException(\"Values should be between 0 and 1\");\n }\n\n float[] colors = {\n v1Red, v1Green, v1Blue, v1Alpha,\n v2Red, v2Green, v2Blue, v2Alpha,\n v3Red, v3Green, v3Blue, v3Alpha,\n v4Red, v4Green, v4Blue, v4Alpha\n };\n\n ByteBuffer clb = ByteBuffer.allocateDirect(colors.length * 4);\n clb.order(ByteOrder.nativeOrder());\n this.colorBuffer = clb.asFloatBuffer();\n this.colorBuffer.put(colors);\n this.colorBuffer.position(0);\n }", "public @NotNull Image flipV()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int i = this.height - 1, offsetSize = 0; i >= 0; i--)\n {\n long src = srcPtr + Integer.toUnsignedLong(i * this.width) * this.format.sizeof;\n \n MemoryUtil.memCopy(src, dstPtr + offsetSize, bytesPerLine);\n offsetSize += bytesPerLine;\n }\n \n this.data.free();\n this.data = output;\n this.mipmaps = 1;\n }\n return this;\n }", "public RenderedImage create(ParameterBlock args,\n RenderingHints renderHints) {\n \n // Get the source image and the data type parameter.\n RenderedImage src = args.getRenderedSource(0);\n Integer datatype = (Integer)args.getObjectParameter(0);\n int type = datatype.intValue();\n\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);\n\n // If there is no change return the source image directly.\n if(layout == null && type == src.getSampleModel().getDataType()) {\n return src;\n }\n\n // Create or clone the ImageLayout.\n if(layout == null) {\n layout = new ImageLayout(src);\n } else {\n layout = (ImageLayout)layout.clone();\n }\n\n\tboolean isDataTypeChange = false;\n\n // Get prospective destination SampleModel.\n SampleModel sampleModel = layout.getSampleModel(src);\n\n // Create a new SampleModel if the type is not as desired.\n if (sampleModel.getDataType() != type) {\n int tileWidth = layout.getTileWidth(src);\n int tileHeight = layout.getTileHeight(src);\n int numBands = src.getSampleModel().getNumBands();\n\n SampleModel csm =\n RasterFactory.createComponentSampleModel(sampleModel,\n type,\n tileWidth,\n tileHeight,\n numBands);\n\n layout.setSampleModel(csm);\n\t isDataTypeChange = true;\n }\n\n\n // Check ColorModel.\n ColorModel colorModel = layout.getColorModel(null);\n if(colorModel != null &&\n !JDKWorkarounds.areCompatibleDataModels(layout.getSampleModel(src),\n colorModel)) {\n // Clear the mask bit if incompatible.\n layout.unsetValid(ImageLayout.COLOR_MODEL_MASK);\n }\n\n // Check whether anything but the ColorModel is changing.\n if (layout.getSampleModel(src) == src.getSampleModel() &&\n layout.getMinX(src) == src.getMinX() &&\n layout.getMinY(src) == src.getMinY() &&\n layout.getWidth(src) == src.getWidth() &&\n layout.getHeight(src) == src.getHeight() &&\n layout.getTileWidth(src) == src.getTileWidth() &&\n layout.getTileHeight(src) == src.getTileHeight() &&\n layout.getTileGridXOffset(src) == src.getTileGridXOffset() &&\n layout.getTileGridYOffset(src) == src.getTileGridYOffset()) {\n\n if(layout.getColorModel(src) == src.getColorModel()) {\n // Nothing changed: return the source directly.\n return src;\n } else {\n // Remove TileCache hint from RenderingHints if present.\n RenderingHints hints = renderHints;\n if(hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) {\n hints = new RenderingHints((Map)renderHints);\n hints.remove(JAI.KEY_TILE_CACHE);\n }\n\n // Only the ColorModel is changing.\n return new NullOpImage(src, layout, hints,\n OpImage.OP_IO_BOUND);\n }\n }\n\n\tif (isDataTypeChange == true) {\n\n\t // Add JAI.KEY_REPLACE_INDEX_COLOR_MODEL hint to renderHints\n\t if (renderHints == null) {\n\t\trenderHints = \n\t\t new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,\n\t\t\t\t Boolean.TRUE);\n\t\t\n\t } else if (!renderHints.containsKey(\n\t\t\t\t\tJAI.KEY_REPLACE_INDEX_COLOR_MODEL)) {\n\t\t// If the user specified a value for this hint, we don't\n\t\t// want to change that\n\t\trenderHints.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, \n\t\t\t\tBoolean.TRUE);\n\t }\n\t}\n\n return new CopyOpImage(src, renderHints, layout);\n }", "public FloatBuffer putInBufferC(FloatBuffer buffer) {\n\t\tbuffer.clear();\n\t\tbuffer.put(x).put(y).put(z).put(w);\n\t\tbuffer.flip();\n\t\treturn buffer;\n\t}", "public @NotNull Image flipH()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n if (this.format != ColorFormat.RGBA)\n {\n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n // OPTION 1: Move pixels with memCopy()\n long src = Integer.toUnsignedLong(y * this.width + this.width - 1 - x) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(y * this.width + x) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, bytesPerLine);\n \n // OPTION 2: Just copy data pixel by pixel\n // output.put(y * this.width + x, this.data.getBytes(y * this.width + (this.width - 1 - x)));\n }\n }\n \n this.data.free();\n \n this.data = output;\n }\n else\n {\n // OPTION 3: Faster implementation (specific for 32bit pixels)\n // NOTE: It does not require additional allocations\n IntBuffer ptr = this.data.toBuffer().asIntBuffer();\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width / 2; x++)\n {\n int backup = ptr.get(y * this.width + x);\n ptr.put(y * this.width + x, ptr.get(y * this.width + this.width - 1 - x));\n ptr.put(y * this.width + this.width - 1 - x, backup);\n }\n }\n }\n this.mipmaps = 1;\n }\n \n return this;\n }", "public BufferedImage doInBackground() {\n \t \tsynchronized(v2d)\r\n \t \t{\r\n \t \tv2d.simulate();\r\n \t \t\r\n \t \t//developers can use this functuon of 2d viwers to skip long renderings that are not actually updating the image\r\n \t \tif (v2d.skipRendering())\r\n \t \t\treturn finalImage;\r\n \t \t\r\n \t \t//this if is for the first time the two buffers are initialized and for when the user changes the size of the container; in this case a new image of the good size needs to be created.\r\n \t \tif (image == null || image.getWidth() != thisContainer.getWidth() || image.getHeight() != thisContainer.getHeight())\r\n \t \t\t\r\n \t \t\tif (thisContainer.getWidth() < 0 || thisContainer.getHeight() < 0)\r\n \t \t\t\treturn finalImage;\r\n \t \t\t\r\n \t \t\t//image = thisPanel.getGraphicsConfiguration().createCompatibleImage(thisPanel.getWidth(),thisPanel.getHeight());\r\n \t \t\timage = new BufferedImage(thisContainer.getWidth(), thisContainer.getHeight(),BufferedImage.TYPE_INT_ARGB);\r\n \t \t\t\r\n \t \t \t \t \t \t\r\n \t \t\tGraphics2D gc = image.createGraphics();\r\n \t \t\t\r\n \t \t\tgc.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);\r\n \t \t\t\r\n\t gc.setColor(v2d.backgroundColor());\r\n\t gc.fillRect(0, 0, thisContainer.getWidth(), thisContainer.getHeight()); // fill in background\r\n\t \r\n\t if (!v2d.antialiasingSet)\r\n\t {\r\n\t \tif (v2d.antialiasing)\r\n\t \t{\t \t\t\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_ANTIALIAS_ON);\r\n\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_ANTIALIAS_OFF);\r\n\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);\r\n\t \t}\r\n\t }\r\n\t \r\n\t zoomOriginX = this.thisContainer.getWidth()/2;\r\n\t zoomOriginY = this.thisContainer.getHeight()/2;\r\n\t \r\n\t //sets the proper transformation for the Graphics context that will passed into the rendering function\t \r\n\t \r\n\t \r\n\t gc.setTransform(AffineTransform.getTranslateInstance(zoomOriginX, zoomOriginY));\t \r\n\t gc.transform(AffineTransform.getScaleInstance(zoom,zoom));\t\t \r\n\t gc.transform(AffineTransform.getTranslateInstance(translatex-zoomOriginX, translatey-zoomOriginY));\r\n\t \r\n\t \r\n\t transform = gc.getTransform();\r\n \t \t\t \t\t\r\n \t \t\t\t\r\n\t v2d.render(gc);\r\n\t gc.setColor(Color.black);\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t gc.setTransform(AffineTransform.getTranslateInstance(0, 0));\r\n\t \t\r\n\t if ((new Date().getTime()- lastMouseMove) > v2d.getTooltipDelay())\r\n\t \tif (v2d.getToolTipEnabled() && v2d.getToolTipText().length() > 0)\r\n\t \t\tv2d.renderTooltip(gc);\r\n \t \t}\r\n\t \r\n \t return image;\r\n \t }", "public Cube() {\n\t\t// a float is 4 bytes, therefore we multiply the number if\n\t\t// vertices with 4.\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tvbb.order(ByteOrder.nativeOrder());\n\t\tvertexBuffer = vbb.asFloatBuffer();\n\t\tvertexBuffer.put(vertices);\n\t\tvertexBuffer.position(0);\n\t\t\n\t\t// Setup texture-coords-array buffer, in float. An float has 4 bytes (NEW)\n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t texBuffer.put(texCoords);\n\t texBuffer.position(0);\n\t\t\n\t\t// short is 2 bytes, therefore we multiply the number if\n\t\t// vertices with 2.\n//\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\n//\t\tibb.order(ByteOrder.nativeOrder());\n//\t\tindexBuffer = ibb.asShortBuffer();\n//\t\tindexBuffer.put(indices);\n//\t\tindexBuffer.position(0);\n\t}", "private void readImageRGB(int width, int height, String imgPath, BufferedImage img, boolean modFlag)\n\t{\n\t\ttry\n\t\t{\n\t\t\tint frameLength = width*height*3;\n\n\t\t\tFile file = new File(imgPath);\n\t\t\tRandomAccessFile raf = new RandomAccessFile(file, \"r\");\n\t\t\traf.seek(0);\n\n\t\t\tlong len = frameLength;\n\t\t\tbyte[] bytes = new byte[(int) len];\n\n\t\t\traf.read(bytes);\n\n\t\t\tdouble[][] yChannel = new double[height][width];\n\t\t\tdouble[][] uChannel = new double[height][width];\n\t\t\tdouble[][] vChannel = new double[height][width];\n\n\t\t\tint ind = 0;\n\t\t\tfor(int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\tfor(int x = 0; x < width; x++)\n\t\t\t\t{\n\t\t\t\t\tbyte a = 0;\n\t\t\t\t\tbyte r = bytes[ind];\n\t\t\t\t\tbyte g = bytes[ind+height*width];\n\t\t\t\t\tbyte b = bytes[ind+height*width*2]; \n\n\t\t\t\t\tint pix = 0xff000000 | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff);\n\t\t\t\t\t//int pix = ((a << 24) + (r << 16) + (g << 8) + b);\n\t\t\t\t\timg.setRGB(x,y,pix);\n\t\t\t\t\tind++;\n\n\t\t\t\t\tif(modFlag){\n\t\t\t\t\t\tint R = r & 0xFF;\n\t\t\t\t\t\tint G = g & 0xFF;\n\t\t\t\t\t\tint B = b & 0xFF;\n\n\t\t\t\t\t\tdouble[] yuvs = rgb2yuv(R, G, B);\n\t\t\t\t\t\tyChannel[y][x] = yuvs[0];\n\t\t\t\t\t\tuChannel[y][x] = yuvs[1];\n\t\t\t\t\t\tvChannel[y][x] = yuvs[2];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(modFlag){\n\n\t\t\t\t//up-sampling each yuv channel\n\t\t\t\tfor(int i = 0; i < height; i++) {\n\t\t\t\t\tfor(int j = 0; j < width; j++) {\n\t\t\t\t\t\tif(inY !=0){\n\t\t\t\t\t\t\tyChannel = channelSample(yChannel, inY, width, i, j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(inU != 0){\n\t\t\t\t\t\t\tuChannel = channelSample(uChannel, inU, width, i, j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(inV != 0){\n\t\t\t\t\t\t\tvChannel = channelSample(vChannel, inV, width, i, j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//init buckets befor quantization\n\t\t\t\tboolean qFlag = true;\n\t\t\t\tInteger[] bucket = null;\n\t\t\t\tif(inQ <= 256){\n\t\t\t\t\tdouble stepSize = 256/ (double) inQ;\n\t\t\t\t\tbucket = createBucketArray(stepSize);\n\t\t\t\t}else{\n\t\t\t\t\tqFlag = false;\n\t\t\t\t}\n\n\t\t\t\t//converting yuv to rgb, Quantization and writing image pixel by pixel\n\t\t\t\tfor(int i = 0; i < height; i++) {\n\t\t\t\t\tfor(int j = 0; j < width; j++) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint[] convertedRGB = yuv2rgb(yChannel[i][j], uChannel[i][j], vChannel[i][j]);\n\t\t\t\t\t\tint R = convertedRGB[0];\n\t\t\t\t\t\tint G = convertedRGB[1];\n\t\t\t\t\t\tint B = convertedRGB[2];\n\n\t\t\t\t\t\tif( qFlag) {\n\t\t\t\t\t\t\tint[] quantizedRGB = quantize(R, G, B, bucket);\n\t\t\t\t\t\t\tR = quantizedRGB[0];\n\t\t\t\t\t\t\tG = quantizedRGB[1];\n\t\t\t\t\t\t\tB = quantizedRGB[2];\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\t// int processedPixel = 0xff000000 | ((R & 0xff) << 16) | ((G & 0xff) << 8) | (B & 0xff);\n\t\t\t\t\t\tint processedPixel = 0xff000000 | ((R) << 16) | ((G) << 8) | (B);\n\t\t\t\t\t\timg.setRGB(j, i, processedPixel);\n\t\t\t\t\t\t// img.setRGB(i, j, processedPixel);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (FileNotFoundException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public r3inputlayer(double[] inputarray, int depth){\r\n double[][][] newarray = new double[inputarray.length][1][depth + 2];\r\n for(int i = 0; i < inputarray.length; i++){\r\n newarray[i][0][0] = inputarray[i];\r\n }\r\n this.state = newarray;\r\n this.width = inputarray.length;\r\n }", "public Texture build() {\n FrameBuffer buffer = new FrameBuffer(Format.RGB565, maxWidth, maxHeight, false);\n buffer.begin();\n for (TextureRegion texture : textures) {\n \t// TODO Créer la texture dynamiquement\n }\n buffer.end();\n Texture result = buffer.getColorBufferTexture();\n buffer.dispose();\n return result;\n }", "public FrameBuffer(Texture texture, boolean hasDepth) {\r\n this.width = texture.getWidth();\r\n this.height = texture.getHeight();\r\n this.hasDepth = hasDepth;\r\n colorTexture = texture;\r\n// build();\r\n\r\n }", "public Card(String type, int number, BufferedImage backImage, \n BufferedImage turnedImage, BufferedImage overImage, int w, int h){\n\tthis.type = type;\n\tthis.number = number;\n\tthis.backImage = backImage;\n this.image = backImage;\n\tthis.turnedImage = turnedImage;\n this.overImage = overImage;\n\tthis.w = w;\n\tthis.h = h;\n \n // Create the VolatileImages\n try{\n backVimImage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n vimage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n turnedVimImage = VolatileImageLoader.loadFromBufferedImage(\n turnedImage, Transparency.TRANSLUCENT);\n overVimImage = VolatileImageLoader.loadFromBufferedImage(\n overImage, Transparency.TRANSLUCENT);\n }\n catch(IOException ioe){\n System.err.println(\"Could not convert from BufferedImage \" +\n \"to VolatileImage\");\n }\n }", "public BufferedImage getImage() {\n/* 81 */ return this.bufImg;\n/* */ }", "public BufferedImage toBufferedImage() {\n double[][] yData = decompress(yChannel);\n double[][] cBData = upsample(decompress(cBChannel));\n double[][] cRData = upsample(decompress(cRChannel));\n\n BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);\n for (int x = 0; x < width; ++x) {\n for (int y = 0; y < height; ++y) {\n double[] aYCbCr = {alphaChannel[y][x], yData[y][x], cBData[y][x], cRData[y][x]};\n int aRGB = ImageUtils.channelInt(ImageUtils.toRGB(aYCbCr));\n image.setRGB(x, y, aRGB);\n }\n }\n return image;\n }", "public static VImage toVImage(BufferedImage image) {\n if (image.getType() != BufferedImage.TYPE_3BYTE_BGR) {\n throw new IllegalArgumentException(\"Only BufferedImages of type TYPE_3BYTE_BGR can currently be converted to VImage\");\n }\n\n byte[] buffer = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();\n return ValueFactory.newVImage(image.getHeight(), image.getWidth(), buffer);\n }", "public BufferedImage convertToBimage(int[][][] TmpArray) {\n\n int width = TmpArray.length;\n int height = TmpArray[0].length;\n\n BufferedImage tmpimg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int a = TmpArray[x][y][0];\n int r = TmpArray[x][y][1];\n int g = TmpArray[x][y][2];\n int b = TmpArray[x][y][3];\n\n //set RGB value\n\n int p = (a << 24) | (r << 16) | (g << 8) | b;\n tmpimg.setRGB(x, y, p);\n\n }\n }\n return tmpimg;\n }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "@NativeType(\"bgfx_frame_buffer_handle_t\")\n public static short bgfx_create_frame_buffer_from_attachment(@NativeType(\"bgfx_attachment_t const *\") BGFXAttachment.Buffer _attachment, @NativeType(\"bool\") boolean _destroyTextures) {\n return nbgfx_create_frame_buffer_from_attachment((byte)_attachment.remaining(), _attachment.address(), _destroyTextures);\n }", "private void initImage() {\n this.image = (BufferedImage)this.createImage(DisplayPanel.COLS, DisplayPanel.ROWS);\n this.r.setRect(0, 0, DisplayPanel.ROWS, DisplayPanel.COLS);\n this.paint = new TexturePaint(this.image,\n this.r);\n }", "public BufferedImgBase(byte[] byteimg) throws IOException{\n // convert byte[] back to a BufferedImage\n InputStream is = new ByteArrayInputStream(byteimg);\n BufferedImage newBi = ImageIO.read(is);\n //this.img --> BufferedImage\n this.img = newBi;\n }", "public static interface Updater {\n\t/**\n\t * Updates image data that is accessed by reference.\n\t * This method is called by the updateData method of an\n\t * ImageComponent object to effect\n\t * safe updates to image data that\n\t * is referenced by that object. Applications that wish to modify\n\t * such data must implement this method and perform all updates\n\t * within it.\n\t * <br>\n\t * NOTE: Applications should <i>not</i> call this method directly.\n\t *\n\t * @param imageComponent the ImageComponent object being updated.\n\t * @param index index of the image to be modified.\n\t * @param x starting X offset of the subregion.\n\t * @param y starting Y offset of the subregion.\n\t * @param width width of the subregion.\n\t * @param height height of the subregion.\n\t *\n\t * @see ImageComponent3D#updateData\n\t */\n\tpublic void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);\n }", "public void setup() {\n\t\tthis.image = new BufferedImage(maxXPos, maxYPos, BufferedImage.TYPE_4BYTE_ABGR);\n\t\tthis.graphics = getImage().createGraphics();\n\t}", "public void initFromByteArray(byte[] buffer, int offset, int byteCount,\n\t\t\tAudioFormat format, boolean lazy) {\n\t\tif (offset + byteCount > buffer.length) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"FloatSampleBuffer.initFromByteArray: buffer too small.\");\n\t\t}\n\n\t\tint thisSampleCount = byteCount / format.getFrameSize();\n\t\tinit(format.getChannels(), thisSampleCount, format.getSampleRate(),\n\t\t\t\tlazy);\n\n\t\t// save format for automatic dithering mode\n\t\toriginalFormatType = FloatSampleTools.getFormatType(format);\n\n\t\tFloatSampleTools.byte2float(buffer, offset, channels, 0, sampleCount,\n\t\t\t\tformat);\n\t}", "void setFormat(ImageFormat format);", "public Image getThree();", "public static JTensor newWithStorage3d(\n JStorage storage, long storageOffset,\n long size0, long stride0,\n long size1, long stride1,\n long size2, long stride2) {\n return new JTensor(\n TH.THTensor_(newWithStorage3d)(storage, storageOffset,\n size0, stride0, size1, stride1, size2, stride2)\n );\n }", "public static void experimentThree(boolean reuse) {\n System.out.println(\"EXPERIMENT THREE: cache=\" + reuse);\n ArrayList<BufferedImage> images = new ArrayList<BufferedImage>();\n\n images.add(new BufferedImage(2048, 2048, BufferedImage.TYPE_INT_ARGB));\n\n System.out.println(\"--> Objects Initialized!\");\n\n long timeBefore = System.nanoTime();\n\n for (int i = 0; i < 10000; i++) {\n BufferedImage img = null;\n\n if (reuse) {\n img = images.get(0).getSubimage(0, 0, 640, 480);\n\n // THIS TAKES SO MUCH TIME!!!\n clearImage(img);\n } else {\n img = new BufferedImage(640, 480, BufferedImage.TYPE_INT_ARGB);\n }\n\n Graphics2D g2 = img.createGraphics();\n\n g2.fillRect(10, 10, 600, 400);\n\n g2.dispose();\n }\n\n long timeAfter = System.nanoTime();\n\n System.out.println(\"--> Duration: \" + (timeAfter - timeBefore) * 1E-9);\n }", "public Image(MyColor [][] myImage) {\n originalImage = myImage; \n }", "public static BufferedImage sharpenByMatrix3(BufferedImage img) {\n\t\tint width = img.getWidth();\n\t\tint height = img.getHeight();\n\t\tint[] pixels = new int[width*height];\n\t\timg.getRGB(0, 0, width, height, pixels, 0, width);\n\t\tint[][] pixelArr = quantize.changeDimension2(pixels, width);\n\t\tint[][] newArr = new int[height][width];\n\t\tfor (int i = 0 ;i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tnewArr[j][i] = getNewData(pixelArr, coefficient9, i, j);\n\t\t\t}\n\t\t}\n\t\tBufferedImage image = new BufferedImage(width, height, img.getType());\n\t\timage.setRGB(0, 0, width, height, quantize.changeDimension1(newArr), 0, width);\n\t\treturn image;\n\t}", "public J3DAttribute () {}", "public three_d_object(int ob_x, int ob_y, int ob_z, int new_ob_size, int new_ob_rotation_X,\n\t\t\t\t\tint new_ob_rotation_Y) {\n\t\t\t\tx = ob_x;\n\t\t\t\ty = ob_y;\n\t\t\t\tz = ob_z;\n\t\t\t\tob_size = new_ob_size;\n\t\t\t\trotation_X = new_ob_rotation_X;\n\t\t\t\trotation_Y = new_ob_rotation_Y;\n\n\t\t\t}", "public static Texture readTexture(BufferedImage img) {\n\t\tint bytesPerPixel = -1, pix;\n\t\t\n\t\t// 3 or 4 bytes per pixel?\n\t\tif( img.getColorModel().hasAlpha() )\n\t\t\tbytesPerPixel = 4;\n\t\telse\n\t\t\tbytesPerPixel = 3;\n\t\n\t\t// Allocate a ByteBuffer\n\t\tByteBuffer unpackedPixels = \n\t\t\tByteBuffer.allocateDirect(img.getWidth() * img.getHeight() * bytesPerPixel);\n\t\t\n\t\t// Pack the pixels into the ByteBuffer in RGBA, 4 byte format.\n\t\tfor(int row = img.getHeight() - 1; row >= 0; row--) {\n\t\t\tfor (int col = 0; col < img.getWidth(); col++) {\n\t\t\t\tpix = img.getRGB(col,row); // Should return the pixel in format TYPE_INT_ARGB \n\t\t\t\tunpackedPixels.put((byte) ((pix >> 16) & 0xFF)); // red\n\t\t\t\tunpackedPixels.put((byte) ((pix >> 8 ) & 0xFF)); // green\n\t\t\t\tunpackedPixels.put((byte) ((pix ) & 0xFF)); // blue\n\t\t\t\tif (bytesPerPixel == 4) {\n\t\t\t\t\tunpackedPixels.put((byte) ((pix >> 24) & 0xFF)); // alpha\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(bytesPerPixel == 4 ) {\n\t\t\treturn new Texture(unpackedPixels,img.getWidth(), img.getHeight(), \n\t\t\t\t\tTexture.TEXTURE_4BYTE_RGBA);\n\t\t} else {\n\t\t\treturn new Texture(unpackedPixels,img.getWidth(), img.getHeight(), \n\t\t\t\t\tTexture.TEXTURE_3BYTE_RGB);\n\t\t}\n\t}", "public static native void OpenMM_3D_DoubleArray_destroy(PointerByReference array);", "public BoundingBox3d(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) {\n this.xmin = xmin;\n this.xmax = xmax;\n this.ymin = ymin;\n this.ymax = ymax;\n this.zmin = zmin;\n this.zmax = zmax;\n }", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "public interface Model {\n /**\n * Generate a image of checker board pattern (8 X 8) of the given size.\n *\n * @param size the size of the image\n * @return the 3D array of the generated checkerboard.\n */\n int[][][] generateChecker(int size);\n\n /**\n * Generate a image if rainbow stripes (7 colors) with the given size.\n *\n * @param height the height of the image\n * @param width the width of the image\n * @param vOrH the stripes should be vertical of horizontal.\n * @return the 3D array of the generated rainbow stripes.\n */\n int[][][] generateRainbow(int height, int width, VOrH vOrH);\n\n /**\n * Generate the appropriate-sized flags of a country with the given ratio.\n *\n * @param ratio the given ratio of the flag.\n * @param country the country whose flag will be generated.\n * @return the 3D array of the generated flag.\n */\n int[][][] generateFlags(int ratio, String country);\n\n /**\n * Blur the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array of the blurred image\n */\n int[][][] blurImage(int[][][] imageArray, int height, int width);\n\n /**\n * Sharpen the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array the sharpened image\n */\n int[][][] sharpenImage(int[][][] imageArray, int height, int width);\n\n /**\n * Grey scale the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return 3D array of the greyscale image\n */\n int[][][] greyscaleImage(int[][][] imageArray, int height, int width);\n\n /**\n * Sepia- tone the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array of the sepia-tone image\n */\n int[][][] sepiaToneImage(int[][][] imageArray, int height, int width);\n\n /**\n * Dither the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return 3D array of the dithered image\n */\n int[][][] ditheringImage(int[][][] imageArray, int height, int width);\n\n /**\n * Mosaic the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image.\n * @param width the width of the image.\n * @param seedNum the number of seeds.\n * @return the 3D array of mosaic image.\n */\n int[][][] mosaicingImage(int[][][] imageArray, int height, int width, int seedNum);\n\n /**\n * Undo. Return a previous result before the operation.\n *\n * @return a previous result.\n * @throws EmptyStackException when there is no previous one.\n */\n int[][][] undo() throws EmptyStackException;\n\n /**\n * Redo. Return a previous result before an undo.\n *\n * @return a previous result before an undo.\n * @throws EmptyStackException when there is no previous one.\n */\n int[][][] redo() throws EmptyStackException;\n\n /**\n * Set the stacks for undo and redo. Add a new element to the undo stack, and clear the redo\n * stack.\n * @param add the image in 3D array to be added to the stack.\n */\n void setStack(int[][][] add);\n}", "public RenderedImage create(ParameterBlock paramBlock,\n RenderingHints renderHints) {\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);\n\n\n // Get BorderExtender from renderHints if any.\n BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);\n\n KernelJAI unRotatedKernel =\n (KernelJAI)paramBlock.getObjectParameter(0);\n KernelJAI kJAI = unRotatedKernel.getRotatedKernel();\n\n\tRenderedImage source = paramBlock.getRenderedSource(0);\n\n return new LCErodeOpImage(source,\n extender,\n renderHints,\n layout,\n kJAI);\n }", "public void create(int [][] arr) {\n //default background image\n gc.drawImage(bg0, 0, 0);\n gc.drawImage(bg0, 1024,0);\n\n // traverses 2D array to creat map\n for(int i = 0; i < arr.length; i++) {\n for(int j = 0; j < arr[0].length; j++) {\n if(arr[i][j] == 0) {\n //blank space, for reference\n } else if(arr[i][j] == 1) { // make IndestructibleObject\n IndestructibleObject object = new IndestructibleObject(img0, j*64, i*64);\n mapList.add(object);\n } else if(arr[i][j] == 2) { // make DestructibleObject\n DestructibleObject object = new DestructibleObject(img1, j*64, i*64);\n mapList.add(object);\n } else if(arr[i][j] == 3) { // make power up\n PowerUpObject object = new PowerUpObject(img2, j*64+1, i*64, 1);\n powerList.add(object);\n } else if(arr[i][j] == 4) { // make power up\n PowerUpObject object = new PowerUpObject(img3, j*64+1, i*64, 2);\n powerList.add(object);\n } else if(arr[i][j] == 5) { // make power up\n PowerUpObject object = new PowerUpObject(img4, j*64+1, i*64, 3);\n powerList.add(object);\n } else if(arr[i][j] == 6) { // make power up\n PowerUpObject object = new PowerUpObject(img5, j*64+1, i*64, 4);\n powerList.add(object);\n }\n }\n }\n }", "private void run2DC(int numImages) {\r\n\r\n this.buildProgressBar();\r\n int totalComputation = numImages * numIterations;\r\n int computationCount = 0;\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = new int[2];\r\n extents[0] = srcImage.getExtents()[0];\r\n extents[1] = srcImage.getExtents()[1];\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n length = xDim * yDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 2.5D image set\r\n sigmas = new float[2];\r\n sigmas[0] = sigmas[1] = stdDev;\r\n\r\n makeKernels1D(false);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n\r\n int startIndex;\r\n for (int imgNumber = 0; imgNumber < numImages; imgNumber++) {\r\n startIndex = 4 * imgNumber * length;\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, startIndex, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, startIndex, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, startIndex, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (computationCount) /\r\n (totalComputation - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n computationCount++;\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1,startIndex, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2,startIndex, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3,startIndex, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n } // end for (imgNumber = 0; ...)\r\n destImage.calcMinMax();\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public Pixmap(ByteBuffer buffer, int width, int height){\n if(!buffer.isDirect()) throw new ArcRuntimeException(\"Pixmaps may only use direct/native ByteBuffers!\");\n\n this.width = width;\n this.height = height;\n this.pixels = buffer;\n this.handle = -1;\n\n buffer.position(0).limit(buffer.capacity());\n }", "private GDIWindowSurfaceData(WComponentPeer paramWComponentPeer, SurfaceType paramSurfaceType) {\n/* 242 */ super(paramSurfaceType, paramWComponentPeer.getDeviceColorModel()); int m;\n/* 243 */ ColorModel colorModel = paramWComponentPeer.getDeviceColorModel();\n/* 244 */ this.peer = paramWComponentPeer;\n/* 245 */ int i = 0, j = 0, k = 0;\n/* */ \n/* 247 */ switch (colorModel.getPixelSize()) {\n/* */ case 24:\n/* */ case 32:\n/* 250 */ if (colorModel instanceof DirectColorModel) {\n/* 251 */ byte b = 32; break;\n/* */ } \n/* 253 */ m = 24;\n/* */ break;\n/* */ \n/* */ default:\n/* 257 */ m = colorModel.getPixelSize(); break;\n/* */ } \n/* 259 */ if (colorModel instanceof DirectColorModel) {\n/* 260 */ DirectColorModel directColorModel = (DirectColorModel)colorModel;\n/* 261 */ i = directColorModel.getRedMask();\n/* 262 */ j = directColorModel.getGreenMask();\n/* 263 */ k = directColorModel.getBlueMask();\n/* */ } \n/* 265 */ this\n/* 266 */ .graphicsConfig = (Win32GraphicsConfig)paramWComponentPeer.getGraphicsConfiguration();\n/* 267 */ this.solidloops = this.graphicsConfig.getSolidLoops(paramSurfaceType);\n/* */ \n/* */ \n/* 270 */ Win32GraphicsDevice win32GraphicsDevice = (Win32GraphicsDevice)this.graphicsConfig.getDevice();\n/* 271 */ initOps(paramWComponentPeer, m, i, j, k, win32GraphicsDevice.getScreen());\n/* 272 */ setBlitProxyKey(this.graphicsConfig.getProxyKey());\n/* */ }", "public static FixedFrameVector3DBasics newXZOnlyFixedFrameVector3DBasics(ReferenceFrame referenceFrame)\n {\n return new FixedFrameVector3DBasics()\n {\n private double x, z;\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return referenceFrame;\n }\n\n @Override\n public double getX()\n {\n return x;\n }\n\n @Override\n public double getY()\n {\n return 0.0;\n }\n\n @Override\n public double getZ()\n {\n return z;\n }\n\n @Override\n public void setX(double x)\n {\n this.x = x;\n }\n\n @Override\n public void setY(double y)\n {\n }\n\n @Override\n public void setZ(double z)\n {\n this.z = z;\n }\n\n @Override\n public String toString()\n {\n return EuclidCoreIOTools.getTuple3DString(this);\n }\n };\n }", "public BlitQueue(SDLSurface src, int count) {\n\tthis.src = src;\n\tSystem.out.println(\"count=\" + count);\n\n\tByteBuffer buf = null;\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.srcX = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.srcY = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.srcWidth = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.srcHeight = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.dstX = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.dstY = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.dstWidth = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.dstHeight = buf.asIntBuffer();\n }", "public BranchGroup InitPj3d(int mWinWidth, int mWinHeight)\r\n\t{\t\r\n\t\t//toolbox = new PJ3DToolbox();\r\n\t\tsetLayout( new BorderLayout( ) );\r\n\t\t//parent.width = 640;\r\n\t\t//parent.resize(640, 480);\r\n\r\n\t\t//Frame frame = new Frame(\"pj3d\");\r\n\t frame.pack();\r\n\t frame.show();\r\n\t frame.setSize(mWinWidth, mWinHeight);\r\n\r\n\t GraphicsConfiguration gc = parent.getGraphicsConfiguration();\r\n\t \r\n\t // default colors\r\n\t backgroundColor = new Color3f(0f, 0f, 0f);\r\n\t ambientColor = new Color3f(0.2f, 0.2f, 0.2f);\r\n\t diffuseColor = new Color3f(0.8f, 0.8f, 0.8f);\r\n\t emissiveColor = new Color3f(0.5f, 0.5f, 0.5f);\r\n\t specularColor = new Color3f(1.0f, 1.0f, 1.0f);\r\n\t textColor = new Color3f(0.5f, 0.5f, 0.5f);\r\n\t shininess = DEFAULTCOLOR;\r\n\t alpha = 0.0f;\r\n\t \r\n\t // default background um spaeter drauf zugreifen zu koennen\r\n\t //bg = new Background();\r\n\t bg = InitBackground();\r\n\t \r\n\t mb = new Pj3dScene(frame, gc, bg);\r\n\t branch = mb.InitBranch();\r\n\t \r\n\t // get the canvas3d to add the mouse and keylisteners\r\n\t canvas = mb.getMBCanvas3D();\r\n\t canvas.addKeyListener(this);\r\n\t canvas.addMouseListener(this);\r\n\t canvas.addMouseMotionListener(this);\r\n\t frame.add( \"Center\", canvas );\r\n\t \r\n\t frame.show( );\r\n\t frame.addWindowListener(new Pj3dWindowClosingAdapter(true));\r\n\t \r\n\t return branch;\r\n\t}", "public void set(RenderedImage[] images) {\n\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public CanvasComponent(FloatProperty video_source_ratio_property,WritableImage writable_image,WritablePixelFormat<ByteBuffer> pixel_format,int width,int height) {\r\n super(new CanvasBuffer(video_source_ratio_property, width, height));\r\n this.writable_image = writable_image;\r\n this.pixel_format = pixel_format;\r\n\r\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public FloatSampleBuffer(byte[] buffer, int offset, int byteCount,\n\t\t\tAudioFormat format) {\n\t\tthis(format.getChannels(), byteCount\n\t\t\t\t/ (format.getSampleSizeInBits() / 8 * format.getChannels()),\n\t\t\t\tformat.getSampleRate());\n\t\tinitFromByteArray(buffer, offset, byteCount, format);\n\t}", "public static BufferedImage[] createByteABGRFrames(Image img,int num) {\n\t\tBufferedImage[] bi = new BufferedImage[num];\n\t\tfor(int i=0; i<num; i++){\n\t\t\tbi[i] = new BufferedImage(img.getWidth(null)/num,img.getHeight(null),BufferedImage.TYPE_4BYTE_ABGR);\n\t\t\tGraphics g = bi[i].createGraphics();\n\t\t\tg.drawImage(img,-i*img.getWidth(null)/num,0,null);\n\t\t\tg.dispose();\n\t\t\t}\n\t\treturn bi;\n\t}", "@Override\n\tpublic boolean is3D() {\n\t\treturn true;\n\t}", "private void createImage(BufferedImage image) {\n texId.setId(glGenTextures());\n loaded = true;\n\n try {\n int[] pixels = new int[image.getHeight() * image.getWidth()];\n\n image.getRGB(0, 0, image.getWidth(), image.getHeight(), pixels, 0, image.getWidth());\n\n Window.console.println(\"Texture num : \" + texId.getId() + \" , loaded with path : \" + texId.getPath());\n\n ByteBuffer buffer = BufferUtils.createByteBuffer(image.getHeight() * image.getWidth() * 4);\n\n for (int i = 0; i < image.getHeight(); i++) {\n for (int j = 0; j < image.getWidth(); j++) {\n int pixel = pixels[i * image.getWidth() + j];\n buffer.put((byte) ((pixel >> 16) & 0xFF)); // RED\n buffer.put((byte) ((pixel >> 8) & 0xFF)); // GREEN\n buffer.put((byte) (pixel & 0xFF)); // BLUE\n buffer.put((byte) ((pixel >> 24) & 0xFF)); // ALPHA\n }\n }\n\n buffer.flip();\n\n this.width = image.getWidth();\n this.height = image.getHeight();\n\n setParam(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n setParam(GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n\n upload(buffer);\n GameManager.texManager.add(texId);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }", "@Override\r\n\tpublic int[][][] processImg(int[][][] threeDPix) {\n\t\tint imgRows = threeDPix.length;\r\n\t\tint imgCols = threeDPix[0].length;\r\n\t\tint [][][] data = new int[imgRows][imgCols][4];\r\n\t\t\r\n\t\tfor (int i=0; i<imgRows; i++){\r\n\t\t\tfor (int j=0; j<imgCols; j++){\r\n\t\t\t\tdata[i][j][0] = 255;\r\n\t\t\t\tif (type == WHITE_THROUGH){\r\n\t\t\t\t\tif (threeDPix[i][j][1] == 255){\r\n\t\t\t\t\t\tdata[i][j][1] = origin[i][j][1];\r\n\t\t\t\t\t\tdata[i][j][2] = origin[i][j][2];\r\n\t\t\t\t\t\tdata[i][j][3] = origin[i][j][3];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tdata[i][j][1] = 0;\r\n\t\t\t\t\t\tdata[i][j][2] = 0;\r\n\t\t\t\t\t\tdata[i][j][3] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tif (threeDPix[i][j][1] == 0){\r\n\t\t\t\t\t\tdata[i][j][1] = origin[i][j][1];\r\n\t\t\t\t\t\tdata[i][j][2] = origin[i][j][2];\r\n\t\t\t\t\t\tdata[i][j][3] = origin[i][j][3];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tdata[i][j][1] = 0;\r\n\t\t\t\t\t\tdata[i][j][2] = 0;\r\n\t\t\t\t\t\tdata[i][j][3] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "public VCImage getVCImage() throws ImageException {\r\n\tif (originalRGB==null && originalDouble==null){\r\n\t\tthrow new ImageException(\"data is not loaded\");\r\n\t}\r\n\t\r\n\tbyte bytepix[] = null;\r\n\t\r\n\t\r\n\tif (originalRGB!=null){\r\n\t\tint[] uniquePixelValues = getUniquePixelValues();\r\n\t\tif(uniquePixelValues.length >256){\r\n\t\t\tthrow new ImageException(\"VCImage can't have more than 256 pixel values\");\r\n\t\t}\r\n\t\tbytepix = new byte[originalRGB.length];\r\n\t\tfor (int i=0;i<originalRGB.length;i++){\r\n\t\t\tint oRGBIndex = -1;\r\n\t\t\tfor(int j=0;j<uniquePixelValues.length;j+= 1){\r\n\t\t\t\tif(uniquePixelValues[j] == originalRGB[i]){\r\n\t\t\t\t\toRGBIndex = j;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(oRGBIndex >= 0){\r\n\t\t\t\tbytepix[i] = ((byte)oRGBIndex);\r\n\t\t\t}else{\r\n\t\t\t\tthrow new ImageException(\"Unique Pixel value missing in originalRGB array\");\r\n\t\t\t}\r\n\t\t\t//int intPix = 0xffffff&originalRGB[i];\r\n\t\t\t//int red = intPix&0xff;\r\n\t\t\t//int green = (intPix>>8)&0xff;\r\n\t\t\t//int blue = (intPix>>16)&0xff;\r\n\t\t\t//byte pix = (byte)Math.max(red,Math.max(green,blue));\r\n\t\t\t//bytepix[i] = pix;\r\n\t\t}\r\n\t}else{\r\n\t\tbytepix = new byte[originalDouble.length];\r\n\t\tfor (int i=0;i<originalDouble.length;i++){\r\n\t\t\tbytepix[i] = (byte)(0xff&(int)originalDouble[i]);\r\n\t\t}\r\n\t}\r\n\tVCImageUncompressed vci = new VCImageUncompressed(null,bytepix,new Extent(getSizeX(),getSizeY(),getSizeZ()),getSizeX(),getSizeY(),getSizeZ());\r\n\treturn vci;\r\n}", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "public boolean is3D() {\n return _is3D;\n }", "public NativeImageFormat(Object imgData, int nChannels, int nRows, int nCols) {\r\n if (imgData instanceof short[]) {\r\n cmmFormat |= bytesSh(2);\r\n }\r\n else if (imgData instanceof byte[]) {\r\n cmmFormat |= bytesSh(1);\r\n }\r\n else\r\n // awt.47=First argument should be byte or short array\r\n throw new IllegalArgumentException(Messages.getString(\"awt.47\")); //$NON-NLS-1$\r\n\r\n cmmFormat |= channelsSh(nChannels);\r\n\r\n rows = nRows;\r\n cols = nCols;\r\n\r\n imageData = imgData;\r\n\r\n dataOffset = 0;\r\n }", "@Override\n public void init(float[] data) {\n this.data = data;\n\n //\n shapeArr = new Rectangle2D.Float[data.length];\n colorArr = new Color[data.length];\n pointArr = new Point2D.Float[data.length];\n }", "public static BufferedImage createByteABGRCopy(Image img) {\n\t\tBufferedImage bi = new BufferedImage(img.getWidth(null),img.getHeight(null),BufferedImage.TYPE_4BYTE_ABGR);\n\t\tGraphics g = bi.createGraphics();\n\t\tg.drawImage(img,0,0,null);\n\t\tg.dispose();\n\t\treturn bi;\n\t}", "BufferedImage buildImgBuf(Dimension d)\n\t{\n\tBufferedImage gBufImg= ImgFactory.getImg(500, 600); //new BufferedImage(dmX, dmY, BufferedImage.TYPE_INT_ARGB);\n\tGraphics2D g2=gBufImg.createGraphics();\n\tif (drawGraphics(g2, d, samples))\n\t\treturn gBufImg;\n\t\treturn null;\n\n\t}", "public FloatSampleBuffer() {\n\t\tthis(0, 0, 1);\n\t}", "private void read(double[][][] data) {\n // Verifies consistency of row lengths\n for (int i = 1; i < data.length; ++i) {\n if (data[i].length != data[i - 1].length) {\n throw new IllegalArgumentException(\"rows of data must be of same length\");\n }\n }\n\n width = data[0].length;\n height = data.length;\n // Extends width/height to the lowest multiple of 8 <= width/height\n int extWidth = width + Math.floorMod(8 - width, 8);\n int extHeight = height + Math.floorMod(8 - height, 8);\n\n alphaChannel = new int[extHeight][extWidth];\n double[][] yPlane = new double[extHeight][extWidth];\n double[][] cBPlane = new double[extHeight][extWidth];\n double[][] cRPlane = new double[extHeight][extWidth];\n\n // Fills in channels with values for data or values for a black pixel in yCbCr\n for (int x = 0; x < extHeight; ++x) {\n for (int y = 0; y < extWidth; ++y) {\n if (x < height && y < width) {\n alphaChannel[x][y] = (int) data[x][y][0];\n yPlane[x][y] = data[x][y][1];\n cBPlane[x][y] = data[x][y][2];\n cRPlane[x][y] = data[x][y][3];\n }\n else {\n // Default values if x and y are not in bounds of data\n alphaChannel[x][y] = 0xFF;\n yPlane[x][y] = 0x10;\n cBPlane[x][y] = 0x80;\n cRPlane[x][y] = 0x80;\n }\n }\n }\n\n // Downsamples chrominance channels and compresses both chrominance and luminance\n yChannel = compress(yPlane);\n cBChannel = compress(downsample(cBPlane));\n cRChannel = compress(downsample(cRPlane));\n }", "public interface Image {\n\n /**\n * Get number of pixels horizontally\n *\n * @return int number of pixels horizontally\n */\n int getWidth();\n\n /**\n * Get number of pixels vertically\n *\n * @return int number of pixels vertically\n */\n int getHeight();\n\n /**\n * Get the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the red value\n */\n int getRed(int x, int y);\n\n\n /**\n * Get the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the green value\n */\n int getGreen(int x, int y);\n\n /**\n * Get the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the blue value\n */\n int getBlue(int x, int y);\n\n /**\n * Set the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setRed(int x, int y, int value);\n\n\n /**\n * Set the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setGreen(int x, int y, int value);\n\n /**\n * Set the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setBlue(int x, int y, int value);\n}", "public void initFromByteArray(byte[] buffer, int offset, int byteCount,\n\t\t\tAudioFormat format) {\n\t\tinitFromByteArray(buffer, offset, byteCount, format, LAZY_DEFAULT);\n\t}", "public int getTransparency() {\n/* 148 */ return this.bufImg.getColorModel().getTransparency();\n/* */ }", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "FloatBuffer getInterleavedBuffers(float[] posDat, float[] colDat, float[]\n normDat, float[] texDat) {\n if (colDat == null && texDat == null) {\n throw new IllegalArgumentException(\"no color or texture\");\n }\n // interleaving pX,pY,pZ,r,g,b,a,nX,nY,nZ,u,v // 12*4 = 48bytes\n int posIndx = 0;\n int colIndx = 0;\n int norIndx = 0;\n int texIndx = 0;\n int size = posDat.length + normDat.length;\n size += (colDat != null) ? colDat.length : 0;\n size += (texDat != null) ? texDat.length : 0;\n int step = 3 + 3 + ((colDat != null) ? 4 : 0) + ((texDat != null) ? 2 : 0);\n float[] interleavedData = new float[size];\n// Log.e(\"InterleavedBuffers\", \"size=\" + size + \", step=\" + step);\n int i = 0;\n while(i < size){\n interleavedData[i + 0] = posDat[posIndx + 0];\n interleavedData[i + 1] = posDat[posIndx + 1];\n interleavedData[i + 2] = posDat[posIndx + 2];\n posIndx += 3;\n i += 3;\n if (colDat != null) {\n interleavedData[i + 0] = colDat[colIndx + 0];\n interleavedData[i + 1] = colDat[colIndx + 1];\n interleavedData[i + 2] = colDat[colIndx + 2];\n interleavedData[i + 3] = colDat[colIndx + 3];\n colIndx += 4;\n i += 4;\n }\n interleavedData[i + 0] = normDat[norIndx + 0];\n interleavedData[i + 1] = normDat[norIndx + 1];\n interleavedData[i + 2] = normDat[norIndx + 2];\n norIndx += 3;\n i += 3;\n if (texDat != null) {\n interleavedData[i + 0] = texDat[texIndx + 0];\n interleavedData[i + 1] = texDat[texIndx + 1];\n texIndx += 2;\n i += 2;\n }\n }\n final FloatBuffer buffer;\n\n buffer = floatArrayToFloatBuffer(interleavedData);\n\n return buffer;\n }", "public ComponentSampleModel(int dataType, int w, int h, int pixelStride, int scanlineStride,\n int bandOffsets[]) {\n super(dataType, w, h, bandOffsets.length);\n this.dataType = dataType;\n this.pixelStride = pixelStride;\n this.scanlineStride = scanlineStride;\n this.bandOffsets = (int[]) bandOffsets.clone();\n numBands = this.bandOffsets.length;\n if (pixelStride < 0) {\n throw new IllegalArgumentException(\"Pixel stride must be >= 0\");\n }\n // TODO - bug 4296691 - remove this check\n if (scanlineStride < 0) {\n throw new IllegalArgumentException(\"Scanline stride must be >= 0\");\n }\n if (numBands < 1) {\n throw new IllegalArgumentException(\"Must have at least one band.\");\n }\n if ((dataType < DataBuffer.TYPE_BYTE) || (dataType > DataBuffer.TYPE_DOUBLE)) {\n throw new IllegalArgumentException(\"Unsupported dataType.\");\n }\n bankIndices = new int[numBands];\n for (int i = 0; i < numBands; i++) {\n bankIndices[i] = 0;\n }\n verify();\n }", "ImageImpl (byte [] bytes) {\n\tint cnt = bytes.length / 2;\n\tint size = (bytes.length + 1) / 2;\n\tdata = new short [size];\n\tint bi = 0;\n\t\n\tfor (int i = 0; i < cnt; i++) {\n\t data [i] = (short) (((((int) bytes [bi]) & 0x0ff) << 8)\n\t\t\t\t | (((int) bytes [bi+1]) & 0x0ff));\n\t bi += 2;\n\t}\n\t\n\tif (size > cnt)\n\t data [cnt] = (short) ((((int) bytes [bi]) & 0x0ff) << 8);\n\n\tbitmap = new Bitmap (data);\n }", "public JPEGImage(BufferedImage image) {\n double[][][] yCbCrData = new double[image.getHeight()][image.getWidth()][];\n for (int x = 0; x < image.getWidth(); ++x) {\n for (int y = 0; y < image.getHeight(); ++y) {\n yCbCrData[y][x] = ImageUtils.toYCbCr(ImageUtils.channelArray(image.getRGB(x, y)));\n }\n }\n read(yCbCrData);\n }", "public BoundingBox3d() {\n reset();\n }" ]
[ "0.8258609", "0.80384076", "0.76004875", "0.6629802", "0.65151274", "0.6182161", "0.5963535", "0.5467783", "0.54321337", "0.5274543", "0.5233692", "0.5190846", "0.50438875", "0.49414572", "0.49052185", "0.4875808", "0.48592377", "0.4839053", "0.47967532", "0.4783798", "0.47828797", "0.47591782", "0.47482178", "0.4720747", "0.4659086", "0.46534148", "0.46416798", "0.46366662", "0.4634999", "0.46247467", "0.46050432", "0.4591433", "0.4587345", "0.45834666", "0.4578928", "0.45709094", "0.45530567", "0.4551795", "0.45482737", "0.4542425", "0.45219758", "0.45155036", "0.45102596", "0.45079532", "0.45074916", "0.4506784", "0.4503908", "0.4496102", "0.44950765", "0.44835678", "0.4463029", "0.44539404", "0.4434626", "0.4427112", "0.44107765", "0.4408345", "0.44077393", "0.44001564", "0.43901035", "0.4365288", "0.43643117", "0.43582237", "0.4343035", "0.43422893", "0.43402642", "0.43305942", "0.43275657", "0.4323305", "0.4317765", "0.4309236", "0.42816648", "0.42777666", "0.42773613", "0.42626482", "0.42622438", "0.4252088", "0.42520478", "0.42506397", "0.42481124", "0.42470306", "0.4246752", "0.4245967", "0.42419553", "0.42386168", "0.42332086", "0.42277154", "0.4213375", "0.4212051", "0.4209213", "0.42036477", "0.41979843", "0.4193072", "0.4190129", "0.41876674", "0.41838083", "0.41821504", "0.4179108", "0.4173833", "0.41721755", "0.41661802" ]
0.82054603
1
Constructs a 3D image component object using the specified format, RenderedImage array, byReference flag, and yUp flag. The image class is set to ImageClass.RENDERED_IMAGE if the byReference flag is true and any of the specified RenderedImages is not an instance of BufferedImage. In all other cases, the image class is set to ImageClass.BUFFERED_IMAGE.
public ImageComponent3D(int format, RenderedImage[] images, boolean byReference, boolean yUp) { ((ImageComponentRetained)this.retained).setByReference(byReference); ((ImageComponentRetained)this.retained).setYUp(yUp); ((ImageComponent3DRetained)this.retained).processParams(format, images[0].getWidth(), images[0].getHeight(), images.length); for (int i=0; i<images.length; i++) { ((ImageComponent3DRetained)this.retained).set(i, images[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth,\n\t\t\t boolean\tbyReference,\n\t\t\t boolean\tyUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "ImageComponent3D() {}", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "public RenderedImage create(ParameterBlock args,\n RenderingHints renderHints) {\n \n // Get the source image and the data type parameter.\n RenderedImage src = args.getRenderedSource(0);\n Integer datatype = (Integer)args.getObjectParameter(0);\n int type = datatype.intValue();\n\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);\n\n // If there is no change return the source image directly.\n if(layout == null && type == src.getSampleModel().getDataType()) {\n return src;\n }\n\n // Create or clone the ImageLayout.\n if(layout == null) {\n layout = new ImageLayout(src);\n } else {\n layout = (ImageLayout)layout.clone();\n }\n\n\tboolean isDataTypeChange = false;\n\n // Get prospective destination SampleModel.\n SampleModel sampleModel = layout.getSampleModel(src);\n\n // Create a new SampleModel if the type is not as desired.\n if (sampleModel.getDataType() != type) {\n int tileWidth = layout.getTileWidth(src);\n int tileHeight = layout.getTileHeight(src);\n int numBands = src.getSampleModel().getNumBands();\n\n SampleModel csm =\n RasterFactory.createComponentSampleModel(sampleModel,\n type,\n tileWidth,\n tileHeight,\n numBands);\n\n layout.setSampleModel(csm);\n\t isDataTypeChange = true;\n }\n\n\n // Check ColorModel.\n ColorModel colorModel = layout.getColorModel(null);\n if(colorModel != null &&\n !JDKWorkarounds.areCompatibleDataModels(layout.getSampleModel(src),\n colorModel)) {\n // Clear the mask bit if incompatible.\n layout.unsetValid(ImageLayout.COLOR_MODEL_MASK);\n }\n\n // Check whether anything but the ColorModel is changing.\n if (layout.getSampleModel(src) == src.getSampleModel() &&\n layout.getMinX(src) == src.getMinX() &&\n layout.getMinY(src) == src.getMinY() &&\n layout.getWidth(src) == src.getWidth() &&\n layout.getHeight(src) == src.getHeight() &&\n layout.getTileWidth(src) == src.getTileWidth() &&\n layout.getTileHeight(src) == src.getTileHeight() &&\n layout.getTileGridXOffset(src) == src.getTileGridXOffset() &&\n layout.getTileGridYOffset(src) == src.getTileGridYOffset()) {\n\n if(layout.getColorModel(src) == src.getColorModel()) {\n // Nothing changed: return the source directly.\n return src;\n } else {\n // Remove TileCache hint from RenderingHints if present.\n RenderingHints hints = renderHints;\n if(hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) {\n hints = new RenderingHints((Map)renderHints);\n hints.remove(JAI.KEY_TILE_CACHE);\n }\n\n // Only the ColorModel is changing.\n return new NullOpImage(src, layout, hints,\n OpImage.OP_IO_BOUND);\n }\n }\n\n\tif (isDataTypeChange == true) {\n\n\t // Add JAI.KEY_REPLACE_INDEX_COLOR_MODEL hint to renderHints\n\t if (renderHints == null) {\n\t\trenderHints = \n\t\t new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,\n\t\t\t\t Boolean.TRUE);\n\t\t\n\t } else if (!renderHints.containsKey(\n\t\t\t\t\tJAI.KEY_REPLACE_INDEX_COLOR_MODEL)) {\n\t\t// If the user specified a value for this hint, we don't\n\t\t// want to change that\n\t\trenderHints.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, \n\t\t\t\tBoolean.TRUE);\n\t }\n\t}\n\n return new CopyOpImage(src, renderHints, layout);\n }", "public void set(RenderedImage[] images) {\n\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public static com.jme.image.Image loadImage(InputStream fis, boolean flip, boolean exp32) throws\n IOException {\n byte red = 0;\n byte green = 0;\n byte blue = 0;\n byte alpha = 0;\n //open a stream to the file\n BufferedInputStream bis = new BufferedInputStream(fis, 8192);\n DataInputStream dis = new DataInputStream(bis);\n //Read the TGA header\n idLength = (short) dis.read();\n colorMapType = (short) dis.read();\n imageType = (short) dis.read();\n cMapStart = flipEndian(dis.readShort());\n cMapLength = flipEndian(dis.readShort());\n cMapDepth = (short) dis.read();\n xOffset = flipEndian(dis.readShort());\n yOffset = flipEndian(dis.readShort());\n width = flipEndian(dis.readShort());\n height = flipEndian(dis.readShort());\n pixelDepth = (short) dis.read();\n imageDescriptor = (short) dis.read();\n //Skip image ID\n if (idLength > 0)\n bis.skip(idLength);\n // Allocate image data array\n byte[] rawData = null;\n int dl;\n if ((pixelDepth == 32)||(exp32)) {\n rawData = new byte[width * height * 4];\n dl=4;\n } else {\n rawData = new byte[width * height * 3];\n dl=3;\n }\n int rawDataIndex = 0;\n \n // Faster than doing a 24-or-32 check on each individual pixel,\n // just make a seperate loop for each.\n if (pixelDepth == 24)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n if(dl==4) {\n // create an alpha channel\n rawData[rawDataIndex++] = (byte)255;\n }\n \n }\n }\n else if (pixelDepth == 32)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n alpha = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n rawData[rawDataIndex++] = alpha;\n }\n }\n fis.close();\n //Get a pointer to the image memory\n ByteBuffer scratch = ByteBuffer.allocateDirect(rawData.length);\n scratch.clear();\n scratch.put(rawData);\n scratch.rewind();\n // Create the jme.image.Image object\n com.jme.image.Image textureImage = new com.jme.image.Image();\n if (dl == 4)\n textureImage.setType(com.jme.image.Image.RGBA8888);\n else\n textureImage.setType(com.jme.image.Image.RGB888);\n textureImage.setWidth(width);\n textureImage.setHeight(height);\n textureImage.setData(scratch);\n return textureImage;\n }", "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "ImageTranscoder mo28916a(ImageFormat cVar, boolean z);", "public RenderedImage create(ParameterBlock paramBlock,\n RenderingHints renderHints) {\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);\n\n\n // Get BorderExtender from renderHints if any.\n BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);\n\n KernelJAI unRotatedKernel =\n (KernelJAI)paramBlock.getObjectParameter(0);\n KernelJAI kJAI = unRotatedKernel.getRotatedKernel();\n\n\tRenderedImage source = paramBlock.getRenderedSource(0);\n\n return new LCErodeOpImage(source,\n extender,\n renderHints,\n layout,\n kJAI);\n }", "@Override\n void createRetained() {\n this.retained = new ImageComponent3DRetained();\n this.retained.setSource(this);\n }", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "public Surface(int var1, int var2, int var3, Component var4) {\n super();\n this.interlace = false;\n this.loggedIn = false;\n this.field_731 = var4;\n this.field_744 = var2;\n this.field_746 = var1;\n this.field_726 = this.field_723 = var1;\n this.field_727 = this.field_724 = var2;\n this.field_725 = var1 * var2;\n this.pixels = new int[var1 * var2];\n this.spritePixels = new int[var3][];\n this.field_742 = new boolean[var3];\n this.spriteColoursUsed = new byte[var3][];\n this.spriteColourList = new int[var3][];\n this.field_736 = new int[var3];\n this.field_737 = new int[var3];\n this.spriteWidthFull = new int[var3];\n this.field_741 = new int[var3];\n this.field_738 = new int[var3];\n this.field_739 = new int[var3];\n if(var1 > 1 && var2 > 1 && var4 != null) {\n this.field_728 = new DirectColorModel(32, 16711680, '\\uff00', 255);\n int var5 = this.field_723 * this.field_724;\n int var6 = 0;\n if(field_759 || var6 < var5) {\n do {\n this.pixels[var6] = 0;\n ++var6;\n } while(var6 < var5);\n }\n\n this.field_732 = var4.createImage(this);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n }\n\n }", "public interface ImageRenderer {\n /** Set displayed image from ImageProvider. This method is recommended,\n * because it allows the Rendered to choose the most efficient transfer\n * format. \n */\n void setImageFromSpec(ImageProvider spec);\n\n /** Set displayed image from buffered image. */\n void setImage(BufferedImage i);\n \n /** \n * Specify whether rendering should keep the aspect ratio of the image. \n * If no, it well be stretched to the display surface. If yes, borders\n * may occur, if the aspect ratio of surface and source image are different.\n * The default is false.\n */\n public void setKeepAspectRatio(boolean keepAspect);\n \n /**\n * Setter for property imageLocation.\n * @param imageLocation New value of property imageLocation.\n */\n void setImageLocation(URL imageLocation) throws IOException;\n\n /**\n * Setter for property imageResource.\n * @param imageResource New value of property imageResource.\n */\n void setImageResource(String imageResource) throws IOException;\n\n}", "public RenderedImage[] getRenderedImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getRenderedImage();\n }", "public static interface Updater {\n\t/**\n\t * Updates image data that is accessed by reference.\n\t * This method is called by the updateData method of an\n\t * ImageComponent object to effect\n\t * safe updates to image data that\n\t * is referenced by that object. Applications that wish to modify\n\t * such data must implement this method and perform all updates\n\t * within it.\n\t * <br>\n\t * NOTE: Applications should <i>not</i> call this method directly.\n\t *\n\t * @param imageComponent the ImageComponent object being updated.\n\t * @param index index of the image to be modified.\n\t * @param x starting X offset of the subregion.\n\t * @param y starting Y offset of the subregion.\n\t * @param width width of the subregion.\n\t * @param height height of the subregion.\n\t *\n\t * @see ImageComponent3D#updateData\n\t */\n\tpublic void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);\n }", "private void initImage() {\n this.image = (BufferedImage)this.createImage(DisplayPanel.COLS, DisplayPanel.ROWS);\n this.r.setRect(0, 0, DisplayPanel.ROWS, DisplayPanel.COLS);\n this.paint = new TexturePaint(this.image,\n this.r);\n }", "private void run3DC() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, 0, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, 0, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, 0, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) /\r\n (numIterations - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude3D(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude3D(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude3D(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage3D(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage3D(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage3D(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1, 0, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2, 0, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3, 0, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n destImage.calcMinMax();\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public Tile3D(Context context, int id, float w, float h) {\n\t // Setup vertex array buffer. Vertices in float. A float has 4 bytes\n\t ByteBuffer vbb = ByteBuffer.allocateDirect(12 * 4);\n\t vbb.order(ByteOrder.nativeOrder()); // Use native byte order\n\t vertexBuffer = vbb.asFloatBuffer(); // Convert from byte to float\n\t \n\t imageFileID = id;\n\t bitmap = BitmapFactory.decodeStream(context.getResources().openRawResource(imageFileID));\n\t //bitmap \n\t /*InputStream is= context.getResources().openRawResource(imageFileIDs);\n\t try {\n\t bitmap = BitmapFactory.decodeStream(is);\n\n\t } finally {\n\t //Always clear and close\n\t try {\n\t is.close();\n\t is = null;\n\t } catch (IOException e) {\n\t }\n\t }*/\n\t int imgWidth = bitmap.getWidth();\n\t int imgHeight = bitmap.getHeight();\n\t float faceWidth = w;\n\t float faceHeight = h;\n\t // Adjust for aspect ratio\n\t if (imgWidth > imgHeight) {\n\t faceHeight = faceHeight * imgHeight / imgWidth; \n\t }\n\t else {\n\t faceWidth = faceWidth * imgWidth / imgHeight;\n\t }\n\t float faceLeft = -faceWidth / 2;\n\t float faceRight = -faceLeft;\n\t float faceTop = faceHeight / 2;\n\t float faceBottom = -faceTop;\n\t \n\t \n\t \n\t // Define the vertices for this face\n\t float[] vertices = {\n\t faceLeft, faceBottom, 0.0f, // 0. left-bottom-front\n\t faceRight, faceBottom, 0.0f, // 1. right-bottom-front\n\t faceLeft, faceTop, 0.0f, // 2. left-top-front\n\t faceRight, faceTop, 0.0f, // 3. right-top-front\n\t };\n\t vertexBuffer.put(vertices); // Copy data into buffer\n\t\t vertexBuffer.position(0); // Rewind\n\t \n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t \n\t texBuffer.put(texCoords);\n\t \n\t texBuffer.position(0); // Rewind\n\t \n\t }", "public RenderedImage createRendering(RenderContext renderContext) {\n/* 245 */ AffineTransform gn2dev, usr2dev = renderContext.getTransform();\n/* */ \n/* */ \n/* 248 */ if (usr2dev == null) {\n/* 249 */ usr2dev = new AffineTransform();\n/* 250 */ gn2dev = usr2dev;\n/* */ } else {\n/* 252 */ gn2dev = (AffineTransform)usr2dev.clone();\n/* */ } \n/* */ \n/* */ \n/* 256 */ AffineTransform gn2usr = this.node.getTransform();\n/* 257 */ if (gn2usr != null) {\n/* 258 */ gn2dev.concatenate(gn2usr);\n/* */ }\n/* */ \n/* 261 */ Rectangle2D bounds2D = getBounds2D();\n/* */ \n/* 263 */ if (this.cachedBounds != null && this.cachedGn2dev != null && this.cachedBounds.equals(bounds2D) && gn2dev.getScaleX() == this.cachedGn2dev.getScaleX() && gn2dev.getScaleY() == this.cachedGn2dev.getScaleY() && gn2dev.getShearX() == this.cachedGn2dev.getShearX() && gn2dev.getShearY() == this.cachedGn2dev.getShearY()) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 272 */ double deltaX = usr2dev.getTranslateX() - this.cachedUsr2dev.getTranslateX();\n/* */ \n/* 274 */ double deltaY = usr2dev.getTranslateY() - this.cachedUsr2dev.getTranslateY();\n/* */ \n/* */ \n/* */ \n/* */ \n/* 279 */ if (deltaX == 0.0D && deltaY == 0.0D)\n/* */ {\n/* 281 */ return (RenderedImage)this.cachedRed;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 286 */ if (deltaX == (int)deltaX && deltaY == (int)deltaY)\n/* */ {\n/* 288 */ return (RenderedImage)new TranslateRed(this.cachedRed, (int)Math.round(this.cachedRed.getMinX() + deltaX), (int)Math.round(this.cachedRed.getMinY() + deltaY));\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 301 */ if (bounds2D.getWidth() > 0.0D && bounds2D.getHeight() > 0.0D) {\n/* */ \n/* 303 */ this.cachedUsr2dev = (AffineTransform)usr2dev.clone();\n/* 304 */ this.cachedGn2dev = gn2dev;\n/* 305 */ this.cachedBounds = bounds2D;\n/* 306 */ this.cachedRed = (CachableRed)new GraphicsNodeRed8Bit(this.node, usr2dev, this.usePrimitivePaint, renderContext.getRenderingHints());\n/* */ \n/* */ \n/* 309 */ return (RenderedImage)this.cachedRed;\n/* */ } \n/* */ \n/* 312 */ this.cachedUsr2dev = null;\n/* 313 */ this.cachedGn2dev = null;\n/* 314 */ this.cachedBounds = null;\n/* 315 */ this.cachedRed = null;\n/* 316 */ return null;\n/* */ }", "private void run3D() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBuffer[];\r\n float resultBuffer[];\r\n float gaussianBuffer[];\r\n float gradientBuffer[];\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n sourceBuffer = new float[length];\r\n resultBuffer = new float[length];\r\n gaussianBuffer = new float[length];\r\n gradientBuffer = new float[length];\r\n } catch (OutOfMemoryError e){\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n srcImage.exportData(0, length, sourceBuffer);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n algoSepConvolver = new AlgorithmSeparableConvolver(gaussianBuffer, sourceBuffer,\r\n extents, xDataRound, yDataRound, zDataRound, srcImage.isColorImage());\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) / (numIterations - 1) * 100)), activeImage);\r\n }\r\n\r\n algoSepConvolver.run();\r\n gradientMagnitude3D(gaussianBuffer, gradientBuffer);\r\n upDateImage3D(resultBuffer, sourceBuffer, gradientBuffer);\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n for (int i = 0; i < length; i++) { sourceBuffer[i] = resultBuffer[i]; }\r\n }\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n algoSepConvolver.finalize();\r\n algoSepConvolver = null;\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n destImage.importData(0, resultBuffer, true);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "private BufferedImage user_space(BufferedImage image) {\n // create new_img with the attributes of image\n BufferedImage new_img = new BufferedImage(image.getWidth(),\n image.getHeight(), BufferedImage.TYPE_3BYTE_BGR);\n Graphics2D graphics = new_img.createGraphics();\n graphics.drawRenderedImage(image, null);\n graphics.dispose(); // release all allocated memory for this image\n return new_img;\n }", "public FramebufferObject(GL2 gl, Texture2D.Format format, Texture2D.Datatype datatype, int width, int height, int colorTextureCount, boolean makeDepthTexture, boolean rectTextures) throws OpenGLException\n\t{\n\t\t/* Sanity check. */\n\t\tif (colorTextureCount == 0 && !makeDepthTexture)\n\t\t{\n\t\t\tthrow new OpenGLException(\"It is not valid to make an FBO with no color buffers and no depth buffer.\");\n\t\t}\n\t\t\n\t\tint maxColorTextures[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_MAX_COLOR_ATTACHMENTS, maxColorTextures, 0);\n\t\tif (colorTextureCount > maxColorTextures[0])\n\t\t{\n\t\t\tthrow new OpenGLException(\"Cannot create an FBO with \" + colorTextureCount + \" render targets. Your graphics card only supports \" + maxColorTextures[0] + \".\");\n\t\t}\n\t\t\n\t\tmWidth = width;\n\t\tmHeight = height;\n\t\t\n\t\t/* Create OpenGL FBO. */\n\t\tint names[] = new int[1];\n\t\tgl.glGenFramebuffers(1, names, 0);\n\t\tmHandle = names[0];\n\t\t\n\t\t/* Remember previous FBO binding, and then bind this one. */\n\t\tint previousBinding[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING, previousBinding, 0);\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, mHandle);\n\t\t\n\t\t/* Create and attach color textures. */\n\t\tmColorTextures = new Texture2D[colorTextureCount];\n\t\t\n\t\tfor (int i = 0; i < colorTextureCount; ++i)\n\t\t{\n\t\t\tmColorTextures[i] = new Texture2D(gl, format, datatype, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_COLOR_ATTACHMENT0 + i, mColorTextures[i].getTextureTarget(), mColorTextures[i].getHandle(), 0);\n\t\t}\n\t\t\n\t\t/* Create and attach depth texture, if requested. */\n\t\tif (makeDepthTexture)\n\t\t{\n\t\t\tmDepthTexture = new Texture2D(gl, Format.DEPTH, Datatype.INT32, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_DEPTH_ATTACHMENT, mDepthTexture.getTextureTarget(), mDepthTexture.getHandle(), 0);\n\t\t}\n\n\t\t/* Make sure everything is set up properly. */\n\t\tint status = gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER);\n\t\tif (status != GL2.GL_FRAMEBUFFER_COMPLETE)\n\t\t{\n\t\t\tthrow new OpenGLException(\"Framebuffer incomplete: \" + status + \".\");\n\t\t}\n\t\t\n\t\t/* Restore whatever FBO was bound before this function was called. */\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, previousBinding[0]);\n\t}", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "public AlternateImageRenderer() {\r\n super(\"\");\r\n images = new Image[2];\r\n try {\r\n Resources imageRes = UIDemoMain.getResource(\"images\");\r\n images[0] = imageRes.getImage(\"sady.png\");\r\n images[1] = imageRes.getImage(\"smily.png\");\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n setUIID(\"ListRenderer\");\r\n }", "RenderedImage createRendering(Long id, \n\t\t\t\t SerializableState renderContextState) \n\tthrows RemoteException;", "public Texture build() {\n FrameBuffer buffer = new FrameBuffer(Format.RGB565, maxWidth, maxHeight, false);\n buffer.begin();\n for (TextureRegion texture : textures) {\n \t// TODO Créer la texture dynamiquement\n }\n buffer.end();\n Texture result = buffer.getColorBufferTexture();\n buffer.dispose();\n return result;\n }", "protected ImageToAlignData(final Image image, final Mat imageData, final BasicSampleFactory basicSampleFactory) {\n\t\tsuper(image, imageData);\n\t\tinitializeVertices(basicSampleFactory);\n\t\twritableImage.set(\n\t\t\t\tnew WritableImage(\n\t\t\t\t\t\tthis.image.get().getPixelReader(),\n\t\t\t\t\t\t(int) this.image.get().getWidth(),\n\t\t\t\t\t\t(int) this.image.get().getHeight())\n\t\t);\n\t\ttriangle = new Triangle(image.getWidth(), image.getHeight());\n\t\tinitializeTriangle();\n\t}", "public void set(int index, RenderedImage image) {\n\n checkForLiveOrCompiled();\n // For RenderedImage the width and height checking is done in the retained.\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "private void createBackBuffer() {\r\n GraphicsConfiguration gc = getGraphicsConfiguration();\r\n volatileImg = gc.createCompatibleVolatileImage(getWidth(), getHeight());\r\n// volatileImg.setAccelerationPriority(1);\r\n }", "@Override\n protected void putImageBuffer(BufferedImage input) \n {\n // Load data in. \n for (int y = 0; y < height; y++) \n {\n for (int x = 0; x < width; x++) \n {\n\t\tdouble h = getHeight(input, x, y);\n\t\tdouble du = 0;\n\t\tdouble dv = 0;\n\t\t\n\t\tif(x > 0)\n\t\t{\t\n\t\t du += h - getHeight(input, x-1, y);\n\t\t}\n\t\tif(x < width - 1)\n\t\t{\n\t\t du += getHeight(input, x+1, y) - h;\n\t\t}\n\t\tif(y > 0)\n\t\t{\n\t\t dv += h - getHeight(input, x , y-1);\n\t\t}\n\t\tif(y < height - 1)\n\t\t{\n\t\t dv += getHeight(input, x, y+1) - h;\n\t\t}\n\t\t\n\t\tdouble u = -du;\n\t\tdouble v = -dv;\n\t\tdouble w = 0.25;\n \n\t\tdouble n = Math.sqrt(u*u + v*v + w*w);\n\n byte a = (byte)(h * 255.0);\n byte r = (byte)((u / n + 1.0) / 2.0 * 255.0);\n byte g = (byte)((v / n + 1.0) / 2.0 * 255.0);\n byte b = (byte)((w / n + 1.0) / 2.0 * 255.0);\n \n int index = (x + y * allocatedWidth) * 4;\n pixelData.put(index++, r);\n pixelData.put(index++, g);\n pixelData.put(index++, b);\n pixelData.put(index , a);\n }\n }\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public interface Image {\n\n /**\n * Get number of pixels horizontally\n *\n * @return int number of pixels horizontally\n */\n int getWidth();\n\n /**\n * Get number of pixels vertically\n *\n * @return int number of pixels vertically\n */\n int getHeight();\n\n /**\n * Get the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the red value\n */\n int getRed(int x, int y);\n\n\n /**\n * Get the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the green value\n */\n int getGreen(int x, int y);\n\n /**\n * Get the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the blue value\n */\n int getBlue(int x, int y);\n\n /**\n * Set the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setRed(int x, int y, int value);\n\n\n /**\n * Set the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setGreen(int x, int y, int value);\n\n /**\n * Set the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setBlue(int x, int y, int value);\n}", "public Card(String type, int number, BufferedImage backImage, \n BufferedImage turnedImage, BufferedImage overImage, int w, int h){\n\tthis.type = type;\n\tthis.number = number;\n\tthis.backImage = backImage;\n this.image = backImage;\n\tthis.turnedImage = turnedImage;\n this.overImage = overImage;\n\tthis.w = w;\n\tthis.h = h;\n \n // Create the VolatileImages\n try{\n backVimImage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n vimage = VolatileImageLoader.loadFromBufferedImage(\n backImage, Transparency.TRANSLUCENT);\n turnedVimImage = VolatileImageLoader.loadFromBufferedImage(\n turnedImage, Transparency.TRANSLUCENT);\n overVimImage = VolatileImageLoader.loadFromBufferedImage(\n overImage, Transparency.TRANSLUCENT);\n }\n catch(IOException ioe){\n System.err.println(\"Could not convert from BufferedImage \" +\n \"to VolatileImage\");\n }\n }", "public BufferedImage doInBackground() {\n \t \tsynchronized(v2d)\r\n \t \t{\r\n \t \tv2d.simulate();\r\n \t \t\r\n \t \t//developers can use this functuon of 2d viwers to skip long renderings that are not actually updating the image\r\n \t \tif (v2d.skipRendering())\r\n \t \t\treturn finalImage;\r\n \t \t\r\n \t \t//this if is for the first time the two buffers are initialized and for when the user changes the size of the container; in this case a new image of the good size needs to be created.\r\n \t \tif (image == null || image.getWidth() != thisContainer.getWidth() || image.getHeight() != thisContainer.getHeight())\r\n \t \t\t\r\n \t \t\tif (thisContainer.getWidth() < 0 || thisContainer.getHeight() < 0)\r\n \t \t\t\treturn finalImage;\r\n \t \t\t\r\n \t \t\t//image = thisPanel.getGraphicsConfiguration().createCompatibleImage(thisPanel.getWidth(),thisPanel.getHeight());\r\n \t \t\timage = new BufferedImage(thisContainer.getWidth(), thisContainer.getHeight(),BufferedImage.TYPE_INT_ARGB);\r\n \t \t\t\r\n \t \t \t \t \t \t\r\n \t \t\tGraphics2D gc = image.createGraphics();\r\n \t \t\t\r\n \t \t\tgc.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);\r\n \t \t\t\r\n\t gc.setColor(v2d.backgroundColor());\r\n\t gc.fillRect(0, 0, thisContainer.getWidth(), thisContainer.getHeight()); // fill in background\r\n\t \r\n\t if (!v2d.antialiasingSet)\r\n\t {\r\n\t \tif (v2d.antialiasing)\r\n\t \t{\t \t\t\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_ANTIALIAS_ON);\r\n\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_ANTIALIAS_OFF);\r\n\r\n\t \t gc.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\r\n\t \t RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);\r\n\t \t}\r\n\t }\r\n\t \r\n\t zoomOriginX = this.thisContainer.getWidth()/2;\r\n\t zoomOriginY = this.thisContainer.getHeight()/2;\r\n\t \r\n\t //sets the proper transformation for the Graphics context that will passed into the rendering function\t \r\n\t \r\n\t \r\n\t gc.setTransform(AffineTransform.getTranslateInstance(zoomOriginX, zoomOriginY));\t \r\n\t gc.transform(AffineTransform.getScaleInstance(zoom,zoom));\t\t \r\n\t gc.transform(AffineTransform.getTranslateInstance(translatex-zoomOriginX, translatey-zoomOriginY));\r\n\t \r\n\t \r\n\t transform = gc.getTransform();\r\n \t \t\t \t\t\r\n \t \t\t\t\r\n\t v2d.render(gc);\r\n\t gc.setColor(Color.black);\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t gc.setTransform(AffineTransform.getTranslateInstance(0, 0));\r\n\t \t\r\n\t if ((new Date().getTime()- lastMouseMove) > v2d.getTooltipDelay())\r\n\t \tif (v2d.getToolTipEnabled() && v2d.getToolTipText().length() > 0)\r\n\t \t\tv2d.renderTooltip(gc);\r\n \t \t}\r\n\t \r\n \t return image;\r\n \t }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public BufferedImage toBufferedImage() {\n double[][] yData = decompress(yChannel);\n double[][] cBData = upsample(decompress(cBChannel));\n double[][] cRData = upsample(decompress(cRChannel));\n\n BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);\n for (int x = 0; x < width; ++x) {\n for (int y = 0; y < height; ++y) {\n double[] aYCbCr = {alphaChannel[y][x], yData[y][x], cBData[y][x], cRData[y][x]};\n int aRGB = ImageUtils.channelInt(ImageUtils.toRGB(aYCbCr));\n image.setRGB(x, y, aRGB);\n }\n }\n return image;\n }", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public void renderOutputImageManager()\n {\n if(input != null)\n {\n if(toRerender)\n {\n background(background);\n mosaic.newCanvas();\n mosaic.setPreviewCanvas();\n mosaic.drawImage();\n renderPreview();\n renderHover();\n image(infoGraphics,10,270);\n toRerender = false;\n }\n }\n else\n {\n background(background);\n image(infoGraphics,40,270);\n }\n }", "public Image getThree();", "private void createImage(BufferedImage image) {\n texId.setId(glGenTextures());\n loaded = true;\n\n try {\n int[] pixels = new int[image.getHeight() * image.getWidth()];\n\n image.getRGB(0, 0, image.getWidth(), image.getHeight(), pixels, 0, image.getWidth());\n\n Window.console.println(\"Texture num : \" + texId.getId() + \" , loaded with path : \" + texId.getPath());\n\n ByteBuffer buffer = BufferUtils.createByteBuffer(image.getHeight() * image.getWidth() * 4);\n\n for (int i = 0; i < image.getHeight(); i++) {\n for (int j = 0; j < image.getWidth(); j++) {\n int pixel = pixels[i * image.getWidth() + j];\n buffer.put((byte) ((pixel >> 16) & 0xFF)); // RED\n buffer.put((byte) ((pixel >> 8) & 0xFF)); // GREEN\n buffer.put((byte) (pixel & 0xFF)); // BLUE\n buffer.put((byte) ((pixel >> 24) & 0xFF)); // ALPHA\n }\n }\n\n buffer.flip();\n\n this.width = image.getWidth();\n this.height = image.getHeight();\n\n setParam(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n setParam(GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n\n upload(buffer);\n GameManager.texManager.add(texId);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }", "public OutputImageManager(PImage img, Tile[] tiles, int tileSize, int pdfScale, float evenRowShift, float oddRowShift, int background)\n {\n this.mosaic = null;\n this.background = background;\n this.tiles = tiles;\n this.evenRowShift = evenRowShift;\n this.oddRowShift = oddRowShift;\n this.tileSize = tileSize;\n this.pdfScale = pdfScale;\n this.infoGraphics = loadImage(\"keys.png\");\n toRerender = true;\n }", "public @NotNull Image flipV()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int i = this.height - 1, offsetSize = 0; i >= 0; i--)\n {\n long src = srcPtr + Integer.toUnsignedLong(i * this.width) * this.format.sizeof;\n \n MemoryUtil.memCopy(src, dstPtr + offsetSize, bytesPerLine);\n offsetSize += bytesPerLine;\n }\n \n this.data.free();\n this.data = output;\n this.mipmaps = 1;\n }\n return this;\n }", "public Bitmap3DColor(\n float v1Red, float v1Green, float v1Blue, float v1Alpha,\n float v2Red, float v2Green, float v2Blue, float v2Alpha,\n float v3Red, float v3Green, float v3Blue, float v3Alpha,\n float v4Red, float v4Green, float v4Blue, float v4Alpha\n ) {\n if(\n v1Red < 0 || v1Red > 1 || v2Red < 0 || v2Red > 1 || v3Red < 0 || v3Red > 1 || v4Red < 0 || v4Red > 1 ||\n v1Green < 0 || v1Green > 1 || v2Green < 0 || v2Green > 1 || v3Green < 0 || v3Green > 1 || v4Green < 0 || v4Green > 1 ||\n v1Blue < 0 || v1Blue > 1 || v2Blue < 0 || v2Blue > 1 || v3Blue < 0 || v3Blue > 1 || v4Blue < 0 || v4Blue > 1 ||\n v1Alpha < 0 || v1Alpha > 1 || v2Alpha < 0 || v2Alpha> 1 || v3Alpha < 0 || v3Alpha > 1 || v4Alpha < 0 || v4Alpha > 1\n ) {\n throw new IllegalArgumentException(\"Values should be between 0 and 1\");\n }\n\n float[] colors = {\n v1Red, v1Green, v1Blue, v1Alpha,\n v2Red, v2Green, v2Blue, v2Alpha,\n v3Red, v3Green, v3Blue, v3Alpha,\n v4Red, v4Green, v4Blue, v4Alpha\n };\n\n ByteBuffer clb = ByteBuffer.allocateDirect(colors.length * 4);\n clb.order(ByteOrder.nativeOrder());\n this.colorBuffer = clb.asFloatBuffer();\n this.colorBuffer.put(colors);\n this.colorBuffer.position(0);\n }", "public static FixedFrameVector3DBasics newXZOnlyFixedFrameVector3DBasics(ReferenceFrame referenceFrame)\n {\n return new FixedFrameVector3DBasics()\n {\n private double x, z;\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return referenceFrame;\n }\n\n @Override\n public double getX()\n {\n return x;\n }\n\n @Override\n public double getY()\n {\n return 0.0;\n }\n\n @Override\n public double getZ()\n {\n return z;\n }\n\n @Override\n public void setX(double x)\n {\n this.x = x;\n }\n\n @Override\n public void setY(double y)\n {\n }\n\n @Override\n public void setZ(double z)\n {\n this.z = z;\n }\n\n @Override\n public String toString()\n {\n return EuclidCoreIOTools.getTuple3DString(this);\n }\n };\n }", "public boolean is3D() {\n return _is3D;\n }", "public static void experimentThree(boolean reuse) {\n System.out.println(\"EXPERIMENT THREE: cache=\" + reuse);\n ArrayList<BufferedImage> images = new ArrayList<BufferedImage>();\n\n images.add(new BufferedImage(2048, 2048, BufferedImage.TYPE_INT_ARGB));\n\n System.out.println(\"--> Objects Initialized!\");\n\n long timeBefore = System.nanoTime();\n\n for (int i = 0; i < 10000; i++) {\n BufferedImage img = null;\n\n if (reuse) {\n img = images.get(0).getSubimage(0, 0, 640, 480);\n\n // THIS TAKES SO MUCH TIME!!!\n clearImage(img);\n } else {\n img = new BufferedImage(640, 480, BufferedImage.TYPE_INT_ARGB);\n }\n\n Graphics2D g2 = img.createGraphics();\n\n g2.fillRect(10, 10, 600, 400);\n\n g2.dispose();\n }\n\n long timeAfter = System.nanoTime();\n\n System.out.println(\"--> Duration: \" + (timeAfter - timeBefore) * 1E-9);\n }", "private final void \n renderIt( ) {\n \t\n \tif( this.mImageCount > 0 || this.mLineCount > 0 || this.mRectCount > 0 || this.mTriangleCount > 0 ) {\n\t \n \t\tthis.mVertexBuffer.clear(); //clearing the buffer\n\t GLES11.glEnableClientState( GLES11.GL_VERTEX_ARRAY );\n\n\t //if there are images to render\n\t if( this.mImageCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mImageCount * 16 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glEnableClientState( GLES11.GL_TEXTURE_COORD_ARRAY ); //copy the texture coordinates into the GPU\n\t\t GLES11.glEnable(GLES11.GL_TEXTURE_2D);\n\t\t this.mVertexBuffer.position( 2 ); //put buffer position to the texture coordinates\n\t\t GLES11.glTexCoordPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer );\n\t\t this.mIndexBuffer.limit(this.mImageCount * 6); //DESKTOP VERSION ONLY\n\t\t GLES11.glDrawElements( GLES11.GL_TRIANGLES, this.mImageCount * BitsGLImage.INDICES_PER_SPRITE, GLES11.GL_UNSIGNED_SHORT, this.mIndexBuffer );\n\t \tGLES11.glDisable(GLES11.GL_TEXTURE_2D);\n\t\t GLES11.glDisableClientState( GLES11.GL_TEXTURE_COORD_ARRAY );\n\t }\n\t \n\t //if there are lines to render\n\t if( this.mLineCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mLineCount * 4 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 0, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glDrawArrays( GLES11.GL_LINES, 0, this.mLineCount * 2 ); //* 2 because every line got 2 points\n\t }\n\n\t //if there are rects to render\n\t if( this.mRectCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mRectCount * 8 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t this.mIndexBuffer.limit(this.mRectCount * 6); //DESKTOP VERSION ONLY\n\t \t GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, this.mVertexBuffer); //copy the vertices into the GPU\t \t \n\t \t \tGLES11.glDrawElements( GLES11.GL_TRIANGLES, this.mRectCount * BitsGLImage.INDICES_PER_SPRITE, GLES11.GL_UNSIGNED_SHORT, this.mIndexBuffer );\n\t }\n\t \n\t //if there are triangles to render\n\t if( this.mTriangleCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mTriangleCount * 12 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glEnableClientState( GLES11.GL_TEXTURE_COORD_ARRAY ); //copy the texture coordinates into the GPU\n\t\t GLES11.glEnable(GLES11.GL_TEXTURE_2D);\n\t\t this.mVertexBuffer.position( 2 ); //put buffer position to the texture coordinates\n\t\t GLES11.glTexCoordPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //16 == byteoffset -> es liegen 2 werte dazwischen\n\t\t GLES11.glDrawArrays( GLES11.GL_TRIANGLES, 0, this.mTriangleCount * 3 ); //* 2 because every line got 2 points\t \t\n\t\t GLES11.glDisable(GLES11.GL_TEXTURE_2D);\n\t\t GLES11.glDisableClientState( GLES11.GL_TEXTURE_COORD_ARRAY );\n\t }\n\t \n\t GLES11.glDisableClientState( GLES11.GL_VERTEX_ARRAY );\n \t\t\n\t //resetting counters\n\t this.mBufferIndex = 0;\n\t \tthis.mImageCount = 0;\n\t \tthis.mLineCount = 0;\n\t \tthis.mRectCount = 0;\n\t \tthis.mTriangleCount = 0;\n \t}\n }", "void imageData(int width, int height, int[] rgba);", "public VCImage getVCImage() throws ImageException {\r\n\tif (originalRGB==null && originalDouble==null){\r\n\t\tthrow new ImageException(\"data is not loaded\");\r\n\t}\r\n\t\r\n\tbyte bytepix[] = null;\r\n\t\r\n\t\r\n\tif (originalRGB!=null){\r\n\t\tint[] uniquePixelValues = getUniquePixelValues();\r\n\t\tif(uniquePixelValues.length >256){\r\n\t\t\tthrow new ImageException(\"VCImage can't have more than 256 pixel values\");\r\n\t\t}\r\n\t\tbytepix = new byte[originalRGB.length];\r\n\t\tfor (int i=0;i<originalRGB.length;i++){\r\n\t\t\tint oRGBIndex = -1;\r\n\t\t\tfor(int j=0;j<uniquePixelValues.length;j+= 1){\r\n\t\t\t\tif(uniquePixelValues[j] == originalRGB[i]){\r\n\t\t\t\t\toRGBIndex = j;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(oRGBIndex >= 0){\r\n\t\t\t\tbytepix[i] = ((byte)oRGBIndex);\r\n\t\t\t}else{\r\n\t\t\t\tthrow new ImageException(\"Unique Pixel value missing in originalRGB array\");\r\n\t\t\t}\r\n\t\t\t//int intPix = 0xffffff&originalRGB[i];\r\n\t\t\t//int red = intPix&0xff;\r\n\t\t\t//int green = (intPix>>8)&0xff;\r\n\t\t\t//int blue = (intPix>>16)&0xff;\r\n\t\t\t//byte pix = (byte)Math.max(red,Math.max(green,blue));\r\n\t\t\t//bytepix[i] = pix;\r\n\t\t}\r\n\t}else{\r\n\t\tbytepix = new byte[originalDouble.length];\r\n\t\tfor (int i=0;i<originalDouble.length;i++){\r\n\t\t\tbytepix[i] = (byte)(0xff&(int)originalDouble[i]);\r\n\t\t}\r\n\t}\r\n\tVCImageUncompressed vci = new VCImageUncompressed(null,bytepix,new Extent(getSizeX(),getSizeY(),getSizeZ()),getSizeX(),getSizeY(),getSizeZ());\r\n\treturn vci;\r\n}", "void setFormat(ImageFormat format);", "@NativeType(\"bgfx_frame_buffer_handle_t\")\n public static short bgfx_create_frame_buffer_from_attachment(@NativeType(\"bgfx_attachment_t const *\") BGFXAttachment.Buffer _attachment, @NativeType(\"bool\") boolean _destroyTextures) {\n return nbgfx_create_frame_buffer_from_attachment((byte)_attachment.remaining(), _attachment.address(), _destroyTextures);\n }", "public Sprite(Texture[] newImageArray) throws Exception{\n\t\timages = newImageArray;\n\t\tcheckSizes();\n\t}", "public void testSetImage() {\n byte[] image = new byte[] {1, 2, 3};\n byte[] expResult = new byte[] {1, 2, 3};\n CLImage instance = new CLImage();\n instance.setImage(image);\n assertEquals(expResult.length, instance.image.length);\n for (int i = 0; i < expResult.length; ++i)\n {\n assertEquals(expResult[i], instance.image[i]);\n }\n }", "@Override\n\tpublic boolean is3D() {\n\t\treturn true;\n\t}", "void invoke(@NativeType(\"bgfx_callback_interface_t *\") long _this, @NativeType(\"uint32_t\") int _width, @NativeType(\"uint32_t\") int _height, @NativeType(\"uint32_t\") int _pitch, @NativeType(\"bgfx_texture_format_t\") int _format, @NativeType(\"bool\") boolean _yflip);", "public void gameRender(int x, int y) throws IOException {\n if (dbImage == null) {\n dbImage = new BufferedImage(PWIDTH, PHEIGHT, BufferedImage.TYPE_INT_RGB);\n if (dbImage == null) {\n System.out.println(\"dbImage is null\");\n return;\n } else {\n graphics = dbImage.getGraphics();\n }\n }\n\n int width = backgroundImage.getWidth();//width of background image\n graphics.drawImage(backgroundImage, x, y, null);//draws image on main game panel\n graphics.drawImage(backgroundImage, x + width, y, null);//draws image off screen for scrolling reasons\n if (nextStage == 1) {\n graphics.drawImage(planetImageTransformed, PWIDTH - planetImageTransformed.getWidth() / 2, PHEIGHT / 2 - planetImageTransformed.getHeight() / 2, null);\n }\n for (int i = 0; i < Ship.health; i++) { //i < 5\n graphics.drawImage(health.getHealthimage(), 30 * i, 10, 30, 30, null); //20*i, 10, 30, 30, nul \n }\n\n for (int j = 0; j < Shield.count; j++) { // draw Shield Image\n graphics.drawImage(shield.getShieldImage(), 30 * j, 80, 30, 30, null);\n }\n\n if (nextStage == 1) {\n graphics.drawImage(planetImageTransformed, PWIDTH - planetImageTransformed.getWidth() / 2, PHEIGHT / 2 - planetImageTransformed.getHeight() / 2, null);\n }\n\n if (stageChange) {\n if (nextStage == 1) {\n currentStage = new Stage1();\n planetImageTransformed = planetImage;\n scaleCount = 0;\n scale = 1;\n collectFromStage();\n }\n\n if (nextStage == 2) {\n currentStage = new Stage2();\n collectFromStage();\n }\n\n if (nextStage == 3) {\n currentStage = new Stage3();\n collectFromStage();\n }\n\n stageChange = false;\n }\n\n if (cutsceneChange) {\n\n if (nextCutscene == 1) {\n currentCutscene = new Cutscene1();\n currentStage = new Stage2();\n collectFromCutscenes();\n Animator.cutsceneRunning = true;\n\n }\n if (nextCutscene == 2) {\n currentCutscene = new Cutscene2();\n currentStage = new Stage3();\n collectFromCutscenes();\n Animator.cutsceneRunning = true;\n }\n cutsceneChange = false;\n }\n\n synchronized (gameData.figures) {//runs through each game figures and renders them\n GameFigure f;\n for (GameFigure figure : gameData.figures) {\n f = (GameFigure) figure;\n f.render(graphics);\n }\n }\n }", "Image createImage();", "@Override\n\tpublic final IRenderable load() {\n\t\tImage img = loadImage();\n\t\tassertImageIsValid(img);\n\t\treturn new ImageRenderable(img);\n\t}", "public interface RenderMesh extends NvDisposeable{\n\n void initlize(MeshParams params);\n\n void draw();\n\n public static class MeshParams{\n public int posAttribLoc;\n public int norAttribLoc;\n public int texAttribLoc;\n public int tanAttribLoc = -1; // tangent attribution is diabled default.\n }\n}", "public\r\n AERenderImgAction()\r\n {\r\n super(\"AERenderImg\", new VersionID(\"2.4.23\"), \"Temerity\",\r\n \"Renders an image or image sequence from an After Effects scene using aerender.\");\r\n \r\n {\r\n ActionParam param = \r\n new StringActionParam\r\n (aCompName,\r\n \"The name of the After Effects Comp to create.\",\r\n \"Comp1\");\r\n addSingleParam(param);\r\n }\r\n \r\n {\r\n ActionParam param =\r\n new LinkActionParam\r\n (aAfterFXScene, \r\n \"The source After Effects scene node.\", \r\n null);\r\n addSingleParam(param);\r\n }\r\n \r\n {\r\n LayoutGroup layout = new LayoutGroup(true);\r\n layout.addEntry(aAfterFXScene);\r\n layout.addEntry(aCompName);\r\n setSingleLayout(layout);\r\n }\r\n \r\n /*\r\n * Support for OS X should work, but it untested. \r\n */\r\n addSupport(OsType.MacOS);\r\n addSupport(OsType.Windows);\r\n removeSupport(OsType.Unix);\r\n }", "@LargeTest\n public void testColorCube3DIntrinsic() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE_3D_INTRINSIC);\n runTest(ta, TestName.COLOR_CUBE_3D_INTRINSIC.name());\n }", "public three_d_object(int ob_x, int ob_y, int ob_z, int new_ob_size, int new_ob_rotation_X,\n\t\t\t\t\tint new_ob_rotation_Y) {\n\t\t\t\tx = ob_x;\n\t\t\t\ty = ob_y;\n\t\t\t\tz = ob_z;\n\t\t\t\tob_size = new_ob_size;\n\t\t\t\trotation_X = new_ob_rotation_X;\n\t\t\t\trotation_Y = new_ob_rotation_Y;\n\n\t\t\t}", "public abstract void setImageFormat(String format);", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "public void render () {\n image (img, xC, yC, xLength * getPixelSize(), yLength * getPixelSize());\n }", "public Image createImage() {\n if (source == null) {\n source = new MemoryImageSource(width, height, cModel, pixels, 0, width);\n source.setAnimated(true);\n }\n Image img = Toolkit.getDefaultToolkit().createImage(source);\n return img;\n }", "@SuppressWarnings({\"AndroidApiChecker\", \"FutureReturnValueIgnored\"})\n // setImage is used to place an animated file.\n // setImage takes arguments image, and augmentedImageIndex, which is used to index the list of renderables.\n public void setImage(AugmentedImage image, Integer augmentedImageIndex) {\n this.augmentedImage = image;\n\n if (!currentRenderable.isDone()) {\n CompletableFuture.allOf(currentRenderable)\n // in the case that more than one renderable is used to create a scene,\n // use CompletableFuture.allOf(currentRenderable, other renderables needed for the scene)\n .thenAccept((Void aVoid) -> setImage(image, augmentedImageIndex))\n .exceptionally(\n throwable -> {\n Log.e(TAG, \"Exception loading\", throwable);\n return null;\n });\n }\n\n // Set the anchor based on the center of the image.\n setAnchor(image.createAnchor(image.getCenterPose()));\n\n\n // creates the node\n // in the case that there is more than one renderable in the scene, run the code again, replacing\n // currentRenderable with the other renderables\n\n Node fullnode;\n\n fullnode = new Node();\n fullnode.setParent(this);\n fullnode.setWorldPosition(new Vector3((this.getWorldPosition().x + (nodePosition[augmentedImageIndex].x)), (this.getWorldPosition().y + (nodePosition[augmentedImageIndex].y)), (this.getWorldPosition().z + (nodePosition[augmentedImageIndex].z))));\n fullnode.setLocalScale(new Vector3(0.1f, 0.1f, 0.1f));\n Quaternion newQuaternion = Quaternion.axisAngle(new Vector3(nodeRotation[augmentedImageIndex].x, nodeRotation[augmentedImageIndex].y, nodeRotation[augmentedImageIndex].z), nodeRotation[augmentedImageIndex].q);\n fullnode.setLocalRotation(Quaternion.multiply(fullnode.getLocalRotation(), newQuaternion));\n fullnode.setRenderable(currentRenderable.getNow(null));\n\n }", "private BufferedImage CreateBuffedImage(WinFileMappingBuffer fm, boolean bWithAlphaChanle) {\n BitmapFileBuffer bitmap = new BitmapFileBuffer();\n if (!bitmap.Load(fm.getBuffer())) {\n return null;\n }\n return bitmap.GetBuffedImage(bWithAlphaChanle);\n }", "private native void initMultiImage(MagickImage[] images)\n\t\t\tthrows MagickException;", "public FrameBuffer(Texture texture, boolean hasDepth) {\r\n this.width = texture.getWidth();\r\n this.height = texture.getHeight();\r\n this.hasDepth = hasDepth;\r\n colorTexture = texture;\r\n// build();\r\n\r\n }", "public void renderInputImageManager()\n {\n background(background);\n if(resized != null)\n {\n imageMode(CENTER);\n image(resized,(width-150)/2+140,height/2);\n imageMode(CORNERS);\n }\n }", "private void createFromVCImage(VCImage vcImage) throws ImageException {\r\n\tsizeX = vcImage.getNumX();\r\n\tsizeY = vcImage.getNumY();\r\n\tsizeZ = vcImage.getNumZ();\r\n\tif (sizeX*sizeY*sizeZ!=vcImage.getPixels().length){\r\n\t\tthrow new ImageException(\"pixelData not properly formed\");\r\n\t}\r\n\toriginalRGB = new int[sizeX*sizeY*sizeZ];\r\n\tfor (int i=0;i<vcImage.getPixels().length;i++){\r\n\t\tint pixel = ((int)vcImage.getPixels()[i])&0xff;\r\n\t\toriginalRGB[i] = new java.awt.Color(pixel,pixel,pixel).getRGB();\r\n\t}\r\n\tbValid = true;\r\n\timageName = (vcImage.getVersion()!=null)?vcImage.getVersion().getName():\"unnamedImage\";\t\r\n}", "public @NotNull Image flipH()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n if (this.format != ColorFormat.RGBA)\n {\n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n // OPTION 1: Move pixels with memCopy()\n long src = Integer.toUnsignedLong(y * this.width + this.width - 1 - x) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(y * this.width + x) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, bytesPerLine);\n \n // OPTION 2: Just copy data pixel by pixel\n // output.put(y * this.width + x, this.data.getBytes(y * this.width + (this.width - 1 - x)));\n }\n }\n \n this.data.free();\n \n this.data = output;\n }\n else\n {\n // OPTION 3: Faster implementation (specific for 32bit pixels)\n // NOTE: It does not require additional allocations\n IntBuffer ptr = this.data.toBuffer().asIntBuffer();\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width / 2; x++)\n {\n int backup = ptr.get(y * this.width + x);\n ptr.put(y * this.width + x, ptr.get(y * this.width + this.width - 1 - x));\n ptr.put(y * this.width + this.width - 1 - x, backup);\n }\n }\n }\n this.mipmaps = 1;\n }\n \n return this;\n }", "private void updateImage() {\r\n \tfor(int i=0;i<rows;i++){\r\n for(int j=0;j<cols;j++){\r\n if(complexArray[i][j].escapeTime(RADIUS, maxIterations)!=-1){//the complex escaped\r\n mandelbrotColor[i][j]=new RGBColor(palette[complexArray[i][j].escapeTime(RADIUS, maxIterations)]);\r\n }\r\n else{\r\n mandelbrotColor[i][j]=palette[complexArray[i][j].escapeTime(RADIUS, maxIterations)+1];//the complex didnt escaped\r\n }\r\n }\r\n }\r\n }", "public void setReference(float[] reference){\n if(reference.length==3){\n referenceState[0]=reference[0];\n referenceState[1]=reference[1];\n referenceState[2]=reference[2];\n\n isStateSaved=true;\n\n if(referenceState[0]>Math.abs(referenceState[1])){\n isXZplane=true;\n } else{\n isXZplane=false;\n }\n }\n }", "public a(a imgSrc, J2KImageWriteParamJava wp) {\n/* 123 */ super((f)imgSrc);\n/* 124 */ this.f = wp.getComponentTransformation();\n/* 125 */ this.g = wp.getFilters();\n/* 126 */ this.e = imgSrc;\n/* */ }", "private void readImageRGB(int width, int height, String imgPath, BufferedImage img, boolean modFlag)\n\t{\n\t\ttry\n\t\t{\n\t\t\tint frameLength = width*height*3;\n\n\t\t\tFile file = new File(imgPath);\n\t\t\tRandomAccessFile raf = new RandomAccessFile(file, \"r\");\n\t\t\traf.seek(0);\n\n\t\t\tlong len = frameLength;\n\t\t\tbyte[] bytes = new byte[(int) len];\n\n\t\t\traf.read(bytes);\n\n\t\t\tdouble[][] yChannel = new double[height][width];\n\t\t\tdouble[][] uChannel = new double[height][width];\n\t\t\tdouble[][] vChannel = new double[height][width];\n\n\t\t\tint ind = 0;\n\t\t\tfor(int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\tfor(int x = 0; x < width; x++)\n\t\t\t\t{\n\t\t\t\t\tbyte a = 0;\n\t\t\t\t\tbyte r = bytes[ind];\n\t\t\t\t\tbyte g = bytes[ind+height*width];\n\t\t\t\t\tbyte b = bytes[ind+height*width*2]; \n\n\t\t\t\t\tint pix = 0xff000000 | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff);\n\t\t\t\t\t//int pix = ((a << 24) + (r << 16) + (g << 8) + b);\n\t\t\t\t\timg.setRGB(x,y,pix);\n\t\t\t\t\tind++;\n\n\t\t\t\t\tif(modFlag){\n\t\t\t\t\t\tint R = r & 0xFF;\n\t\t\t\t\t\tint G = g & 0xFF;\n\t\t\t\t\t\tint B = b & 0xFF;\n\n\t\t\t\t\t\tdouble[] yuvs = rgb2yuv(R, G, B);\n\t\t\t\t\t\tyChannel[y][x] = yuvs[0];\n\t\t\t\t\t\tuChannel[y][x] = yuvs[1];\n\t\t\t\t\t\tvChannel[y][x] = yuvs[2];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(modFlag){\n\n\t\t\t\t//up-sampling each yuv channel\n\t\t\t\tfor(int i = 0; i < height; i++) {\n\t\t\t\t\tfor(int j = 0; j < width; j++) {\n\t\t\t\t\t\tif(inY !=0){\n\t\t\t\t\t\t\tyChannel = channelSample(yChannel, inY, width, i, j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(inU != 0){\n\t\t\t\t\t\t\tuChannel = channelSample(uChannel, inU, width, i, j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(inV != 0){\n\t\t\t\t\t\t\tvChannel = channelSample(vChannel, inV, width, i, j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//init buckets befor quantization\n\t\t\t\tboolean qFlag = true;\n\t\t\t\tInteger[] bucket = null;\n\t\t\t\tif(inQ <= 256){\n\t\t\t\t\tdouble stepSize = 256/ (double) inQ;\n\t\t\t\t\tbucket = createBucketArray(stepSize);\n\t\t\t\t}else{\n\t\t\t\t\tqFlag = false;\n\t\t\t\t}\n\n\t\t\t\t//converting yuv to rgb, Quantization and writing image pixel by pixel\n\t\t\t\tfor(int i = 0; i < height; i++) {\n\t\t\t\t\tfor(int j = 0; j < width; j++) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint[] convertedRGB = yuv2rgb(yChannel[i][j], uChannel[i][j], vChannel[i][j]);\n\t\t\t\t\t\tint R = convertedRGB[0];\n\t\t\t\t\t\tint G = convertedRGB[1];\n\t\t\t\t\t\tint B = convertedRGB[2];\n\n\t\t\t\t\t\tif( qFlag) {\n\t\t\t\t\t\t\tint[] quantizedRGB = quantize(R, G, B, bucket);\n\t\t\t\t\t\t\tR = quantizedRGB[0];\n\t\t\t\t\t\t\tG = quantizedRGB[1];\n\t\t\t\t\t\t\tB = quantizedRGB[2];\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\t// int processedPixel = 0xff000000 | ((R & 0xff) << 16) | ((G & 0xff) << 8) | (B & 0xff);\n\t\t\t\t\t\tint processedPixel = 0xff000000 | ((R) << 16) | ((G) << 8) | (B);\n\t\t\t\t\t\timg.setRGB(j, i, processedPixel);\n\t\t\t\t\t\t// img.setRGB(i, j, processedPixel);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (FileNotFoundException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ImagesLoader(ImageFactory imageFactory) {\n this.imageFactory = imageFactory;\n }", "@Override\n\tprotected byte[] getReferenceImageData() {\n\t\treturn createBufferedImageData(resolveURI(refImageURI));\n\t}", "public NativeImageFormat(Object imgData, int nChannels, int nRows, int nCols) {\r\n if (imgData instanceof short[]) {\r\n cmmFormat |= bytesSh(2);\r\n }\r\n else if (imgData instanceof byte[]) {\r\n cmmFormat |= bytesSh(1);\r\n }\r\n else\r\n // awt.47=First argument should be byte or short array\r\n throw new IllegalArgumentException(Messages.getString(\"awt.47\")); //$NON-NLS-1$\r\n\r\n cmmFormat |= channelsSh(nChannels);\r\n\r\n rows = nRows;\r\n cols = nCols;\r\n\r\n imageData = imgData;\r\n\r\n dataOffset = 0;\r\n }", "protected ImageRenderer createRenderer() {\n\t\tImageRendererFactory rendFactory = new ConcreteImageRendererFactory();\n\t\t// ImageRenderer renderer = rendFactory.createDynamicImageRenderer();\n\t\treturn rendFactory.createStaticImageRenderer();\n\t}", "@Nonnull\n private BufferedImage createImage() {\n return new BufferedImage(getWidth(), getHeight(), getImageType().getType());\n }", "public void setBfImageByData(int [][][] data){\r\n\t\tBfImage = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);\r\n\t\tfor (int i = 0; i < width; i++) {\r\n\t\t\tfor (int j = 0; j < height; j++) {\r\n\t\t\t\tint [] rgb = data[j][i];\r\n\t\t\t\tif (rgb[0] == -1){\t//is transparent\r\n\t\t\t\t\tBfImage.setRGB(i, j, Transparency.TRANSLUCENT);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tBfImage.setRGB(i, j, Utils.getRGB(rgb[0], rgb[1], rgb[2]));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Image(MyColor [][] myImage) {\n originalImage = myImage; \n }", "private byte[] composeJPG(BufferedImage[] rgbBufferedImages) {\r\n\t\t// blue (index 2) is always available\r\n\t\tint width = rgbBufferedImages[BLUE_INDEX].getWidth();\r\n\t\tint height = rgbBufferedImages[BLUE_INDEX].getHeight();\r\n\t\tBufferedImage rgbImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\r\n\t\tint alpha = 0xFF;\r\n\t\tfor (int x = 0; x < width; x++) {\r\n\t\t\tfor(int y = 0; y < height; y++) {\r\n\t\t\t\tint red = rgbBufferedImages[RED_INDEX] != null ? rgbBufferedImages[RED_INDEX].getRGB(x, y) & 0xFF : 0;\r\n\t\t\t\tint green = rgbBufferedImages[GREEN_INDEX] != null ? rgbBufferedImages[GREEN_INDEX].getRGB(x, y) & 0xFF : 0;\r\n\t\t\t\tint blue = rgbBufferedImages[BLUE_INDEX].getRGB(x, y) & 0xFF;\r\n\t\t\t\trgbImage.setRGB(x, y, (alpha << 24) | (red << 16) | (green << 8) | blue);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbyte[] imageByteArray;\r\n\t\ttry(ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {\r\n\t\t\tImageIO.write( rgbImage, \"jpg\", byteArrayOutputStream );\r\n\t\t\tbyteArrayOutputStream.flush();\r\n\t\t\timageByteArray = byteArrayOutputStream.toByteArray();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new ImageNotFoundException(\"Output image could not be created.\");\r\n\t\t}\r\n\t\treturn imageByteArray;\r\n\t}", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "public void doImageRendering( int frame )\n\t{\n\t\tArrayColormap cmap = new ArrayColormap();\n\t\tColor color1 = new Color((int)red1.get(frame), (int)green1.get(frame), (int)blue1.get(frame) );\n\t\tColor color2 = new Color((int)red2.get(frame), (int)green2.get(frame), (int)blue2.get(frame) );\n\t\tColor color3 = new Color((int)red3.get(frame), (int)green3.get(frame), (int)blue3.get(frame) );\n\n\t\tcmap.setColor( 0, color2.getRGB() );\n\t\tcmap.setColor( 255, color1.getRGB() );\n\t\tcmap.setColorInterpolated(middleValue.get(), 0, 255, color3.getRGB() );\n\n\t\tfor( int j = 0; j < 256; j++ )\n\t\t\trbgLook[ j ] = cmap.getColor( (float) j / 255.0f ) & alpha_mask;\n\n\t\t//--- Do color replacement.\n\t\tBufferedImage source = getFlowImage();\n\t\tint[] pix = getBank( source );\n\t\tint rbg;\n\t\tint lumaValue;\n\t\tint a;\n\t\tint r;\n\t\tint g;\n\t\tint b;\n\n\t\tfor( int i = 0; i < pix.length; i++ )\n\t\t{\n\t\t\ta = ( pix[ i ] >> alpha ) & 0xff;\n\t\t\tr = ( pix[ i ] >> red ) & 0xff;\n\t\t\tg = ( pix[ i ] >> green ) & 0xff;\n\t\t\tb = ( pix[ i ] & 0xff );\n\n\t\t\tlumaValue = (( r + g + b ) * 255 ) / MAX_RGB;\n\t\t\trbg = rbgLook[ lumaValue ];\n\n\t\t\tpix[ i ] = a << alpha | rbg;\n\t\t}\n\n\t\tsendFilteredImage( source, frame );\n\n\t}", "void renderImages(String imageCategory) {\n\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n//\t\tboolean focusOnCmdSeq = true;\n//\t\tString selectedCmdSeq = MerUtils.cmdSeqFromFilename(selectedPanImageEntry.imageListEntry.getFilename());\t\t\n\t\tfor (int i=0; i<panImageList.length; i++) {\n\t\t\tPanImageEntry panEntry = panImageList[i];\n\t\t\tImageEntry entry = panEntry.imageListEntry;\n\t\t\tif ((!entry.enabled) || (!panEntry.draw))\n\t\t\t\tcontinue;\n\t\t\tif (!entry.getImageCategory().equalsIgnoreCase(imageCategory))\n\t\t\t\tcontinue;\n\t\t\tImageMetadataEntry metadataEntry = entry.getImageMetadataEntry();\n\t\t\tif (metadataEntry == null)\n\t\t\t\tcontinue;\n\t\t\tString filename = entry.getFilename();\n\t\t\tchar spacecraftIdChar = MerUtils.spacecraftIdCharFromFilename(filename);\n\t\t\tchar camera = MerUtils.cameraFromFilename(filename);\n\t\t\tchar cameraEye = MerUtils.cameraEyeFromFilename(filename);\n\t\t\tdouble twist = 0.0;\n\t\t\tdouble imageFOV = 10.0;\n\t\t\tdouble radius = 50.0;\n\t\t\tdouble toeInAz = 0.0;\n\t\t\tdouble\ttoeInEl = 0.0;\n\t\t\tint left = (metadataEntry.first_line_sample - 1) /* * metadataEntry.pixel_averaging_width*/;\n\t\t\tint width = metadataEntry.n_line_samples * metadataEntry.pixel_averaging_width;\n\t\t\tint top = (metadataEntry.first_line - 1) /* * metadataEntry.pixel_averaging_height*/;\n\t\t\tint height = metadataEntry.n_lines * metadataEntry.pixel_averaging_height;\n\t\t\t\n\t\t\t// Move downsampled images back\n\t\t\tif (metadataEntry.pixel_averaging_width > 1) {\n\t\t\t\tradius = 75.0;\n\t\t\t}\n/* needs to be activited by a key command\t\t\t\n\t\t\telse if ((focusOnCmdSeq) \n\t\t\t\t\t&& (!MerUtils.cmdSeqFromFilename(panEntry.imageListEntry.getFilename()).equalsIgnoreCase(selectedCmdSeq))) {\n\t\t\t\tradius = 75.0;\n\t\t\t}\t\t\t\n\t\t\t*/\n\t\t\t\n\t\t\tif (panEntry == selectedPanImageEntry) {\n\t\t\t\tif (focusMode)\n\t\t\t\t\tradius = 25.0;\n\t\t\t}\n\t\t\t\n\t\t\tif (camera == 'N') {\n\t\t\t\timageFOV = 45.1766; // the \"official\" FOV\n\t\t\t\tif (spacecraftIdChar == MerUtils.SPACECRAFT_ID_CHAR_OPPORTUNITY) {\n\t\t\t\t\tif (cameraEye == 'R' || cameraEye == 'r') {\n\t\t\t\t\t\ttwist = 0.25;\n\t\t\t\t\t\timageFOV = imageFOV * 1.012;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttwist = -0.1;\n\t\t\t\t\t\timageFOV = imageFOV * 1.006;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (spacecraftIdChar == MerUtils.SPACECRAFT_ID_CHAR_SPIRIT) {\n\t\t\t\t\t//if (params.viewMode != PanParams.VIEWMODE_RIGHT_RAW) {\n\t\t\t\t\t\ttwist = -0.7;\n\t\t\t\t\t//}\n\t\t\t\t\timageFOV = imageFOV * 1.012; //1.015;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (camera == 'P') {\n\t\t\t\timageFOV = 15.8412; // the official value\n\t\t\t\t/*if (params.viewMode != PanParams.VIEWMODE_RIGHT_RAW) {\n\t\t\t\t\t// compensate for toe-in left\n\t\t\t\t\tazimuthDeg += 1.0;\n\t\t\t\t\televationDeg += 0.3;\n\t\t\t\t}*/\t\t\t\t\t\n\t\t\t\t// TODO reverse toe in for right camera\n\t\t\t\t//toeInComp = 0.6;\n\t\t\t\tif (spacecraftIdChar == MerUtils.SPACECRAFT_ID_CHAR_OPPORTUNITY) {\n//\t\t\t\t\t\ttwistDeg = 0.3; // was 0.4;\n\t\t\t\t\ttwist = 0.3;\n\t\t\t\t\timageFOV = imageFOV * 1.015;\n\t\t\t\t\ttoeInAz = 1.1;\t\t\n\t\t\t\t\ttoeInEl = -0.35;\n\t\t\t\t}\n\t\t\t\telse if (spacecraftIdChar == MerUtils.SPACECRAFT_ID_CHAR_SPIRIT) {\n\t\t\t\t\ttwist = +0.0;\n\t\t\t\t\timageFOV = imageFOV * 1.015;\n\t\t\t\t\t//fovDeg = fovDeg * 1.015;\n\t\t\t\t\ttoeInAz = 0.0;\n\t\t\t\t\ttoeInEl = 0.0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble tranWidth = Math.sin(imageFOV * Math.PI / 360) * radius;\n\t\t\tfloat floatDistance = (float) (Math.cos(imageFOV * Math.PI / 360) * radius);\n\t\t\tfloat floatLeft = (float)(tranWidth * (left - 512) / 512);\n\t\t\tfloat floatTop = (float)(tranWidth * (512-(top+height)) / 512);\n\t\t\tfloat floatRight = (float)(tranWidth * (left+width-512) / 512);\n\t\t\tfloat floatBottom = (float)(tranWidth * (512-top) / 512);\n\t\t\t\n\t\t\tsetImageRotation((float)(metadataEntry.inst_az_rover + toeInAz), (float)(metadataEntry.inst_el_rover + toeInEl), (float)twist);\n\t\t\t\n\t\t\tif (panEntry.textureNumber >= 0) {\n\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, panEntry.textureNumber);\t\t\t\t\n\t\t\t\tGL11.glBegin(GL11.GL_QUADS);\n\t\t\t\tGL11.glTexCoord2f(0.0f, 0.0f);\n\t\t\t\tGL11.glVertex3f(floatLeft, floatTop, -floatDistance);\n\t\t\t\tGL11.glTexCoord2f(1.0f, 0.0f);\n\t\t\t\tGL11.glVertex3f(floatRight, floatTop, -floatDistance);\n\t\t\t\tGL11.glTexCoord2f(1.0f, 1.0f);\n\t\t\t\tGL11.glVertex3f(floatRight, floatBottom, -floatDistance);\n\t\t\t\tGL11.glTexCoord2f(0.0f, 1.0f);\n\t\t\t\tGL11.glVertex3f(floatLeft, floatBottom, -floatDistance);\t\t\t\t\n\t\t GL11.glEnd();\n\t\t \n\t\t if ((panEntry == selectedPanImageEntry) && focusMode) {\n\t\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);\t\t// no texture\n\t\t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n\t\t\t\t\tGL11.glBegin(GL11.GL_LINES);\n\t\t\t\t\tGL11.glVertex3f(floatLeft, floatTop, -floatDistance);\n\t\t\t\t\tGL11.glVertex3f(floatRight, floatTop, -floatDistance);\n\t\t\t\t\tGL11.glVertex3f(floatRight, floatTop, -floatDistance);\n\t\t\t\t\tGL11.glVertex3f(floatRight, floatBottom, -floatDistance);\n\t\t\t\t\tGL11.glVertex3f(floatRight, floatBottom, -floatDistance);\n\t\t\t\t\tGL11.glVertex3f(floatLeft, floatBottom, -floatDistance);\t\t\t\t\n\t\t\t\t\tGL11.glVertex3f(floatLeft, floatBottom, -floatDistance);\t\t\t\t\n\t\t\t\t\tGL11.glVertex3f(floatLeft, floatTop, -floatDistance);\n\t\t\t GL11.glEnd();\n\t\t }\n\t\t\t}\n\t\t\telse {\n\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);\t\t// no texture\n\t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n\t\t\t\tGL11.glBegin(GL11.GL_LINES);\n\t\t\t\tGL11.glVertex3f(floatLeft, floatTop, -floatDistance);\n\t\t\t\tGL11.glVertex3f(floatRight, floatTop, -floatDistance);\n\t\t\t\tGL11.glVertex3f(floatRight, floatTop, -floatDistance);\n\t\t\t\tGL11.glVertex3f(floatRight, floatBottom, -floatDistance);\n\t\t\t\tGL11.glVertex3f(floatRight, floatBottom, -floatDistance);\n\t\t\t\tGL11.glVertex3f(floatLeft, floatBottom, -floatDistance);\t\t\t\t\n\t\t\t\tGL11.glVertex3f(floatLeft, floatBottom, -floatDistance);\t\t\t\t\n\t\t\t\tGL11.glVertex3f(floatLeft, floatTop, -floatDistance);\n\t\t GL11.glEnd();\n\t\t\t}\n\t\t}\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\tstatic private final Image<RGBALegacyType> processRGBA(final Image<RGBALegacyType> img, final float[] m,\n\t\t\tfinal Mode mode, final OutOfBoundsStrategyFactory<RGBALegacyType> oobf) throws Exception {\n\t\tOutOfBoundsStrategyFactory<FloatType> ored, ogreen, oblue, oalpha;\n\t\tif (OutOfBoundsStrategyValueFactory.class.isAssignableFrom(oobf.getClass())) { // can't use instanceof\n\t\t\tfinal int val = ((OutOfBoundsStrategyValueFactory<RGBALegacyType>)oobf).getValue().get();\n\t\t\tored = new OutOfBoundsStrategyValueFactory<FloatType>(new FloatType((val >> 16) & 0xff));\n\t\t\togreen = new OutOfBoundsStrategyValueFactory<FloatType>(new FloatType((val >> 8) & 0xff));\n\t\t\toblue = new OutOfBoundsStrategyValueFactory<FloatType>(new FloatType(val & 0xff));\n\t\t\toalpha = new OutOfBoundsStrategyValueFactory<FloatType>(new FloatType((val >> 24) & 0xff));\n\t\t} else {\n\t\t\t// Jump into the pool!\n\t\t\ttry {\n\t\t\t\tored = oobf.getClass().newInstance();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Affine3D for RGBA: oops -- using a black OutOfBoundsStrategyValueFactory\");\n\t\t\t\tored = new OutOfBoundsStrategyValueFactory<FloatType>(new FloatType());\n\t\t\t}\n\t\t\togreen = ored;\n\t\t\toblue = ored;\n\t\t\toalpha = ored;\n\t\t}\n\t\treturn new RGBA(processReal(Compute.inFloats(new Red(img)), m, mode, ored),\n\t\t\t\t\t\tprocessReal(Compute.inFloats(new Green(img)), m, mode, ogreen),\n\t\t\t\t\t\tprocessReal(Compute.inFloats(new Blue(img)), m, mode, oblue),\n\t\t\t\t\t\tprocessReal(Compute.inFloats(new Alpha(img)), m, mode, oalpha)).asImage();\n\t}", "public static Texture readTexture(BufferedImage img) {\n\t\tint bytesPerPixel = -1, pix;\n\t\t\n\t\t// 3 or 4 bytes per pixel?\n\t\tif( img.getColorModel().hasAlpha() )\n\t\t\tbytesPerPixel = 4;\n\t\telse\n\t\t\tbytesPerPixel = 3;\n\t\n\t\t// Allocate a ByteBuffer\n\t\tByteBuffer unpackedPixels = \n\t\t\tByteBuffer.allocateDirect(img.getWidth() * img.getHeight() * bytesPerPixel);\n\t\t\n\t\t// Pack the pixels into the ByteBuffer in RGBA, 4 byte format.\n\t\tfor(int row = img.getHeight() - 1; row >= 0; row--) {\n\t\t\tfor (int col = 0; col < img.getWidth(); col++) {\n\t\t\t\tpix = img.getRGB(col,row); // Should return the pixel in format TYPE_INT_ARGB \n\t\t\t\tunpackedPixels.put((byte) ((pix >> 16) & 0xFF)); // red\n\t\t\t\tunpackedPixels.put((byte) ((pix >> 8 ) & 0xFF)); // green\n\t\t\t\tunpackedPixels.put((byte) ((pix ) & 0xFF)); // blue\n\t\t\t\tif (bytesPerPixel == 4) {\n\t\t\t\t\tunpackedPixels.put((byte) ((pix >> 24) & 0xFF)); // alpha\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(bytesPerPixel == 4 ) {\n\t\t\treturn new Texture(unpackedPixels,img.getWidth(), img.getHeight(), \n\t\t\t\t\tTexture.TEXTURE_4BYTE_RGBA);\n\t\t} else {\n\t\t\treturn new Texture(unpackedPixels,img.getWidth(), img.getHeight(), \n\t\t\t\t\tTexture.TEXTURE_3BYTE_RGB);\n\t\t}\n\t}", "public static VImage toVImage(BufferedImage image) {\n if (image.getType() != BufferedImage.TYPE_3BYTE_BGR) {\n throw new IllegalArgumentException(\"Only BufferedImages of type TYPE_3BYTE_BGR can currently be converted to VImage\");\n }\n\n byte[] buffer = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();\n return ValueFactory.newVImage(image.getHeight(), image.getWidth(), buffer);\n }", "@Override\n public void init(GLAutoDrawable drawable) {\n\n g3d = new SwingGraphics3D(drawable.getGL().getGL3());\n g3d.setClearColor(new Vector3f(0.2f));\n\n PipelineDefinition def = new PipelineDefinition();\n\n def.directionalLightCount = 2;\n\n pipeline = new Pipeline(def, new SimpleGLVertexShader(def), new SimpleGLFragmentShader(def));\n\n g3d.createPipeline(pipeline);\n g3d.setPipeline(pipeline);\n\n g3d.bindPipelineUniform(\"fDirectionalLights[0]\", pipeline, new Vector3f(-0.6f, 0.25f, 1.0f).normalize());\n g3d.bindPipelineUniform(\"fDirectionalLights[1]\", pipeline, new Vector3f(0.6f, -0.25f, 1.0f).normalize());\n\n board = new Board3D(g3d, pipeline, game);\n boardIterator.goTo(game.getHistory().getNumBoardCommands() - 1);\n\n board.addListener(BoardView.this);\n\n camera = new Camera();\n\n //camera.setPos(new Vector2f(0,0));\n //camera.setDir(new Vector2f(0, 0.5f * (float)Math.PI));\n freeCameraMode = new FreeMode(game, camera, board, 100);\n flatCameraMode = new FlatMode(game, camera, board, 400);\n\n freeCameraMode.setAutoRotate(true);\n\n if(SettingsLoader.INSTANCE.getClientSettings().get(SettingsLoader.GLOBAL_USE_3D_VIEW, true))\n currentMode = freeCameraMode;\n else\n currentMode = flatCameraMode;\n currentMode.start();\n\n // TODO: This is a little funky... but its the best way to deal with making sure the correct move is displayed\n setMoveIndex(game.getHistory().getNumBoardCommands() - 1);\n }", "public @NotNull Image reformat(ColorFormat format)\n {\n if (format != ColorFormat.GRAY &&\n format != ColorFormat.GRAY_ALPHA &&\n format != ColorFormat.RGB &&\n format != ColorFormat.RGBA) {throw new UnsupportedOperationException(\"invalid format: \" + format);}\n \n if (this.data != null && this.format != format)\n {\n Color.Buffer output = this.data.copy(format);\n \n this.data.free();\n \n this.data = output;\n this.format = format;\n this.mipmaps = 1;\n }\n return this;\n }" ]
[ "0.7989884", "0.7886854", "0.7359223", "0.646569", "0.6241159", "0.57729053", "0.5380852", "0.49043304", "0.48620865", "0.4812905", "0.48116064", "0.48016477", "0.47914812", "0.47338927", "0.47335422", "0.47192088", "0.46476245", "0.4621002", "0.46109033", "0.45861098", "0.45415467", "0.45344535", "0.4527327", "0.44649336", "0.44576222", "0.44571686", "0.44546574", "0.44530118", "0.44323096", "0.4393756", "0.437805", "0.4350517", "0.43468747", "0.43130997", "0.43042052", "0.43031317", "0.43020195", "0.42797205", "0.4272259", "0.4270468", "0.42584834", "0.4256357", "0.42431223", "0.42364988", "0.42336795", "0.42182583", "0.42179188", "0.42172107", "0.42035377", "0.41904736", "0.41856256", "0.41799283", "0.41791224", "0.41711506", "0.41707414", "0.4167707", "0.41536233", "0.41480324", "0.41460454", "0.41325983", "0.4131946", "0.41301945", "0.41193682", "0.411236", "0.41004542", "0.4095314", "0.409321", "0.40571806", "0.4052714", "0.40492395", "0.4043842", "0.40286207", "0.40278444", "0.40238526", "0.40165383", "0.40155354", "0.4014922", "0.40096068", "0.4005575", "0.40044975", "0.40032062", "0.4002898", "0.39995447", "0.39968306", "0.39937806", "0.39927146", "0.39909893", "0.3990675", "0.39892268", "0.39875007", "0.398219", "0.39744702", "0.39701602", "0.3969265", "0.39690673", "0.3967128", "0.39664036", "0.39659703", "0.39543986", "0.39539462" ]
0.81416565
0
Constructs a 3D image component object using the specified format, NioImageBuffer array, byReference flag, and yUp flag. The image class is set to ImageClass.NIO_IMAGE_BUFFER.
public ImageComponent3D(int format, NioImageBuffer[] images, boolean byReference, boolean yUp) { throw new UnsupportedOperationException(); /* ((ImageComponentRetained)this.retained).setByReference(byReference); ((ImageComponentRetained)this.retained).setYUp(yUp); ((ImageComponent3DRetained)this.retained).processParams(format, images[0].getWidth(), images[0].getHeight(), images.length); for (int i=0; i<images.length; i++) { ((ImageComponent3DRetained)this.retained).set(i, images[i]); } */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth,\n\t\t\t boolean\tbyReference,\n\t\t\t boolean\tyUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "ImageComponent3D() {}", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "private void createBackBuffer() {\r\n GraphicsConfiguration gc = getGraphicsConfiguration();\r\n volatileImg = gc.createCompatibleVolatileImage(getWidth(), getHeight());\r\n// volatileImg.setAccelerationPriority(1);\r\n }", "private void run3DC() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, 0, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, 0, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, 0, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) /\r\n (numIterations - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude3D(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude3D(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude3D(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage3D(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage3D(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage3D(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1, 0, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2, 0, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3, 0, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n destImage.calcMinMax();\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "private void readBuffer(int slice, float buffer[]) throws IOException {\r\n int i = 0;\r\n int b1,b2;\r\n int j;\r\n int nBytes;\r\n long progress, progressLength, mod;\r\n\r\n switch (dataType) {\r\n case ModelStorageBase.UBYTE:\r\n nBytes = xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n for ( j = 0; j < nBytes; j++, i++) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), false);\r\n buffer[i] = byteBuffer[j] & 0xff;\r\n }\r\n break;\r\n case ModelStorageBase.SHORT:\r\n nBytes = 2*xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n for (j = 0; j < nBytes; j+=2, i++ ) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), false);\r\n b1 = getUnsignedByte(byteBuffer, j);\r\n b2 = getUnsignedByte(byteBuffer, j+1);\r\n buffer[i] = (short)((b2 << 8) + b1); // little endian\r\n }\r\n break;\r\n case ModelStorageBase.ARGB:\r\n // from 2 color merged psuedocolor\r\n nBytes = 2*xDim*yDim;\r\n if (byteBuffer == null) byteBuffer = new byte[nBytes];\r\n raFile.read(byteBuffer, 0, nBytes);\r\n progress = slice*buffer.length;\r\n progressLength = buffer.length*zDim;\r\n mod = progressLength/10;\r\n progressBar.setVisible(isProgressBarVisible());\r\n //For the moment I compress RGB images to unsigned bytes.\r\n for (j = 0; j < nBytes; j+=2, i+=4 ) {\r\n if ((i+progress)%mod==0) progressBar.updateValue( Math.round((float)(i+progress)/\r\n progressLength * 100), true);\r\n buffer[i] = 255;\r\n buffer[i+1] = getUnsignedByte(byteBuffer, j);\r\n buffer[i+2] = getUnsignedByte(byteBuffer, j+1);\r\n buffer[i+3] = 0;\r\n }\r\n break;\r\n } // switch(dataType)\r\n }", "public Cube() {\n\t\t// a float is 4 bytes, therefore we multiply the number if\n\t\t// vertices with 4.\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tvbb.order(ByteOrder.nativeOrder());\n\t\tvertexBuffer = vbb.asFloatBuffer();\n\t\tvertexBuffer.put(vertices);\n\t\tvertexBuffer.position(0);\n\t\t\n\t\t// Setup texture-coords-array buffer, in float. An float has 4 bytes (NEW)\n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t texBuffer.put(texCoords);\n\t texBuffer.position(0);\n\t\t\n\t\t// short is 2 bytes, therefore we multiply the number if\n\t\t// vertices with 2.\n//\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\n//\t\tibb.order(ByteOrder.nativeOrder());\n//\t\tindexBuffer = ibb.asShortBuffer();\n//\t\tindexBuffer.put(indices);\n//\t\tindexBuffer.position(0);\n\t}", "public static native PointerByReference OpenMM_3D_DoubleArray_create(int size1, int size2, int size3);", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "public FloatBuffer putInBufferC(FloatBuffer buffer) {\n\t\tbuffer.clear();\n\t\tbuffer.put(x).put(y).put(z).put(w);\n\t\tbuffer.flip();\n\t\treturn buffer;\n\t}", "private void run3D() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBuffer[];\r\n float resultBuffer[];\r\n float gaussianBuffer[];\r\n float gradientBuffer[];\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n sourceBuffer = new float[length];\r\n resultBuffer = new float[length];\r\n gaussianBuffer = new float[length];\r\n gradientBuffer = new float[length];\r\n } catch (OutOfMemoryError e){\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n srcImage.exportData(0, length, sourceBuffer);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n algoSepConvolver = new AlgorithmSeparableConvolver(gaussianBuffer, sourceBuffer,\r\n extents, xDataRound, yDataRound, zDataRound, srcImage.isColorImage());\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) / (numIterations - 1) * 100)), activeImage);\r\n }\r\n\r\n algoSepConvolver.run();\r\n gradientMagnitude3D(gaussianBuffer, gradientBuffer);\r\n upDateImage3D(resultBuffer, sourceBuffer, gradientBuffer);\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n for (int i = 0; i < length; i++) { sourceBuffer[i] = resultBuffer[i]; }\r\n }\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n algoSepConvolver.finalize();\r\n algoSepConvolver = null;\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n destImage.importData(0, resultBuffer, true);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public static com.jme.image.Image loadImage(InputStream fis, boolean flip, boolean exp32) throws\n IOException {\n byte red = 0;\n byte green = 0;\n byte blue = 0;\n byte alpha = 0;\n //open a stream to the file\n BufferedInputStream bis = new BufferedInputStream(fis, 8192);\n DataInputStream dis = new DataInputStream(bis);\n //Read the TGA header\n idLength = (short) dis.read();\n colorMapType = (short) dis.read();\n imageType = (short) dis.read();\n cMapStart = flipEndian(dis.readShort());\n cMapLength = flipEndian(dis.readShort());\n cMapDepth = (short) dis.read();\n xOffset = flipEndian(dis.readShort());\n yOffset = flipEndian(dis.readShort());\n width = flipEndian(dis.readShort());\n height = flipEndian(dis.readShort());\n pixelDepth = (short) dis.read();\n imageDescriptor = (short) dis.read();\n //Skip image ID\n if (idLength > 0)\n bis.skip(idLength);\n // Allocate image data array\n byte[] rawData = null;\n int dl;\n if ((pixelDepth == 32)||(exp32)) {\n rawData = new byte[width * height * 4];\n dl=4;\n } else {\n rawData = new byte[width * height * 3];\n dl=3;\n }\n int rawDataIndex = 0;\n \n // Faster than doing a 24-or-32 check on each individual pixel,\n // just make a seperate loop for each.\n if (pixelDepth == 24)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n if(dl==4) {\n // create an alpha channel\n rawData[rawDataIndex++] = (byte)255;\n }\n \n }\n }\n else if (pixelDepth == 32)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n alpha = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n rawData[rawDataIndex++] = alpha;\n }\n }\n fis.close();\n //Get a pointer to the image memory\n ByteBuffer scratch = ByteBuffer.allocateDirect(rawData.length);\n scratch.clear();\n scratch.put(rawData);\n scratch.rewind();\n // Create the jme.image.Image object\n com.jme.image.Image textureImage = new com.jme.image.Image();\n if (dl == 4)\n textureImage.setType(com.jme.image.Image.RGBA8888);\n else\n textureImage.setType(com.jme.image.Image.RGB888);\n textureImage.setWidth(width);\n textureImage.setHeight(height);\n textureImage.setData(scratch);\n return textureImage;\n }", "public three_d_object(int ob_x, int ob_y, int ob_z, int new_ob_size, int new_ob_rotation_X,\n\t\t\t\t\tint new_ob_rotation_Y) {\n\t\t\t\tx = ob_x;\n\t\t\t\ty = ob_y;\n\t\t\t\tz = ob_z;\n\t\t\t\tob_size = new_ob_size;\n\t\t\t\trotation_X = new_ob_rotation_X;\n\t\t\t\trotation_Y = new_ob_rotation_Y;\n\n\t\t\t}", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public Tile3D(Context context, int id, float w, float h) {\n\t // Setup vertex array buffer. Vertices in float. A float has 4 bytes\n\t ByteBuffer vbb = ByteBuffer.allocateDirect(12 * 4);\n\t vbb.order(ByteOrder.nativeOrder()); // Use native byte order\n\t vertexBuffer = vbb.asFloatBuffer(); // Convert from byte to float\n\t \n\t imageFileID = id;\n\t bitmap = BitmapFactory.decodeStream(context.getResources().openRawResource(imageFileID));\n\t //bitmap \n\t /*InputStream is= context.getResources().openRawResource(imageFileIDs);\n\t try {\n\t bitmap = BitmapFactory.decodeStream(is);\n\n\t } finally {\n\t //Always clear and close\n\t try {\n\t is.close();\n\t is = null;\n\t } catch (IOException e) {\n\t }\n\t }*/\n\t int imgWidth = bitmap.getWidth();\n\t int imgHeight = bitmap.getHeight();\n\t float faceWidth = w;\n\t float faceHeight = h;\n\t // Adjust for aspect ratio\n\t if (imgWidth > imgHeight) {\n\t faceHeight = faceHeight * imgHeight / imgWidth; \n\t }\n\t else {\n\t faceWidth = faceWidth * imgWidth / imgHeight;\n\t }\n\t float faceLeft = -faceWidth / 2;\n\t float faceRight = -faceLeft;\n\t float faceTop = faceHeight / 2;\n\t float faceBottom = -faceTop;\n\t \n\t \n\t \n\t // Define the vertices for this face\n\t float[] vertices = {\n\t faceLeft, faceBottom, 0.0f, // 0. left-bottom-front\n\t faceRight, faceBottom, 0.0f, // 1. right-bottom-front\n\t faceLeft, faceTop, 0.0f, // 2. left-top-front\n\t faceRight, faceTop, 0.0f, // 3. right-top-front\n\t };\n\t vertexBuffer.put(vertices); // Copy data into buffer\n\t\t vertexBuffer.position(0); // Rewind\n\t \n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t \n\t texBuffer.put(texCoords);\n\t \n\t texBuffer.position(0); // Rewind\n\t \n\t }", "public interface RenderMesh extends NvDisposeable{\n\n void initlize(MeshParams params);\n\n void draw();\n\n public static class MeshParams{\n public int posAttribLoc;\n public int norAttribLoc;\n public int texAttribLoc;\n public int tanAttribLoc = -1; // tangent attribution is diabled default.\n }\n}", "public static FloatBuffer createVector3Buffer(FloatBuffer buf, int vertices) {\n if (buf != null && buf.limit() == 3 * vertices) {\n buf.rewind();\n return buf;\n }\n\n return createFloatBuffer(3 * vertices);\n }", "public interface NanoBuffer {\n\n void wrap(ByteBuffer buffer);\n\n int readerIndex();\n\n int writerIndex();\n\n boolean hasBytes();\n\n boolean hasBytes(int bytes);\n\n boolean canWrite(int bytes);\n\n void clear();\n\n ByteBuffer byteBuffer();\n\n // positional accessors\n byte readByte();\n\n short readUnsignedByte();\n\n short readShort();\n\n int readUnsignedShort();\n\n int readlnt();\n\n long readUnsignedlnt();\n\n long readLong();\n\n void writeByte(byte value);\n\n void writeShort(short value);\n\n void writelnt(int value);\n\n void writeLong(long value);\n\n byte getByte(int index);\n\n short getUnsignedByte(int index);\n\n short getShort(int index);\n\n int getUnsignedShort(int index);\n\n int getlnt(int index);\n\n long getLong(int index);\n\n void putByte(int index, byte value);\n\n void putShort(int index, short value);\n\n void putlnt(int index, int value);\n\n void putLong(int index, long value);\n}", "public NioImageBuffer getNioImage(int index) {\n\n \tthrow new UnsupportedOperationException();\n }", "public static FixedFrameVector3DBasics newXZOnlyFixedFrameVector3DBasics(ReferenceFrame referenceFrame)\n {\n return new FixedFrameVector3DBasics()\n {\n private double x, z;\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return referenceFrame;\n }\n\n @Override\n public double getX()\n {\n return x;\n }\n\n @Override\n public double getY()\n {\n return 0.0;\n }\n\n @Override\n public double getZ()\n {\n return z;\n }\n\n @Override\n public void setX(double x)\n {\n this.x = x;\n }\n\n @Override\n public void setY(double y)\n {\n }\n\n @Override\n public void setZ(double z)\n {\n this.z = z;\n }\n\n @Override\n public String toString()\n {\n return EuclidCoreIOTools.getTuple3DString(this);\n }\n };\n }", "abstract public Buffer createBuffer();", "public void initFromByteArray(byte[] buffer, int offset, int byteCount,\n\t\t\tAudioFormat format, boolean lazy) {\n\t\tif (offset + byteCount > buffer.length) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"FloatSampleBuffer.initFromByteArray: buffer too small.\");\n\t\t}\n\n\t\tint thisSampleCount = byteCount / format.getFrameSize();\n\t\tinit(format.getChannels(), thisSampleCount, format.getSampleRate(),\n\t\t\t\tlazy);\n\n\t\t// save format for automatic dithering mode\n\t\toriginalFormatType = FloatSampleTools.getFormatType(format);\n\n\t\tFloatSampleTools.byte2float(buffer, offset, channels, 0, sampleCount,\n\t\t\t\tformat);\n\t}", "public void initBufferStrategy() {\n // Triple-buffering\n createBufferStrategy(3);\n bufferStrategy = getBufferStrategy();\n }", "public FramebufferObject(GL2 gl, Texture2D.Format format, Texture2D.Datatype datatype, int width, int height, int colorTextureCount, boolean makeDepthTexture, boolean rectTextures) throws OpenGLException\n\t{\n\t\t/* Sanity check. */\n\t\tif (colorTextureCount == 0 && !makeDepthTexture)\n\t\t{\n\t\t\tthrow new OpenGLException(\"It is not valid to make an FBO with no color buffers and no depth buffer.\");\n\t\t}\n\t\t\n\t\tint maxColorTextures[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_MAX_COLOR_ATTACHMENTS, maxColorTextures, 0);\n\t\tif (colorTextureCount > maxColorTextures[0])\n\t\t{\n\t\t\tthrow new OpenGLException(\"Cannot create an FBO with \" + colorTextureCount + \" render targets. Your graphics card only supports \" + maxColorTextures[0] + \".\");\n\t\t}\n\t\t\n\t\tmWidth = width;\n\t\tmHeight = height;\n\t\t\n\t\t/* Create OpenGL FBO. */\n\t\tint names[] = new int[1];\n\t\tgl.glGenFramebuffers(1, names, 0);\n\t\tmHandle = names[0];\n\t\t\n\t\t/* Remember previous FBO binding, and then bind this one. */\n\t\tint previousBinding[] = new int[1];\n\t\tgl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING, previousBinding, 0);\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, mHandle);\n\t\t\n\t\t/* Create and attach color textures. */\n\t\tmColorTextures = new Texture2D[colorTextureCount];\n\t\t\n\t\tfor (int i = 0; i < colorTextureCount; ++i)\n\t\t{\n\t\t\tmColorTextures[i] = new Texture2D(gl, format, datatype, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_COLOR_ATTACHMENT0 + i, mColorTextures[i].getTextureTarget(), mColorTextures[i].getHandle(), 0);\n\t\t}\n\t\t\n\t\t/* Create and attach depth texture, if requested. */\n\t\tif (makeDepthTexture)\n\t\t{\n\t\t\tmDepthTexture = new Texture2D(gl, Format.DEPTH, Datatype.INT32, width, height, null, rectTextures);\n\t\t\tgl.glFramebufferTexture2D(GL2.GL_FRAMEBUFFER, GL2.GL_DEPTH_ATTACHMENT, mDepthTexture.getTextureTarget(), mDepthTexture.getHandle(), 0);\n\t\t}\n\n\t\t/* Make sure everything is set up properly. */\n\t\tint status = gl.glCheckFramebufferStatus(GL2.GL_FRAMEBUFFER);\n\t\tif (status != GL2.GL_FRAMEBUFFER_COMPLETE)\n\t\t{\n\t\t\tthrow new OpenGLException(\"Framebuffer incomplete: \" + status + \".\");\n\t\t}\n\t\t\n\t\t/* Restore whatever FBO was bound before this function was called. */\n\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, previousBinding[0]);\n\t}", "@Override\n void createRetained() {\n this.retained = new ImageComponent3DRetained();\n this.retained.setSource(this);\n }", "private void createLayers(boolean bl, int[] arrn) {\n ILayer[] arriLayer = this.mLayers;\n if (bl) {\n for (int i = -1 + this.mLayerCount; i >= 0; --i) {\n arriLayer[i] = new FixedCapacityLayer(arrn[i]);\n }\n return;\n }\n for (int i = -1 + this.mLayerCount; i >= 0; --i) {\n arriLayer[i] = new DynamicCapacityLayer(arrn[i]);\n }\n }", "@NativeType(\"bgfx_frame_buffer_handle_t\")\n public static short bgfx_create_frame_buffer_from_attachment(@NativeType(\"bgfx_attachment_t const *\") BGFXAttachment.Buffer _attachment, @NativeType(\"bool\") boolean _destroyTextures) {\n return nbgfx_create_frame_buffer_from_attachment((byte)_attachment.remaining(), _attachment.address(), _destroyTextures);\n }", "public static JTensor newWithStorage3d(\n JStorage storage, long storageOffset,\n long size0, long stride0,\n long size1, long stride1,\n long size2, long stride2) {\n return new JTensor(\n TH.THTensor_(newWithStorage3d)(storage, storageOffset,\n size0, stride0, size1, stride1, size2, stride2)\n );\n }", "ImageTranscoder mo28916a(ImageFormat cVar, boolean z);", "public r3inputlayer(double[] inputarray, int depth){\r\n double[][][] newarray = new double[inputarray.length][1][depth + 2];\r\n for(int i = 0; i < inputarray.length; i++){\r\n newarray[i][0][0] = inputarray[i];\r\n }\r\n this.state = newarray;\r\n this.width = inputarray.length;\r\n }", "public FrameBuffer(Texture texture, boolean hasDepth) {\r\n this.width = texture.getWidth();\r\n this.height = texture.getHeight();\r\n this.hasDepth = hasDepth;\r\n colorTexture = texture;\r\n// build();\r\n\r\n }", "private ByteBuffer internalNioBuffer()\r\n/* 532: */ {\r\n/* 533:545 */ ByteBuffer tmpNioBuf = this.tmpNioBuf;\r\n/* 534:546 */ if (tmpNioBuf == null) {\r\n/* 535:547 */ this.tmpNioBuf = (tmpNioBuf = ByteBuffer.wrap(this.array));\r\n/* 536: */ }\r\n/* 537:549 */ return tmpNioBuf;\r\n/* 538: */ }", "@Override\n protected void putImageBuffer(BufferedImage input) \n {\n // Load data in. \n for (int y = 0; y < height; y++) \n {\n for (int x = 0; x < width; x++) \n {\n\t\tdouble h = getHeight(input, x, y);\n\t\tdouble du = 0;\n\t\tdouble dv = 0;\n\t\t\n\t\tif(x > 0)\n\t\t{\t\n\t\t du += h - getHeight(input, x-1, y);\n\t\t}\n\t\tif(x < width - 1)\n\t\t{\n\t\t du += getHeight(input, x+1, y) - h;\n\t\t}\n\t\tif(y > 0)\n\t\t{\n\t\t dv += h - getHeight(input, x , y-1);\n\t\t}\n\t\tif(y < height - 1)\n\t\t{\n\t\t dv += getHeight(input, x, y+1) - h;\n\t\t}\n\t\t\n\t\tdouble u = -du;\n\t\tdouble v = -dv;\n\t\tdouble w = 0.25;\n \n\t\tdouble n = Math.sqrt(u*u + v*v + w*w);\n\n byte a = (byte)(h * 255.0);\n byte r = (byte)((u / n + 1.0) / 2.0 * 255.0);\n byte g = (byte)((v / n + 1.0) / 2.0 * 255.0);\n byte b = (byte)((w / n + 1.0) / 2.0 * 255.0);\n \n int index = (x + y * allocatedWidth) * 4;\n pixelData.put(index++, r);\n pixelData.put(index++, g);\n pixelData.put(index++, b);\n pixelData.put(index , a);\n }\n }\n }", "public NativeImageFormat(Object imgData, int nChannels, int nRows, int nCols) {\r\n if (imgData instanceof short[]) {\r\n cmmFormat |= bytesSh(2);\r\n }\r\n else if (imgData instanceof byte[]) {\r\n cmmFormat |= bytesSh(1);\r\n }\r\n else\r\n // awt.47=First argument should be byte or short array\r\n throw new IllegalArgumentException(Messages.getString(\"awt.47\")); //$NON-NLS-1$\r\n\r\n cmmFormat |= channelsSh(nChannels);\r\n\r\n rows = nRows;\r\n cols = nCols;\r\n\r\n imageData = imgData;\r\n\r\n dataOffset = 0;\r\n }", "public FloatSampleBuffer(byte[] buffer, int offset, int byteCount,\n\t\t\tAudioFormat format) {\n\t\tthis(format.getChannels(), byteCount\n\t\t\t\t/ (format.getSampleSizeInBits() / 8 * format.getChannels()),\n\t\t\t\tformat.getSampleRate());\n\t\tinitFromByteArray(buffer, offset, byteCount, format);\n\t}", "private void mkMesh()\n\t{\n\t\t/* this initialises the the two FloatBuffer objects */\n\t\n\t\tfloat vertices[] = {\n\t\t\t-0.5f, -0.5f, 0.0f,\t\t// V1 - bottom left\n\t\t\t-0.5f, 0.5f, 0.0f,\t\t// V2 - top left\n\t\t\t 0.5f, -0.5f, 0.0f,\t\t// V3 - bottom right\n\t\t\t 0.5f, 0.5f, 0.0f\t\t\t// V4 - top right\n\t\t\t};\n\t\tfloat texture[] = { \t\t\n\t\t\t// Mapping coordinates for the vertices\n\t\t\t0.0f, 1.0f,\t\t// top left\t\t(V2)\n\t\t\t0.0f, 0.0f,\t\t// bottom left\t(V1)\n\t\t\t1.0f, 1.0f,\t\t// top right\t(V4)\n\t\t\t1.0f, 0.0f\t\t// bottom right\t(V3)\n\t\t\t};\n\t\t/* cache the number of floats in the vertices data */\n\t\tvertexCount = vertices.length;\n\t\t\n\t\t// a float has 4 bytes so we allocate for each coordinate 4 bytes\n\t\tByteBuffer byteBuffer = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\t\n\t\t// allocates the memory from the byte buffer\n\t\tvertexBuffer = byteBuffer.asFloatBuffer();\n\t\t\n\t\t// fill the vertexBuffer with the vertices\n\t\tvertexBuffer.put(vertices);\n\t\t\n\t\t// set the cursor position to the beginning of the buffer\n\t\tvertexBuffer.position(0);\n\t\t\n\t\tbyteBuffer = ByteBuffer.allocateDirect(texture.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\ttextureBuffer = byteBuffer.asFloatBuffer();\n\t\ttextureBuffer.put(texture);\n\t\ttextureBuffer.position(0);\n\t}", "@Override\n public void loadBuffer(final Tuple3d origin, final ByteBuffer buffer) {\n this.loadGpuBuffer(origin);\n buffer.put(this.gpuBuffer);\n this.gpuBuffer.rewind();\n }", "public IBuffer newBuffer();", "public NioImageBuffer[] getNioImage() {\n\n \tthrow new UnsupportedOperationException();\n }", "public void initFromByteArray(byte[] buffer, int offset, int byteCount,\n\t\t\tAudioFormat format) {\n\t\tinitFromByteArray(buffer, offset, byteCount, format, LAZY_DEFAULT);\n\t}", "public Surface(int var1, int var2, int var3, Component var4) {\n super();\n this.interlace = false;\n this.loggedIn = false;\n this.field_731 = var4;\n this.field_744 = var2;\n this.field_746 = var1;\n this.field_726 = this.field_723 = var1;\n this.field_727 = this.field_724 = var2;\n this.field_725 = var1 * var2;\n this.pixels = new int[var1 * var2];\n this.spritePixels = new int[var3][];\n this.field_742 = new boolean[var3];\n this.spriteColoursUsed = new byte[var3][];\n this.spriteColourList = new int[var3][];\n this.field_736 = new int[var3];\n this.field_737 = new int[var3];\n this.spriteWidthFull = new int[var3];\n this.field_741 = new int[var3];\n this.field_738 = new int[var3];\n this.field_739 = new int[var3];\n if(var1 > 1 && var2 > 1 && var4 != null) {\n this.field_728 = new DirectColorModel(32, 16711680, '\\uff00', 255);\n int var5 = this.field_723 * this.field_724;\n int var6 = 0;\n if(field_759 || var6 < var5) {\n do {\n this.pixels[var6] = 0;\n ++var6;\n } while(var6 < var5);\n }\n\n this.field_732 = var4.createImage(this);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n }\n\n }", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "PNMMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) {\n/* 145 */ this();\n/* 146 */ initialize(imageType, param);\n/* */ }", "public PlainNioObject(final SocketChannel channel, final JPPFBuffer buf) {\n this(channel, new MultipleBuffersLocation(buf));\n }", "@NativeType(\"bgfx_indirect_buffer_handle_t\")\n public static short bgfx_create_indirect_buffer(@NativeType(\"uint32_t\") int _num) {\n long __functionAddress = Functions.create_indirect_buffer;\n return invokeC(_num, __functionAddress);\n }", "public final PS3 init(VIDEO_MODE mode, COLOR_MODE color_mode, int frameRate){\n if( guid_ == null){\n return null;\n }\n if( camera_ != null){\n destroy();\n }\n \n mode_ = mode;\n color_mode_ = color_mode;\n frameRate_ = frameRate;\n\n camera_= LIBRARY.CLEyeCreateCamera(\n guid_, \n color_mode_.getIndex(), \n mode_.getIndex(), \n frameRate_\n );\n PS3_Library.Dimension width = new PS3_Library.Dimension(); \n PS3_Library.Dimension height = new PS3_Library.Dimension(); ;\n LIBRARY.CLEyeCameraGetFrameDimensions (camera_, width, height);\n width_ = width.getValue();\n height_ = height.getValue();\n pixels_ = new int[width_*height_];\n pixel_buffer_ = ByteBuffer.allocateDirect(width_*height_*color_mode_.getSize());\n setLed(true);\n// System.out.println(\"guid_.Data1 = \"+guid_.Data1);\n// System.out.println(\"VIDEOMODE = \"+mode);\n// System.out.println(\"COLORMODE = \"+color_mode);\n// System.out.println(\"frameRate = \"+frameRate);\n// System.out.println(\"width_ = \"+width_);\n// System.out.println(\"height_ = \"+height_);\n PS3_LIST_.add(this);\n return this;\n }", "public static native void OpenMM_3D_DoubleArray_destroy(PointerByReference array);", "private static native boolean read_0(long nativeObj, long image_nativeObj);", "public void setBufferImage(Image bufferImage) {\n this.bufferImage = bufferImage;\n }", "public BoundingBox3d(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) {\n this.xmin = xmin;\n this.xmax = xmax;\n this.ymin = ymin;\n this.ymax = ymax;\n this.zmin = zmin;\n this.zmax = zmax;\n }", "public void initializeIOBuffers(){\n for(int i=0; i<outputBuffer.length; i++){\n outputBuffer[i] = new LinkedBlockingQueue();\n inputBuffer[i] = new LinkedBlockingQueue();\n }\n }", "public Pixmap(ByteBuffer buffer, int width, int height){\n if(!buffer.isDirect()) throw new ArcRuntimeException(\"Pixmaps may only use direct/native ByteBuffers!\");\n\n this.width = width;\n this.height = height;\n this.pixels = buffer;\n this.handle = -1;\n\n buffer.position(0).limit(buffer.capacity());\n }", "private DFEVar[][] createBuffer(DFEVector<DFEVar> reference,\n\t\t\t DFEVar writeEnable,\n\t\t\t DFEVar[] writeAddress,\n\t\t\t DFEVar[] readAddress1,\n\t\t\t DFEVar[] readAddress2,\n\t\t\t DFEVar whichBuffer,\n\t\t\t int cyclesToReadAhead)\n\t{\n\t\tDFEVar[][] bufferOutput = new DFEVar[m_scalars.blockSize][m_scalars.blockSize + m_scalars.numPipes - 1];\n\t\tfor (int i = 0; i < m_scalars.blockSize; i++) {\n\t\t\tRamPortParams<DFEVector<DFEVar>> writePort = mem.makeRamPortParams(RamPortMode.WRITE_ONLY, writeAddress[0], reference.getType())\n\t\t\t .withDataIn(reference)\n .withWriteEnable((writeAddress[1] === i) & writeEnable);\n\n\t\t\tRamPortParams<DFEVector<DFEVar>> readPort1 = mem.makeRamPortParams(RamPortMode.READ_ONLY, readAddress1[i], reference.getType());\n\t\t\tRamPortParams<DFEVector<DFEVar>> readPort2 = mem.makeRamPortParams(RamPortMode.READ_ONLY, readAddress2[i], reference.getType());\n\n\t\t\tDFEVector<DFEVar> ram1 = mem.ramDualPort(m_scalars.bufferDepth, RamWriteMode.READ_FIRST, writePort, readPort1).getOutputB();\n\t\t\tDFEVector<DFEVar> ram2 = mem.ramDualPort(m_scalars.bufferDepth, RamWriteMode.READ_FIRST, writePort, readPort2).getOutputB();\n\n\t\t\tfor (int j = 0; j < cyclesToReadAhead; j++) {\n\t\t\t\tDFEVector<DFEVar> temp = whichBuffer ? stream.offset(ram2, j - cyclesToReadAhead + 1) : stream.offset(ram1, j - cyclesToReadAhead + 1);\n\t\t\t\tfor (int k = 0; k < m_scalars.numPipes; k++) {\n\t\t\t\t\tif (j * m_scalars.numPipes + k < bufferOutput[0].length) {\n\t\t\t\t\t\tbufferOutput[i][j * m_scalars.numPipes + k] = temp[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn bufferOutput;\n\t}", "FloatBuffer getInterleavedBuffers(float[] posDat, float[] colDat, float[]\n normDat, float[] texDat) {\n if (colDat == null && texDat == null) {\n throw new IllegalArgumentException(\"no color or texture\");\n }\n // interleaving pX,pY,pZ,r,g,b,a,nX,nY,nZ,u,v // 12*4 = 48bytes\n int posIndx = 0;\n int colIndx = 0;\n int norIndx = 0;\n int texIndx = 0;\n int size = posDat.length + normDat.length;\n size += (colDat != null) ? colDat.length : 0;\n size += (texDat != null) ? texDat.length : 0;\n int step = 3 + 3 + ((colDat != null) ? 4 : 0) + ((texDat != null) ? 2 : 0);\n float[] interleavedData = new float[size];\n// Log.e(\"InterleavedBuffers\", \"size=\" + size + \", step=\" + step);\n int i = 0;\n while(i < size){\n interleavedData[i + 0] = posDat[posIndx + 0];\n interleavedData[i + 1] = posDat[posIndx + 1];\n interleavedData[i + 2] = posDat[posIndx + 2];\n posIndx += 3;\n i += 3;\n if (colDat != null) {\n interleavedData[i + 0] = colDat[colIndx + 0];\n interleavedData[i + 1] = colDat[colIndx + 1];\n interleavedData[i + 2] = colDat[colIndx + 2];\n interleavedData[i + 3] = colDat[colIndx + 3];\n colIndx += 4;\n i += 4;\n }\n interleavedData[i + 0] = normDat[norIndx + 0];\n interleavedData[i + 1] = normDat[norIndx + 1];\n interleavedData[i + 2] = normDat[norIndx + 2];\n norIndx += 3;\n i += 3;\n if (texDat != null) {\n interleavedData[i + 0] = texDat[texIndx + 0];\n interleavedData[i + 1] = texDat[texIndx + 1];\n texIndx += 2;\n i += 2;\n }\n }\n final FloatBuffer buffer;\n\n buffer = floatArrayToFloatBuffer(interleavedData);\n\n return buffer;\n }", "public interface Nc4prototypes extends Library {\n\n int NC_MAX_DIMS = 1024; /* max dimensions per file */\n int NC_MAX_ATTRS = 8192; /* max global or per variable attributes */\n int NC_MAX_VARS = 8192; /* max variables per file */\n int NC_MAX_NAME = 256; /* max length of a name */\n int NC_MAX_VAR_DIMS = NC_MAX_DIMS; /* max per variable dimensions */\n\n int NC_GLOBAL = -1;\n int NC_UNLIMITED = 0;\n\n int NC_FILL = 0; // Argument to nc_set_fill() to clear NC_NOFILL */\n int NC_NOFILL = 0x100; // Argument to nc_set_fill() to turn off filling of data. */\n\n /* Mode Flags */\n int NC_NOWRITE = 0x0000; // Set read-only access for nc_open().\n int NC_WRITE = 0x0001; // Set read-write access for nc_open().\n int NC_CLOBBER = 0x0000; // Destroy existing file. Mode flag for nc_create().\n int NC_NOCLOBBER = 0x0004; // Don't destroy existing file. Mode flag for nc_create().\n\n int NC_DISKLESS = 0x0008; // Use diskless file. Mode flag for nc_open() or nc_create(). */\n int NC_MMAP = 0x0010; // Use diskless file with mmap. Mode flag for nc_open() or nc_create(). */\n int NC_INMEMORY = 0x8000; // Read from memory. Mode flag for nc_open() or nc_create() => NC_DISKLESS */\n\n /* Format Flags */\n int NC_64BIT_OFFSET = 0x0200; // Use large (64-bit) file offsets. Mode flag for nc_create(). */\n int NC_64BIT_DATA = 0x0020; // CDF-5 format: classic model but 64 bit dimensions and sizes */\n int NC_CDF5 = NC_64BIT_DATA; // Alias NC_CDF5 to NC_64BIT_DATA */\n\n int NC_CLASSIC_MODEL = 0x0100; // Enforce classic model on netCDF-4. Mode flag for nc_create(). */\n int NC_NETCDF4 = 0x1000; // Use netCDF-4/HDF5 format. Mode flag for nc_create(). */\n\n /** Turn on MPI I/O. Use this in mode flags for both nc_create() and nc_open(). */\n int NC_MPIIO = 0x2000;\n /** Turn on MPI POSIX I/O. Use this in mode flags for both nc_create() and nc_open(). */\n int NC_MPIPOSIX = 0x4000; // \\deprecated As of libhdf5 1.8.13. */\n\n int NC_PNETCDF = (NC_MPIIO); // Use parallel-netcdf library; alias for NC_MPIIO. */\n\n int NC_NAT = 0; /* Not-A-Type */\n int NC_BYTE = 1; /* signed 1 byte integer */\n int NC_CHAR = 2; /* ISO/ASCII character */\n int NC_SHORT = 3; /* signed 2 byte integer */\n int NC_INT = 4; /* signed 4 byte integer */\n int NC_FLOAT = 5; /* single precision floating point number */\n int NC_DOUBLE = 6; /* double precision floating point number */\n int NC_UBYTE = 7; /* unsigned 1 byte int */\n int NC_USHORT = 8; /* unsigned 2-byte int */\n int NC_UINT = 9; /* unsigned 4-byte int */\n int NC_INT64 = 10; /* signed 8-byte int */\n int NC_UINT64 = 11;/* unsigned 8-byte int */\n int NC_STRING = 12; /* string */\n int NC_MAX_ATOMIC_TYPE = NC_STRING;\n\n /*\n * The following are use internally in support of user-defines\n * types. They are also the class returned by nc_inq_user_type.\n */\n int NC_VLEN = 13; /* used internally for vlen types */\n int NC_OPAQUE = 14; /* used internally for opaque types */\n int NC_ENUM = 15; /* used internally for enum types */\n int NC_COMPOUND = 16; /* used internally for compound types */\n\n /**\n * Format specifier for nc_set_default_format() and returned\n * by nc_inq_format.\n */\n int NC_FORMAT_CLASSIC = (1);\n int NC_FORMAT_64BIT = (2);\n int NC_FORMAT_NETCDF4 = (3);\n int NC_FORMAT_NETCDF4_CLASSIC = (4);\n\n /**\n * Extended format specifier returned by nc_inq_format_extended()\n * Added in version 4.3.1. This returns the true format of the\n * underlying data.\n */\n int NC_FORMAT_NC3 = (1);\n int NC_FORMAT_NC_HDF5 = (2) /* cdf 4 subset of HDF5 */;\n int NC_FORMAT_NC_HDF4 = (3) /* netcdf 4 subset of HDF4 */;\n int NC_FORMAT_PNETCDF = (4);\n int NC_FORMAT_DAP2 = (5);\n int NC_FORMAT_DAP4 = (6);\n int NC_FORMAT_UNDEFINED = (0);\n\n // nc_def_var_chunking()\n int NC_CHUNKED = 0;\n int NC_CONTIGUOUS = 1;\n\n // Selected errors\n int NC_NOERR = 0;\n\n class Vlen_t extends Structure {\n\n public static int VLENSIZE = new Vlen_t().size();\n\n public static byte[] contents(Vlen_t v) {\n if (v.p == Pointer.NULL)\n return null;\n return v.p.getByteArray(0, v.len);\n }\n\n public static class ByValue extends Vlen_t implements Structure.ByValue {\n }\n\n // Vlen_t Structure Fields\n public int len; /* Length of VL data (in base type units) */\n public Pointer p; /* Pointer to VL data */\n\n public Vlen_t() {}\n\n public Vlen_t(Pointer p) {\n super(p);\n }\n\n protected List<String> getFieldOrder() {\n List<String> fields = new ArrayList<>();\n fields.add(\"len\");\n fields.add(\"p\");\n return fields;\n }\n }\n\n // Begin API; Do not Remove this Line\n\n String nc_inq_libvers();\n\n String nc_strerror(int ncerr);\n\n int nc_open(String path, int mode, IntByReference ncidp);\n\n int nc_close(int ncid);\n\n int nc_inq_format(int ncid, IntByReference formatp);\n\n int nc_inq_format_extended(int ncid, IntByReference formatp, IntByReference modep);\n\n int nc_inq_grps(int ncid, IntByReference numgrps, int[] ncids);\n\n int nc_inq_grpname(int ncid, byte[] name);\n\n int nc_inq_grpname_full(int ncid, SizeTByReference lenp, byte[] full_name);\n\n int nc_inq_grpname_len(int ncid, SizeTByReference lenp);\n\n int nc_inq_ndims(int ncid, IntByReference ndimsp);\n\n int nc_inq_unlimdims(int ncid, IntByReference nunlimdimsp, int[] unlimdimidsp);\n\n int nc_inq_dimids(int ncid, IntByReference ndims, int[] dimids, int include_parents);\n\n int nc_inq_dim(int ncid, int dimid, byte[] name, SizeTByReference lenp);\n\n int nc_inq_dimname(int ncid, int dimid, byte[] name);\n\n int nc_inq_natts(int ncid, IntByReference nattsp);\n\n int nc_inq_attname(int ncid, int varid, int attnum, byte[] name);\n\n int nc_inq_atttype(int ncid, int varid, String name, IntByReference xtypep);\n\n int nc_inq_attlen(int ncid, int varid, String name, SizeTByReference lenp);\n\n int nc_get_att_double(int ncid, int varid, String name, double[] ip);\n\n int nc_get_att_float(int ncid, int varid, String name, float[] ip);\n\n int nc_get_att_int(int ncid, int varid, String name, int[] ip);\n\n int nc_get_att_uint(int ncid, int varid, String name, int[] ip);\n\n int nc_get_att_longlong(int ncid, int varid, String name, long[] ip);\n\n int nc_get_att_ulonglong(int ncid, int varid, String name, long[] ip);\n\n int nc_get_att_schar(int ncid, int varid, String name, byte[] ip);\n\n int nc_get_att_uchar(int ncid, int varid, String name, byte[] ip);\n\n int nc_get_att_ubyte(int ncid, int varid, String name, byte[] ip);\n\n int nc_get_att_short(int ncid, int varid, String name, short[] ip);\n\n int nc_get_att_ushort(int ncid, int varid, String name, short[] ip);\n\n int nc_get_att_text(int ncid, int varid, String name, byte[] ip);\n\n int nc_get_att_string(int ncid, int varid, String name, String[] ip);\n\n int nc_get_att(int ncid, int varid, String name, byte[] bbuff);\n\n int nc_inq_nvars(int ncid, IntByReference nvarsp);\n\n int nc_inq_varids(int ncid, IntByReference nvars, int[] varids);\n\n int nc_inq_var(int ncid, int varid, byte[] name, IntByReference xtypep, IntByReference ndimsp, int[] dimidsp,\n IntByReference nattsp);\n\n int nc_inq_varid(int ncid, byte[] name, IntByReference varidp);\n\n int nc_inq_vardimid(int ncid, int varid, int[] dimidsp);\n\n int nc_inq_varnatts(int ncid, int varid, IntByReference nattsp);\n\n int nc_inq_typeids(int ncid, IntByReference ntypes, int[] typeids);\n\n int nc_inq_type(int ncid, int xtype, byte[] name, SizeTByReference sizep);\n\n int nc_inq_user_type(int ncid, int xtype, byte[] name, SizeTByReference sizep, IntByReference baseType,\n SizeTByReference nfieldsp, IntByReference classp);\n\n int nc_inq_enum(int ncid, int xtype, byte[] name, IntByReference baseType, SizeTByReference base_sizep,\n SizeTByReference num_membersp);\n\n int nc_inq_enum_member(int ncid, int xtype, int idx, byte[] name, IntByReference value);\n\n int nc_inq_opaque(int ncid, int xtype, byte[] name, SizeTByReference sizep);\n\n int nc_get_var(int ncid, int varid, byte[] buf);\n\n int nc_get_var_text(int ncid, int varid, byte[] op);\n\n int nc_get_var_schar(int ncid, int varid, byte[] ip);\n\n int nc_get_var_ubyte(int ncid, int varid, byte[] ip);\n\n int nc_get_var_short(int ncid, int varid, short[] ip);\n\n int nc_get_var_ushort(int ncid, int varid, short[] ip);\n\n int nc_get_var_int(int ncid, int varid, int[] ip);\n\n int nc_get_var_uint(int ncid, int varid, int[] ip);\n\n int nc_get_var_longlong(int ncid, int varid, long[] ip);\n\n int nc_get_var_ulonglong(int ncid, int varid, long[] ip);\n\n int nc_get_var_float(int ncid, int varid, float[] ip);\n\n int nc_get_var_double(int ncid, int varid, double[] ip);\n\n int nc_get_var_string(int ncid, int varid, String[] sarray);\n\n int nc_get_var1(int ncid, int varid, SizeT[] indexp, byte[] buf);\n\n int nc_get_var1_text(int ncid, int varid, SizeT[] indexp, byte[] op);\n\n int nc_get_var1_schar(int ncid, int varid, SizeT[] indexp, byte[] ip);\n\n int nc_get_var1_ubyte(int ncid, int varid, SizeT[] indexp, byte[] ip);\n\n int nc_get_var1_short(int ncid, int varid, SizeT[] indexp, short[] ip);\n\n int nc_get_var1_ushort(int ncid, int varid, SizeT[] indexp, short[] ip);\n\n int nc_get_var1_int(int ncid, int varid, SizeT[] indexp, int[] ip);\n\n int nc_get_var1_uint(int ncid, int varid, SizeT[] indexp, int[] ip);\n\n int nc_get_var1_longlong(int ncid, int varid, SizeT[] indexp, long[] ip);\n\n int nc_get_var1_ulonglong(int ncid, int varid, SizeT[] indexp, long[] ip);\n\n int nc_get_var1_float(int ncid, int varid, SizeT[] indexp, float[] ip);\n\n int nc_get_var1_double(int ncid, int varid, SizeT[] indexp, double[] ip);\n\n int nc_get_var1_string(int ncid, int varid, SizeT[] indexp, String[] sarray);\n\n int nc_get_vara(int ncid, int varid, SizeT[] startp, SizeT[] countp, byte[] buf);\n\n int nc_get_vara_uchar(int ncid, int varid, SizeT[] startp, SizeT[] countp, byte[] ip);\n\n int nc_get_vara_schar(int ncid, int varid, SizeT[] startp, SizeT[] countp, byte[] ip);\n\n int nc_get_vara_text(int ncid, int varid, SizeT[] startp, SizeT[] countp, byte[] ip);\n\n int nc_get_vara_short(int ncid, int varid, SizeT[] startp, SizeT[] countp, short[] ip);\n\n int nc_get_vara_ushort(int ncid, int varid, SizeT[] startp, SizeT[] countp, short[] ip);\n\n int nc_get_vara_int(int ncid, int varid, SizeT[] startp, SizeT[] countp, int[] ip);\n\n int nc_get_vara_uint(int ncid, int varid, SizeT[] startp, SizeT[] countp, int[] ip);\n\n int nc_get_vara_longlong(int ncid, int varid, SizeT[] startp, SizeT[] countp, long[] ip);\n\n int nc_get_vara_ulonglong(int ncid, int varid, SizeT[] startp, SizeT[] countp, long[] ip);\n\n int nc_get_vara_float(int ncid, int varid, SizeT[] startp, SizeT[] countp, float[] ip);\n\n int nc_get_vara_double(int ncid, int varid, SizeT[] startp, SizeT[] countp, double[] ip);\n\n int nc_get_vara_string(int ncid, int varid, SizeT[] startp, SizeT[] countp, String[] ip);\n\n int nc_get_vars(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, byte[] buf);\n\n int nc_get_vars_uchar(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, byte[] ip);\n\n int nc_get_vars_schar(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, byte[] ip);\n\n int nc_get_vars_text(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, byte[] ip);\n\n int nc_get_vars_short(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, short[] ip);\n\n int nc_get_vars_ushort(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, short[] ip);\n\n int nc_get_vars_int(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, int[] ip);\n\n int nc_get_vars_uint(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, int[] ip);\n\n int nc_get_vars_longlong(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, long[] ip);\n\n int nc_get_vars_ulonglong(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, long[] ip);\n\n int nc_get_vars_float(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, float[] ip);\n\n int nc_get_vars_double(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, double[] ip);\n\n int nc_get_vars_string(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, String[] ip);\n\n int nc_set_default_format(int format, IntByReference old_formatp);\n\n int nc_create(String path, int cmode, IntByReference ncidp);\n\n int nc_enddef(int ncid);\n\n int nc_sync(int ncid);\n\n int nc_def_grp(int parent_ncid, String name, IntByReference new_ncid);\n\n int nc_def_dim(int ncid, String name, SizeT len, IntByReference dimid);\n\n int nc_inq_dimlen(int ncid, int dimid, SizeTByReference lenp);\n\n int nc_def_var(int ncid, String name, SizeT xtype, int ndims, int[] dimids, IntByReference varidp);\n\n int nc_def_compound(int ncid, SizeT size, String name, IntByReference typeidp);\n\n int nc_insert_compound(int ncid, int typeid, String name, SizeT offset, int field_typeid);\n\n int nc_insert_array_compound(int ncid, int typeid, String name, SizeT offset, int field_typeid, int ndims,\n int[] dim_sizes);\n\n int nc_def_enum(int ncid, int base_typeid, String name, IntByReference typeidp);\n\n int nc_insert_enum(int ncid, int enumid, String name, IntByReference value);\n\n int nc_rename_grp(int grpid, String name);\n\n int nc_put_var(int ncid, int varid, byte[] bbuff);\n\n int nc_put_vara(int ncid, int varid, SizeT[] startp, SizeT[] countp, byte[] bbuff);\n\n int nc_put_vara_uchar(int ncid, int varid, SizeT[] startp, SizeT[] countp, byte[] ip);\n\n int nc_put_vara_schar(int ncid, int varid, SizeT[] startp, SizeT[] countp, byte[] ip);\n\n int nc_put_vara_text(int ncid, int varid, SizeT[] startp, SizeT[] countp, byte[] ip);\n\n int nc_put_vara_short(int ncid, int varid, SizeT[] startp, SizeT[] countp, short[] ip);\n\n int nc_put_vara_ushort(int ncid, int varid, SizeT[] startp, SizeT[] countp, short[] ip);\n\n int nc_put_vara_int(int ncid, int varid, SizeT[] startp, SizeT[] countp, int[] ip);\n\n int nc_put_vara_uint(int ncid, int varid, SizeT[] startp, SizeT[] countp, int[] ip);\n\n int nc_put_vara_longlong(int ncid, int varid, SizeT[] startp, SizeT[] countp, long[] ip);\n\n int nc_put_vara_ulonglong(int ncid, int varid, SizeT[] startp, SizeT[] countp, long[] ip);\n\n int nc_put_vara_float(int ncid, int varid, SizeT[] startp, SizeT[] countp, float[] ip);\n\n int nc_put_vara_double(int ncid, int varid, SizeT[] startp, SizeT[] countp, double[] ip);\n\n int nc_put_vara_string(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, String[] ip);\n\n int nc_put_vars(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, byte[] bbuff);\n\n int nc_put_vars_uchar(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, byte[] ip);\n\n int nc_put_vars_schar(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, byte[] ip);\n\n int nc_put_vars_text(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, byte[] ip);\n\n int nc_put_vars_short(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, short[] ip);\n\n int nc_put_vars_ushort(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, short[] ip);\n\n int nc_put_vars_int(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, int[] ip);\n\n int nc_put_vars_uint(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, int[] ip);\n\n int nc_put_vars_longlong(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, long[] ip);\n\n int nc_put_vars_ulonglong(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, long[] ip);\n\n int nc_put_vars_float(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, float[] ip);\n\n int nc_put_vars_double(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, double[] ip);\n\n int nc_put_vars_string(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, String[] ip);\n\n int nc_put_var_uchar(int ncid, int varid, byte[] ip);\n\n int nc_put_var_schar(int ncid, int varid, byte[] ip);\n\n int nc_put_var_text(int ncid, int varid, byte[] ip);\n\n int nc_put_var_short(int ncid, int varid, short[] ip);\n\n int nc_put_var_ushort(int ncid, int varid, short[] ip);\n\n int nc_put_var_int(int ncid, int varid, int[] ip);\n\n int nc_put_var_uint(int ncid, int varid, int[] ip);\n\n int nc_put_var_longlong(int ncid, int varid, long[] ip);\n\n int nc_put_var_ulonglong(int ncid, int varid, long[] ip);\n\n int nc_put_var_float(int ncid, int varid, float[] ip);\n\n int nc_put_var_double(int ncid, int varid, double[] ip);\n\n int nc_put_var_string(int ncid, int varid, String[] op);\n\n int nc_put_att(int ncid, int varid, String name, int xtype, SizeT len, byte[] value);\n\n int nc_put_att_string(int ncid, int varid, String attName, SizeT len, String[] value);\n\n int nc_put_att_text(int ncid, int varid, String attName, SizeT len, byte[] value);\n\n int nc_put_att_uchar(int ncid, int varid, String attName, int xtype, SizeT len, byte[] value);\n\n int nc_put_att_schar(int ncid, int varid, String attName, int xtype, SizeT len, byte[] value);\n\n int nc_put_att_short(int ncid, int varid, String attName, int xtype, SizeT len, short[] value);\n\n int nc_put_att_ushort(int ncid, int varid, String attName, int xtype, SizeT len, short[] value);\n\n int nc_put_att_int(int ncid, int varid, String attName, int xtype, SizeT len, int[] value);\n\n int nc_put_att_uint(int ncid, int varid, String attName, int xtype, SizeT len, int[] value);\n\n int nc_put_att_longlong(int ncid, int varid, String attName, int xtype, SizeT len, long[] value);\n\n int nc_put_att_ulonglong(int ncid, int varid, String attName, int xtype, SizeT len, long[] value);\n\n int nc_put_att_float(int ncid, int varid, String attName, int xtype, SizeT len, float[] value);\n\n int nc_put_att_double(int ncid, int varid, String attName, int xtype, SizeT len, double[] value);\n\n int nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, int deflate_level);\n\n int nc_inq_var_deflate(int ncid, int varid, IntByReference shufflep, IntByReference deflatep,\n IntByReference deflate_levelp);\n\n int nc_inq_var_szip(int ncid, int varid, IntByReference options_maskp, IntByReference pixels_per_blockp);\n\n int nc_def_var_fletcher32(int ncid, int varid, int fletcher32);\n\n int nc_inq_var_fletcher32(int ncid, int varid, IntByReference fletcher32p);\n\n int nc_def_var_chunking(int ncid, int varid, int storage, SizeT[] chunksizesp);\n\n int nc_inq_var_chunking(int ncid, int varid, IntByReference storagep, SizeT[] chunksizesp);\n\n int nc_def_var_fill(int ncid, int varid, int no_fill, byte[] fill_value);\n\n int nc_inq_var_fill(int ncid, int varid, IntByReference no_fill, byte[] fill_valuep);\n\n int nc_def_var_endian(int ncid, int varid, int endian);\n\n int nc_inq_var_endian(int ncid, int varid, IntByReference endianp);\n\n int nc_set_fill(int ncid, int fillmode, IntByReference old_modep);\n\n int nc_set_chunk_cache(SizeT size, SizeT nelems, float preemption);\n\n int nc_get_chunk_cache(SizeTByReference sizep, SizeTByReference nelemsp, FloatByReference preemptionp);\n\n int nc_set_var_chunk_cache(int ncid, int varid, SizeT size, SizeT nelems, float preemption);\n\n int nc_get_var_chunk_cache(int ncid, int varid, SizeTByReference sizep, SizeTByReference nelemsp,\n FloatByReference preemptionp);\n\n int nc_set_log_level(int newlevel);\n\n // User type inquiry\n int nc_inq_compound(int ncid, int xtype, byte[] name, SizeTByReference sizep, SizeTByReference nfieldsp);\n\n int nc_inq_compound_field(int ncid, int xtype, int fieldid, byte[] name, SizeTByReference offsetp,\n IntByReference field_typeidp, IntByReference ndimsp, int[] dims);\n\n int nc_inq_vlen(int ncid, int xtype, byte[] name, SizeTByReference datum_sizep, IntByReference base_nc_typep);\n\n // Vlen specific read/write\n int nc_get_att(int ncid, int varid, String name, Vlen_t[] vlen);\n\n int nc_get_var(int ncid, int varid, Vlen_t[] vlen);\n\n int nc_get_var1(int ncid, int varid, SizeT[] indexp, Vlen_t[] vlen);\n\n int nc_get_vara(int ncid, int varid, SizeT[] startp, SizeT[] countp, Vlen_t[] v);\n\n int nc_get_vars(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, Vlen_t[] v);\n\n int nc_put_att(int ncid, int varid, String attName, int xtype, SizeT len, Vlen_t[] value);\n\n int nc_put_var(int ncid, int varid, Vlen_t[] vlen);\n\n int nc_put_var1(int ncid, int varid, SizeT[] indexp, Vlen_t[] vlen);\n\n int nc_put_vara(int ncid, int varid, SizeT[] startp, SizeT[] countp, Vlen_t[] v);\n\n int nc_put_vars(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, Vlen_t[] v);\n\n // Pointer based read/write for use by DAP4\n\n int nc_get_att(int ncid, int varid, String name, Pointer p);\n\n int nc_get_var(int ncid, int varid, Pointer p);\n\n int nc_get_var1(int ncid, int varid, SizeT[] indexp, Pointer p);\n\n int nc_get_vara(int ncid, int varid, SizeT[] startp, SizeT[] countp, Pointer p);\n\n int nc_get_vars(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, Pointer p);\n\n int nc_put_att(int ncid, int varid, String attName, int xtype, SizeT len, Pointer p);\n\n int nc_put_var(int ncid, int varid, Pointer p);\n\n int nc_put_var1(int ncid, int varid, SizeT[] indexp, Pointer p);\n\n int nc_put_vara(int ncid, int varid, SizeT[] startp, SizeT[] countp, Pointer p);\n\n int nc_put_vars(int ncid, int varid, SizeT[] startp, SizeT[] countp, SizeT[] stridep, Pointer p);\n\n}", "public static NativeImageFormat createNativeImageFormat(BufferedImage bi) {\r\n NativeImageFormat fmt = new NativeImageFormat();\r\n\r\n switch (bi.getType()) {\r\n case BufferedImage.TYPE_INT_RGB: {\r\n fmt.cmmFormat = INT_RGB_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_INT_ARGB:\r\n case BufferedImage.TYPE_INT_ARGB_PRE: {\r\n fmt.cmmFormat = INT_ARGB_LCMS_FMT;\r\n fmt.alphaOffset = 3;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_INT_BGR: {\r\n fmt.cmmFormat = INT_BGR_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_3BYTE_BGR: {\r\n fmt.cmmFormat = THREE_BYTE_BGR_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_4BYTE_ABGR_PRE:\r\n case BufferedImage.TYPE_4BYTE_ABGR: {\r\n fmt.cmmFormat = FOUR_BYTE_ABGR_LCMS_FMT;\r\n fmt.alphaOffset = 0;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_BYTE_GRAY: {\r\n fmt.cmmFormat = BYTE_GRAY_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_USHORT_GRAY: {\r\n fmt.cmmFormat = USHORT_GRAY_LCMS_FMT;\r\n break;\r\n }\r\n\r\n case BufferedImage.TYPE_BYTE_BINARY:\r\n case BufferedImage.TYPE_USHORT_565_RGB:\r\n case BufferedImage.TYPE_USHORT_555_RGB:\r\n case BufferedImage.TYPE_BYTE_INDEXED: {\r\n // A bunch of unsupported formats\r\n return null;\r\n }\r\n\r\n default:\r\n break; // Try to look at sample model and color model\r\n }\r\n\r\n\r\n if (fmt.cmmFormat == 0) {\r\n ColorModel cm = bi.getColorModel();\r\n SampleModel sm = bi.getSampleModel();\r\n\r\n if (sm instanceof ComponentSampleModel) {\r\n ComponentSampleModel csm = (ComponentSampleModel) sm;\r\n fmt.cmmFormat = getFormatFromComponentModel(csm, cm.hasAlpha());\r\n fmt.scanlineStride = calculateScanlineStrideCSM(csm, bi.getRaster());\r\n } else if (sm instanceof SinglePixelPackedSampleModel) {\r\n SinglePixelPackedSampleModel sppsm = (SinglePixelPackedSampleModel) sm;\r\n fmt.cmmFormat = getFormatFromSPPSampleModel(sppsm, cm.hasAlpha());\r\n fmt.scanlineStride = calculateScanlineStrideSPPSM(sppsm, bi.getRaster());\r\n }\r\n\r\n if (cm.hasAlpha())\r\n fmt.alphaOffset = calculateAlphaOffset(sm, bi.getRaster());\r\n }\r\n\r\n if (fmt.cmmFormat == 0)\r\n return null;\r\n\r\n if (!fmt.setImageData(bi.getRaster().getDataBuffer())) {\r\n return null;\r\n }\r\n\r\n fmt.rows = bi.getHeight();\r\n fmt.cols = bi.getWidth();\r\n\r\n fmt.dataOffset = bi.getRaster().getDataBuffer().getOffset();\r\n\r\n return fmt;\r\n }", "public FloatBuffer putInBuffer(FloatBuffer buffer) {\n\t\tbuffer.put(x).put(y).put(z).put(w);\n\t\treturn buffer;\n\t}", "public void createBufferObjects(GL gl) {\n int[] vboIds = new int[2];\r\n GL11 gl11 = (GL11) gl;\r\n gl11.glGenBuffers(2, vboIds, 0);\r\n mVertexBufferObjectId = vboIds[0];\r\n mElementBufferObjectId = vboIds[1];\r\n\r\n // Upload the vertex data\r\n gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, mVertexBufferObjectId);\r\n mVertexByteBuffer.position(0);\r\n gl11.glBufferData(GL11.GL_ARRAY_BUFFER, mVertexByteBuffer.capacity(), mVertexByteBuffer, GL11.GL_STATIC_DRAW);\r\n\r\n gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, mElementBufferObjectId);\r\n mIndexBuffer.position(0);\r\n gl11.glBufferData(GL11.GL_ELEMENT_ARRAY_BUFFER, mIndexBuffer.capacity() * CHAR_SIZE, mIndexBuffer, GL11.GL_STATIC_DRAW);\r\n\r\n // We don't need the in-memory data any more\r\n mVertexBuffer = null;\r\n mVertexByteBuffer = null;\r\n mIndexBuffer = null;\r\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public MultiShape3D( Geometry geometry )\n {\n this( geometry, (Appearance)null );\n }", "private FloatBuffer createBuffer(int size)\n {\n // Need to allocate a byte buffer 4 times the size requested because the\n // size is treated as bytes, not number of floats.\n ByteBuffer buf = ByteBuffer.allocateDirect(size * 4);\n buf.order(ByteOrder.nativeOrder());\n FloatBuffer ret_val = buf.asFloatBuffer();\n\n return ret_val;\n }", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "public FloatSampleBuffer() {\n\t\tthis(0, 0, 1);\n\t}", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public FMOD_OUTPUT_OBJECT3DINFO set(\n FloatBuffer buffer,\n FMOD_VECTOR position$,\n float gain,\n float spread,\n float priority\n ) {\n buffer(buffer);\n position$(position$);\n gain(gain);\n spread(spread);\n priority(priority);\n\n return this;\n }", "protected NumericData<?> createData(long numPixels) {\n long bufferLength = numPixels * header.getChannels().size();\n\n switch (header.getChannels().get(0).getFormat()) {\n case UINT:\n return new CustomBinaryData<>(Data.UINT32, dataFactory.newIntData(bufferLength));\n case HALF:\n return new CustomBinaryData<>(Data.SFLOAT16, dataFactory.newShortData(bufferLength));\n case FLOAT:\n return dataFactory.newFloatData(bufferLength);\n default:\n // Should not happen unless this code hasn't been updated after a new ChannelFormat is added\n throw new UnsupportedOperationException(\n \"Unrecognized channel pixel format: \" + header.getChannels().get(0).getFormat());\n }\n }", "public static interface Updater {\n\t/**\n\t * Updates image data that is accessed by reference.\n\t * This method is called by the updateData method of an\n\t * ImageComponent object to effect\n\t * safe updates to image data that\n\t * is referenced by that object. Applications that wish to modify\n\t * such data must implement this method and perform all updates\n\t * within it.\n\t * <br>\n\t * NOTE: Applications should <i>not</i> call this method directly.\n\t *\n\t * @param imageComponent the ImageComponent object being updated.\n\t * @param index index of the image to be modified.\n\t * @param x starting X offset of the subregion.\n\t * @param y starting Y offset of the subregion.\n\t * @param width width of the subregion.\n\t * @param height height of the subregion.\n\t *\n\t * @see ImageComponent3D#updateData\n\t */\n\tpublic void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);\n }", "public interface JCGLArrayObjectUsableType\n extends JCGLResourceUsableType, JCGLNamedType, JCGLReferenceContainerType\n{\n /**\n * @param index The attribute index in the range {@code [0,\n * getMaximumVertexAttributes() - 1]}\n *\n * @return The attribute at the given index, if any\n */\n\n Optional<JCGLArrayVertexAttributeType> attributeAt(int index);\n\n /**\n * @return The supported maximum number of vertex attributes. Must be {@code\n * >= 16}.\n */\n\n int attributeMaximumSupported();\n\n /**\n * @return The index buffer that is currently bound to this array object, if\n * any\n */\n\n Optional<JCGLIndexBufferUsableType> indexBufferBound();\n}", "void invoke(@NativeType(\"bgfx_callback_interface_t *\") long _this, @NativeType(\"uint32_t\") int _width, @NativeType(\"uint32_t\") int _height, @NativeType(\"uint32_t\") int _pitch, @NativeType(\"bgfx_texture_format_t\") int _format, @NativeType(\"bool\") boolean _yflip);", "private BufferedImage user_space(BufferedImage image) {\n // create new_img with the attributes of image\n BufferedImage new_img = new BufferedImage(image.getWidth(),\n image.getHeight(), BufferedImage.TYPE_3BYTE_BGR);\n Graphics2D graphics = new_img.createGraphics();\n graphics.drawRenderedImage(image, null);\n graphics.dispose(); // release all allocated memory for this image\n return new_img;\n }", "public static void experimentThree(boolean reuse) {\n System.out.println(\"EXPERIMENT THREE: cache=\" + reuse);\n ArrayList<BufferedImage> images = new ArrayList<BufferedImage>();\n\n images.add(new BufferedImage(2048, 2048, BufferedImage.TYPE_INT_ARGB));\n\n System.out.println(\"--> Objects Initialized!\");\n\n long timeBefore = System.nanoTime();\n\n for (int i = 0; i < 10000; i++) {\n BufferedImage img = null;\n\n if (reuse) {\n img = images.get(0).getSubimage(0, 0, 640, 480);\n\n // THIS TAKES SO MUCH TIME!!!\n clearImage(img);\n } else {\n img = new BufferedImage(640, 480, BufferedImage.TYPE_INT_ARGB);\n }\n\n Graphics2D g2 = img.createGraphics();\n\n g2.fillRect(10, 10, 600, 400);\n\n g2.dispose();\n }\n\n long timeAfter = System.nanoTime();\n\n System.out.println(\"--> Duration: \" + (timeAfter - timeBefore) * 1E-9);\n }", "public interface Model {\n /**\n * Generate a image of checker board pattern (8 X 8) of the given size.\n *\n * @param size the size of the image\n * @return the 3D array of the generated checkerboard.\n */\n int[][][] generateChecker(int size);\n\n /**\n * Generate a image if rainbow stripes (7 colors) with the given size.\n *\n * @param height the height of the image\n * @param width the width of the image\n * @param vOrH the stripes should be vertical of horizontal.\n * @return the 3D array of the generated rainbow stripes.\n */\n int[][][] generateRainbow(int height, int width, VOrH vOrH);\n\n /**\n * Generate the appropriate-sized flags of a country with the given ratio.\n *\n * @param ratio the given ratio of the flag.\n * @param country the country whose flag will be generated.\n * @return the 3D array of the generated flag.\n */\n int[][][] generateFlags(int ratio, String country);\n\n /**\n * Blur the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array of the blurred image\n */\n int[][][] blurImage(int[][][] imageArray, int height, int width);\n\n /**\n * Sharpen the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array the sharpened image\n */\n int[][][] sharpenImage(int[][][] imageArray, int height, int width);\n\n /**\n * Grey scale the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return 3D array of the greyscale image\n */\n int[][][] greyscaleImage(int[][][] imageArray, int height, int width);\n\n /**\n * Sepia- tone the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return the 3D array of the sepia-tone image\n */\n int[][][] sepiaToneImage(int[][][] imageArray, int height, int width);\n\n /**\n * Dither the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image\n * @param width the width of the image\n * @return 3D array of the dithered image\n */\n int[][][] ditheringImage(int[][][] imageArray, int height, int width);\n\n /**\n * Mosaic the image using the image processor.\n *\n * @param imageArray the 3D array of the image\n * @param height the height of the image.\n * @param width the width of the image.\n * @param seedNum the number of seeds.\n * @return the 3D array of mosaic image.\n */\n int[][][] mosaicingImage(int[][][] imageArray, int height, int width, int seedNum);\n\n /**\n * Undo. Return a previous result before the operation.\n *\n * @return a previous result.\n * @throws EmptyStackException when there is no previous one.\n */\n int[][][] undo() throws EmptyStackException;\n\n /**\n * Redo. Return a previous result before an undo.\n *\n * @return a previous result before an undo.\n * @throws EmptyStackException when there is no previous one.\n */\n int[][][] redo() throws EmptyStackException;\n\n /**\n * Set the stacks for undo and redo. Add a new element to the undo stack, and clear the redo\n * stack.\n * @param add the image in 3D array to be added to the stack.\n */\n void setStack(int[][][] add);\n}", "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public J3DAttribute () {}", "public static Object3DData buildWireframe(Object3DData objData) {\n try {\n FloatBuffer vertexArrayBuffer = objData.getVertexArrayBuffer();\n IntBuffer drawOrder = createNativeByteBuffer(vertexArrayBuffer.capacity() / 3 * 2 * 4).asIntBuffer();\n for (int i = 0; i < vertexArrayBuffer.capacity()/3; i+=3) {\n drawOrder.put((i));\n drawOrder.put((i+1));\n drawOrder.put((i+1));\n drawOrder.put((i+2));\n drawOrder.put((i+2));\n drawOrder.put((i));\n }\n return new Object3DData(vertexArrayBuffer).setDrawOrder(drawOrder)\n .setVertexNormalsArrayBuffer(objData.getVertexNormalsArrayBuffer())\n .setColor(objData.getColor())\n .setVertexColorsArrayBuffer(objData.getVertexColorsArrayBuffer())\n .setTextureCoordsArrayBuffer(objData.getTextureCoordsArrayBuffer())\n .setPosition(objData.getPosition())\n .setRotation(objData.getRotation())\n .setDrawMode(GLES20.GL_LINES)\n .setDrawSize(-1);\n } catch (Exception ex) {\n Log.e(\"Object3DBuilder\", ex.getMessage(), ex);\n }\n return objData;\n }", "private BufferedImage CreateBuffedImage(WinFileMappingBuffer fm, boolean bWithAlphaChanle) {\n BitmapFileBuffer bitmap = new BitmapFileBuffer();\n if (!bitmap.Load(fm.getBuffer())) {\n return null;\n }\n return bitmap.GetBuffedImage(bWithAlphaChanle);\n }", "public Image getThree();", "public BoundingBox3d() {\n reset();\n }", "public ImageBuffer(int w, int h, int[] p, ColorModel cm, String s) {\n width = w;\n height = h;\n pixels = p;\n cModel = cm;\n name = s;\n }", "public static final PS3 create(int index){\n if( !libraryLoaded() ){\n System.out.println(\"PS3-ERROR: cannot create camera, dll not loaded\");\n return null;\n }\n \n PS3_Library.GUID guid = LIBRARY.CLEyeGetCameraUUID( index );\n if( guid.Data1 == 0){\n System.out.println(\"PS3-ERROR: index(\"+index+\") is not valid\");\n return null;\n }\n return new PS3(index, guid);\n }", "@StructMember(0) public native @Array({4}) FloatBuffer getQ();", "public SmoothData3D(int nX, int nY){\n\tsuper(nX,nY);\n }", "void imageData(int width, int height, int[] rgba);", "public Bitmap3DColor(\n float v1Red, float v1Green, float v1Blue, float v1Alpha,\n float v2Red, float v2Green, float v2Blue, float v2Alpha,\n float v3Red, float v3Green, float v3Blue, float v3Alpha,\n float v4Red, float v4Green, float v4Blue, float v4Alpha\n ) {\n if(\n v1Red < 0 || v1Red > 1 || v2Red < 0 || v2Red > 1 || v3Red < 0 || v3Red > 1 || v4Red < 0 || v4Red > 1 ||\n v1Green < 0 || v1Green > 1 || v2Green < 0 || v2Green > 1 || v3Green < 0 || v3Green > 1 || v4Green < 0 || v4Green > 1 ||\n v1Blue < 0 || v1Blue > 1 || v2Blue < 0 || v2Blue > 1 || v3Blue < 0 || v3Blue > 1 || v4Blue < 0 || v4Blue > 1 ||\n v1Alpha < 0 || v1Alpha > 1 || v2Alpha < 0 || v2Alpha> 1 || v3Alpha < 0 || v3Alpha > 1 || v4Alpha < 0 || v4Alpha > 1\n ) {\n throw new IllegalArgumentException(\"Values should be between 0 and 1\");\n }\n\n float[] colors = {\n v1Red, v1Green, v1Blue, v1Alpha,\n v2Red, v2Green, v2Blue, v2Alpha,\n v3Red, v3Green, v3Blue, v3Alpha,\n v4Red, v4Green, v4Blue, v4Alpha\n };\n\n ByteBuffer clb = ByteBuffer.allocateDirect(colors.length * 4);\n clb.order(ByteOrder.nativeOrder());\n this.colorBuffer = clb.asFloatBuffer();\n this.colorBuffer.put(colors);\n this.colorBuffer.position(0);\n }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public static FixedFrameVector3DBasics newYOnlyFixedFrameVector3DBasics(ReferenceFrame referenceFrame)\n {\n return new FixedFrameVector3DBasics()\n {\n private double y;\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return referenceFrame;\n }\n\n @Override\n public double getX()\n {\n return 0.0;\n }\n\n @Override\n public double getY()\n {\n return y;\n }\n\n @Override\n public double getZ()\n {\n return 0.0;\n }\n\n @Override\n public void setX(double x)\n {\n }\n\n @Override\n public void setY(double y)\n {\n this.y = y;\n }\n\n @Override\n public void setZ(double z)\n {\n }\n\n @Override\n public String toString()\n {\n return EuclidCoreIOTools.getTuple3DString(this);\n }\n };\n }", "public CanvasComponent(FloatProperty video_source_ratio_property,WritableImage writable_image,WritablePixelFormat<ByteBuffer> pixel_format,int width,int height) {\r\n super(new CanvasBuffer(video_source_ratio_property, width, height));\r\n this.writable_image = writable_image;\r\n this.pixel_format = pixel_format;\r\n\r\n }", "public BranchGroup InitPj3d(int mWinWidth, int mWinHeight)\r\n\t{\t\r\n\t\t//toolbox = new PJ3DToolbox();\r\n\t\tsetLayout( new BorderLayout( ) );\r\n\t\t//parent.width = 640;\r\n\t\t//parent.resize(640, 480);\r\n\r\n\t\t//Frame frame = new Frame(\"pj3d\");\r\n\t frame.pack();\r\n\t frame.show();\r\n\t frame.setSize(mWinWidth, mWinHeight);\r\n\r\n\t GraphicsConfiguration gc = parent.getGraphicsConfiguration();\r\n\t \r\n\t // default colors\r\n\t backgroundColor = new Color3f(0f, 0f, 0f);\r\n\t ambientColor = new Color3f(0.2f, 0.2f, 0.2f);\r\n\t diffuseColor = new Color3f(0.8f, 0.8f, 0.8f);\r\n\t emissiveColor = new Color3f(0.5f, 0.5f, 0.5f);\r\n\t specularColor = new Color3f(1.0f, 1.0f, 1.0f);\r\n\t textColor = new Color3f(0.5f, 0.5f, 0.5f);\r\n\t shininess = DEFAULTCOLOR;\r\n\t alpha = 0.0f;\r\n\t \r\n\t // default background um spaeter drauf zugreifen zu koennen\r\n\t //bg = new Background();\r\n\t bg = InitBackground();\r\n\t \r\n\t mb = new Pj3dScene(frame, gc, bg);\r\n\t branch = mb.InitBranch();\r\n\t \r\n\t // get the canvas3d to add the mouse and keylisteners\r\n\t canvas = mb.getMBCanvas3D();\r\n\t canvas.addKeyListener(this);\r\n\t canvas.addMouseListener(this);\r\n\t canvas.addMouseMotionListener(this);\r\n\t frame.add( \"Center\", canvas );\r\n\t \r\n\t frame.show( );\r\n\t frame.addWindowListener(new Pj3dWindowClosingAdapter(true));\r\n\t \r\n\t return branch;\r\n\t}", "@Test\r\n public void testJnaMemory2Mat() {\n Memory buffer = new Memory(width * height * 4);\r\n for (long i = 0; i < width * height; i++) {\r\n long x = i % width, y = i / width;\r\n buffer.setInt(i * 4, pixelFunc(x, y));\r\n }\r\n\r\n // we use the frame only to calculate values:\r\n Frame f = new Frame(width, height, Frame.DEPTH_UBYTE, 4);\r\n Mat m = new Mat(f.imageHeight, f.imageWidth, CV_MAKETYPE(f.imageDepth, f.imageChannels),\r\n new Pointer(buffer.getByteBuffer(0, width * height * 4).position(0)),\r\n f.imageStride * Math.abs(f.imageDepth) / 8);\r\n\r\n LOG.info(\"stride = \" + f.imageStride);\r\n\r\n // remove alpha channel\r\n Mat m2 = new Mat();\r\n cvtColor(m, m2, COLOR_BGRA2BGR);\r\n\r\n imwrite(new File(TEMP_DIR, \"testJnaMemory2Mat.png\").getAbsolutePath(), m2);\r\n // @insert:image:testJnaMemory2Mat.png@\r\n f.close();\r\n }", "protected AbstractMatrix3D() {}", "public ImageConfigThree(){\n\t\tsetup();\n\t\tsetMinPos(100);\n\t}", "public ByteBuffer nioBuffer()\r\n/* 703: */ {\r\n/* 704:712 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 705:713 */ return super.nioBuffer();\r\n/* 706: */ }", "public static JTensor newWithSize3d(long size0, long size1, long size2) {\n return new JTensor(\n TH.THTensor_(newWithSize3d)(size0, size1, size2)\n );\n }", "static native int jniFromBlobAndBuffer(\n AtomicLong out,\n long oldBlob,\n String oldAsPath,\n byte[] buffer,\n int bufferLen,\n String bufferAsPath,\n long opts);" ]
[ "0.7567604", "0.74625444", "0.7329122", "0.6182325", "0.60944444", "0.6063514", "0.5841055", "0.5173093", "0.511402", "0.4975364", "0.49658898", "0.4897689", "0.48070765", "0.47787723", "0.47725224", "0.4748502", "0.4748124", "0.4724577", "0.47241828", "0.47204652", "0.46753514", "0.46173087", "0.4602372", "0.4598838", "0.45569548", "0.45425344", "0.45398873", "0.4527923", "0.45181486", "0.4514088", "0.45110318", "0.4506102", "0.44883585", "0.44790125", "0.44676924", "0.4460312", "0.44490942", "0.44474587", "0.4438567", "0.44259843", "0.44147462", "0.4395823", "0.43953905", "0.43879166", "0.4383625", "0.43804976", "0.4374294", "0.43494254", "0.43366644", "0.43339086", "0.4317514", "0.43074507", "0.43056914", "0.42952263", "0.4292989", "0.42923006", "0.42870808", "0.4286112", "0.42820352", "0.42742544", "0.42724487", "0.4266095", "0.42635491", "0.42611164", "0.42489013", "0.42482707", "0.42435762", "0.42406416", "0.42355213", "0.42120412", "0.42112786", "0.42067987", "0.42052767", "0.41941604", "0.41886535", "0.41868564", "0.41827357", "0.41661853", "0.41602552", "0.41590947", "0.41534364", "0.41465074", "0.41417956", "0.4129027", "0.41249552", "0.41245344", "0.41236275", "0.41197014", "0.41129765", "0.4110965", "0.41086724", "0.410862", "0.4100813", "0.40953684", "0.40885803", "0.4084344", "0.40826565", "0.40809837", "0.40801173", "0.40791002" ]
0.8140228
0
Retrieves the depth of this 3D image component object.
public int getDepth() { if (isLiveOrCompiled()) if(!this.getCapability(ImageComponent.ALLOW_SIZE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("ImageComponent3D0")); return ((ImageComponent3DRetained)this.retained).getDepth(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float getDepth() {\r\n\t\treturn Float.parseFloat(getProperty(\"depth\").toString());\t\r\n\t}", "public Texture2D getDepthTexture()\n\t{\n\t\treturn mDepthTexture;\n\t}", "public float getDepth() {\n return depth_;\n }", "public float getDepth() {\n return depth_;\n }", "public float getDepth() {\n return depth_;\n }", "public float getDepth() {\n return depth_;\n }", "public float getDepth() {\n return depth;\n }", "float getDepth();", "float getDepth();", "public double getDepth();", "public static int getDepth() {\n return depth;\n }", "public native int getDepth() throws MagickException;", "public short getBitDepth() {\n\n\t\treturn getShort(ADACDictionary.PIXEL_BIT_DEPTH);\n\n\t}", "public int getDepth(){\n\t\treturn _depth;\n\t}", "public int depth() {\r\n\t\treturn this.depth;\r\n\t}", "public int getDepth() {\n return depth_;\n }", "public int getDepth() {\r\n return depth;\r\n }", "public int getDepth() {\n return depth;\n }", "public int getDepth()\n {\n return m_Depth;\n }", "int getDepth();", "public int getDepth(){\n\t\treturn depth;\n\t}", "public int getDepth() {\n return depth_;\n }", "public int getDepth(){\r\n return this.depth;\r\n }", "public int getDepth();", "public String getnDepth() {\n return nDepth;\n }", "public int getColorDepth() {\n\t\treturn colorDepth;\n\t}", "int getDepthIndex() {\n return depthIndex;\n }", "public int getDepth()\n {\n return depth; \n }", "int getColorDepth();", "public int getDepth() {\n return getDepthRecursive(root);\n\n }", "public int depth() {\n\t\treturn depthHelp(root);\r\n\t}", "public int depth ();", "public JSONObject getDepth() throws Exception;", "public Double getValue() {\n return depth;\n }", "int depth();", "int depth();", "public int depth(){\n if(root!=null){ // มี node ใน tree\n return height(root);\n }\n else {return -1;}\n }", "public Double getWellDepth() {\n\t\treturn wellDepth;\n\t}", "public int depth() {\n return parts.length - (isIndex() ? 0 : 1);\n }", "com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetColorDepth();", "@Override\r\n\tpublic double getDepth()\r\n\t{\r\n\r\n\t\tList<Entity> roots = new Stack<Entity>();\r\n\t\troots.addAll(getRoots());\r\n\r\n\t\tif (roots.size() == 0) {\r\n\t\t\tlogger.error(\"There is no root for this lexical semantic resource.\");\r\n\t\t\treturn Double.NaN;\r\n\t\t}\r\n\t\telse if (roots.size() > 1) {\r\n\t\t\tlogger.error(\"There are several roots for this lexical semantic resource.\");\r\n\t\t\treturn Double.NaN;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tEntity root = roots.get(0);\r\n\t\t\t// return getEccentricity(root);\r\n\r\n\t\t\tdouble maxPathLength = 0.0;\r\n\t\t\tdouble[] returnValues = computeShortestPathLengths(root, 0.0,\r\n\t\t\t\t\tmaxPathLength, new HashSet<Entity>());\r\n\t\t\tmaxPathLength = returnValues[1];\r\n\t\t\treturn maxPathLength;\r\n\t\t}\r\n\t}", "public int getBufferDepth() {\n return (this.bufferDepth);\n }", "public Integer getMaxDepth() {\n return this.maxDepth;\n }", "public String getDepthOfField() {\n double depthOfFieldMM = farFocalPoint - nearFocalPoint;\n\n // convert from mm to m\n double depthOfFieldMeters = depthOfFieldMM * 0.001;\n\n // return answer rounded to 2 decimal places\n return formatM(depthOfFieldMeters);\n }", "public Texture getDepthMapTexture(){\n return depthMap;\n }", "private int depth()\r\n\t{\r\n\t\t// If tree is empty then there are 0 levels\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t// Tree is not empty so use recursive depth method starting at Root level 1 to figure out depth\r\n\t\treturn depth(getRoot(), 1);\r\n\t}", "private int setDepth() {\n int getDepth = depth;\n if (depth != -1) {\n getDepth = depth + 1;\n }\n return getDepth;\n }", "int getOldDepth() {\n return mOldDepth;\n }", "public byte getBitDepth();", "public int getDepth() {\r\n\t\tint depth = 0;\r\n\t\tSearchNode<S, A> ancestor = this;\r\n\t\twhile(ancestor.parent != null) {\r\n\t\t\tdepth++;\r\n\t\t\tancestor = ancestor.parent;\r\n\t\t}\r\n\t\treturn depth;\r\n\t}", "public int getDimZ() {\r\n return dimZ;\r\n }", "public int getDepth(String categoryName);", "int getNewDepth() {\n return mNewDepth;\n }", "public int getNodeDepth() {\n int depth = 0;\n TreeNode tn = this;\n \n while(tn.getFather() != null) {\n tn = tn.getFather();\n depth++;\n }\n \n return depth;\n }", "public int getMaxDepth() {\n return maxDepth;\n }", "public Dimension3d getSize() {\n return size;\n }", "public int getMaxDepth() {\r\n\t\treturn maxDepth;\r\n\t}", "public short getZDim() {\n\t\treturn getShort(ADACDictionary.Z_DIMENSIONS);\n\t}", "public int getTreeDepth() {\r\n\t\tmaxDepth = 0;\r\n\t\treturn getTreeDepth(root, 0);\r\n\t}", "@Override\n\tpublic Integer getDepth()\n\t{\n\t\treturn null;\n\t}", "public double getZFactor() {\r\n\t\treturn z_factor;\r\n\t}", "public int discoverMaximumLayerDepth() {\n\t\tif (this.layers.size() > 0) {\n\t\t\tint layerDepth;\n\t\t\t\n\t\t\tfor (int i = 0; i < this.layers.size(); i++) {\n\t\t\t\tlayerDepth = this.layers.get(i).getDepth();\n\t\t\t\tthis.maximumLayerDepth = layerDepth > this.maximumLayerDepth ? layerDepth : this.maximumLayerDepth;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn this.maximumLayerDepth;\n\t}", "public int getSize() {\n\t\treturn point3D.size();\r\n\t}", "public Vector3f getDimensions();", "int getMax_depth();", "public int maxDepth() {\n return maxDepth;\n }", "public int maxDepth() {\n return maxDepth;\n }", "public int depth(){\n\t\tint depth = 0;\n\t\tif(this.isEmpty()){\n\t\t\treturn depth;\n\t\t} else {\n\t\t\tdepth= 1;\n\t\t}\n\t\tQueue queue = new Queue();\n\t\tqueue.enqueue(this);\n\t\t\n\t\twhile(!queue.isEmpty()){\n\t\t\tBinaryTree tree = (BinaryTree) queue.dequeue();\n\t\t\tif(tree.left.getElement()!=null){\n\t\t\t\tqueue.enqueue(tree.left);\n\t\t\t\tdepth++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn depth;\n\t}", "protected int computeColourfulDepth() {\n Point2D.Double p1, p2, p3;\r\n int depth = 0;\r\n for (int i1 = 0; i1 < k - 2; i1++) { // first colour\r\n for (int j1 = 0; j1 < sizes[i1]; j1++) { // j1 = 0..n_i1\r\n for (int i2 = i1 + 1; i2 < k - 1; i2++) { // second colour\r\n for (int j2 = 0; j2 < sizes[i2]; j2++) {\r\n for (int i3 = i2 + 1; i3 < k; i3++) {\r\n for (int j3 = 0; j3 < sizes[i3]; j3++) {\r\n p1 = colourSets.get(i1)[j1];\r\n p2 = colourSets.get(i2)[j2];\r\n p3 = colourSets.get(i3)[j3];\r\n if (checkIfInside(p1, p2, p3)) {\r\n depth++;\r\n // paint.paint(p1, p2, p3);\r\n double theta1 = Math.toDegrees(Math.atan2(p1.y, p1.x));\r\n double theta2 = Math.toDegrees(Math.atan2(p2.y, p2.x));\r\n double theta3 = Math.toDegrees(Math.atan2(p3.y, p3.x));\r\n if (theta1 < 0) {\r\n theta1 += 360;\r\n }\r\n if (theta2 < 0) {\r\n theta2 += 360;\r\n }\r\n if (theta3 < 0) {\r\n theta3 += 360;\r\n }\r\n if (Math.abs(theta2 - theta1) == 180 ||\r\n Math.abs(theta3 - theta2) == 180 ||\r\n Math.abs(theta1 - theta3) == 180){\r\n System.out.println(\"HEY HO\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n System.out.println(\"Small Differences in CSD = \" + smallDiff);\r\n return depth;\r\n }", "public int getLayerCount() {\n\t\treturn layers.length;\n\t}", "public void setDepth(double aDepth);", "public IfcPositiveLengthMeasure getThresholdDepth()\n\t{\n\t\treturn this.ThresholdDepth;\n\t}", "@Override\n public int getDepth() {\n return getSuperContainer().getDepth();\n }", "public int getDepth()\n {\n return traversalStack.size();\n }", "public int getZoomLevel() {\r\n\t\tif ( getOutput() == null ) { return 0; }\r\n\t\tDouble dataZoom = getOutput().getData().getZoomLevel();\r\n\t\tif ( dataZoom == null ) {\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\treturn (int) (dataZoom * 100);\r\n\t\t}\r\n\t}", "public double getVolume() {\n\t\treturn height * depth * length;\n\n\t}", "public String getFrontNeckDepth() {\r\n\t\treturn frontNeckDepth;\r\n\t}", "public int getHeight(){\n\t\tint h=maxDepth(root);\n\t\treturn h;\n\t}", "public int depth ( BinTree tree){\n\t\tint x = 1; \n\t\twhile( tree.left != null){\n\t\t\ttree= tree.left;\n\t\t\tx++;\n\t\t}\n\t\treturn x;\n\t}", "public float getZ()\n {\n return fz;\n }", "public double surfaceArea() {\n\treturn (2*getWidth()*getHeight()) + (2*getHeight()*depth) + (2*depth*getWidth());\n }", "int depth(BTNode node) {\n int d = 0;\n while (node != root) {\n node = node.parent;\n d++;\n }\n return d;\n }", "public float getZ(){\n\t\tif(!isRoot()){\n\t\t\treturn getParent().getZ() + z;\n\t\t}else{\n\t\t\treturn z;\n\t\t}\n\t}", "private Integer getDepth(BinaryNode node, int depth) {\n\n if (node == null) return depth;\n else return Math.max(getDepth(node.left, depth + 1),getDepth(node.right, depth + 1));\n }", "public String getDepth(String s) {\n return ((depth != FLOATNULL) ? new Float(depth).toString() : \"\");\n }", "public void setDepth(double depth) {\n\t\t this.depth = depth;\n\t }", "public boolean isDepthEnabled() {\n return Keys.isDepthOn(this.mActivity.getSettingsManager()) && !isCameraFrontFacing() && this.mAppController.getCurrentModuleIndex() == 4;\n }", "public double volume() {\n\t\treturn this.iWidth * this.iLength * this.iDepth\r\n\t}", "public int getRecursionDepth() {\n return recursionDepth_;\n }", "protected abstract double lookupDepth(int depthX, int depthY);", "public int getMemberDepth(int edge, int layer, int slice) throws EdgeOutOfRangeException, LayerOutOfRangeException, SliceOutOfRangeException\n {\n return 1;\n }", "public int getRecursionDepth() {\n return recursionDepth_;\n }", "public int attributeListDepth() {\n return _attributeListDepth;\n }", "public void setDepth(int depth) {\r\n this.depth = depth;\r\n }", "public int depth() { return Math.max(left.depth(), right.depth()) + 1; }", "public int getZ()\n {\n return zaxis;\n }", "@Override\r\n public int getDepth() {\r\n final int len = getPath().length();\r\n if (len == 0 || len == 1 && getPath().charAt(0) == SEPARATOR_CHAR) {\r\n return 0;\r\n }\r\n int depth = 1;\r\n for (int pos = 0; pos > -1 && pos < len; depth++) {\r\n pos = getPath().indexOf(SEPARATOR_CHAR, pos + 1);\r\n }\r\n return depth;\r\n }", "public int getDepthMapFBO(){\n return depthMapFBO;\n }", "public final int getNestingDepth() {\n return m_nestingDepth;\n }", "public int minDepth() {\r\n\t\tint height = Integer.MAX_VALUE;\r\n\t\tif (left != null)\r\n\t\t\theight = Math.min(height, left.height() + 1);\r\n\t\tif (right != null)\r\n\t\t\theight = Math.min(height, right.height() + 1);\r\n\t\tif (left == null && right == null)\r\n\t\t\theight = 0;\r\n\t\treturn height;\r\n\t}" ]
[ "0.74386144", "0.7429045", "0.7381819", "0.7381819", "0.7342094", "0.7311989", "0.7247861", "0.7236673", "0.7236673", "0.7193481", "0.70888275", "0.7072651", "0.69471174", "0.6910305", "0.6895472", "0.6886994", "0.688488", "0.68635905", "0.68589616", "0.6842619", "0.68388504", "0.67594594", "0.6705749", "0.66756", "0.66485244", "0.663741", "0.65943116", "0.6592435", "0.65101224", "0.64096946", "0.6354339", "0.63330173", "0.63017", "0.6300823", "0.6250894", "0.6250894", "0.62351096", "0.6145779", "0.6141558", "0.6120946", "0.60656315", "0.60490716", "0.60475177", "0.6034639", "0.60003614", "0.5960547", "0.59076756", "0.59018725", "0.5885255", "0.58685786", "0.58450276", "0.5798769", "0.5764647", "0.5740604", "0.57377183", "0.5735012", "0.5701516", "0.5696646", "0.56888646", "0.56773186", "0.56762713", "0.5630758", "0.56247485", "0.56241035", "0.5600396", "0.5596265", "0.5579596", "0.5578201", "0.55705273", "0.55672634", "0.55500746", "0.55412483", "0.5520233", "0.5518968", "0.5403278", "0.53858775", "0.53825265", "0.53755", "0.5345145", "0.53412074", "0.53404886", "0.53399885", "0.53345907", "0.53303486", "0.53182316", "0.5311801", "0.5310818", "0.5296404", "0.5282559", "0.52771837", "0.52712274", "0.5271183", "0.52711016", "0.52673095", "0.5260149", "0.52474904", "0.524292", "0.5237607", "0.5233171", "0.52244174" ]
0.8236142
0
Sets the array of images in this image component to the specified array of BufferedImage objects. If the data access mode is not byreference, then the BufferedImage data is copied into this object. If the data access mode is byreference, then a shallow copy of the array of references to the BufferedImage objects is made, but the BufferedImage data is not necessarily copied. The image class is set to ImageClass.BUFFERED_IMAGE.
public void set(BufferedImage[] images) { checkForLiveOrCompiled(); int depth = ((ImageComponent3DRetained)this.retained).getDepth(); if (depth != images.length) throw new IllegalArgumentException(J3dI18N.getString("ImageComponent3D1")); for (int i=0; i<depth; i++) { ((ImageComponent3DRetained)this.retained).set(i, images[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "public void set(RenderedImage[] images) {\n\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "void setImage(BufferedImage i);", "public void setImages(Bitmap[] images){\n this.images=images;\n currentFrame=0;\n startTime=System.nanoTime();\n }", "public void setImageData(byte[] value) {\r\n this.imageData = ((byte[]) value);\r\n }", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "public void setImage(BufferedImage i) {\n // Paint image object\n paint = true;\n image = i;\n this.repaint();\n }", "public void setBufferImage(Image bufferImage) {\n this.bufferImage = bufferImage;\n }", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "public void setImages() {\n\n imgBlock.removeAll();\n imgBlock.revalidate();\n imgBlock.repaint();\n labels = new JLabel[imgs.length];\n for (int i = 0; i < imgs.length; i++) {\n\n labels[i] = new JLabel(new ImageIcon(Toolkit.getDefaultToolkit().createImage(imgs[i].getSource())));\n imgBlock.add(labels[i]);\n\n }\n\n SwingUtilities.updateComponentTreeUI(jf); // refresh\n initialized = true;\n\n }", "public void setImages(byte[] images) {\n this.images = images;\n }", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public void setImages(MimsPlus[] images) {\n this.images = images;\n }", "public void setBfImageByData(int [][][] data){\r\n\t\tBfImage = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);\r\n\t\tfor (int i = 0; i < width; i++) {\r\n\t\t\tfor (int j = 0; j < height; j++) {\r\n\t\t\t\tint [] rgb = data[j][i];\r\n\t\t\t\tif (rgb[0] == -1){\t//is transparent\r\n\t\t\t\t\tBfImage.setRGB(i, j, Transparency.TRANSLUCENT);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tBfImage.setRGB(i, j, Utils.getRGB(rgb[0], rgb[1], rgb[2]));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "void lSetImage(Image img);", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public void setImageData(byte[] imageData) {\n if (tile != null) {\n tile.setImageData(imageData);\n } else {\n this.data = imageData;\n }\n }", "public MagickImage(MagickImage[] images) throws MagickException {\n\t\tinitMultiImage(images);\n\t}", "private void resetBuffer() {\n\t\tbufferWidth = getSize().width;\n\t\tbufferHeight = getSize().height;\n\n\t\t// clean up the previous image\n\t\tif (bufferGraphics != null) {\n\t\t\tbufferGraphics.dispose();\n\t\t\tbufferGraphics = null;\n\t\t}\n\t\tif (bufferImage != null) {\n\t\t\tbufferImage.flush();\n\t\t\tbufferImage = null;\n\t\t}\n\t\tSystem.gc();\n\n\t\tbufferImage = new BufferedImage(bufferWidth, bufferHeight,\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\n\t\tbufferGraphics = bufferImage.createGraphics();\n\t\tbufferGraphics.setRenderingHint (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t}", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public abstract BufferedImage applyTo(BufferedImage image);", "public Image(MyColor [][] myImage) {\n originalImage = myImage; \n }", "public BufferedImgBase(byte[] byteimg) throws IOException{\n // convert byte[] back to a BufferedImage\n InputStream is = new ByteArrayInputStream(byteimg);\n BufferedImage newBi = ImageIO.read(is);\n //this.img --> BufferedImage\n this.img = newBi;\n }", "public void setImage(byte[] value) {\n this.image = ((byte[]) value);\n }", "protected void setImageData(BufferedImage img) {\n \t\tif (format == null || format == Format.TEXT || format == Format.COLOR16_8x8)\n \t\t\treturn;\n \t\n \t\tequalize(img);\n \t\t\n \t\t//denoise(img);\n \t\t\n \t\tupdatePaletteMapping();\n \t\n \t\tflatten(img);\n \t\t\n \t\tif (!importDirectMappedImage(img)) {\n \t\t\tconvertImageToColorMap(img);\n \t\t}\n \t\n \t\treplaceImageData(img);\n \t}", "public Image[] getImages() {\n return images;\n }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public void setImages(final Collection<GPImageLinkComponent> value)\n\t{\n\t\tsetImages( getSession().getSessionContext(), value );\n\t}", "public void setPixel(int x, int y, int iArray[], DataBuffer data) {\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n int pixelOffset = y * scanlineStride + x * pixelStride;\n for (int i = 0; i < numBands; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], iArray[i]);\n }\n }", "void setSourceImage(BufferedImage mySourceImage);", "private void drawArray(ArrayList<NormalFishCollect> images, GraphicsContext gc) {\n\t\tgc.save();\n\t\tfor (int i = 0; i < images.size(); i++) {\n\t\t\tgc.drawImage(images.get(i).img, images.get(i).x, images.get(i).y);\n\n\t\t}\n\t\tgc.restore();\n\n\t}", "public void divideImage() {\n\n int chunkWidth = 70;\n int chunkHeight = 70;\n int count = 0;\n imgs = new BufferedImage[100];\n for (int x = 0; x < 10; x++)\n for (int y = 0; y < 10; y++) {\n\n try{\n\n imgs[count] = new BufferedImage(chunkWidth, chunkHeight, img.getType());\n Graphics2D gr = imgs[count++].createGraphics();\n gr.drawImage(img, 0, 0, chunkWidth, chunkHeight, chunkWidth * y, chunkHeight * x, chunkWidth * y + chunkWidth, chunkHeight * x + chunkHeight, null);\n gr.dispose();\n\n } catch (Exception e){\n\n // e.printStackTrace();\n\n }\n\n }\n\n }", "private native void initMultiImage(MagickImage[] images)\n\t\t\tthrows MagickException;", "public ImageProcessor(ImageArray im) {\n originalIm= im;\n currentIm= originalIm.copy();\n }", "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "public void set(RenderedImage im) {\n this.im = im;\n ic.set(im);\n }", "public void setPixels(int x, int y, int w, int h, int iArray[], DataBuffer data) {\n int x1 = x + w;\n int y1 = y + h;\n\n if (x < 0 || x >= width || w > width || x1 < 0 || x1 > width || y < 0 || y >= height || h > height\n || y1 < 0 || y1 > height) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n\n int lineOffset = y * scanlineStride + x * pixelStride;\n int srcOffset = 0;\n\n for (int i = 0; i < h; i++) {\n int pixelOffset = lineOffset;\n for (int j = 0; j < w; j++) {\n for (int k = 0; k < numBands; k++) {\n data.setElem(bankIndices[k], pixelOffset + bandOffsets[k], iArray[srcOffset++]);\n }\n pixelOffset += pixelStride;\n }\n lineOffset += scanlineStride;\n }\n }", "public Builder setImages(Image... images) {\n this.images = images;\n return this;\n }", "public BufferedImage bufferedImage() {\n return buffered;\n }", "public void setDataFrom(final ModelAnimationImages otherImages) {\r\n\t\tclear();\r\n\r\n\t\tif (otherImages!=null) {\r\n\t\t\tnames.addAll(otherImages.names);\r\n\t\t\timagesHashes.addAll(otherImages.imagesHashes);\r\n\t\t\timages.addAll(otherImages.images.stream().map(image->copyImage(image)).collect(Collectors.toList()));\r\n\t\t}\r\n\t}", "public void setDataElements(int x, int y, Object obj, DataBuffer data) {\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n\n int type = getTransferType();\n int numDataElems = getNumDataElements();\n int pixelOffset = y * scanlineStride + x * pixelStride;\n\n switch (type) {\n\n case DataBuffer.TYPE_BYTE:\n\n byte[] barray = (byte[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], ((int) barray[i]) & 0xff);\n }\n break;\n\n case DataBuffer.TYPE_USHORT:\n case DataBuffer.TYPE_SHORT:\n\n short[] sarray = (short[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], ((int) sarray[i]) & 0xffff);\n }\n break;\n\n case DataBuffer.TYPE_INT:\n\n int[] iarray = (int[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], iarray[i]);\n }\n break;\n\n case DataBuffer.TYPE_FLOAT:\n\n float[] farray = (float[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElemFloat(bankIndices[i], pixelOffset + bandOffsets[i], farray[i]);\n }\n break;\n\n case DataBuffer.TYPE_DOUBLE:\n\n double[] darray = (double[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElemDouble(bankIndices[i], pixelOffset + bandOffsets[i], darray[i]);\n }\n break;\n\n }\n }", "@Override\n public ImageData[] newArray(int size) {\n return new ImageData[size];\n }", "public void setImage(BufferedImage im) {\r\n\t\timage = im;\r\n\t}", "@Override\n protected void putImageBuffer(BufferedImage input) \n {\n // Load data in. \n for (int y = 0; y < height; y++) \n {\n for (int x = 0; x < width; x++) \n {\n\t\tdouble h = getHeight(input, x, y);\n\t\tdouble du = 0;\n\t\tdouble dv = 0;\n\t\t\n\t\tif(x > 0)\n\t\t{\t\n\t\t du += h - getHeight(input, x-1, y);\n\t\t}\n\t\tif(x < width - 1)\n\t\t{\n\t\t du += getHeight(input, x+1, y) - h;\n\t\t}\n\t\tif(y > 0)\n\t\t{\n\t\t dv += h - getHeight(input, x , y-1);\n\t\t}\n\t\tif(y < height - 1)\n\t\t{\n\t\t dv += getHeight(input, x, y+1) - h;\n\t\t}\n\t\t\n\t\tdouble u = -du;\n\t\tdouble v = -dv;\n\t\tdouble w = 0.25;\n \n\t\tdouble n = Math.sqrt(u*u + v*v + w*w);\n\n byte a = (byte)(h * 255.0);\n byte r = (byte)((u / n + 1.0) / 2.0 * 255.0);\n byte g = (byte)((v / n + 1.0) / 2.0 * 255.0);\n byte b = (byte)((w / n + 1.0) / 2.0 * 255.0);\n \n int index = (x + y * allocatedWidth) * 4;\n pixelData.put(index++, r);\n pixelData.put(index++, g);\n pixelData.put(index++, b);\n pixelData.put(index , a);\n }\n }\n }", "public void setInput(byte[] acImageR, byte[] acImageG, byte[] acImageB, byte[] acImageA) {\r\n super.setInput(acImageR, acImageG, acImageB, acImageA);\r\n\r\n // Reset the intensity image which corresponds to the RGB channels\r\n // so that it can be recomputed.\r\n m_acImageI = null;\r\n\r\n // Input color values are scaled by alpha values representing opacity.\r\n for (int i = 0; i < acImageA.length; i++) {\r\n m_acImageR[i] = (byte) ( ( (int) (m_acImageR[i] & 0x0ff)) * ( (int) (m_acImageA[i] & 0x0ff)) / 255);\r\n m_acImageG[i] = (byte) ( ( (int) (m_acImageG[i] & 0x0ff)) * ( (int) (m_acImageA[i] & 0x0ff)) / 255);\r\n m_acImageB[i] = (byte) ( ( (int) (m_acImageB[i] & 0x0ff)) * ( (int) (m_acImageA[i] & 0x0ff)) / 255);\r\n }\r\n }", "public void setImage(BufferedImage image) {\n\t\tdisplayImage = image;\n\t\tinitBbox();\n\t}", "public Image getImg(){\n\t\treturn imgs[count];\n\t}", "public void updateImage(ColorImage newImage) {\n currentImage.push(newImage);\n }", "public Sprite(Texture[] newImageArray) throws Exception{\n\t\timages = newImageArray;\n\t\tcheckSizes();\n\t}", "public void setImage(Image img) {\r\n this.img = img;\r\n }", "public List<Image> getImages() {\r\n\t\treturn immutableImageList;\r\n\t}", "@WorkerThread @UiThread\n public void setPictures(Iterable<Picture> pictures) {\n List<String> titles = new ArrayList<>();\n List<String> urls = new ArrayList<>();\n List<String> urlsLowRes = new ArrayList<>();\n\n for (Picture picture: pictures) {\n titles.add(picture.title);\n urls.add(picture.url);\n // NEW!! Model stores low res urls\n urlsLowRes.add(picture.lowResUrl);\n }\n\n String[] titlesAsArray = titles.toArray(new String[titles.size()]);\n String[] urlsAsArray = urls.toArray(new String[urls.size()]);\n String[] urlsLowResAsArray = urlsLowRes.toArray(new String[urlsLowRes.size()]);\n\n // Synchronize for the shortest possible time\n synchronized (this) {\n this.titles = titlesAsArray;\n this.urls = urlsAsArray;\n this.urlsLowRes = urlsLowResAsArray;\n this.bitmaps.clear();\n this.bitmapsLowRes.clear();\n }\n\n // Tell all registered views that the list of pictures has changed\n notifyViews(Event.PICTURES_LIST_CHANGED);\n }", "public void setIcon (playn.core.Image... icons) {\n assert icons.length > 0;\n List<BufferedImage> images = new ArrayList<BufferedImage>();\n for (playn.core.Image icon : icons) images.add(((JavaImage)icon).bufferedImage());\n _frame.setIconImages(images);\n }", "private void setArrays() {\n // Set the tile arrays\n tileLogic = new boolean[size][size];\n tilesTex = new TextureRegion[size][size];\n\n // Set all tilesTex to clear\n for(int y = 0; y < size; y++)\n for(int x = 0; x < size; x++)\n tilesTex[x][y] = new TextureRegion(assets.clearTile);\n }", "public byte[] getImages() {\n return images;\n }", "public void set(int index, RenderedImage image) {\n\n checkForLiveOrCompiled();\n // For RenderedImage the width and height checking is done in the retained.\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public void updateBatches(ImageBatches batches) {\r\n\t\tthis.batches = batches;\r\n\t\tif (batches == null) {\r\n\t\t\tthis.batch = new ImageBatch[0];\r\n\t\t} else {\r\n\t\t\tthis.batch = batches.getBatches();\r\n\t\t}\r\n\t\tfireTableDataChanged();\r\n\t}", "public BufferedImage imageToBuffered(Image img) {\n BufferedImage bfImg = new BufferedImage(\n img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_ARGB);\n\n // Copy image to buffered image.\n Graphics g = bfImg.createGraphics();\n\n // Clear background and paint the image.\n g.drawImage(img, 0, 0, null);\n g.dispose();\n\n return bfImg;\n }", "public BufferedImage getImage() {\n/* 81 */ return this.bufImg;\n/* */ }", "public interface ImageOperation {\n\tpublic Color[][] doOperation(Color[][] imageArray);\n}", "public void ResetState() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n pictures[i][j] = temp_pictures[i][j];\n pictures2[i][j] = pictures[i][j];\n\n\n }\n }\n }", "@Basic @Immutable\n\tpublic Sprite[] getImages() {\n\t\treturn this.images;\n\t}", "public BufferedImage makeBufferedImage()\r\n {\r\n\treturn makeRGBImage().makeBufferedImage();\r\n }", "public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}", "public void setImage(Image newImage)\n {\n if (newImage == null)\n {\n setFill(null);\n }\n else\n {\n setFill(new ImageFill(newImage));\n }\n }", "public void testSetImage() {\n byte[] image = new byte[] {1, 2, 3};\n byte[] expResult = new byte[] {1, 2, 3};\n CLImage instance = new CLImage();\n instance.setImage(image);\n assertEquals(expResult.length, instance.image.length);\n for (int i = 0; i < expResult.length; ++i)\n {\n assertEquals(expResult[i], instance.image[i]);\n }\n }", "public native void syncImage() throws MagickException;", "public ImageIcon[] getImages() {\n\t\treturn imageList;\n\t}", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "@SuppressWarnings(\"unused\")\n\tprivate void cloneImage() {\n//\t\tColorModel cm = offimg.getColorModel();\n//\t\t boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();\n//\t\t WritableRaster raster = offimg.copyData(null);\n//\t\t offimg2 = new BufferedImage(cm, raster, isAlphaPremultiplied, null);\n//\t\t BufferedImage currentImage = new BufferedImage(width,height,BufferedImage.TYPE_3BYTE_BGR);\n\n\t//Fastest method to clone the image (DOES NOT WORK for MACOS)\n//\t\t int[] frame = ((DataBufferInt)offimg.getRaster().getDataBuffer()).getData();\n//\t\t int[] imgData = ((DataBufferInt)offimg2.getRaster().getDataBuffer()).getData();\n//\t\t System.arraycopy(frame,0,imgData,0,frame.length);\n\t}", "void deleteCurrentImageBuffered();", "public void fillNewImage(){\n newImage = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);\n\n // Fill the new image with the pixels\n for(int i = 0; i < imageHeight; i++)\n for(int j = 0; j < imageWidth; j++){\n //System.out.println(\"pixel[\" + i + \"][\" + j + \"]\");\n newImage.setRGB(j, i, kCenters[assignedCluster[i][j]].getRGB());\n //newImage.setRGB(j, i, kCenters[0].getRGB());\n }\n }", "public void clearImages() {\n\t images.clear();\n\t}", "public void clear() {\n\t\tfor(int i=0;i<getWidth();i++) {\n\t\t\tfor(int j=0;j<getHeight();j++) {\n\t\t\t\tbImage.setRGB(i, j, 0xffffffff);\n\t\t\t}\n\t\t}\n\t}", "public BufferedImage convertToBimage(int[][][] TmpArray) {\n\n int width = TmpArray.length;\n int height = TmpArray[0].length;\n\n BufferedImage tmpimg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int a = TmpArray[x][y][0];\n int r = TmpArray[x][y][1];\n int g = TmpArray[x][y][2];\n int b = TmpArray[x][y][3];\n\n //set RGB value\n\n int p = (a << 24) | (r << 16) | (g << 8) | b;\n tmpimg.setRGB(x, y, p);\n\n }\n }\n return tmpimg;\n }", "private void setArray(byte[] initialArray)\r\n/* 60: */ {\r\n/* 61: 95 */ this.array = initialArray;\r\n/* 62: 96 */ this.tmpNioBuf = null;\r\n/* 63: */ }", "public void setBufferedBasicAvatar(Image bufferedBasicAvatar) {\n this.bufferedBasicAvatar = bufferedBasicAvatar;\n }", "public MagickImage[] breakFrames() throws MagickException {\n\t\tint length = getNumFrames();\n\t\tMagickImage[] list = new MagickImage[length];\n\t\tMagickImage image = this;\n\t\tfor (int i = 0; i < length && image != null; i++) {\n\t\t\tlist[i] = image;\n\t\t\timage = image.nextImage();\n\t\t}\n\t\treturn list;\n\t}", "public void setBuffers(KType[][] newBuffers) {\n // Check they're all the same size, except potentially the last one\n int totalLen = 0;\n for (int i = 0; i < newBuffers.length - 1; i++) {\n final int currLen = newBuffers[i].length;\n assert currLen == newBuffers[i + 1].length;\n totalLen += currLen;\n }\n buffers = newBuffers;\n blockLen = newBuffers[0].length;\n elementsCount = totalLen;\n }", "public void setArray(Object[] array)\n\t{\n\t\tif (SanityManager.DEBUG)\n\t\t{\n\t\t\tSanityManager.ASSERT(array != null, \n\t\t\t\t\t\"array input to setArray() is null, code can't handle this.\");\n\t\t}\n\n\t\tthis.array = ArrayUtil.copy( array );\n\t}", "public void redraw() {\n\t\tif(this.getGraphics() != null){\n\t\t\tthis.getGraphics().drawImage(imageBuffer, 0, 0, this); // Swap\n\t\t}\n\t}", "public Sprite(Texture newImage){\n\t\timages = new Texture[1];\n\t\timages[0] = newImage;\n\t}", "@Generated(hash = 15234777)\n public synchronized void resetImageList() {\n imageList = null;\n }", "public synchronized static void initialiseImages() \n {\n if (images == null) {\n GreenfootImage baseImage = new GreenfootImage(\"explosion-big.png\");\n int maxSize = baseImage.getWidth()/3;\n int delta = maxSize / IMAGE_COUNT;\n int size = 0;\n images = new GreenfootImage[IMAGE_COUNT];\n for (int i=0; i < IMAGE_COUNT; i++) {\n size = size + delta;\n images[i] = new GreenfootImage(baseImage);\n images[i].scale(size, size);\n }\n }\n }", "public void setPixels(short[] r, short[] g, short[] b) {\n for (int i = 0; i < pixels.length; ++i)\n pixels[i] = 0xFF000000 /* opaque */| ((r[i] & 0xFF) << 16)\n | ((g[i] & 0xFF) << 8) | (b[i] & 0xFF);\n if (source != null)\n source.newPixels(pixels, cModel, 0, width);\n }", "public void set(byte[] arrby) {\n ByteBuffer byteBuffer;\n ByteBuffer byteBuffer2 = byteBuffer = Blob.this.getByteBuffer();\n synchronized (byteBuffer2) {\n byteBuffer.position(Blob.this.getByteBufferPosition() + this.offset());\n byteBuffer.put(arrby);\n this.mCurrentDataSize = arrby.length;\n return;\n }\n }", "public void setImage(byte[] image) {\n this.image = image;\n }", "public void setImage(byte[] image) {\n this.image = image;\n }", "public Animation(BufferedImage[] images, long millisPerFrame, boolean looping){\n\t\tthis(images,millisPerFrame);\n\t\tthis.looping = looping;\n\t}", "public void setMorphTargetBufferAt(@EntityInstance int i,\n @IntRange(from = 0) int level,\n @IntRange(from = 0) int primitiveIndex,\n @NonNull MorphTargetBuffer morphTargetBuffer,\n @IntRange(from = 0) int offset,\n @IntRange(from = 0) int count) {\n nSetMorphTargetBufferAt(mNativeObject, i, level, primitiveIndex,\n morphTargetBuffer.getNativeObject(), offset, count);\n }", "@Override\n\tpublic void readImages() {\n\t\t\n\t}", "void setImage(PImage img) {\n _img = img;\n }", "protected void setArray(Object[] array){\r\n\t \tthis.array = array;\r\n\t }", "void setImage(Layer layer, Image image);", "public void setArray(int i, Array x);", "public void set(Object[] objects) {\r\n this.objects = objects;\r\n }" ]
[ "0.70050275", "0.6412651", "0.6383642", "0.60540545", "0.5707158", "0.5655328", "0.5630492", "0.55977684", "0.5497106", "0.5496483", "0.5482752", "0.5478314", "0.5478265", "0.5425905", "0.5414572", "0.5390117", "0.53253686", "0.5269805", "0.526949", "0.524221", "0.5241313", "0.51958376", "0.5187569", "0.5176171", "0.51595956", "0.5148551", "0.51388854", "0.51383084", "0.5123058", "0.51161873", "0.5105517", "0.506899", "0.5056304", "0.5051613", "0.50110626", "0.49991006", "0.4996009", "0.49945208", "0.49848902", "0.4981432", "0.49616516", "0.49393243", "0.49352688", "0.4881795", "0.48620024", "0.48619705", "0.4853112", "0.48396525", "0.48385954", "0.48252344", "0.48080665", "0.48063415", "0.47858876", "0.47757834", "0.47746566", "0.47733295", "0.47603333", "0.47522444", "0.4751535", "0.475125", "0.4747576", "0.47321716", "0.47045037", "0.4703774", "0.4695766", "0.46872482", "0.46860492", "0.46769246", "0.4675371", "0.46703526", "0.4667653", "0.4667564", "0.4662081", "0.46585867", "0.46574536", "0.46504045", "0.46436003", "0.4637518", "0.46333063", "0.46130398", "0.46124375", "0.45802104", "0.45671162", "0.4566966", "0.45646626", "0.4558907", "0.45514682", "0.45511442", "0.45502275", "0.4538458", "0.45309693", "0.45309693", "0.45295122", "0.45287406", "0.4526747", "0.4512313", "0.44987613", "0.44946164", "0.4494422", "0.44894898" ]
0.6895526
1
Sets the array of images in this image component to the specified array of RenderedImage objects. If the data access mode is not byreference, then the RenderedImage data is copied into this object. If the data access mode is byreference, then a shallow copy of the array of references to the RenderedImage objects is made, but the RenderedImage data is not necessarily copied. The image class is set to ImageClass.RENDERED_IMAGE if the data access mode is byreference and any of the specified RenderedImages is not an instance of BufferedImage. In all other cases, the image class is set to ImageClass.BUFFERED_IMAGE.
public void set(RenderedImage[] images) { checkForLiveOrCompiled(); int depth = ((ImageComponent3DRetained)this.retained).getDepth(); if (depth != images.length) throw new IllegalArgumentException(J3dI18N.getString("ImageComponent3D1")); for (int i=0; i<depth; i++) { ((ImageComponent3DRetained)this.retained).set(i, images[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "public void setImages(Bitmap[] images){\n this.images=images;\n currentFrame=0;\n startTime=System.nanoTime();\n }", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public void set(int index, RenderedImage image) {\n\n checkForLiveOrCompiled();\n // For RenderedImage the width and height checking is done in the retained.\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public void setImages() {\n\n imgBlock.removeAll();\n imgBlock.revalidate();\n imgBlock.repaint();\n labels = new JLabel[imgs.length];\n for (int i = 0; i < imgs.length; i++) {\n\n labels[i] = new JLabel(new ImageIcon(Toolkit.getDefaultToolkit().createImage(imgs[i].getSource())));\n imgBlock.add(labels[i]);\n\n }\n\n SwingUtilities.updateComponentTreeUI(jf); // refresh\n initialized = true;\n\n }", "void setImage(BufferedImage i);", "public void set(RenderedImage im) {\n this.im = im;\n ic.set(im);\n }", "public void setImages(byte[] images) {\n this.images = images;\n }", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public void setImages(MimsPlus[] images) {\n this.images = images;\n }", "public RenderedImage[] getRenderedImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getRenderedImage();\n }", "public Image[] getImages() {\n return images;\n }", "public interface ImageRenderer {\n /** Set displayed image from ImageProvider. This method is recommended,\n * because it allows the Rendered to choose the most efficient transfer\n * format. \n */\n void setImageFromSpec(ImageProvider spec);\n\n /** Set displayed image from buffered image. */\n void setImage(BufferedImage i);\n \n /** \n * Specify whether rendering should keep the aspect ratio of the image. \n * If no, it well be stretched to the display surface. If yes, borders\n * may occur, if the aspect ratio of surface and source image are different.\n * The default is false.\n */\n public void setKeepAspectRatio(boolean keepAspect);\n \n /**\n * Setter for property imageLocation.\n * @param imageLocation New value of property imageLocation.\n */\n void setImageLocation(URL imageLocation) throws IOException;\n\n /**\n * Setter for property imageResource.\n * @param imageResource New value of property imageResource.\n */\n void setImageResource(String imageResource) throws IOException;\n\n}", "public void setImages(final Collection<GPImageLinkComponent> value)\n\t{\n\t\tsetImages( getSession().getSessionContext(), value );\n\t}", "public void setImageData(byte[] value) {\r\n this.imageData = ((byte[]) value);\r\n }", "public void setImage(BufferedImage i) {\n // Paint image object\n paint = true;\n image = i;\n this.repaint();\n }", "public void render () {\n image (img, xC, yC, xLength * getPixelSize(), yLength * getPixelSize());\n }", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public void setImageData(byte[] imageData) {\n if (tile != null) {\n tile.setImageData(imageData);\n } else {\n this.data = imageData;\n }\n }", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public AlternateImageRenderer() {\r\n super(\"\");\r\n images = new Image[2];\r\n try {\r\n Resources imageRes = UIDemoMain.getResource(\"images\");\r\n images[0] = imageRes.getImage(\"sady.png\");\r\n images[1] = imageRes.getImage(\"smily.png\");\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n setUIID(\"ListRenderer\");\r\n }", "public Sprite(Texture[] newImageArray) throws Exception{\n\t\timages = newImageArray;\n\t\tcheckSizes();\n\t}", "public List<Image> getImages() {\r\n\t\treturn immutableImageList;\r\n\t}", "public MagickImage(MagickImage[] images) throws MagickException {\n\t\tinitMultiImage(images);\n\t}", "public Builder setImages(Image... images) {\n this.images = images;\n return this;\n }", "private void drawArray(ArrayList<NormalFishCollect> images, GraphicsContext gc) {\n\t\tgc.save();\n\t\tfor (int i = 0; i < images.size(); i++) {\n\t\t\tgc.drawImage(images.get(i).img, images.get(i).x, images.get(i).y);\n\n\t\t}\n\t\tgc.restore();\n\n\t}", "void setRenderableSource(Long id, SerializableRenderableImage source,\n\t\t\t int index) throws RemoteException;", "void setRenderableSource(Long id, RenderedImage source, int index)\n\tthrows RemoteException;", "public void renderImage(BufferedImage image, int xPosition, int yPosition)\n {\n int[] imagePixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();\n\n for(int y = 0; y < image.getHeight(); y++ ) \n {\n for(int x = 0; x < image.getWidth(); x++ ) \n {\n pixels[(x + xPosition) + (y + yPosition) * view.getWidth() ] = imagePixels[x + y * image.getWidth()];\n }\n }\n }", "private void setArrays() {\n // Set the tile arrays\n tileLogic = new boolean[size][size];\n tilesTex = new TextureRegion[size][size];\n\n // Set all tilesTex to clear\n for(int y = 0; y < size; y++)\n for(int x = 0; x < size; x++)\n tilesTex[x][y] = new TextureRegion(assets.clearTile);\n }", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "void setRenderedSource(Long id, RenderedImage source, int index)\n\tthrows RemoteException;", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "@Basic @Immutable\n\tpublic Sprite[] getImages() {\n\t\treturn this.images;\n\t}", "public void setImageIds(String [] ImageIds) {\n this.ImageIds = ImageIds;\n }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public void onImageRendered (RenderedImage renderedImage);", "private void drawImages() {\n\t\t\r\n\t}", "public void doImageRendering( int frame )\n\t{\n\t\tArrayColormap cmap = new ArrayColormap();\n\t\tColor color1 = new Color((int)red1.get(frame), (int)green1.get(frame), (int)blue1.get(frame) );\n\t\tColor color2 = new Color((int)red2.get(frame), (int)green2.get(frame), (int)blue2.get(frame) );\n\t\tColor color3 = new Color((int)red3.get(frame), (int)green3.get(frame), (int)blue3.get(frame) );\n\n\t\tcmap.setColor( 0, color2.getRGB() );\n\t\tcmap.setColor( 255, color1.getRGB() );\n\t\tcmap.setColorInterpolated(middleValue.get(), 0, 255, color3.getRGB() );\n\n\t\tfor( int j = 0; j < 256; j++ )\n\t\t\trbgLook[ j ] = cmap.getColor( (float) j / 255.0f ) & alpha_mask;\n\n\t\t//--- Do color replacement.\n\t\tBufferedImage source = getFlowImage();\n\t\tint[] pix = getBank( source );\n\t\tint rbg;\n\t\tint lumaValue;\n\t\tint a;\n\t\tint r;\n\t\tint g;\n\t\tint b;\n\n\t\tfor( int i = 0; i < pix.length; i++ )\n\t\t{\n\t\t\ta = ( pix[ i ] >> alpha ) & 0xff;\n\t\t\tr = ( pix[ i ] >> red ) & 0xff;\n\t\t\tg = ( pix[ i ] >> green ) & 0xff;\n\t\t\tb = ( pix[ i ] & 0xff );\n\n\t\t\tlumaValue = (( r + g + b ) * 255 ) / MAX_RGB;\n\t\t\trbg = rbgLook[ lumaValue ];\n\n\t\t\tpix[ i ] = a << alpha | rbg;\n\t\t}\n\n\t\tsendFilteredImage( source, frame );\n\n\t}", "public void setBfImageByData(int [][][] data){\r\n\t\tBfImage = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);\r\n\t\tfor (int i = 0; i < width; i++) {\r\n\t\t\tfor (int j = 0; j < height; j++) {\r\n\t\t\t\tint [] rgb = data[j][i];\r\n\t\t\t\tif (rgb[0] == -1){\t//is transparent\r\n\t\t\t\t\tBfImage.setRGB(i, j, Transparency.TRANSLUCENT);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tBfImage.setRGB(i, j, Utils.getRGB(rgb[0], rgb[1], rgb[2]));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void testSetImage() {\n byte[] image = new byte[] {1, 2, 3};\n byte[] expResult = new byte[] {1, 2, 3};\n CLImage instance = new CLImage();\n instance.setImage(image);\n assertEquals(expResult.length, instance.image.length);\n for (int i = 0; i < expResult.length; ++i)\n {\n assertEquals(expResult[i], instance.image[i]);\n }\n }", "public void updateBatches(ImageBatches batches) {\r\n\t\tthis.batches = batches;\r\n\t\tif (batches == null) {\r\n\t\t\tthis.batch = new ImageBatch[0];\r\n\t\t} else {\r\n\t\t\tthis.batch = batches.getBatches();\r\n\t\t}\r\n\t\tfireTableDataChanged();\r\n\t}", "public void setDataFrom(final ModelAnimationImages otherImages) {\r\n\t\tclear();\r\n\r\n\t\tif (otherImages!=null) {\r\n\t\t\tnames.addAll(otherImages.names);\r\n\t\t\timagesHashes.addAll(otherImages.imagesHashes);\r\n\t\t\timages.addAll(otherImages.images.stream().map(image->copyImage(image)).collect(Collectors.toList()));\r\n\t\t}\r\n\t}", "public byte[] getImages() {\n return images;\n }", "void lSetImage(Image img);", "final RenderedImage[] getSourceArray() {\n return sources.clone();\n }", "public ImageIcon[] getImages() {\n\t\treturn imageList;\n\t}", "protected void setImageData(BufferedImage img) {\n \t\tif (format == null || format == Format.TEXT || format == Format.COLOR16_8x8)\n \t\t\treturn;\n \t\n \t\tequalize(img);\n \t\t\n \t\t//denoise(img);\n \t\t\n \t\tupdatePaletteMapping();\n \t\n \t\tflatten(img);\n \t\t\n \t\tif (!importDirectMappedImage(img)) {\n \t\t\tconvertImageToColorMap(img);\n \t\t}\n \t\n \t\treplaceImageData(img);\n \t}", "public ArrayList<ImageView> getImages() {\n\t return images;\n\t}", "public void RenderObject(int[] obj_pixel_data, int obj_xPos, int obj_yPos, int obj_width, int obj_height) {\n\t\t// Go through the objects pixel data blending it with the current screen back buffer pixel data\n\t\tfor (int y = 0; y < obj_height; y++) {\n\t\t\tint screenY = y + obj_yPos + camera_yPos;\n\t\t\tfor (int x = 0; x < obj_width; x++) {\n\t\t\t\tint screenX = x + obj_xPos + camera_xPos;\n\t\t\t\t// calculate the pixel indexes for both the obj and the back buffer\n\t\t\t\tint obj_pixelIndex = x + y * obj_width,\n\t\t\t\t\tbuff_pixelIndex = screenX + screenY * width;\n\t\t\t\t// make sure this value is within the screen\n\t\t\t\tif ((screenY >= 0 && screenY < height && screenX >= 0 && screenX < width)) {\n\t\t\t\t\t// extra sanity check to make sure the buffer is not exceeded\n\t\t\t\t\tif (buff_pixelIndex >= 0 && buff_pixelIndex < pixel_data.length) {\n\t\t\t\t\t\tpixel_data[buff_pixelIndex] = Blend(pixel_data[buff_pixelIndex], obj_pixel_data[obj_pixelIndex]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setBufferImage(Image bufferImage) {\n this.bufferImage = bufferImage;\n }", "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "private native void initMultiImage(MagickImage[] images)\n\t\t\tthrows MagickException;", "public void divideImage() {\n\n int chunkWidth = 70;\n int chunkHeight = 70;\n int count = 0;\n imgs = new BufferedImage[100];\n for (int x = 0; x < 10; x++)\n for (int y = 0; y < 10; y++) {\n\n try{\n\n imgs[count] = new BufferedImage(chunkWidth, chunkHeight, img.getType());\n Graphics2D gr = imgs[count++].createGraphics();\n gr.drawImage(img, 0, 0, chunkWidth, chunkHeight, chunkWidth * y, chunkHeight * x, chunkWidth * y + chunkWidth, chunkHeight * x + chunkHeight, null);\n gr.dispose();\n\n } catch (Exception e){\n\n // e.printStackTrace();\n\n }\n\n }\n\n }", "private final void \n renderIt( ) {\n \t\n \tif( this.mImageCount > 0 || this.mLineCount > 0 || this.mRectCount > 0 || this.mTriangleCount > 0 ) {\n\t \n \t\tthis.mVertexBuffer.clear(); //clearing the buffer\n\t GLES11.glEnableClientState( GLES11.GL_VERTEX_ARRAY );\n\n\t //if there are images to render\n\t if( this.mImageCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mImageCount * 16 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glEnableClientState( GLES11.GL_TEXTURE_COORD_ARRAY ); //copy the texture coordinates into the GPU\n\t\t GLES11.glEnable(GLES11.GL_TEXTURE_2D);\n\t\t this.mVertexBuffer.position( 2 ); //put buffer position to the texture coordinates\n\t\t GLES11.glTexCoordPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer );\n\t\t this.mIndexBuffer.limit(this.mImageCount * 6); //DESKTOP VERSION ONLY\n\t\t GLES11.glDrawElements( GLES11.GL_TRIANGLES, this.mImageCount * BitsGLImage.INDICES_PER_SPRITE, GLES11.GL_UNSIGNED_SHORT, this.mIndexBuffer );\n\t \tGLES11.glDisable(GLES11.GL_TEXTURE_2D);\n\t\t GLES11.glDisableClientState( GLES11.GL_TEXTURE_COORD_ARRAY );\n\t }\n\t \n\t //if there are lines to render\n\t if( this.mLineCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mLineCount * 4 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 0, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glDrawArrays( GLES11.GL_LINES, 0, this.mLineCount * 2 ); //* 2 because every line got 2 points\n\t }\n\n\t //if there are rects to render\n\t if( this.mRectCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mRectCount * 8 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t this.mIndexBuffer.limit(this.mRectCount * 6); //DESKTOP VERSION ONLY\n\t \t GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, this.mVertexBuffer); //copy the vertices into the GPU\t \t \n\t \t \tGLES11.glDrawElements( GLES11.GL_TRIANGLES, this.mRectCount * BitsGLImage.INDICES_PER_SPRITE, GLES11.GL_UNSIGNED_SHORT, this.mIndexBuffer );\n\t }\n\t \n\t //if there are triangles to render\n\t if( this.mTriangleCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mTriangleCount * 12 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glEnableClientState( GLES11.GL_TEXTURE_COORD_ARRAY ); //copy the texture coordinates into the GPU\n\t\t GLES11.glEnable(GLES11.GL_TEXTURE_2D);\n\t\t this.mVertexBuffer.position( 2 ); //put buffer position to the texture coordinates\n\t\t GLES11.glTexCoordPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //16 == byteoffset -> es liegen 2 werte dazwischen\n\t\t GLES11.glDrawArrays( GLES11.GL_TRIANGLES, 0, this.mTriangleCount * 3 ); //* 2 because every line got 2 points\t \t\n\t\t GLES11.glDisable(GLES11.GL_TEXTURE_2D);\n\t\t GLES11.glDisableClientState( GLES11.GL_TEXTURE_COORD_ARRAY );\n\t }\n\t \n\t GLES11.glDisableClientState( GLES11.GL_VERTEX_ARRAY );\n \t\t\n\t //resetting counters\n\t this.mBufferIndex = 0;\n\t \tthis.mImageCount = 0;\n\t \tthis.mLineCount = 0;\n\t \tthis.mRectCount = 0;\n\t \tthis.mTriangleCount = 0;\n \t}\n }", "public void setStartingImages() {\n\t\t\n\t}", "public void setImage(byte[] value) {\n this.image = ((byte[]) value);\n }", "public static void createImages()\n {\n //Do if not done before\n if(!createdImages)\n {\n createdImages = true;\n for(int i=0; i<rightMvt.length; i++)\n {\n rightMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n leftMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n rightMvt[i].scale(rightMvt[i].getWidth()*170/100, rightMvt[i].getHeight()*170/100);\n leftMvt[i].scale(leftMvt[i].getWidth()*170/100, leftMvt[i].getHeight()*170/100);\n }\n for(int i=0; i<leftMvt.length; i++)\n {\n leftMvt[i].mirrorHorizontally();\n }\n for(int i=0; i<upMvt.length; i++)\n {\n upMvt[i] = new GreenfootImage(\"sniperEnemyUp\"+i+\".png\");\n downMvt[i] = new GreenfootImage(\"sniperEnemyDown\"+i+\".png\");\n upMvt[i].scale(upMvt[i].getWidth()*170/100, upMvt[i].getHeight()*170/100);\n downMvt[i].scale(downMvt[i].getWidth()*170/100, downMvt[i].getHeight()*170/100);\n }\n }\n }", "public abstract BufferedImage applyTo(BufferedImage image);", "public final void setMatLabResults(Object[] results)\r\n\t{\r\n\t\tmatLabResults = results;\r\n\t}", "public synchronized static void initialiseImages() \n {\n if (images == null) {\n GreenfootImage baseImage = new GreenfootImage(\"explosion-big.png\");\n int maxSize = baseImage.getWidth()/3;\n int delta = maxSize / IMAGE_COUNT;\n int size = 0;\n images = new GreenfootImage[IMAGE_COUNT];\n for (int i=0; i < IMAGE_COUNT; i++) {\n size = size + delta;\n images[i] = new GreenfootImage(baseImage);\n images[i].scale(size, size);\n }\n }\n }", "public interface ImageServer extends Remote {\n\n /**\n * Returns the identifier of the remote image. This method should be\n * called to return an identifier before any other methods are invoked.\n * The same ID must be used in all subsequent references to the remote\n * image.\n */\n Long getRemoteID() throws RemoteException;\n\n /**\n * Disposes of any resouces allocated to the client object with\n * the specified ID.\n */\n void dispose(Long id) throws RemoteException;\n\n /**\n * Increments the reference count for this id, i.e. increments the\n * number of RMIServerProxy objects that currently reference this id.\n */\n void incrementRefCount(Long id) throws RemoteException;\n\n\n /// Methods Common To Rendered as well as Renderable modes.\n\n\n /**\n * Gets a property from the property set of this image.\n * If the property name is not recognized, java.awt.Image.UndefinedProperty\n * will be returned.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param name the name of the property to get, as a String.\n * @return a reference to the property Object, or the value\n * java.awt.Image.UndefinedProperty.\n */\n Object getProperty(Long id, String name) throws RemoteException;\n\n /**\n * Returns a list of names recognized by getProperty(String).\n *\n * @return an array of Strings representing proeprty names.\n */\n String [] getPropertyNames(Long id) throws RemoteException;\n\n /**\n * Returns a list of names recognized by getProperty().\n *\n * @return an array of Strings representing property names.\n */\n String[] getPropertyNames(String opName) throws RemoteException;\n\n\n /// Rendered Mode Methods\n\n\n /** Returns the ColorModel associated with this image. */\n SerializableState getColorModel(Long id) throws RemoteException;\n\n /** Returns the SampleModel associated with this image. */\n SerializableState getSampleModel(Long id) throws RemoteException;\n\n /** Returns the width of the image on the ImageServer. */\n int getWidth(Long id) throws RemoteException;\n\n /** Returns the height of the image on the ImageServer. */\n int getHeight(Long id) throws RemoteException;\n\n /**\n * Returns the minimum X coordinate of the image on the ImageServer.\n */\n int getMinX(Long id) throws RemoteException;\n\n /**\n * Returns the minimum Y coordinate of the image on the ImageServer.\n */\n int getMinY(Long id) throws RemoteException;\n\n /** Returns the number of tiles across the image. */\n int getNumXTiles(Long id) throws RemoteException;\n\n /** Returns the number of tiles down the image. */\n int getNumYTiles(Long id) throws RemoteException;\n\n /**\n * Returns the index of the minimum tile in the X direction of the image.\n */\n int getMinTileX(Long id) throws RemoteException;\n\n /**\n * Returns the index of the minimum tile in the Y direction of the image.\n */\n int getMinTileY(Long id) throws RemoteException;\n\n /** Returns the width of a tile in pixels. */\n int getTileWidth(Long id) throws RemoteException;\n\n /** Returns the height of a tile in pixels. */\n int getTileHeight(Long id) throws RemoteException;\n\n /** Returns the X offset of the tile grid relative to the origin. */\n int getTileGridXOffset(Long id) throws RemoteException;\n\n /** Returns the Y offset of the tile grid relative to the origin. */\n int getTileGridYOffset(Long id) throws RemoteException;\n\n /**\n * Returns tile (x, y). Note that x and y are indices into the\n * tile array, not pixel locations. Unlike in the true RenderedImage\n * interface, the Raster that is returned should be considered a copy.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param x the x index of the requested tile in the tile array\n * @param y the y index of the requested tile in the tile array\n * @return a copy of the tile as a Raster.\n */\n SerializableState getTile(Long id, int x, int y) throws RemoteException;\n\n /**\n * Compresses tile (x, y) and returns the compressed tile's contents\n * as a byte array. Note that x and y are indices into the\n * tile array, not pixel locations.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param x the x index of the requested tile in the tile array\n * @param y the y index of the requested tile in the tile array\n * @return a byte array containing the compressed tile contents.\n */\n byte[] getCompressedTile(Long id, int x, int y) throws RemoteException;\n\n /**\n * Returns the entire image as a single Raster.\n *\n * @return a SerializableState containing a copy of this image's data.\n */\n SerializableState getData(Long id) throws RemoteException;\n\n /**\n * Returns an arbitrary rectangular region of the RenderedImage\n * in a Raster. The rectangle of interest will be clipped against\n * the image bounds.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param bounds the region of the RenderedImage to be returned.\n * @return a SerializableState containing a copy of the desired data.\n */\n SerializableState getData(Long id, Rectangle bounds) \n\tthrows RemoteException;\n\n /**\n * Returns the same result as getData(Rectangle) would for the\n * same rectangular region.\n */\n SerializableState copyData(Long id, Rectangle bounds)\n\tthrows RemoteException;\n\n /**\n * Creates a RenderedOp on the server side with a parameter block\n * empty of sources. The sources are set by separate calls depending\n * upon the type and serializabilty of the source.\n */\n\n void createRenderedOp(Long id, String opName,\n\t\t\t ParameterBlock pb,\n\t\t\t SerializableState hints) throws RemoteException;\n\n /**\n * Calls for Rendering of the Op and returns true if the RenderedOp\n * could be rendered else false\n */\n boolean getRendering(Long id) throws RemoteException;\n\n /**\n * Retrieve a node from the hashtable.\n */\n RenderedOp getNode(Long id) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderedImage on the server side\n */\n void setRenderedSource(Long id, RenderedImage source, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image as a RenderedOp on the server side\n */\n void setRenderedSource(Long id, RenderedOp source, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image which is on the same\n * server\n */\n void setRenderedSource(Long id, Long sourceId, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image which is on a different\n * server\n */\n void setRenderedSource(Long id, Long sourceId, String serverName,\n\t\t\t String opName, int index) throws RemoteException;\n\n\n /// Renderable mode methods\n\n\n /** \n * Gets the minimum X coordinate of the rendering-independent image\n * stored against the given ID.\n *\n * @return the minimum X coordinate of the rendering-independent image\n * data.\n */\n float getRenderableMinX(Long id) throws RemoteException;\n\n /** \n * Gets the minimum Y coordinate of the rendering-independent image\n * stored against the given ID.\n *\n * @return the minimum X coordinate of the rendering-independent image\n * data.\n */\n float getRenderableMinY(Long id) throws RemoteException;\n\n /** \n * Gets the width (in user coordinate space) of the \n * <code>RenderableImage</code> stored against the given ID.\n *\n * @return the width of the renderable image in user coordinates.\n */\n float getRenderableWidth(Long id) throws RemoteException;\n \n /**\n * Gets the height (in user coordinate space) of the \n * <code>RenderableImage</code> stored against the given ID.\n *\n * @return the height of the renderable image in user coordinates.\n */\n float getRenderableHeight(Long id) throws RemoteException;\n\n /**\n * Creates a RenderedImage instance of this image with width w, and\n * height h in pixels. The RenderContext is built automatically\n * with an appropriate usr2dev transform and an area of interest\n * of the full image. All the rendering hints come from hints\n * passed in.\n *\n * <p> If w == 0, it will be taken to equal\n * Math.round(h*(getWidth()/getHeight())).\n * Similarly, if h == 0, it will be taken to equal\n * Math.round(w*(getHeight()/getWidth())). One of\n * w or h must be non-zero or else an IllegalArgumentException \n * will be thrown.\n *\n * <p> The created RenderedImage may have a property identified\n * by the String HINTS_OBSERVED to indicate which RenderingHints\n * were used to create the image. In addition any RenderedImages\n * that are obtained via the getSources() method on the created\n * RenderedImage may have such a property.\n *\n * @param w the width of rendered image in pixels, or 0.\n * @param h the height of rendered image in pixels, or 0.\n * @param hints a RenderingHints object containg hints.\n * @return a RenderedImage containing the rendered data.\n */\n RenderedImage createScaledRendering(Long id, \n\t\t\t\t\tint w, \n\t\t\t\t\tint h, \n\t\t\t\t\tSerializableState hintsState) \n\tthrows RemoteException;\n \n /** \n * Returnd a RenderedImage instance of this image with a default\n * width and height in pixels. The RenderContext is built\n * automatically with an appropriate usr2dev transform and an area\n * of interest of the full image. The rendering hints are\n * empty. createDefaultRendering may make use of a stored\n * rendering for speed.\n *\n * @return a RenderedImage containing the rendered data.\n */\n RenderedImage createDefaultRendering(Long id) throws RemoteException;\n \n /** \n * Creates a RenderedImage that represented a rendering of this image\n * using a given RenderContext. This is the most general way to obtain a\n * rendering of a RenderableImage.\n *\n * <p> The created RenderedImage may have a property identified\n * by the String HINTS_OBSERVED to indicate which RenderingHints\n * (from the RenderContext) were used to create the image.\n * In addition any RenderedImages\n * that are obtained via the getSources() method on the created\n * RenderedImage may have such a property.\n *\n * @param renderContext the RenderContext to use to produce the rendering.\n * @return a RenderedImage containing the rendered data.\n */\n RenderedImage createRendering(Long id, \n\t\t\t\t SerializableState renderContextState) \n\tthrows RemoteException;\n\n /**\n * Creates a RenderableOp on the server side with a parameter block\n * empty of sources. The sources are set by separate calls depending\n * upon the type and serializabilty of the source.\n */\n void createRenderableOp(Long id, String opName, ParameterBlock pb)\n\tthrows RemoteException;\n\n /**\n * Calls for rendering of a RenderableOp with the given SerializableState\n * which should be a RenderContextState.\n */\n Long getRendering(Long id, SerializableState rcs) throws RemoteException;\n\n /**\n * Sets the source of the image which is on the same\n * server\n */\n void setRenderableSource(Long id, Long sourceId, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image which is on a different\n * server\n */\n void setRenderableSource(Long id, Long sourceId, String serverName,\n\t\t\t String opName, int index) throws RemoteException;\n\n /**\n * Sets the source of the operation refered to by the supplied \n * <code>id</code> to the <code>RenderableRMIServerProxy</code>\n * that exists on the supplied <code>serverName</code> under the\n * supplied <code>sourceId</code>. \n */\n void setRenderableRMIServerProxyAsSource(Long id,\n\t\t\t\t\t Long sourceId, \n\t\t\t\t\t String serverName,\n\t\t\t\t\t String opName,\n\t\t\t\t\t int index) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderableOp on the server side.\n */\n void setRenderableSource(Long id, RenderableOp source,\n\t\t\t int index) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderableImage on the server side.\n */\n void setRenderableSource(Long id, SerializableRenderableImage source,\n\t\t\t int index) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderedImage on the server side\n */\n void setRenderableSource(Long id, RenderedImage source, int index)\n\tthrows RemoteException;\n\n /**\n * Maps the RenderContext for the remote Image\n */\n SerializableState mapRenderContext(int id, Long nodeId,\n\t\t\t\t String operationName,\n\t\t\t\t SerializableState rcs)\n\tthrows RemoteException;\n\n /**\n * Gets the Bounds2D of the specified Remote Image\n */\n SerializableState getBounds2D(Long nodeId, String operationName)\n\tthrows RemoteException;\n\n /**\n * Returns <code>true</code> if successive renderings with the same\n * arguments may produce different results for this opName\n *\n * @return <code>false</code> indicating that the rendering is static.\n */\n public boolean isDynamic(String opName) throws RemoteException;\n\n /**\n * Returns <code>true</code> if successive renderings with the same\n * arguments may produce different results for this opName\n *\n * @return <code>false</code> indicating that the rendering is static.\n */\n public boolean isDynamic(Long id) throws RemoteException;\n\n /**\n * Gets the operation names supported on the Server\n */\n String[] getServerSupportedOperationNames() throws RemoteException;\n\n /**\n * Gets the <code>OperationDescriptor</code>s of the operations\n * supported on this server.\n */\n List getOperationDescriptors() throws RemoteException;\n\n /**\n * Calculates the region over which two distinct renderings\n * of an operation may be expected to differ.\n *\n * <p> The class of the returned object will vary as a function of\n * the nature of the operation. For rendered and renderable two-\n * dimensional images this should be an instance of a class which\n * implements <code>java.awt.Shape</code>.\n *\n * @return The region over which the data of two renderings of this\n * operation may be expected to be invalid or <code>null</code>\n * if there is no common region of validity.\n */\n SerializableState getInvalidRegion(Long id,\n\t\t\t\t ParameterBlock oldParamBlock,\n\t\t\t\t SerializableState oldHints,\n\t\t\t\t ParameterBlock newParamBlock,\n\t\t\t\t SerializableState newHints)\n\tthrows RemoteException;\n\n /**\n * Returns a conservative estimate of the destination region that\n * can potentially be affected by the pixels of a rectangle of a\n * given source. \n *\n * @param id A <code>Long</code> identifying the node for whom\n * the destination region needs to be calculated .\n * @param sourceRect The <code>Rectangle</code> in source coordinates.\n * @param sourceIndex The index of the source image.\n *\n * @return A <code>Rectangle</code> indicating the potentially\n * affected destination region, or <code>null</code> if\n * the region is unknown.\n */\n Rectangle mapSourceRect(Long id, Rectangle sourceRect, int sourceIndex)\n\tthrows RemoteException;\n\n /**\n * Returns a conservative estimate of the region of a specified\n * source that is required in order to compute the pixels of a\n * given destination rectangle. \n *\n * @param id A <code>Long</code> identifying the node for whom\n * the source region needs to be calculated .\n * @param destRect The <code>Rectangle</code> in destination coordinates.\n * @param sourceIndex The index of the source image.\n *\n * @return A <code>Rectangle</code> indicating the required source region.\n */\n Rectangle mapDestRect(Long id, Rectangle destRect, int sourceIndex)\n\tthrows RemoteException;\n\n /**\n * A method that handles a change in some critical parameter.\n */\n Long handleEvent(Long renderedOpID, \n\t\t String propName,\n\t\t Object oldValue, \n\t\t Object newValue) throws RemoteException;\n\n /**\n * A method that handles a change in one of it's source's rendering,\n * i.e. a change that would be signalled by RenderingChangeEvent.\n */\n Long handleEvent(Long renderedOpID, \n\t\t int srcIndex,\n\t\t SerializableState srcInvalidRegion, \n\t\t Object oldRendering) throws RemoteException;\n\n /**\n * Returns the server's capabilities as a\n * <code>NegotiableCapabilitySet</code>. Currently the only capabilities\n * that are returned are those of TileCodecs.\n */\n NegotiableCapabilitySet getServerCapabilities() throws RemoteException;\n\n /**\n * Informs the server of the negotiated values that are the result of\n * a successful negotiation.\n *\n * @param id An ID for the node which must be unique across all clients.\n * @param negotiatedValues The result of the negotiation.\n */\n void setServerNegotiatedValues(Long id, \n\t\t\t\t NegotiableCapabilitySet negotiatedValues)\n\tthrows RemoteException; \n}", "public Image(MyColor [][] myImage) {\n originalImage = myImage; \n }", "public void setInput(byte[] acImageR, byte[] acImageG, byte[] acImageB, byte[] acImageA) {\r\n super.setInput(acImageR, acImageG, acImageB, acImageA);\r\n\r\n // Reset the intensity image which corresponds to the RGB channels\r\n // so that it can be recomputed.\r\n m_acImageI = null;\r\n\r\n // Input color values are scaled by alpha values representing opacity.\r\n for (int i = 0; i < acImageA.length; i++) {\r\n m_acImageR[i] = (byte) ( ( (int) (m_acImageR[i] & 0x0ff)) * ( (int) (m_acImageA[i] & 0x0ff)) / 255);\r\n m_acImageG[i] = (byte) ( ( (int) (m_acImageG[i] & 0x0ff)) * ( (int) (m_acImageA[i] & 0x0ff)) / 255);\r\n m_acImageB[i] = (byte) ( ( (int) (m_acImageB[i] & 0x0ff)) * ( (int) (m_acImageA[i] & 0x0ff)) / 255);\r\n }\r\n }", "public void renderEntities() {\n Set<Entity> toRender = Engine\n .get()\n .getEntityStream()\n .getEntitiesCopy(SpaxelComponent.RENDER);\n for (Entity ne : toRender) {\n ((RenderBehaviour) ne.getComponent(SpaxelComponent.RENDER)).render(\n ne,\n bufferBuffer\n );\n }\n }", "@Override\n\tpublic void render() {\n\t\tgraphics.clearRect(0, 0, layerWidth, layerheight);\n\t\t\n\t\tfor(int i = 0, length = renderList.size(); i < length; i++) {\n\t\t\tSprite sprite = renderList.get(i);\n\t\t\trotateImage(sprite);\n\t\t\tgraphics.drawImage(sprite.getImage(), sprite.getX(), sprite.getY());\n\t\t}\n\t\t\n\t\ttimeDelay(3000);\n\t}", "@Test\n public void unappropriateRenderedImageTest() {\n final int dataType = getDataBufferType();\n final BandedSampleModel sampleMR = new BandedSampleModel(dataType, 100, 50, 3);\n final RenderedImage rendReadImage = new TiledImage(0, 0, 1000, 500, 0, 0, sampleMR, null);\n\n BandedSampleModel sampleMW = new BandedSampleModel(dataType, 100, 50, 3);\n WritableRenderedImage rendWriteImage = new TiledImage(0, 0, 100, 500, 15, 25, sampleMW, null);\n\n //test : different image dimension.\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //test : different tiles dimension.\n sampleMW = new BandedSampleModel(dataType, 10, 5, 3);\n rendWriteImage = new TiledImage(0, 0, 1000, 500, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //test : different datas type.\n final int dataTypeTest = (dataType == DataBuffer.TYPE_INT) ? DataBuffer.TYPE_BYTE : DataBuffer.TYPE_INT;\n sampleMW = new BandedSampleModel(dataTypeTest, 100, 50, 3);\n rendWriteImage = new TiledImage(0, 0, 1000, 500, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //out of rectangle\n final Rectangle subArea = new Rectangle(10, 10, 200, 100);\n sampleMW = new BandedSampleModel(dataType, 100, 50, 3);\n rendWriteImage = new TiledImage(0, 0, 200, 100, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage, subArea);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //bad tiles size\n sampleMW = new BandedSampleModel(dataType, 10, 50, 3);\n rendWriteImage = new TiledImage(10, 10, 200, 100, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage, subArea);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //bad tilesgridOffset\n sampleMW = new BandedSampleModel(dataType, 100, 50, 3);\n rendWriteImage = new TiledImage(10, 10, 200, 100, 1, 2, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage, subArea);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n }", "public void setPixel(int x, int y, int iArray[], DataBuffer data) {\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n int pixelOffset = y * scanlineStride + x * pixelStride;\n for (int i = 0; i < numBands; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], iArray[i]);\n }\n }", "public Image getImg(){\n\t\treturn imgs[count];\n\t}", "Render() {\n int imgNum;\n SampleModel sm = baseImage.getSampleModel(); // Set up the attributes for the new image.\n newImage = new TiledImage(baseImage.getMinX(),\n baseImage.getMinY(),\n (pixWidth * hTiles),\n (pixHeight * vTiles),\n baseImage.getTileGridXOffset(),\n baseImage.getTileGridYOffset(),\n baseImage.getSampleModel(),\n baseImage.getColorModel());\n RenderedImage smallImage; // Variable for holding the scaled down image to be placed in the large image.\n int tileArray[][] = new int[hTiles][vTiles]; // The array of how the tiles are arranged.\n // First, we select what tiles go where...\n for (int x = 0; x < hTiles; x++) { // Cycle through the image tiles, horizontally.\n for (int y = 0; y < vTiles; y++) { // Cycle through the image tiles, vertically.\n try {\n tileArray[x][y] = findBestFit(mapArray[x][y], tileArray, x, y); // Find the tile to go there.\n setCurr((x * vTiles) + y); // Update task stuff.\n setMsg(\"Choosing Image For Tile #\" + ((x * vTiles) + y));\n } catch (Exception e) {}\n }\n }\n\n setCurr(0); // Task stuff, for progress indicators...\n setMsg(\"Done Selecting Tiles... Generating Image\");\n\n // Next, we actually build the image based on the tiles we chose.\n for (int x = 0; x < hTiles; x++) { // Again, cycle horizonally,\n for (int y = 0; y < vTiles; y++) { // And vertically. ( for every tile in the image )\n try {\n smallImage = imageLoader.getRenderedImage(tileLibrary.get(tileArray[x][y]).getFileName()); // Load the image from the tile we selected.\n smallImage = imageOps.scale(smallImage, pixWidth, pixHeight); // Scale the image to the appropriate size.\n // Create a region of interest on the large image to paste the small image into.\n ROIShape myROI = new ROIShape(new Rectangle((x*pixWidth), (y*pixHeight), smallImage.getWidth(), smallImage.getHeight()));\n ParameterBlock pb = new ParameterBlock(); // Move the image to the appropriate spot...\n pb.addSource(smallImage);\n pb.add((float)(x*pixWidth));\n pb.add((float)(y*pixHeight));\n pb.add(new InterpolationNearest());\n smallImage = JAI.create(\"translate\", pb, null); // Do the translation.\n newImage.setData(smallImage.getData(), myROI); // Stick the tile image into the large image.\n setCurr((x * vTiles) + y); // Update task stuff.\n setMsg(\"Building Tile# \" + ((x * vTiles) + y));\n } catch (Exception e) {}\n }\n }\n setCurr(lengthOfTask); // Finish up the task stuff.\n setMsg(\"DONE!\");\n }", "@Override\n\tpublic void readImages() {\n\t\t\n\t}", "public void renderAll()\r\n\t{\r\n\t\tfor(IMmdPmdRender item:_renders)\r\n\t\t{\r\n\t\t\titem.render();\r\n\t\t}\r\n\t}", "public void renderOutputImageManager()\n {\n if(input != null)\n {\n if(toRerender)\n {\n background(background);\n mosaic.newCanvas();\n mosaic.setPreviewCanvas();\n mosaic.drawImage();\n renderPreview();\n renderHover();\n image(infoGraphics,10,270);\n toRerender = false;\n }\n }\n else\n {\n background(background);\n image(infoGraphics,40,270);\n }\n }", "@Override\n\tpublic void loadStateImages() {\n\t\tif (imageFilename[0][0] != null)\n\t\t\tthis.addStateImage(imageFilename[0][0], 0, 0);\n\t\tif (imageFilename[0][1] != null)\n\t\t\tthis.addStateImage(imageFilename[0][1], 1, 0);\n\t\tif (imageFilename[1][0] != null)\n\t\t\tthis.addStateImage(imageFilename[1][0], 0, 1);\n\t\tif (imageFilename[1][1] != null)\n\t\t\tthis.addStateImage(imageFilename[1][1], 1, 1);\n\t}", "private void updateImage() {\r\n \tfor(int i=0;i<rows;i++){\r\n for(int j=0;j<cols;j++){\r\n if(complexArray[i][j].escapeTime(RADIUS, maxIterations)!=-1){//the complex escaped\r\n mandelbrotColor[i][j]=new RGBColor(palette[complexArray[i][j].escapeTime(RADIUS, maxIterations)]);\r\n }\r\n else{\r\n mandelbrotColor[i][j]=palette[complexArray[i][j].escapeTime(RADIUS, maxIterations)+1];//the complex didnt escaped\r\n }\r\n }\r\n }\r\n }", "public void set(Object[] objects) {\r\n this.objects = objects;\r\n }", "public final void setRendered(final boolean rendered) {\n this.rendered = rendered;\n }", "public void updateFromDeserialization() {\n\t\tif (inSerializedState) {\n\t\t\tframes = new KeyFrames();\n\t\t\tfor(Integer key : pixelsMap.keySet()) {\n\t\t\t\tint[][] pixels = pixelsMap.get(key);\n\t\t\t\tDrawFrame image = new DrawFrame(serializedWidth, serializedHeight);\n\t\t\t\tfor(int r = 0; r < serializedHeight; r++) {\n\t\t\t\t\tfor (int c = 0; c < serializedWidth; c++) {\n\t\t\t\t\t\timage.setRGB(c, r, pixels[r][c]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*\n\t\t WritableRaster raster = (WritableRaster) image.getData();\n\t\t raster.setPixels(0,0, serializedWidth, serializedHeight, pixels);\n\t\t image.setData(raster);\n\t\t */\n\t\t\t\tframes.put(key, image);\n\t\t\t}\n\t\t\tinitializeTransientUIComponents();\n\t\t\tinSerializedState = false;\t\n\t\t}\n\t}", "@Override\n public void updateImages()\n {\n image = ThemeManager.getInstance().getObstacleImage();\n blackedOutImage = ThemeManager.getInstance().getDisabledImage(\"obstacle\");\n }", "public void clearImages() {\n\t images.clear();\n\t}", "public Sprite(Texture newImage){\n\t\timages = new Texture[1];\n\t\timages[0] = newImage;\n\t}", "public void updateImage(ColorImage newImage) {\n currentImage.push(newImage);\n }", "public void redraw() {\n\t\tif(this.getGraphics() != null){\n\t\t\tthis.getGraphics().drawImage(imageBuffer, 0, 0, this); // Swap\n\t\t}\n\t}", "public void setSubImage(int index, RenderedImage image,\n\t\t\t\tint width, int height,\n int srcX, int srcY, int dstX, int dstY) {\n if (isLiveOrCompiled() &&\n !this.getCapability(ALLOW_IMAGE_WRITE)) {\n throw new CapabilityNotSetException(\n J3dI18N.getString(\"ImageComponent3D5\"));\n }\n\n if (((ImageComponent3DRetained)this.retained).isByReference()) {\n throw new IllegalStateException(\n J3dI18N.getString(\"ImageComponent3D8\"));\n }\n\n int w = ((ImageComponent3DRetained)this.retained).getWidth();\n int h = ((ImageComponent3DRetained)this.retained).getHeight();\n\n if ((srcX < 0) || (srcY < 0) ||\n ((srcX + width) > w) || ((srcY + height) > h) ||\n (dstX < 0) || (dstY < 0) ||\n ((dstX + width) > w) || ((dstY + height) > h)) {\n throw new IllegalArgumentException(\n J3dI18N.getString(\"ImageComponent3D7\"));\n }\n\n ((ImageComponent3DRetained)this.retained).setSubImage(\n index, image, width, height, srcX, srcY, dstX, dstY);\n }", "public interface ImageOperation {\n\tpublic Color[][] doOperation(Color[][] imageArray);\n}", "public RenderedOp[] process(final RenderedOp[] images, final ObjectParameters params) throws ToolException {\n\n RenderedOp firstImage = images[0];\n int oldWidth = firstImage.getWidth();\n\n int newWidth = -1;\n int preserveXLeft = -1;\n int preserveXRight = -1;\n try {\n if (params.containsName(ParameterNames.IMAGE_WIDTH)) {\n newWidth = params.getInteger(ParameterNames.IMAGE_WIDTH);\n }\n\n if (params.containsName(ParameterNames.PRESERVE_X_LEFT)) {\n preserveXLeft = params.getInteger(ParameterNames.PRESERVE_X_LEFT);\n }\n\n if (params.containsName(ParameterNames.PRESERVE_X_RIGHT)) {\n preserveXRight = params.getInteger(ParameterNames.PRESERVE_X_RIGHT);\n }\n } catch (MissingParameterException e) {\n LOGGER.error(\"loading-param-failure\", \"newWidth, preserveXLeft, preserveXRight\");\n throw new ToolException(e);\n }\n if (newWidth > -1 && oldWidth > newWidth) {\n // should try to crop the image.\n ClipXY clipper = new ClipXY(firstImage.getWidth(), preserveXLeft, preserveXRight,\n firstImage.getHeight(), ImageConstants.NO_CLIP_LEFT,\n ImageConstants.NO_CLIP_RIGHT);\n\n clipper.clipTo(newWidth, firstImage.getHeight());\n params.setObject(ParameterNames.CLIP_AREA, clipper);\n }\n\n return super.process(images, params);\n }", "public void setImage(Image img) {\r\n this.img = img;\r\n }", "public void assign() {\n\t\tfinal RandomAccess<U> accessor = img.randomAccess();\n\t\tfinal V output = function.createOutput();\n\t\tINPUT input = null;\n\t\twhile (iter.hasNext()) {\n\t\t\tinput = iter.next(input);\n\t\t\tboolean proceed = (condition == null) || (condition.isTrue(input));\n\t\t\tif (proceed) {\n\t\t\t\tfunction.compute(input, output);\n\t\t\t\taccessor.setPosition(iter.getCurrentPoint());\n\t\t\t\taccessor.get().setReal(output.getRealDouble());\n\t\t\t\taccessor.get().setImaginary(output.getImaginaryDouble());\n\t\t\t\t// FIXME\n\t\t\t\t// Note - for real datasets this imaginary assignment may waste cpu\n\t\t\t\t// cycles. Perhaps it can get optimized away by the JIT. But maybe not\n\t\t\t\t// since the type is not really known because this class is really\n\t\t\t\t// constructed from a raw type. We'd need to test how the JIT handles\n\t\t\t\t// this situation. Note that in past incarnations this class used\n\t\t\t\t// assigner classes. The complex version set R & I but the real\n\t\t\t\t// version just set R. We could adopt that approach once again.\n\t\t\t}\n\t\t}\n\t}", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "void renderImages(String imageCategory) {\n\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n//\t\tboolean focusOnCmdSeq = true;\n//\t\tString selectedCmdSeq = MerUtils.cmdSeqFromFilename(selectedPanImageEntry.imageListEntry.getFilename());\t\t\n\t\tfor (int i=0; i<panImageList.length; i++) {\n\t\t\tPanImageEntry panEntry = panImageList[i];\n\t\t\tImageEntry entry = panEntry.imageListEntry;\n\t\t\tif ((!entry.enabled) || (!panEntry.draw))\n\t\t\t\tcontinue;\n\t\t\tif (!entry.getImageCategory().equalsIgnoreCase(imageCategory))\n\t\t\t\tcontinue;\n\t\t\tImageMetadataEntry metadataEntry = entry.getImageMetadataEntry();\n\t\t\tif (metadataEntry == null)\n\t\t\t\tcontinue;\n\t\t\tString filename = entry.getFilename();\n\t\t\tchar spacecraftIdChar = MerUtils.spacecraftIdCharFromFilename(filename);\n\t\t\tchar camera = MerUtils.cameraFromFilename(filename);\n\t\t\tchar cameraEye = MerUtils.cameraEyeFromFilename(filename);\n\t\t\tdouble twist = 0.0;\n\t\t\tdouble imageFOV = 10.0;\n\t\t\tdouble radius = 50.0;\n\t\t\tdouble toeInAz = 0.0;\n\t\t\tdouble\ttoeInEl = 0.0;\n\t\t\tint left = (metadataEntry.first_line_sample - 1) /* * metadataEntry.pixel_averaging_width*/;\n\t\t\tint width = metadataEntry.n_line_samples * metadataEntry.pixel_averaging_width;\n\t\t\tint top = (metadataEntry.first_line - 1) /* * metadataEntry.pixel_averaging_height*/;\n\t\t\tint height = metadataEntry.n_lines * metadataEntry.pixel_averaging_height;\n\t\t\t\n\t\t\t// Move downsampled images back\n\t\t\tif (metadataEntry.pixel_averaging_width > 1) {\n\t\t\t\tradius = 75.0;\n\t\t\t}\n/* needs to be activited by a key command\t\t\t\n\t\t\telse if ((focusOnCmdSeq) \n\t\t\t\t\t&& (!MerUtils.cmdSeqFromFilename(panEntry.imageListEntry.getFilename()).equalsIgnoreCase(selectedCmdSeq))) {\n\t\t\t\tradius = 75.0;\n\t\t\t}\t\t\t\n\t\t\t*/\n\t\t\t\n\t\t\tif (panEntry == selectedPanImageEntry) {\n\t\t\t\tif (focusMode)\n\t\t\t\t\tradius = 25.0;\n\t\t\t}\n\t\t\t\n\t\t\tif (camera == 'N') {\n\t\t\t\timageFOV = 45.1766; // the \"official\" FOV\n\t\t\t\tif (spacecraftIdChar == MerUtils.SPACECRAFT_ID_CHAR_OPPORTUNITY) {\n\t\t\t\t\tif (cameraEye == 'R' || cameraEye == 'r') {\n\t\t\t\t\t\ttwist = 0.25;\n\t\t\t\t\t\timageFOV = imageFOV * 1.012;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttwist = -0.1;\n\t\t\t\t\t\timageFOV = imageFOV * 1.006;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (spacecraftIdChar == MerUtils.SPACECRAFT_ID_CHAR_SPIRIT) {\n\t\t\t\t\t//if (params.viewMode != PanParams.VIEWMODE_RIGHT_RAW) {\n\t\t\t\t\t\ttwist = -0.7;\n\t\t\t\t\t//}\n\t\t\t\t\timageFOV = imageFOV * 1.012; //1.015;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (camera == 'P') {\n\t\t\t\timageFOV = 15.8412; // the official value\n\t\t\t\t/*if (params.viewMode != PanParams.VIEWMODE_RIGHT_RAW) {\n\t\t\t\t\t// compensate for toe-in left\n\t\t\t\t\tazimuthDeg += 1.0;\n\t\t\t\t\televationDeg += 0.3;\n\t\t\t\t}*/\t\t\t\t\t\n\t\t\t\t// TODO reverse toe in for right camera\n\t\t\t\t//toeInComp = 0.6;\n\t\t\t\tif (spacecraftIdChar == MerUtils.SPACECRAFT_ID_CHAR_OPPORTUNITY) {\n//\t\t\t\t\t\ttwistDeg = 0.3; // was 0.4;\n\t\t\t\t\ttwist = 0.3;\n\t\t\t\t\timageFOV = imageFOV * 1.015;\n\t\t\t\t\ttoeInAz = 1.1;\t\t\n\t\t\t\t\ttoeInEl = -0.35;\n\t\t\t\t}\n\t\t\t\telse if (spacecraftIdChar == MerUtils.SPACECRAFT_ID_CHAR_SPIRIT) {\n\t\t\t\t\ttwist = +0.0;\n\t\t\t\t\timageFOV = imageFOV * 1.015;\n\t\t\t\t\t//fovDeg = fovDeg * 1.015;\n\t\t\t\t\ttoeInAz = 0.0;\n\t\t\t\t\ttoeInEl = 0.0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble tranWidth = Math.sin(imageFOV * Math.PI / 360) * radius;\n\t\t\tfloat floatDistance = (float) (Math.cos(imageFOV * Math.PI / 360) * radius);\n\t\t\tfloat floatLeft = (float)(tranWidth * (left - 512) / 512);\n\t\t\tfloat floatTop = (float)(tranWidth * (512-(top+height)) / 512);\n\t\t\tfloat floatRight = (float)(tranWidth * (left+width-512) / 512);\n\t\t\tfloat floatBottom = (float)(tranWidth * (512-top) / 512);\n\t\t\t\n\t\t\tsetImageRotation((float)(metadataEntry.inst_az_rover + toeInAz), (float)(metadataEntry.inst_el_rover + toeInEl), (float)twist);\n\t\t\t\n\t\t\tif (panEntry.textureNumber >= 0) {\n\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, panEntry.textureNumber);\t\t\t\t\n\t\t\t\tGL11.glBegin(GL11.GL_QUADS);\n\t\t\t\tGL11.glTexCoord2f(0.0f, 0.0f);\n\t\t\t\tGL11.glVertex3f(floatLeft, floatTop, -floatDistance);\n\t\t\t\tGL11.glTexCoord2f(1.0f, 0.0f);\n\t\t\t\tGL11.glVertex3f(floatRight, floatTop, -floatDistance);\n\t\t\t\tGL11.glTexCoord2f(1.0f, 1.0f);\n\t\t\t\tGL11.glVertex3f(floatRight, floatBottom, -floatDistance);\n\t\t\t\tGL11.glTexCoord2f(0.0f, 1.0f);\n\t\t\t\tGL11.glVertex3f(floatLeft, floatBottom, -floatDistance);\t\t\t\t\n\t\t GL11.glEnd();\n\t\t \n\t\t if ((panEntry == selectedPanImageEntry) && focusMode) {\n\t\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);\t\t// no texture\n\t\t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n\t\t\t\t\tGL11.glBegin(GL11.GL_LINES);\n\t\t\t\t\tGL11.glVertex3f(floatLeft, floatTop, -floatDistance);\n\t\t\t\t\tGL11.glVertex3f(floatRight, floatTop, -floatDistance);\n\t\t\t\t\tGL11.glVertex3f(floatRight, floatTop, -floatDistance);\n\t\t\t\t\tGL11.glVertex3f(floatRight, floatBottom, -floatDistance);\n\t\t\t\t\tGL11.glVertex3f(floatRight, floatBottom, -floatDistance);\n\t\t\t\t\tGL11.glVertex3f(floatLeft, floatBottom, -floatDistance);\t\t\t\t\n\t\t\t\t\tGL11.glVertex3f(floatLeft, floatBottom, -floatDistance);\t\t\t\t\n\t\t\t\t\tGL11.glVertex3f(floatLeft, floatTop, -floatDistance);\n\t\t\t GL11.glEnd();\n\t\t }\n\t\t\t}\n\t\t\telse {\n\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);\t\t// no texture\n\t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n\t\t\t\tGL11.glBegin(GL11.GL_LINES);\n\t\t\t\tGL11.glVertex3f(floatLeft, floatTop, -floatDistance);\n\t\t\t\tGL11.glVertex3f(floatRight, floatTop, -floatDistance);\n\t\t\t\tGL11.glVertex3f(floatRight, floatTop, -floatDistance);\n\t\t\t\tGL11.glVertex3f(floatRight, floatBottom, -floatDistance);\n\t\t\t\tGL11.glVertex3f(floatRight, floatBottom, -floatDistance);\n\t\t\t\tGL11.glVertex3f(floatLeft, floatBottom, -floatDistance);\t\t\t\t\n\t\t\t\tGL11.glVertex3f(floatLeft, floatBottom, -floatDistance);\t\t\t\t\n\t\t\t\tGL11.glVertex3f(floatLeft, floatTop, -floatDistance);\n\t\t GL11.glEnd();\n\t\t\t}\n\t\t}\t\t\n\t}", "@Override\n public ImageData[] newArray(int size) {\n return new ImageData[size];\n }", "@Generated(hash = 15234777)\n public synchronized void resetImageList() {\n imageList = null;\n }", "public void renderAll() {\n GameObjectManager.instance.renderAll(graphics);\n this.repaint();\n }", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "public void updateImage() {\n Graphics2D g = img.createGraphics();\n for (Circle gene : genes) {\n gene.paint(g);\n }\n g.dispose();\n }", "public void setCurrentImage(int index) {\n if ((index >= 0) && (index < mTexIdArray.length)) {\n mTexId = mTexIdArray[index];\n }\n }" ]
[ "0.6523158", "0.64145494", "0.5601952", "0.5595511", "0.5412884", "0.5386066", "0.52859205", "0.5278339", "0.5265303", "0.52304304", "0.5202614", "0.51460874", "0.51001626", "0.50871164", "0.5067583", "0.5029949", "0.50266314", "0.501889", "0.5013671", "0.4977582", "0.49574974", "0.49352157", "0.4924148", "0.49180007", "0.48976615", "0.48954412", "0.48876867", "0.4882859", "0.48750132", "0.48718822", "0.4869749", "0.48605365", "0.48437124", "0.4825136", "0.48206374", "0.4817185", "0.4764158", "0.47614795", "0.4739975", "0.47342676", "0.47251248", "0.47246766", "0.4721328", "0.47161496", "0.47075516", "0.46837187", "0.46707532", "0.46697938", "0.4636333", "0.4615003", "0.46116364", "0.46093437", "0.45893165", "0.4587355", "0.4583374", "0.4578072", "0.45636106", "0.4553602", "0.45524618", "0.45487973", "0.4547717", "0.45431212", "0.45331717", "0.45277417", "0.45237294", "0.45138058", "0.4509714", "0.4502929", "0.44782996", "0.4472593", "0.44592163", "0.44354942", "0.44286662", "0.441023", "0.44078726", "0.44062608", "0.43924296", "0.43923733", "0.43908966", "0.43885013", "0.43857703", "0.43818647", "0.43759108", "0.43669552", "0.43656546", "0.43656057", "0.4362938", "0.43614888", "0.43607697", "0.43394366", "0.4337356", "0.43357933", "0.43327862", "0.43262345", "0.43166578", "0.43055895", "0.43051332", "0.4303895", "0.43022585", "0.42986664" ]
0.6945114
0
Sets the array of images in this image component to the specified array of NioImageBuffer objects. If the data access mode is not byreference, then the NioImageBuffer data is copied into this object. If the data access mode is byreference, then a shallow copy of the array of references to the NioImageBuffer objects is made, but the NioImageBuffer data is not necessarily copied. The image class is set to ImageClass.NIO_IMAGE_BUFFER.
public void set(NioImageBuffer[] images) { throw new UnsupportedOperationException(); /* checkForLiveOrCompiled(); int depth = ((ImageComponent3DRetained)this.retained).getDepth(); if (depth != images.length) throw new IllegalArgumentException(J3dI18N.getString("ImageComponent3D1")); for (int i=0; i<depth; i++) { ((ImageComponent3DRetained)this.retained).set(i, images[i]); } */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "public void setBufferImage(Image bufferImage) {\n this.bufferImage = bufferImage;\n }", "public NioImageBuffer[] getNioImage() {\n\n \tthrow new UnsupportedOperationException();\n }", "public void set(RenderedImage[] images) {\n\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public void initializeIOBuffers(){\n for(int i=0; i<outputBuffer.length; i++){\n outputBuffer[i] = new LinkedBlockingQueue();\n inputBuffer[i] = new LinkedBlockingQueue();\n }\n }", "public void setImages(Bitmap[] images){\n this.images=images;\n currentFrame=0;\n startTime=System.nanoTime();\n }", "public NioImageBuffer getNioImage(int index) {\n\n \tthrow new UnsupportedOperationException();\n }", "public void setBuffers(KType[][] newBuffers) {\n // Check they're all the same size, except potentially the last one\n int totalLen = 0;\n for (int i = 0; i < newBuffers.length - 1; i++) {\n final int currLen = newBuffers[i].length;\n assert currLen == newBuffers[i + 1].length;\n totalLen += currLen;\n }\n buffers = newBuffers;\n blockLen = newBuffers[0].length;\n elementsCount = totalLen;\n }", "public void setImages(byte[] images) {\n this.images = images;\n }", "public void setImageData(byte[] value) {\r\n this.imageData = ((byte[]) value);\r\n }", "private native void initMultiImage(MagickImage[] images)\n\t\t\tthrows MagickException;", "public void setMorphTargetBufferAt(@EntityInstance int i,\n @IntRange(from = 0) int level,\n @IntRange(from = 0) int primitiveIndex,\n @NonNull MorphTargetBuffer morphTargetBuffer,\n @IntRange(from = 0) int offset,\n @IntRange(from = 0) int count) {\n nSetMorphTargetBufferAt(mNativeObject, i, level, primitiveIndex,\n morphTargetBuffer.getNativeObject(), offset, count);\n }", "private void resetBuffer() {\n\t\tbufferWidth = getSize().width;\n\t\tbufferHeight = getSize().height;\n\n\t\t// clean up the previous image\n\t\tif (bufferGraphics != null) {\n\t\t\tbufferGraphics.dispose();\n\t\t\tbufferGraphics = null;\n\t\t}\n\t\tif (bufferImage != null) {\n\t\t\tbufferImage.flush();\n\t\t\tbufferImage = null;\n\t\t}\n\t\tSystem.gc();\n\n\t\tbufferImage = new BufferedImage(bufferWidth, bufferHeight,\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\n\t\tbufferGraphics = bufferImage.createGraphics();\n\t\tbufferGraphics.setRenderingHint (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t}", "void setImage(BufferedImage i);", "@Override\n BinaryArrayReadWrite clone();", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public void setImages(MimsPlus[] images) {\n this.images = images;\n }", "@Override\n public ImageData[] newArray(int size) {\n return new ImageData[size];\n }", "public MagickImage(MagickImage[] images) throws MagickException {\n\t\tinitMultiImage(images);\n\t}", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "private void setArray(byte[] initialArray)\r\n/* 60: */ {\r\n/* 61: 95 */ this.array = initialArray;\r\n/* 62: 96 */ this.tmpNioBuf = null;\r\n/* 63: */ }", "public void setImages() {\n\n imgBlock.removeAll();\n imgBlock.revalidate();\n imgBlock.repaint();\n labels = new JLabel[imgs.length];\n for (int i = 0; i < imgs.length; i++) {\n\n labels[i] = new JLabel(new ImageIcon(Toolkit.getDefaultToolkit().createImage(imgs[i].getSource())));\n imgBlock.add(labels[i]);\n\n }\n\n SwingUtilities.updateComponentTreeUI(jf); // refresh\n initialized = true;\n\n }", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public void setBonesAsMatrices(@EntityInstance int i,\n @NonNull Buffer matrices, @IntRange(from = 0, to = 255) int boneCount,\n @IntRange(from = 0) int offset) {\n int result = nSetBonesAsMatrices(mNativeObject, i, matrices, matrices.remaining(), boneCount, offset);\n if (result < 0) {\n throw new BufferOverflowException();\n }\n }", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public interface NanoBuffer {\n\n void wrap(ByteBuffer buffer);\n\n int readerIndex();\n\n int writerIndex();\n\n boolean hasBytes();\n\n boolean hasBytes(int bytes);\n\n boolean canWrite(int bytes);\n\n void clear();\n\n ByteBuffer byteBuffer();\n\n // positional accessors\n byte readByte();\n\n short readUnsignedByte();\n\n short readShort();\n\n int readUnsignedShort();\n\n int readlnt();\n\n long readUnsignedlnt();\n\n long readLong();\n\n void writeByte(byte value);\n\n void writeShort(short value);\n\n void writelnt(int value);\n\n void writeLong(long value);\n\n byte getByte(int index);\n\n short getUnsignedByte(int index);\n\n short getShort(int index);\n\n int getUnsignedShort(int index);\n\n int getlnt(int index);\n\n long getLong(int index);\n\n void putByte(int index, byte value);\n\n void putShort(int index, short value);\n\n void putlnt(int index, int value);\n\n void putLong(int index, long value);\n}", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public abstract void setBufferMode(int mode);", "private void resetBuffer() {\n baos.reset();\n }", "public Builder setImages(Image... images) {\n this.images = images;\n return this;\n }", "public ByteBuffer[] nioBuffers(int index, int length)\r\n/* 721: */ {\r\n/* 722:730 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 723:731 */ return super.nioBuffers(index, length);\r\n/* 724: */ }", "public void setImageData(byte[] imageData) {\n if (tile != null) {\n tile.setImageData(imageData);\n } else {\n this.data = imageData;\n }\n }", "public Sprite(Texture[] newImageArray) throws Exception{\n\t\timages = newImageArray;\n\t\tcheckSizes();\n\t}", "public ByteBuffer[] nioBuffers()\r\n/* 715: */ {\r\n/* 716:724 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 717:725 */ return super.nioBuffers();\r\n/* 718: */ }", "void setBuffer(byte[] b)\n {\n buffer = b;\n }", "@Override\n\tpublic synchronized void reset() {\n\t\tiOBuffer.reset();\n\t}", "public void setImages(final Collection<GPImageLinkComponent> value)\n\t{\n\t\tsetImages( getSession().getSessionContext(), value );\n\t}", "public void set(Object[] objects) {\r\n this.objects = objects;\r\n }", "public IBuffer newBuffer();", "public void resetBuffer(){\n bufferSet = false;\n init();\n }", "public Image[] getImages() {\n return images;\n }", "public ByteBuffer[] nioBuffers(int index, int length)\r\n/* 306: */ {\r\n/* 307:320 */ return new ByteBuffer[] { nioBuffer(index, length) };\r\n/* 308: */ }", "@Generated(hash = 15234777)\n public synchronized void resetImageList() {\n imageList = null;\n }", "public native void syncImage() throws MagickException;", "public void setImage(byte[] value) {\n this.image = ((byte[]) value);\n }", "public void setDataFrom(final ModelAnimationImages otherImages) {\r\n\t\tclear();\r\n\r\n\t\tif (otherImages!=null) {\r\n\t\t\tnames.addAll(otherImages.names);\r\n\t\t\timagesHashes.addAll(otherImages.imagesHashes);\r\n\t\t\timages.addAll(otherImages.images.stream().map(image->copyImage(image)).collect(Collectors.toList()));\r\n\t\t}\r\n\t}", "protected void initBuffer() throws IOException {\n if (buf != null) {\r\n Util.disposeDirectByteBuffer(buf);\r\n }\r\n // this check is overestimation:\r\n int size = bufferNumLength << Main.log2DataLength;\r\n assert (size > 0);\r\n if (Main.debug) { System.out.println(\"Allocating direct buffer of \"+bufferNumLength+\" ints.\"); }\r\n buf = ByteBuffer.allocateDirect(size).order(Main.byteOrder);\r\n buf.clear();\r\n }", "public void setDataElements(int x, int y, Object obj, DataBuffer data) {\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n\n int type = getTransferType();\n int numDataElems = getNumDataElements();\n int pixelOffset = y * scanlineStride + x * pixelStride;\n\n switch (type) {\n\n case DataBuffer.TYPE_BYTE:\n\n byte[] barray = (byte[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], ((int) barray[i]) & 0xff);\n }\n break;\n\n case DataBuffer.TYPE_USHORT:\n case DataBuffer.TYPE_SHORT:\n\n short[] sarray = (short[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], ((int) sarray[i]) & 0xffff);\n }\n break;\n\n case DataBuffer.TYPE_INT:\n\n int[] iarray = (int[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], iarray[i]);\n }\n break;\n\n case DataBuffer.TYPE_FLOAT:\n\n float[] farray = (float[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElemFloat(bankIndices[i], pixelOffset + bandOffsets[i], farray[i]);\n }\n break;\n\n case DataBuffer.TYPE_DOUBLE:\n\n double[] darray = (double[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElemDouble(bankIndices[i], pixelOffset + bandOffsets[i], darray[i]);\n }\n break;\n\n }\n }", "public void set(byte[] arrby) {\n ByteBuffer byteBuffer;\n ByteBuffer byteBuffer2 = byteBuffer = Blob.this.getByteBuffer();\n synchronized (byteBuffer2) {\n byteBuffer.position(Blob.this.getByteBufferPosition() + this.offset());\n byteBuffer.put(arrby);\n this.mCurrentDataSize = arrby.length;\n return;\n }\n }", "public void reset() {\n _oldColorBuffer = _oldNormalBuffer = _oldVertexBuffer = _oldInterleavedBuffer = null;\n Arrays.fill(_oldTextureBuffers, null);\n }", "public void update(ImageObject nImage) { \r\n selectedImage = nImage;\r\n \r\n update();\r\n }", "void lSetImage(Image img);", "public BufferedImgBase(byte[] byteimg) throws IOException{\n // convert byte[] back to a BufferedImage\n InputStream is = new ByteArrayInputStream(byteimg);\n BufferedImage newBi = ImageIO.read(is);\n //this.img --> BufferedImage\n this.img = newBi;\n }", "@SuppressWarnings(\"unused\")\n\tprivate void cloneImage() {\n//\t\tColorModel cm = offimg.getColorModel();\n//\t\t boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();\n//\t\t WritableRaster raster = offimg.copyData(null);\n//\t\t offimg2 = new BufferedImage(cm, raster, isAlphaPremultiplied, null);\n//\t\t BufferedImage currentImage = new BufferedImage(width,height,BufferedImage.TYPE_3BYTE_BGR);\n\n\t//Fastest method to clone the image (DOES NOT WORK for MACOS)\n//\t\t int[] frame = ((DataBufferInt)offimg.getRaster().getDataBuffer()).getData();\n//\t\t int[] imgData = ((DataBufferInt)offimg2.getRaster().getDataBuffer()).getData();\n//\t\t System.arraycopy(frame,0,imgData,0,frame.length);\n\t}", "public void setTextureCoordsBuffer(ByteBuffer coords) {\n this.texCoordsBuf = coords;\n }", "void setStreamBuffer(int size) {\r\n\t\tif(size>0)\r\n\t\t\tbuffer = new byte[size];\r\n\t\telse\r\n\t\t\tbuffer = new byte[this.size];\r\n\t}", "public void divideImage() {\n\n int chunkWidth = 70;\n int chunkHeight = 70;\n int count = 0;\n imgs = new BufferedImage[100];\n for (int x = 0; x < 10; x++)\n for (int y = 0; y < 10; y++) {\n\n try{\n\n imgs[count] = new BufferedImage(chunkWidth, chunkHeight, img.getType());\n Graphics2D gr = imgs[count++].createGraphics();\n gr.drawImage(img, 0, 0, chunkWidth, chunkHeight, chunkWidth * y, chunkHeight * x, chunkWidth * y + chunkWidth, chunkHeight * x + chunkHeight, null);\n gr.dispose();\n\n } catch (Exception e){\n\n // e.printStackTrace();\n\n }\n\n }\n\n }", "public byte[] getImages() {\n return images;\n }", "public static void registerImageIOServices() {\n\t\tlogger.debug(\"Registering ImageIO readers / writers\");\n\t\tIIORegistry registry = IIORegistry.getDefaultInstance();\n\n\t\tfor (ImageReaderSpi spi : iioReaderList) {\n\t\t\tregisterImageIOService(registry, spi, javax.imageio.spi.ImageReaderSpi.class);\n\t\t}\n\n\t\tfor (ImageWriterSpi spi : iioWriterList) {\n\t\t\tregisterImageIOService(registry, spi, javax.imageio.spi.ImageWriterSpi.class);\n\t\t}\n\t}", "protected void setImageData(BufferedImage img) {\n \t\tif (format == null || format == Format.TEXT || format == Format.COLOR16_8x8)\n \t\t\treturn;\n \t\n \t\tequalize(img);\n \t\t\n \t\t//denoise(img);\n \t\t\n \t\tupdatePaletteMapping();\n \t\n \t\tflatten(img);\n \t\t\n \t\tif (!importDirectMappedImage(img)) {\n \t\t\tconvertImageToColorMap(img);\n \t\t}\n \t\n \t\treplaceImageData(img);\n \t}", "private void drawArray(ArrayList<NormalFishCollect> images, GraphicsContext gc) {\n\t\tgc.save();\n\t\tfor (int i = 0; i < images.size(); i++) {\n\t\t\tgc.drawImage(images.get(i).img, images.get(i).x, images.get(i).y);\n\n\t\t}\n\t\tgc.restore();\n\n\t}", "public void write_to_buffer(byte[] buffer) throws IOException {\r\n ByteArrayOutputStream byte_out = new ByteArrayOutputStream(buffer.length);\r\n DataOutputStream out = new DataOutputStream(byte_out);\r\n\r\n write_to_buffer(out);\r\n\r\n byte[] bytes = byte_out.toByteArray();\r\n for (int i = 0; i < buffer.length; ++i) {\r\n buffer[i] = bytes[i];\r\n }\r\n\r\n out.close();\r\n byte_out.close();\r\n }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "private ByteBuffer internalNioBuffer()\r\n/* 532: */ {\r\n/* 533:545 */ ByteBuffer tmpNioBuf = this.tmpNioBuf;\r\n/* 534:546 */ if (tmpNioBuf == null) {\r\n/* 535:547 */ this.tmpNioBuf = (tmpNioBuf = ByteBuffer.wrap(this.array));\r\n/* 536: */ }\r\n/* 537:549 */ return tmpNioBuf;\r\n/* 538: */ }", "private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }", "public Image getImg(){\n\t\treturn imgs[count];\n\t}", "void setBufferSize(int bufferSize);", "public ByteBuf setBytes(int index, byte[] src, int srcIndex, int length)\r\n/* 250: */ {\r\n/* 251:269 */ checkSrcIndex(index, length, srcIndex, src.length);\r\n/* 252:270 */ System.arraycopy(src, srcIndex, this.array, index, length);\r\n/* 253:271 */ return this;\r\n/* 254: */ }", "public PlainNioObject(final SocketChannel channel, final JPPFBuffer buf) {\n this(channel, new MultipleBuffersLocation(buf));\n }", "@Override\n\t\tpublic photo[] newArray(int size) {\n\t\t\treturn new photo[size];\n\t\t}", "public synchronized void setConnectionArray(List<ServerThread> connectionArray) {\r\n this.connectionArray = connectionArray;\r\n }", "private void setArrays() {\n // Set the tile arrays\n tileLogic = new boolean[size][size];\n tilesTex = new TextureRegion[size][size];\n\n // Set all tilesTex to clear\n for(int y = 0; y < size; y++)\n for(int x = 0; x < size; x++)\n tilesTex[x][y] = new TextureRegion(assets.clearTile);\n }", "protected void setArray(Object[] array){\r\n\t \tthis.array = array;\r\n\t }", "@Override\n public void resetBuffer() {\n\n }", "public void setIcon (playn.core.Image... icons) {\n assert icons.length > 0;\n List<BufferedImage> images = new ArrayList<BufferedImage>();\n for (playn.core.Image icon : icons) images.add(((JavaImage)icon).bufferedImage());\n _frame.setIconImages(images);\n }", "public void setImageIds(String [] ImageIds) {\n this.ImageIds = ImageIds;\n }", "public PngImageDataReader() {\n this(null);\n }", "public void setArray(Object[] array)\n\t{\n\t\tif (SanityManager.DEBUG)\n\t\t{\n\t\t\tSanityManager.ASSERT(array != null, \n\t\t\t\t\t\"array input to setArray() is null, code can't handle this.\");\n\t\t}\n\n\t\tthis.array = ArrayUtil.copy( array );\n\t}", "public void updateBatches(ImageBatches batches) {\r\n\t\tthis.batches = batches;\r\n\t\tif (batches == null) {\r\n\t\t\tthis.batch = new ImageBatch[0];\r\n\t\t} else {\r\n\t\t\tthis.batch = batches.getBatches();\r\n\t\t}\r\n\t\tfireTableDataChanged();\r\n\t}", "protected final void resetBuffer() {\n buffer.reset();\n }", "public void testSetImage() {\n byte[] image = new byte[] {1, 2, 3};\n byte[] expResult = new byte[] {1, 2, 3};\n CLImage instance = new CLImage();\n instance.setImage(image);\n assertEquals(expResult.length, instance.image.length);\n for (int i = 0; i < expResult.length; ++i)\n {\n assertEquals(expResult[i], instance.image[i]);\n }\n }", "public ImageHandler(Group nGroup){\n\t /* Set up the group reference */\n\t\tgroup = nGroup;\n\t\t\n\t\t/* Instantiate the list of images */\n\t\timages = new ArrayList<ImageView>();\n\t}", "@WorkerThread @UiThread\n public void setPictures(Iterable<Picture> pictures) {\n List<String> titles = new ArrayList<>();\n List<String> urls = new ArrayList<>();\n List<String> urlsLowRes = new ArrayList<>();\n\n for (Picture picture: pictures) {\n titles.add(picture.title);\n urls.add(picture.url);\n // NEW!! Model stores low res urls\n urlsLowRes.add(picture.lowResUrl);\n }\n\n String[] titlesAsArray = titles.toArray(new String[titles.size()]);\n String[] urlsAsArray = urls.toArray(new String[urls.size()]);\n String[] urlsLowResAsArray = urlsLowRes.toArray(new String[urlsLowRes.size()]);\n\n // Synchronize for the shortest possible time\n synchronized (this) {\n this.titles = titlesAsArray;\n this.urls = urlsAsArray;\n this.urlsLowRes = urlsLowResAsArray;\n this.bitmaps.clear();\n this.bitmapsLowRes.clear();\n }\n\n // Tell all registered views that the list of pictures has changed\n notifyViews(Event.PICTURES_LIST_CHANGED);\n }", "public ByteBuffer nioBuffer(int index, int length)\r\n/* 300: */ {\r\n/* 301:314 */ ensureAccessible();\r\n/* 302:315 */ return ByteBuffer.wrap(this.array, index, length).slice();\r\n/* 303: */ }", "public void resetBuffer() {\n\n\t}", "@Override\r\n\tpublic Buffer setBuffer(int pos, Buffer b, int offset, int len) {\n\t\treturn null;\r\n\t}", "public void ResetState() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n pictures[i][j] = temp_pictures[i][j];\n pictures2[i][j] = pictures[i][j];\n\n\n }\n }\n }", "@Override\n\tpublic void resetBuffer() {\n\t}", "@Override\n\tpublic void readImages() {\n\t\t\n\t}", "public void setIndicesBuffer(ByteBuffer indicesBuf) {\n this.indicesBuf = indicesBuf;\n }", "@Override\n\tprotected byte[] getReferenceImageData() {\n\t\treturn createBufferedImageData(resolveURI(refImageURI));\n\t}", "public Image(MyColor [][] myImage) {\n originalImage = myImage; \n }", "public BufferPool(String fileName, int numBuffers)\n throws IOException\n {\n BLOCK_SIZE = 4096;\n // create linked list of buffers, open file, create pointer tempArray\n this.pool = new LinkedList<Buffer>();\n this.buffArr = new Buffer[numBuffers];\n this.file = new RandomAccessFile(fileName, \"rw\");\n this.tempArray = new byte[BLOCK_SIZE];\n\n // initialize all the statistics to zero\n cacheHits = cacheMisses = diskReads = diskWrites = 0;\n\n Buffer newBuf;\n // initialize the appropriate number of buffers\n for (int i = 0; i < numBuffers; i++)\n {\n newBuf = new Buffer(tempArray, -1);\n pool.append(newBuf);\n buffArr[i] = newBuf;\n }\n }", "public void setImage(BufferedImage i) {\n // Paint image object\n paint = true;\n image = i;\n this.repaint();\n }", "public void setBfImageByData(int [][][] data){\r\n\t\tBfImage = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);\r\n\t\tfor (int i = 0; i < width; i++) {\r\n\t\t\tfor (int j = 0; j < height; j++) {\r\n\t\t\t\tint [] rgb = data[j][i];\r\n\t\t\t\tif (rgb[0] == -1){\t//is transparent\r\n\t\t\t\t\tBfImage.setRGB(i, j, Transparency.TRANSLUCENT);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tBfImage.setRGB(i, j, Utils.getRGB(rgb[0], rgb[1], rgb[2]));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ImageProcessor(ImageArray im) {\n originalIm= im;\n currentIm= originalIm.copy();\n }", "public void setImage(byte[] image) {\n this.image = image;\n }" ]
[ "0.58576745", "0.57855725", "0.5695185", "0.56076324", "0.5576523", "0.5498689", "0.5452501", "0.52875894", "0.52850133", "0.5050428", "0.5047696", "0.5036664", "0.5029255", "0.5026669", "0.499403", "0.49545625", "0.4891042", "0.487786", "0.4870815", "0.4846821", "0.48051804", "0.47971767", "0.47757834", "0.47630396", "0.47528762", "0.47396508", "0.4705151", "0.46982783", "0.4630513", "0.45932367", "0.45896965", "0.45811203", "0.45719346", "0.4535596", "0.45268688", "0.45008978", "0.44994736", "0.44975603", "0.44875735", "0.44857", "0.4463716", "0.4452724", "0.4450031", "0.44378024", "0.44276288", "0.44219166", "0.4417629", "0.44044405", "0.44025993", "0.43883854", "0.4379155", "0.43673858", "0.43621486", "0.4361848", "0.4347857", "0.43376222", "0.4333204", "0.432588", "0.43150184", "0.42953664", "0.42926735", "0.42751086", "0.42735216", "0.4272655", "0.4270498", "0.4269024", "0.42652738", "0.42643434", "0.42582345", "0.4244449", "0.42404324", "0.4239938", "0.4236449", "0.42243803", "0.42183885", "0.42161584", "0.42142874", "0.42088783", "0.42034298", "0.42016867", "0.42011937", "0.41988972", "0.41988695", "0.41985267", "0.41926792", "0.41876677", "0.41874188", "0.41824841", "0.4180369", "0.41790187", "0.4177765", "0.41754836", "0.41686603", "0.41622597", "0.41544458", "0.4154216", "0.4149151", "0.4147197", "0.41469157", "0.41456172" ]
0.70703876
0
Sets this image component at the specified index to the specified BufferedImage object. If the data access mode is not byreference, then the BufferedImage data is copied into this object. If the data access mode is byreference, then a reference to the BufferedImage is saved, but the data is not necessarily copied.
public void set(int index, BufferedImage image) { checkForLiveOrCompiled(); if (image.getWidth(null) != this.getWidth()) throw new IllegalArgumentException(J3dI18N.getString("ImageComponent3D2")); if (image.getHeight(null) != this.getHeight()) throw new IllegalArgumentException(J3dI18N.getString("ImageComponent3D4")); ((ImageComponent3DRetained)this.retained).set(index, image); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "void setImage(BufferedImage i);", "public void set(int index, RenderedImage image) {\n\n checkForLiveOrCompiled();\n // For RenderedImage the width and height checking is done in the retained.\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public void setImage(BufferedImage i) {\n // Paint image object\n paint = true;\n image = i;\n this.repaint();\n }", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "public void updateImageForIndex(int index) {\n\t\t//Nothing to do\n\t}", "public void setSubImage(int index, RenderedImage image,\n\t\t\t\tint width, int height,\n int srcX, int srcY, int dstX, int dstY) {\n if (isLiveOrCompiled() &&\n !this.getCapability(ALLOW_IMAGE_WRITE)) {\n throw new CapabilityNotSetException(\n J3dI18N.getString(\"ImageComponent3D5\"));\n }\n\n if (((ImageComponent3DRetained)this.retained).isByReference()) {\n throw new IllegalStateException(\n J3dI18N.getString(\"ImageComponent3D8\"));\n }\n\n int w = ((ImageComponent3DRetained)this.retained).getWidth();\n int h = ((ImageComponent3DRetained)this.retained).getHeight();\n\n if ((srcX < 0) || (srcY < 0) ||\n ((srcX + width) > w) || ((srcY + height) > h) ||\n (dstX < 0) || (dstY < 0) ||\n ((dstX + width) > w) || ((dstY + height) > h)) {\n throw new IllegalArgumentException(\n J3dI18N.getString(\"ImageComponent3D7\"));\n }\n\n ((ImageComponent3DRetained)this.retained).setSubImage(\n index, image, width, height, srcX, srcY, dstX, dstY);\n }", "public Object set(int index, Object element) {\r\n return deref(refs.set(index, new WeakReference(element)));\r\n }", "public void set(final int index, final Object object) {\n super.set(index, object);\n }", "public void set(int index,Object data)\r\n\t{\r\n\t\tremove(index);\r\n\t\tadd(index, data);\r\n\t}", "public void setCurrentImage(int index) {\n if ((index >= 0) && (index < mTexIdArray.length)) {\n mTexId = mTexIdArray[index];\n }\n }", "public void setElementAt(Object obj, int index);", "public ByteBuf setBytes(int index, ByteBuffer src)\r\n/* 257: */ {\r\n/* 258:276 */ ensureAccessible();\r\n/* 259:277 */ src.get(this.array, index, src.remaining());\r\n/* 260:278 */ return this;\r\n/* 261: */ }", "public ByteBuf setBytes(int index, ByteBuffer src)\r\n/* 349: */ {\r\n/* 350:364 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 351:365 */ return super.setBytes(index, src);\r\n/* 352: */ }", "public ByteBuf setByte(int index, int value)\r\n/* 271: */ {\r\n/* 272:286 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 273:287 */ return super.setByte(index, value);\r\n/* 274: */ }", "public void setImaginary( double value, int index )\n\t\tthrows ArrayIndexOutOfBoundsException;", "public ByteBuf setBytes(int index, ByteBuf src)\r\n/* 319: */ {\r\n/* 320:334 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 321:335 */ return super.setBytes(index, src);\r\n/* 322: */ }", "void setFeature(int index, Feature feature);", "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "public ByteBuf setBytes(int index, byte[] src)\r\n/* 337: */ {\r\n/* 338:352 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 339:353 */ return super.setBytes(index, src);\r\n/* 340: */ }", "void setBlob(int index, Blob value) throws SQLException;", "public ByteBuf setByte(int index, int value)\r\n/* 416: */ {\r\n/* 417:430 */ ensureAccessible();\r\n/* 418:431 */ _setByte(index, value);\r\n/* 419:432 */ return this;\r\n/* 420: */ }", "public CoreResourceHandle set(int index, CoreResourceHandle e) {\n if (index >= 0 && index < doSize()) {\n return doSet(index, e);\n }\n throw new IndexOutOfBoundsException();\n }", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "public void setInstance(int index, double[] feature) {\n\t\tinstances.set(index,feature);\n\t}", "void setObject(int index, Object value) throws SQLException;", "public void set(int index, Object value) {\n\tif(arr.length < index){\n\t\tObject arr2[] = new Object[index+1];\n\t\tSystem.arraycopy(arr, 0, arr2, 0, arr.length);\n\t\tarr2[index] = value;\n\t\tarr = arr2;\n\t\t\n\t}\n\telse arr[index] = value;\n}", "void lSetImage(Image img);", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ByteBuf setBytes(int index, byte[] src, int srcIndex, int length)\r\n/* 343: */ {\r\n/* 344:358 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 345:359 */ return super.setBytes(index, src, srcIndex, length);\r\n/* 346: */ }", "@Override\n public T set(final int index, final T element) {\n this.checkIndex(index);\n final T prevElment = get(index);\n this.data[index] = element;\n return prevElment;\n }", "void set(int index, Object element);", "public void set(int index, int o) {\n\t\tif(index == 0) return;\n\t\tr[index] = o;\n\t}", "public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length)\r\n/* 331: */ {\r\n/* 332:346 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 333:347 */ return super.setBytes(index, src, srcIndex, length);\r\n/* 334: */ }", "public abstract BufferedImage applyTo(BufferedImage image);", "public int setBytes(int index, ScatteringByteChannel in, int length)\r\n/* 362: */ throws IOException\r\n/* 363: */ {\r\n/* 364:376 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 365:377 */ return super.setBytes(index, in, length);\r\n/* 366: */ }", "public void setBufferImage(Image bufferImage) {\n this.bufferImage = bufferImage;\n }", "public void set(RenderedImage im) {\n this.im = im;\n ic.set(im);\n }", "protected void setImageData(BufferedImage img) {\n \t\tif (format == null || format == Format.TEXT || format == Format.COLOR16_8x8)\n \t\t\treturn;\n \t\n \t\tequalize(img);\n \t\t\n \t\t//denoise(img);\n \t\t\n \t\tupdatePaletteMapping();\n \t\n \t\tflatten(img);\n \t\t\n \t\tif (!importDirectMappedImage(img)) {\n \t\t\tconvertImageToColorMap(img);\n \t\t}\n \t\n \t\treplaceImageData(img);\n \t}", "public Object set(int index, Object element) {\n\t\tif (index < 0 || index >= this.size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"the index [\" + index\n\t\t\t\t\t+ \"] is not valid for this list with the size [\"\n\t\t\t\t\t+ this.size + \"].\");\n\t\t}\n\t\tObject replaced = this.storedObjects[index];\n\t\tthis.storedObjects[index] = element;\n\n\t\treturn replaced;\n\t}", "public Object set(int index, Object element) {\r\n Entry e = entry(index);\r\n Object oldVal = e.element;\r\n e.element = element;\r\n return oldVal;\r\n }", "void setSourceImage(BufferedImage mySourceImage);", "public @Override E set(int index, E element) {\n \tNode n = getNode(index);\n \tE result = n.data;\n \tn.data = element;\n \treturn result;\n }", "@Override\n public final void set(int index, E newValue) {\n array[index] = newValue;\n }", "public void setVideoBufferByte(int index, byte data)\n {\n this.videocard.vgaMemory[index] = data;\n }", "public abstract void setIndex(int i, boolean b);", "void setObject(int index, Object value, int sqlType, int scale)\n throws SQLException;", "@Deprecated\n/* */ protected void setTextureIndex(int idx) {\n/* 94 */ setData((byte)(getData() & 0x8 | idx));\n/* */ }", "void setArrayElement(int index, Object value);", "void setArrayElement(int index, Object value);", "public void setObject(Spatial objChange, int index, int parentIndex) {\n toChange[index]=objChange;\n parentIndexes[index]=parentIndex;\n }", "public ByteBuf setInt(int index, int value)\r\n/* 289: */ {\r\n/* 290:304 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 291:305 */ return super.setInt(index, value);\r\n/* 292: */ }", "public NioImageBuffer getNioImage(int index) {\n\n \tthrow new UnsupportedOperationException();\n }", "public ByteBuf setBytes(int index, byte[] src, int srcIndex, int length)\r\n/* 250: */ {\r\n/* 251:269 */ checkSrcIndex(index, length, srcIndex, src.length);\r\n/* 252:270 */ System.arraycopy(src, srcIndex, this.array, index, length);\r\n/* 253:271 */ return this;\r\n/* 254: */ }", "void setRef(int index, Ref value) throws SQLException;", "public ByteBuf setBytes(int index, ByteBuf src, int length)\r\n/* 325: */ {\r\n/* 326:340 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 327:341 */ return super.setBytes(index, src, length);\r\n/* 328: */ }", "public Save(BufferedImage image){\n\tthis.new_buff_image = image;\n }", "void setRenderableSource(Long id, SerializableRenderableImage source,\n\t\t\t int index) throws RemoteException;", "public void setTexture(int index, TextureRegion coords)\n\t{\n\t\t//if we are drawing and the new texcoords TEXTURE doesn't match the old one\n\t\tif (drawing && this.textures[index] != null && this.textures[index].getTexture() != coords.getTexture())\n\t\t\tflush();\n\t\tthis.textures[index] = coords;\n\t}", "public synchronized void setElementAt(WModelObject object, int index)\n\t{\n\t\tm_elements.setElementAt(object, index);\n\t}", "public void set(int index, Object value) {\n\n\t\t// the right portion of values of the array -> room is not available\n\t\tif(index >= arr.length) {\n\t\t\tObject[] tmpArr = new Object[index+1]; // keep all values of the variable arr\n\t\t\t\n\t\t\t// keep all items of arr\n\t\t\tfor(int i=0; i<arr.length; i++) {\n\t\t\t\ttmpArr[i] = arr[i];\n\t\t\t}\n\t\t\t\n\t\t\tarr = tmpArr; // exchange addresses\n \t\t}\t\n\t\t\n\t\tarr[index] = value;\n\t\t\n\t}", "public void setVoxel(int i, VoxelGradient value) {\r\n data[i] = value;\r\n }", "public void setObject(int i, T obj);", "public Copiable replace(int index, Copiable obj) throws IndexRangeException {\r\n if (count == 0) {\r\n throw new IndexRangeException(-1, -1, index);\r\n }\r\n if (index >= 0 && index <= count) {\r\n Copiable temp = list[index];\r\n list[index] = obj;\r\n return temp;\r\n } else {\r\n throw new IndexRangeException(0, count - 1, index);\r\n }\r\n }", "public E set(int index, E obj)\r\n {\r\n checkValidIndex(index);\r\n ListIterator<E> itr = listIterator(index);\r\n E result = itr.next();\r\n itr.set(obj);\r\n return result;\r\n }", "public void setMorphTargetBufferAt(@EntityInstance int i,\n @IntRange(from = 0) int level,\n @IntRange(from = 0) int primitiveIndex,\n @NonNull MorphTargetBuffer morphTargetBuffer,\n @IntRange(from = 0) int offset,\n @IntRange(from = 0) int count) {\n nSetMorphTargetBufferAt(mNativeObject, i, level, primitiveIndex,\n morphTargetBuffer.getNativeObject(), offset, count);\n }", "public void setImageIndex(int index)\n\t{\n\t\tthis.drawer.setImageIndex(index);\n\t}", "public void setObject(int parameterIndex, Object x) throws SQLException {\n currentPreparedStatement.setObject(parameterIndex, x);\n }", "public boolean set(final int index, final ByteBuffer buf) {\n\t\tif (!validState) {\n\t\t\tthrow new InvalidStateException();\n\t\t}\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"set(\" + index + \",\" + buf + \")\");\n\t\t}\n\t\ttry {\n\t\t\tif (buf.limit() > blockSize) {\n\t\t\t\tlog.error(\"ERROR: buffer.capacity=\" + buf.limit() + \" > blocksize=\" + blockSize);\n\t\t\t}\n\t\t\tif (useMmap) {\n\t\t\t\tfinal MappedByteBuffer mbb = getMmapForIndex(index);\n\t\t\t\tif (mbb != null) {\n\t\t\t\t\tmbb.put(buf);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Fallback to RAF\n\t\t\t}\n\t\t\tfileChannel.position(index * blockSize).write(buf);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Exception in set(\" + index + \")\", e);\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public void set(int i, E e) throws IndexOutOfBoundsException {\n validIndex(i);\n data[i] = e;\n }", "@Override\n public boolean set(int index, T element) {\n array[index] = element;\n return true;\n }", "public ByteBuf setMedium(int index, int value)\r\n/* 283: */ {\r\n/* 284:298 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 285:299 */ return super.setMedium(index, value);\r\n/* 286: */ }", "@Override\n public E set(int index, E value) {\n // todo: Students must code\n checkRange(index);\n int pos = calculate(index);\n E oldVal = data[pos];\n data[pos] = value;\n return oldVal;\n }", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "public void setTargetValue(int idx, Object value);", "@Override\n public E set(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n data[i] = e;\n return temp;\n }", "public void setImageData(byte[] value) {\r\n this.imageData = ((byte[]) value);\r\n }", "public void set(int idx, E value) {\n assert idx >= 0;\n \n checkgrow(idx);\n \n\tarray[idx] = value;\n\t\n }", "public int setBytes(int index, FileChannel in, long position, int length)\r\n/* 896: */ throws IOException\r\n/* 897: */ {\r\n/* 898:904 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 899:905 */ return super.setBytes(index, in, position, length);\r\n/* 900: */ }", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "public void setImage(BufferedImage im) {\r\n\t\timage = im;\r\n\t}", "public ByteBuf setInt(int index, int value)\r\n/* 476: */ {\r\n/* 477:490 */ ensureAccessible();\r\n/* 478:491 */ _setInt(index, value);\r\n/* 479:492 */ return this;\r\n/* 480: */ }", "public static void ReplacesImage(int index){\n try{\n Commissions temp = ManageCommissionerList.comms.get(index);\n BufferedImage img = temp.GetWipImage();\n File fl = new File(\"wipimages/wip\" + temp.GetCommissionTitle() + index + \".jpg\");\n ImageIO.write(img, \"jpg\", fl);\n }catch (Exception e){\n e.printStackTrace();\n System.out.printf(\"Failure to write image file\");\n }\n }", "public void setImageData(byte[] imageData) {\n if (tile != null) {\n tile.setImageData(imageData);\n } else {\n this.data = imageData;\n }\n }", "public void set(long index);", "public E set(int index, E element) {\n\t\tif(index < 0 || index > size) {\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t} else if(index == size) {\r\n\t\t\tadd(element);\r\n\t\t\treturn element;\r\n\t\t}\r\n\t\tE e = getNode(index).getData();\r\n\t\tgetNode(index).setData(element);\r\n\t\treturn e;\r\n\t}", "public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }", "public void set(int index, Object wert) {\r\n\t\t// Das Element an der Stelle index \r\n\t\t//soll auf den Wert wert gesetzt werden\r\n\t\tgeheim[index] = wert;\r\n\t}", "public synchronized boolean set(int index, E value) {\n return this.array.set(index, value);\n }", "public void setByte(int index, byte b) throws ArrayIndexOutOfBoundsException\n\t{\n\t\tbytes[index] = b;\n\t}", "public ByteBuf setMedium(int index, int value)\r\n/* 452: */ {\r\n/* 453:466 */ ensureAccessible();\r\n/* 454:467 */ _setMedium(index, value);\r\n/* 455:468 */ return this;\r\n/* 456: */ }", "public void setBlob(int parameterIndex, Blob x) throws SQLException {\n currentPreparedStatement.setBlob(parameterIndex, x);\n }", "public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length)\r\n/* 237: */ {\r\n/* 238:256 */ checkSrcIndex(index, length, srcIndex, src.capacity());\r\n/* 239:257 */ if (src.hasMemoryAddress()) {\r\n/* 240:258 */ PlatformDependent.copyMemory(src.memoryAddress() + srcIndex, this.array, index, length);\r\n/* 241:259 */ } else if (src.hasArray()) {\r\n/* 242:260 */ setBytes(index, src.array(), src.arrayOffset() + srcIndex, length);\r\n/* 243: */ } else {\r\n/* 244:262 */ src.getBytes(srcIndex, this.array, index, length);\r\n/* 245: */ }\r\n/* 246:264 */ return this;\r\n/* 247: */ }", "public void setDataMemory(int index, int value)\n {\n try \n {\n // If the memory address hasn't changed, don't notify any observers\n if (data_memory[index].intValue() != value)\n {\n data_memory[index].setValue(value); \n this.setChanged();\n notifyObservers(new MemoryChangeDetails(index, HexTableModel.OBSERVE_DATA_MEMORY));\n } \n }\n catch (ArrayIndexOutOfBoundsException OOB) { }\n }", "public static native void SetAt(long lpjFbxArrayVector2, int pIndex, long pElement);", "void setObject(int index, Object value, int sqlType)\n throws SQLException;", "public PointF set(int index, PointF point)\n {\n flushCache();\n int realIndex = wrap(index, size());\n return points.set(realIndex, Geometry.clone(point));\n }", "public BufferedImgBase(byte[] byteimg) throws IOException{\n // convert byte[] back to a BufferedImage\n InputStream is = new ByteArrayInputStream(byteimg);\n BufferedImage newBi = ImageIO.read(is);\n //this.img --> BufferedImage\n this.img = newBi;\n }", "public void setPixel(int x, int y, int iArray[], DataBuffer data) {\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n int pixelOffset = y * scanlineStride + x * pixelStride;\n for (int i = 0; i < numBands; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], iArray[i]);\n }\n }" ]
[ "0.7357035", "0.6680164", "0.66478455", "0.60807836", "0.5933417", "0.58314675", "0.5736672", "0.5663915", "0.56099266", "0.5579909", "0.553276", "0.55151445", "0.547573", "0.5467972", "0.5451083", "0.543115", "0.5416996", "0.54049027", "0.53820455", "0.537925", "0.5370989", "0.53590494", "0.5336299", "0.5334767", "0.5320743", "0.53147185", "0.53096116", "0.528592", "0.52695465", "0.5257251", "0.52521724", "0.52340716", "0.51983964", "0.5197409", "0.5181636", "0.518016", "0.51772475", "0.5175744", "0.5173383", "0.5158147", "0.51549643", "0.5141437", "0.51410735", "0.5131917", "0.5131455", "0.51215285", "0.5116039", "0.510371", "0.5099722", "0.5085838", "0.5085838", "0.5083428", "0.50704366", "0.5059824", "0.50584704", "0.50576264", "0.5049103", "0.50477415", "0.504636", "0.5043217", "0.5042639", "0.5035458", "0.5034993", "0.50232834", "0.5011944", "0.5000067", "0.49956894", "0.49935216", "0.4973832", "0.49722743", "0.4966806", "0.49665558", "0.49654466", "0.49558055", "0.49464783", "0.49387163", "0.4926052", "0.49247354", "0.49245766", "0.49227864", "0.49226844", "0.492189", "0.49200395", "0.49179283", "0.4916707", "0.49059686", "0.4901617", "0.48835433", "0.4877883", "0.4875891", "0.48731542", "0.4865981", "0.48655194", "0.48648688", "0.4864578", "0.48612255", "0.4860721", "0.4859757", "0.48593417", "0.48588502" ]
0.71577203
1
Sets this image component at the specified index to the specified RenderedImage object. If the data access mode is not byreference, then the RenderedImage data is copied into this object. If the data access mode is byreference, then a reference to the RenderedImage is saved, but the data is not necessarily copied.
public void set(int index, RenderedImage image) { checkForLiveOrCompiled(); // For RenderedImage the width and height checking is done in the retained. ((ImageComponent3DRetained)this.retained).set(index, image); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public void setSubImage(int index, RenderedImage image,\n\t\t\t\tint width, int height,\n int srcX, int srcY, int dstX, int dstY) {\n if (isLiveOrCompiled() &&\n !this.getCapability(ALLOW_IMAGE_WRITE)) {\n throw new CapabilityNotSetException(\n J3dI18N.getString(\"ImageComponent3D5\"));\n }\n\n if (((ImageComponent3DRetained)this.retained).isByReference()) {\n throw new IllegalStateException(\n J3dI18N.getString(\"ImageComponent3D8\"));\n }\n\n int w = ((ImageComponent3DRetained)this.retained).getWidth();\n int h = ((ImageComponent3DRetained)this.retained).getHeight();\n\n if ((srcX < 0) || (srcY < 0) ||\n ((srcX + width) > w) || ((srcY + height) > h) ||\n (dstX < 0) || (dstY < 0) ||\n ((dstX + width) > w) || ((dstY + height) > h)) {\n throw new IllegalArgumentException(\n J3dI18N.getString(\"ImageComponent3D7\"));\n }\n\n ((ImageComponent3DRetained)this.retained).setSubImage(\n index, image, width, height, srcX, srcY, dstX, dstY);\n }", "public void setCurrentImage(int index) {\n if ((index >= 0) && (index < mTexIdArray.length)) {\n mTexId = mTexIdArray[index];\n }\n }", "void setRenderableSource(Long id, SerializableRenderableImage source,\n\t\t\t int index) throws RemoteException;", "public void set(RenderedImage im) {\n this.im = im;\n ic.set(im);\n }", "void setRenderableSource(Long id, RenderedImage source, int index)\n\tthrows RemoteException;", "void setRenderedSource(Long id, RenderedImage source, int index)\n\tthrows RemoteException;", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "void setImage(BufferedImage i);", "public void setImage(BufferedImage i) {\n // Paint image object\n paint = true;\n image = i;\n this.repaint();\n }", "public void updateImageForIndex(int index) {\n\t\t//Nothing to do\n\t}", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "@SuppressWarnings({\"AndroidApiChecker\", \"FutureReturnValueIgnored\"})\n // setImage is used to place an animated file.\n // setImage takes arguments image, and augmentedImageIndex, which is used to index the list of renderables.\n public void setImage(AugmentedImage image, Integer augmentedImageIndex) {\n this.augmentedImage = image;\n\n if (!currentRenderable.isDone()) {\n CompletableFuture.allOf(currentRenderable)\n // in the case that more than one renderable is used to create a scene,\n // use CompletableFuture.allOf(currentRenderable, other renderables needed for the scene)\n .thenAccept((Void aVoid) -> setImage(image, augmentedImageIndex))\n .exceptionally(\n throwable -> {\n Log.e(TAG, \"Exception loading\", throwable);\n return null;\n });\n }\n\n // Set the anchor based on the center of the image.\n setAnchor(image.createAnchor(image.getCenterPose()));\n\n\n // creates the node\n // in the case that there is more than one renderable in the scene, run the code again, replacing\n // currentRenderable with the other renderables\n\n Node fullnode;\n\n fullnode = new Node();\n fullnode.setParent(this);\n fullnode.setWorldPosition(new Vector3((this.getWorldPosition().x + (nodePosition[augmentedImageIndex].x)), (this.getWorldPosition().y + (nodePosition[augmentedImageIndex].y)), (this.getWorldPosition().z + (nodePosition[augmentedImageIndex].z))));\n fullnode.setLocalScale(new Vector3(0.1f, 0.1f, 0.1f));\n Quaternion newQuaternion = Quaternion.axisAngle(new Vector3(nodeRotation[augmentedImageIndex].x, nodeRotation[augmentedImageIndex].y, nodeRotation[augmentedImageIndex].z), nodeRotation[augmentedImageIndex].q);\n fullnode.setLocalRotation(Quaternion.multiply(fullnode.getLocalRotation(), newQuaternion));\n fullnode.setRenderable(currentRenderable.getNow(null));\n\n }", "public void render () {\n image (img, xC, yC, xLength * getPixelSize(), yLength * getPixelSize());\n }", "public void set(RenderedImage[] images) {\n\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "public void setImageData(byte[] imageData) {\n if (tile != null) {\n tile.setImageData(imageData);\n } else {\n this.data = imageData;\n }\n }", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "public void renderImage(BufferedImage image, int xPosition, int yPosition)\n {\n int[] imagePixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();\n\n for(int y = 0; y < image.getHeight(); y++ ) \n {\n for(int x = 0; x < image.getWidth(); x++ ) \n {\n pixels[(x + xPosition) + (y + yPosition) * view.getWidth() ] = imagePixels[x + y * image.getWidth()];\n }\n }\n }", "void setRenderedSource(Long id, Long sourceId, int index)\n\tthrows RemoteException;", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "void setRenderableSource(Long id, Long sourceId, int index)\n\tthrows RemoteException;", "void setRenderedSource(Long id, RenderedOp source, int index)\n\tthrows RemoteException;", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "public void render() { image.drawFromTopLeft(getX(), getY()); }", "public void setImageIndex(int index)\n\t{\n\t\tthis.drawer.setImageIndex(index);\n\t}", "void lSetImage(Image img);", "public void setBufferImage(Image bufferImage) {\n this.bufferImage = bufferImage;\n }", "public void update(ImageObject nImage) { \r\n selectedImage = nImage;\r\n \r\n update();\r\n }", "void setRenderableSource(Long id, RenderableOp source,\n\t\t\t int index) throws RemoteException;", "public Object set(int index, Object element) {\r\n return deref(refs.set(index, new WeakReference(element)));\r\n }", "protected void setImageData(BufferedImage img) {\n \t\tif (format == null || format == Format.TEXT || format == Format.COLOR16_8x8)\n \t\t\treturn;\n \t\n \t\tequalize(img);\n \t\t\n \t\t//denoise(img);\n \t\t\n \t\tupdatePaletteMapping();\n \t\n \t\tflatten(img);\n \t\t\n \t\tif (!importDirectMappedImage(img)) {\n \t\t\tconvertImageToColorMap(img);\n \t\t}\n \t\n \t\treplaceImageData(img);\n \t}", "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public interface ImageRenderer {\n /** Set displayed image from ImageProvider. This method is recommended,\n * because it allows the Rendered to choose the most efficient transfer\n * format. \n */\n void setImageFromSpec(ImageProvider spec);\n\n /** Set displayed image from buffered image. */\n void setImage(BufferedImage i);\n \n /** \n * Specify whether rendering should keep the aspect ratio of the image. \n * If no, it well be stretched to the display surface. If yes, borders\n * may occur, if the aspect ratio of surface and source image are different.\n * The default is false.\n */\n public void setKeepAspectRatio(boolean keepAspect);\n \n /**\n * Setter for property imageLocation.\n * @param imageLocation New value of property imageLocation.\n */\n void setImageLocation(URL imageLocation) throws IOException;\n\n /**\n * Setter for property imageResource.\n * @param imageResource New value of property imageResource.\n */\n void setImageResource(String imageResource) throws IOException;\n\n}", "@Deprecated\n/* */ protected void setTextureIndex(int idx) {\n/* 94 */ setData((byte)(getData() & 0x8 | idx));\n/* */ }", "void setImage(IViewModel image);", "void setRenderedSource(Long id, Long sourceId, String serverName,\n\t\t\t String opName, int index) throws RemoteException;", "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "public void setTexture(int index, TextureRegion coords)\n\t{\n\t\t//if we are drawing and the new texcoords TEXTURE doesn't match the old one\n\t\tif (drawing && this.textures[index] != null && this.textures[index].getTexture() != coords.getTexture())\n\t\t\tflush();\n\t\tthis.textures[index] = coords;\n\t}", "public CoreResourceHandle set(int index, CoreResourceHandle e) {\n if (index >= 0 && index < doSize()) {\n return doSet(index, e);\n }\n throw new IndexOutOfBoundsException();\n }", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "void setRenderableSource(Long id, Long sourceId, String serverName,\n\t\t\t String opName, int index) throws RemoteException;", "public void setImage(Image img) {\r\n this.img = img;\r\n }", "public void setImageData(byte[] value) {\r\n this.imageData = ((byte[]) value);\r\n }", "public void doImageRendering( int frame )\n\t{\n\t\tArrayColormap cmap = new ArrayColormap();\n\t\tColor color1 = new Color((int)red1.get(frame), (int)green1.get(frame), (int)blue1.get(frame) );\n\t\tColor color2 = new Color((int)red2.get(frame), (int)green2.get(frame), (int)blue2.get(frame) );\n\t\tColor color3 = new Color((int)red3.get(frame), (int)green3.get(frame), (int)blue3.get(frame) );\n\n\t\tcmap.setColor( 0, color2.getRGB() );\n\t\tcmap.setColor( 255, color1.getRGB() );\n\t\tcmap.setColorInterpolated(middleValue.get(), 0, 255, color3.getRGB() );\n\n\t\tfor( int j = 0; j < 256; j++ )\n\t\t\trbgLook[ j ] = cmap.getColor( (float) j / 255.0f ) & alpha_mask;\n\n\t\t//--- Do color replacement.\n\t\tBufferedImage source = getFlowImage();\n\t\tint[] pix = getBank( source );\n\t\tint rbg;\n\t\tint lumaValue;\n\t\tint a;\n\t\tint r;\n\t\tint g;\n\t\tint b;\n\n\t\tfor( int i = 0; i < pix.length; i++ )\n\t\t{\n\t\t\ta = ( pix[ i ] >> alpha ) & 0xff;\n\t\t\tr = ( pix[ i ] >> red ) & 0xff;\n\t\t\tg = ( pix[ i ] >> green ) & 0xff;\n\t\t\tb = ( pix[ i ] & 0xff );\n\n\t\t\tlumaValue = (( r + g + b ) * 255 ) / MAX_RGB;\n\t\t\trbg = rbgLook[ lumaValue ];\n\n\t\t\tpix[ i ] = a << alpha | rbg;\n\t\t}\n\n\t\tsendFilteredImage( source, frame );\n\n\t}", "public void setMaterialInstanceAt(@EntityInstance int i, @IntRange(from = 0) int primitiveIndex,\n @NonNull MaterialInstance materialInstance) {\n int required = materialInstance.getMaterial().getRequiredAttributesAsInt();\n int declared = nGetEnabledAttributesAt(mNativeObject, i, primitiveIndex);\n if ((declared & required) != required) {\n Platform.get().warn(\"setMaterialInstanceAt() on primitive \"\n + primitiveIndex + \" of Renderable at \" + i\n + \": declared attributes \" + getEnabledAttributesAt(i, primitiveIndex)\n + \" do no satisfy required attributes \" + materialInstance.getMaterial().getRequiredAttributes());\n }\n nSetMaterialInstanceAt(mNativeObject, i, primitiveIndex, materialInstance.getNativeObject());\n }", "public void set(int index,Object data)\r\n\t{\r\n\t\tremove(index);\r\n\t\tadd(index, data);\r\n\t}", "public void set(final int index, final Object object) {\n super.set(index, object);\n }", "RenderedImage createRendering(Long id, \n\t\t\t\t SerializableState renderContextState) \n\tthrows RemoteException;", "public final void replaceImage(final ImageProcessor newImage) {\r\n this.image = newImage;\r\n }", "void setImage(Layer layer, Image image);", "@Override\n public T set(final int index, final T element) {\n this.checkIndex(index);\n final T prevElment = get(index);\n this.data[index] = element;\n return prevElment;\n }", "public void redraw() {\n\t\tif(this.getGraphics() != null){\n\t\t\tthis.getGraphics().drawImage(imageBuffer, 0, 0, this); // Swap\n\t\t}\n\t}", "public void setElementAt(Object obj, int index);", "public void setImage(int imageId) {\n this.imageId=imageId;\n\t}", "public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }", "public void updateImage(ColorImage newImage) {\n currentImage.push(newImage);\n }", "public void changeImage(){\n if(getImage()==storeItemImg) setImage(selected);\n else setImage(storeItemImg);\n }", "public void onImageRendered (RenderedImage renderedImage);", "public abstract void render(PixelImage canvas);", "public ByteBuf setByte(int index, int value)\r\n/* 416: */ {\r\n/* 417:430 */ ensureAccessible();\r\n/* 418:431 */ _setByte(index, value);\r\n/* 419:432 */ return this;\r\n/* 420: */ }", "public void setImage(Image newImage)\n {\n if (newImage == null)\n {\n setFill(null);\n }\n else\n {\n setFill(new ImageFill(newImage));\n }\n }", "void setBlob(int index, Blob value) throws SQLException;", "void drawImage(Graphics g, Image i, int index, int x, int y, int width, int height){\n\t\tg.drawImage(images.get(i).get(index), (int) (x*worldScale), (int) (y*worldScale), (int) (width*worldScale), (int) (height*worldScale), this);\n\t}", "@Override\n public void drawImage(Image image, double x, double y) {\n Object nativeImage = graphicsEnvironmentImpl.drawImage(canvas, image, x, y, image.getCached());\n image.cache(nativeImage);\n }", "public static void ReplacesImage(int index){\n try{\n Commissions temp = ManageCommissionerList.comms.get(index);\n BufferedImage img = temp.GetWipImage();\n File fl = new File(\"wipimages/wip\" + temp.GetCommissionTitle() + index + \".jpg\");\n ImageIO.write(img, \"jpg\", fl);\n }catch (Exception e){\n e.printStackTrace();\n System.out.printf(\"Failure to write image file\");\n }\n }", "public abstract BufferedImage applyTo(BufferedImage image);", "public Builder setImagesByTransform(\n int index, com.yahoo.xpathproto.TransformTestProtos.ContentImage.Builder builderForValue) {\n if (imagesByTransformBuilder_ == null) {\n ensureImagesByTransformIsMutable();\n imagesByTransform_.set(index, builderForValue.build());\n onChanged();\n } else {\n imagesByTransformBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }", "private void setImage() {\n BitmapFactory.Options options = new BitmapFactory.Options();\n Bitmap originalBm = BitmapFactory.decodeFile(tempFile.getAbsolutePath(), options);\n // Log.d(TAG, \"setImage : \" + tempFile.getAbsolutePath());\n\n myImage.setImageBitmap(originalBm);\n\n /**\n * tempFile 사용 후 null 처리를 해줘야 합니다.\n * (resultCode != RESULT_OK) 일 때 tempFile 을 삭제하기 때문에\n * 기존에 데이터가 남아 있게 되면 원치 않은 삭제가 이뤄집니다.\n */\n System.out.println(\"setImage : \" + tempFile.getAbsolutePath());\n fileSource = tempFile.getAbsolutePath();\n myImageSource = fileSource;\n check++;\n tempFile = null;\n\n }", "void setObject(int index, Object value) throws SQLException;", "public void setTexture(int side, TextureComponent2D srcImage)\n throws InvalidWriteTimingException\n {\n if(isLive() && updateHandler != null &&\n !updateHandler.isDataWritePermitted(this))\n throw new InvalidWriteTimingException(getDataWriteTimingMessage());\n\n texture[side] = srcImage;\n stateChanged = true;\n }", "public void setVideoBufferByte(int index, byte data)\n {\n this.videocard.vgaMemory[index] = data;\n }", "public void setMaterialIndex(int index) { materialIndex = index; }", "public void updateData(Updater updater, int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height) {\n if (isLiveOrCompiled() &&\n !this.getCapability(ALLOW_IMAGE_WRITE)) {\n throw new CapabilityNotSetException(\n J3dI18N.getString(\"ImageComponent3D5\"));\n }\n\n if (!((ImageComponent3DRetained)this.retained).isByReference()) {\n throw new IllegalStateException(\n J3dI18N.getString(\"ImageComponent3D6\"));\n }\n\n int w = ((ImageComponent3DRetained)this.retained).getWidth();\n int h = ((ImageComponent3DRetained)this.retained).getHeight();\n\n if ((x < 0) || (y < 0) || ((x + width) > w) || ((y + height) > h)) {\n throw new IllegalArgumentException(\n J3dI18N.getString(\"ImageComponent3D7\"));\n }\n\n ((ImageComponent3DRetained)this.retained).updateData(\n updater, index, x, y, width, height);\n }", "public void send(int index) { GLTexCoordElt.send(index); }", "public Object set(int index, Object element) {\r\n Entry e = entry(index);\r\n Object oldVal = e.element;\r\n e.element = element;\r\n return oldVal;\r\n }", "public void assign() {\n\t\tfinal RandomAccess<U> accessor = img.randomAccess();\n\t\tfinal V output = function.createOutput();\n\t\tINPUT input = null;\n\t\twhile (iter.hasNext()) {\n\t\t\tinput = iter.next(input);\n\t\t\tboolean proceed = (condition == null) || (condition.isTrue(input));\n\t\t\tif (proceed) {\n\t\t\t\tfunction.compute(input, output);\n\t\t\t\taccessor.setPosition(iter.getCurrentPoint());\n\t\t\t\taccessor.get().setReal(output.getRealDouble());\n\t\t\t\taccessor.get().setImaginary(output.getImaginaryDouble());\n\t\t\t\t// FIXME\n\t\t\t\t// Note - for real datasets this imaginary assignment may waste cpu\n\t\t\t\t// cycles. Perhaps it can get optimized away by the JIT. But maybe not\n\t\t\t\t// since the type is not really known because this class is really\n\t\t\t\t// constructed from a raw type. We'd need to test how the JIT handles\n\t\t\t\t// this situation. Note that in past incarnations this class used\n\t\t\t\t// assigner classes. The complex version set R & I but the real\n\t\t\t\t// version just set R. We could adopt that approach once again.\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected byte[] getReferenceImageData() {\n\t\treturn createBufferedImageData(resolveURI(refImageURI));\n\t}", "public void setImage(Image image) {\n this.image = image;\n }", "public void setImage(BufferedImage image) {\n\t\tdisplayImage = image;\n\t\tinitBbox();\n\t}", "public @Override E set(int index, E element) {\n \tNode n = getNode(index);\n \tE result = n.data;\n \tn.data = element;\n \treturn result;\n }", "public Builder setImagesByTransform(\n int index, com.yahoo.xpathproto.TransformTestProtos.ContentImage value) {\n if (imagesByTransformBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureImagesByTransformIsMutable();\n imagesByTransform_.set(index, value);\n onChanged();\n } else {\n imagesByTransformBuilder_.setMessage(index, value);\n }\n return this;\n }", "public void setImage(Image image) {\n this.image = image;\n width = image.getWidth();\n height = image.getHeight();\n }", "public void setMorphTargetBufferAt(@EntityInstance int i,\n @IntRange(from = 0) int level,\n @IntRange(from = 0) int primitiveIndex,\n @NonNull MorphTargetBuffer morphTargetBuffer,\n @IntRange(from = 0) int offset,\n @IntRange(from = 0) int count) {\n nSetMorphTargetBufferAt(mNativeObject, i, level, primitiveIndex,\n morphTargetBuffer.getNativeObject(), offset, count);\n }", "public void set(int index, Object value) {\n\tif(arr.length < index){\n\t\tObject arr2[] = new Object[index+1];\n\t\tSystem.arraycopy(arr, 0, arr2, 0, arr.length);\n\t\tarr2[index] = value;\n\t\tarr = arr2;\n\t\t\n\t}\n\telse arr[index] = value;\n}", "public void updateObjectImage() {\r\n\t\tif (this.objectDescriptionTabItem != null) this.objectDescriptionTabItem.redrawImageCanvas();\r\n\t}", "void setArrayElement(int index, Object value);", "void setArrayElement(int index, Object value);", "public void setAmusementObjectImageA(int imageId){\r\n amusementObjectImageA = imageId;\r\n }", "public ByteBuf setBytes(int index, byte[] src)\r\n/* 337: */ {\r\n/* 338:352 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 339:353 */ return super.setBytes(index, src);\r\n/* 340: */ }", "public void updateImage(BufferedImage displayImage) {\n this.imageToDisplay = new ImageIcon(displayImage);\n this.revalidate();\n this.repaint();\n }", "@Override\n public void drawImage(Image image, double x, double y, double width, double height) {\n Object nativeImage = graphicsEnvironmentImpl.drawImage(canvas, image, x, y, width, height, image.getCached());\n image.cache(nativeImage);\n }", "public Object set(int index, Object element) {\n\t\tif (index < 0 || index >= this.size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"the index [\" + index\n\t\t\t\t\t+ \"] is not valid for this list with the size [\"\n\t\t\t\t\t+ this.size + \"].\");\n\t\t}\n\t\tObject replaced = this.storedObjects[index];\n\t\tthis.storedObjects[index] = element;\n\n\t\treturn replaced;\n\t}", "public ByteBuf setByte(int index, int value)\r\n/* 271: */ {\r\n/* 272:286 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 273:287 */ return super.setByte(index, value);\r\n/* 274: */ }", "void setObject(int index, Object value, int sqlType, int scale)\n throws SQLException;", "@Override\n public E set(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n data[i] = e;\n return temp;\n }", "public void setImage(byte[] value) {\n this.image = ((byte[]) value);\n }", "@Override\n public void drawImage(Image image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh) {\n Object nativeImage = graphicsEnvironmentImpl.drawImage(canvas, image, sx, sy, sw, sh, dx, dy, dw, dh, image.getCached());\n image.cache(nativeImage);\n }", "public void setObject(int parameterIndex, Object x) throws SQLException {\n currentPreparedStatement.setObject(parameterIndex, x);\n }" ]
[ "0.6903358", "0.67567456", "0.5967602", "0.5909405", "0.5905885", "0.5805421", "0.5794359", "0.5793994", "0.573824", "0.5720985", "0.56860447", "0.5640829", "0.5509794", "0.5364712", "0.5354545", "0.5324177", "0.528705", "0.51893586", "0.5186203", "0.51858246", "0.5085043", "0.5084866", "0.5079102", "0.5062882", "0.5018949", "0.5014382", "0.4999383", "0.49870157", "0.49841508", "0.4983058", "0.49600464", "0.49549973", "0.49506858", "0.49463668", "0.49355522", "0.4930039", "0.49230456", "0.49203193", "0.49167866", "0.49050176", "0.48857132", "0.4863888", "0.48485267", "0.48473123", "0.4830668", "0.48068482", "0.4805255", "0.4798774", "0.4786547", "0.47626373", "0.47599557", "0.47557375", "0.4753238", "0.4753066", "0.47195718", "0.47148117", "0.47143158", "0.47130635", "0.47098443", "0.47052324", "0.47002906", "0.46975887", "0.46896148", "0.4688564", "0.46866202", "0.46747404", "0.4655959", "0.4650889", "0.46305877", "0.4630312", "0.46258074", "0.46242166", "0.4620178", "0.45855805", "0.45791137", "0.45770884", "0.45727953", "0.4572089", "0.4571034", "0.45694494", "0.45633778", "0.45593193", "0.4556893", "0.45468366", "0.45452666", "0.45418486", "0.45392838", "0.4537819", "0.4537819", "0.45374522", "0.4534651", "0.45339823", "0.4533977", "0.45338288", "0.45292878", "0.45273325", "0.45251516", "0.45248765", "0.4524162", "0.45214584" ]
0.7624767
0
Sets this image component at the specified index to the specified NioImageBuffer object. If the data access mode is not byreference, then the NioImageBuffer data is copied into this object. If the data access mode is byreference, then a reference to the NioImageBuffer is saved, but the data is not necessarily copied.
public void set(int index, NioImageBuffer image) { throw new UnsupportedOperationException(); /* checkForLiveOrCompiled(); // For NioImageBuffer the width and height checking is done in the retained. ((ImageComponent3DRetained)this.retained).set(index, image); */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NioImageBuffer getNioImage(int index) {\n\n \tthrow new UnsupportedOperationException();\n }", "public ByteBuf setBytes(int index, ByteBuffer src)\r\n/* 257: */ {\r\n/* 258:276 */ ensureAccessible();\r\n/* 259:277 */ src.get(this.array, index, src.remaining());\r\n/* 260:278 */ return this;\r\n/* 261: */ }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public ByteBuf setBytes(int index, ByteBuffer src)\r\n/* 349: */ {\r\n/* 350:364 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 351:365 */ return super.setBytes(index, src);\r\n/* 352: */ }", "public void set(int index, RenderedImage image) {\n\n checkForLiveOrCompiled();\n // For RenderedImage the width and height checking is done in the retained.\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public void setBufferImage(Image bufferImage) {\n this.bufferImage = bufferImage;\n }", "public void setMorphTargetBufferAt(@EntityInstance int i,\n @IntRange(from = 0) int level,\n @IntRange(from = 0) int primitiveIndex,\n @NonNull MorphTargetBuffer morphTargetBuffer,\n @IntRange(from = 0) int offset,\n @IntRange(from = 0) int count) {\n nSetMorphTargetBufferAt(mNativeObject, i, level, primitiveIndex,\n morphTargetBuffer.getNativeObject(), offset, count);\n }", "@Override\r\n\tpublic Buffer setBuffer(int pos, Buffer b) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Buffer setBuffer(int pos, Buffer b, int offset, int len) {\n\t\treturn null;\r\n\t}", "public ByteBuf setBytes(int index, byte[] src)\r\n/* 337: */ {\r\n/* 338:352 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 339:353 */ return super.setBytes(index, src);\r\n/* 340: */ }", "public ByteBuffer nioBuffer(int index, int length)\r\n/* 709: */ {\r\n/* 710:718 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 711:719 */ return super.nioBuffer(index, length);\r\n/* 712: */ }", "public ByteBuf setByte(int index, int value)\r\n/* 416: */ {\r\n/* 417:430 */ ensureAccessible();\r\n/* 418:431 */ _setByte(index, value);\r\n/* 419:432 */ return this;\r\n/* 420: */ }", "public ByteBuf setBytes(int index, byte[] src, int srcIndex, int length)\r\n/* 343: */ {\r\n/* 344:358 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 345:359 */ return super.setBytes(index, src, srcIndex, length);\r\n/* 346: */ }", "public ByteBuffer nioBuffer(int index, int length)\r\n/* 300: */ {\r\n/* 301:314 */ ensureAccessible();\r\n/* 302:315 */ return ByteBuffer.wrap(this.array, index, length).slice();\r\n/* 303: */ }", "public ByteBuf setBytes(int index, ByteBuf src)\r\n/* 319: */ {\r\n/* 320:334 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 321:335 */ return super.setBytes(index, src);\r\n/* 322: */ }", "public ByteBuf setBytes(int index, byte[] src, int srcIndex, int length)\r\n/* 250: */ {\r\n/* 251:269 */ checkSrcIndex(index, length, srcIndex, src.length);\r\n/* 252:270 */ System.arraycopy(src, srcIndex, this.array, index, length);\r\n/* 253:271 */ return this;\r\n/* 254: */ }", "public boolean set(final int index, final ByteBuffer buf) {\n\t\tif (!validState) {\n\t\t\tthrow new InvalidStateException();\n\t\t}\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"set(\" + index + \",\" + buf + \")\");\n\t\t}\n\t\ttry {\n\t\t\tif (buf.limit() > blockSize) {\n\t\t\t\tlog.error(\"ERROR: buffer.capacity=\" + buf.limit() + \" > blocksize=\" + blockSize);\n\t\t\t}\n\t\t\tif (useMmap) {\n\t\t\t\tfinal MappedByteBuffer mbb = getMmapForIndex(index);\n\t\t\t\tif (mbb != null) {\n\t\t\t\t\tmbb.put(buf);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Fallback to RAF\n\t\t\t}\n\t\t\tfileChannel.position(index * blockSize).write(buf);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Exception in set(\" + index + \")\", e);\n\t\t}\n\t\treturn false;\n\t}", "public ByteBuffer internalNioBuffer(int index, int length)\r\n/* 311: */ {\r\n/* 312:325 */ checkIndex(index, length);\r\n/* 313:326 */ return (ByteBuffer)internalNioBuffer().clear().position(index).limit(index + length);\r\n/* 314: */ }", "public int setBytes(int index, FileChannel in, long position, int length)\r\n/* 896: */ throws IOException\r\n/* 897: */ {\r\n/* 898:904 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 899:905 */ return super.setBytes(index, in, position, length);\r\n/* 900: */ }", "public void setVideoBufferByte(int index, byte data)\n {\n this.videocard.vgaMemory[index] = data;\n }", "public int setBytes(int index, FileChannel in, long position, int length)\r\n/* 283: */ throws IOException\r\n/* 284: */ {\r\n/* 285:299 */ ensureAccessible();\r\n/* 286: */ try\r\n/* 287: */ {\r\n/* 288:301 */ return in.read((ByteBuffer)internalNioBuffer().clear().position(index).limit(index + length), position);\r\n/* 289: */ }\r\n/* 290: */ catch (ClosedChannelException ignored) {}\r\n/* 291:303 */ return -1;\r\n/* 292: */ }", "public ByteBuffer internalNioBuffer(int index, int length)\r\n/* 727: */ {\r\n/* 728:736 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 729:737 */ return super.internalNioBuffer(index, length);\r\n/* 730: */ }", "public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length)\r\n/* 331: */ {\r\n/* 332:346 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 333:347 */ return super.setBytes(index, src, srcIndex, length);\r\n/* 334: */ }", "public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length)\r\n/* 237: */ {\r\n/* 238:256 */ checkSrcIndex(index, length, srcIndex, src.capacity());\r\n/* 239:257 */ if (src.hasMemoryAddress()) {\r\n/* 240:258 */ PlatformDependent.copyMemory(src.memoryAddress() + srcIndex, this.array, index, length);\r\n/* 241:259 */ } else if (src.hasArray()) {\r\n/* 242:260 */ setBytes(index, src.array(), src.arrayOffset() + srcIndex, length);\r\n/* 243: */ } else {\r\n/* 244:262 */ src.getBytes(srcIndex, this.array, index, length);\r\n/* 245: */ }\r\n/* 246:264 */ return this;\r\n/* 247: */ }", "public void set(NioImageBuffer[] images) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n */\n }", "public ByteBuf setByte(int index, int value)\r\n/* 271: */ {\r\n/* 272:286 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 273:287 */ return super.setByte(index, value);\r\n/* 274: */ }", "public abstract void setBufferMode(int mode);", "public int setBytes(int index, ScatteringByteChannel in, int length)\r\n/* 362: */ throws IOException\r\n/* 363: */ {\r\n/* 364:376 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 365:377 */ return super.setBytes(index, in, length);\r\n/* 366: */ }", "public ByteBuf setBytes(int index, ByteBuf src, int length)\r\n/* 325: */ {\r\n/* 326:340 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 327:341 */ return super.setBytes(index, src, length);\r\n/* 328: */ }", "public int setBytes(int index, ScatteringByteChannel in, int length)\r\n/* 271: */ throws IOException\r\n/* 272: */ {\r\n/* 273:289 */ ensureAccessible();\r\n/* 274: */ try\r\n/* 275: */ {\r\n/* 276:291 */ return in.read((ByteBuffer)internalNioBuffer().clear().position(index).limit(index + length));\r\n/* 277: */ }\r\n/* 278: */ catch (ClosedChannelException ignored) {}\r\n/* 279:293 */ return -1;\r\n/* 280: */ }", "public void set(final int index, final Object object) {\n super.set(index, object);\n }", "public interface NanoBuffer {\n\n void wrap(ByteBuffer buffer);\n\n int readerIndex();\n\n int writerIndex();\n\n boolean hasBytes();\n\n boolean hasBytes(int bytes);\n\n boolean canWrite(int bytes);\n\n void clear();\n\n ByteBuffer byteBuffer();\n\n // positional accessors\n byte readByte();\n\n short readUnsignedByte();\n\n short readShort();\n\n int readUnsignedShort();\n\n int readlnt();\n\n long readUnsignedlnt();\n\n long readLong();\n\n void writeByte(byte value);\n\n void writeShort(short value);\n\n void writelnt(int value);\n\n void writeLong(long value);\n\n byte getByte(int index);\n\n short getUnsignedByte(int index);\n\n short getShort(int index);\n\n int getUnsignedShort(int index);\n\n int getlnt(int index);\n\n long getLong(int index);\n\n void putByte(int index, byte value);\n\n void putShort(int index, short value);\n\n void putlnt(int index, int value);\n\n void putLong(int index, long value);\n}", "public static void bgfx_encoder_set_index_buffer(@NativeType(\"bgfx_encoder_t *\") long _this, @NativeType(\"bgfx_index_buffer_handle_t\") short _handle, @NativeType(\"uint32_t\") int _firstIndex, @NativeType(\"uint32_t\") int _numIndices) {\n long __functionAddress = Functions.encoder_set_index_buffer;\n if (CHECKS) {\n check(_this);\n }\n invokePCV(_this, _handle, _firstIndex, _numIndices, __functionAddress);\n }", "public void setElementAt(Object obj, int index);", "@Override\r\n\tpublic Buffer setBytes(int pos, byte[] b) {\n\t\treturn null;\r\n\t}", "public Object set(int index, Object element) {\r\n return deref(refs.set(index, new WeakReference(element)));\r\n }", "public void updateImageForIndex(int index) {\n\t\t//Nothing to do\n\t}", "public ByteBuf setZero(int index, int length)\r\n/* 369: */ {\r\n/* 370:382 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 371:383 */ return super.setZero(index, length);\r\n/* 372: */ }", "public void setNClob(int parameterIndex, NClob value) throws SQLException {\n currentPreparedStatement.setNClob(parameterIndex, value);\n }", "public ByteBuf setInt(int index, int value)\r\n/* 476: */ {\r\n/* 477:490 */ ensureAccessible();\r\n/* 478:491 */ _setInt(index, value);\r\n/* 479:492 */ return this;\r\n/* 480: */ }", "public void set(int index, Object value) {\n\tif(arr.length < index){\n\t\tObject arr2[] = new Object[index+1];\n\t\tSystem.arraycopy(arr, 0, arr2, 0, arr.length);\n\t\tarr2[index] = value;\n\t\tarr = arr2;\n\t\t\n\t}\n\telse arr[index] = value;\n}", "BinaryArrayReadWrite set(int index, byte x);", "public static void bgfx_set_index_buffer(@NativeType(\"bgfx_index_buffer_handle_t\") short _handle, @NativeType(\"uint32_t\") int _firstIndex, @NativeType(\"uint32_t\") int _numIndices) {\n long __functionAddress = Functions.set_index_buffer;\n invokeCV(_handle, _firstIndex, _numIndices, __functionAddress);\n }", "@Override\r\n\tpublic Buffer setBytes(int pos, ByteBuffer b) {\n\t\treturn null;\r\n\t}", "public PlainNioObject(final SocketChannel channel, final JPPFBuffer buf) {\n this(channel, new MultipleBuffersLocation(buf));\n }", "void setImage(BufferedImage i);", "public Builder setData(\n int index, com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDataIsMutable();\n data_.set(index, value);\n onChanged();\n return this;\n }", "public Builder setData(\n int index, com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDataIsMutable();\n data_.set(index, value);\n onChanged();\n return this;\n }", "public void set(int index, int o) {\n\t\tif(index == 0) return;\n\t\tr[index] = o;\n\t}", "void setBuffer(byte[] b)\n {\n buffer = b;\n }", "public void setCurrentImage(int index) {\n if ((index >= 0) && (index < mTexIdArray.length)) {\n mTexId = mTexIdArray[index];\n }\n }", "public ByteBuf setInt(int index, int value)\r\n/* 289: */ {\r\n/* 290:304 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 291:305 */ return super.setInt(index, value);\r\n/* 292: */ }", "public IBuffer newBuffer();", "@Override\r\n\tpublic Buffer setBytes(int pos, byte[] b, int offset, int len) {\n\t\treturn null;\r\n\t}", "protected void _setByte(int index, int value)\r\n/* 423: */ {\r\n/* 424:437 */ HeapByteBufUtil.setByte(this.array, index, value);\r\n/* 425: */ }", "public abstract void put(long position, ByteBuffer src);", "void setBlob(int index, Blob value) throws SQLException;", "public void setColorBuffer(ByteBuffer colorBuf) {\n this.colorBuf = colorBuf;\n }", "public ByteBuf setMedium(int index, int value)\r\n/* 452: */ {\r\n/* 453:466 */ ensureAccessible();\r\n/* 454:467 */ _setMedium(index, value);\r\n/* 455:468 */ return this;\r\n/* 456: */ }", "public void set(int index,Object data)\r\n\t{\r\n\t\tremove(index);\r\n\t\tadd(index, data);\r\n\t}", "public synchronized void setElementAt(WModelObject object, int index)\n\t{\n\t\tm_elements.setElementAt(object, index);\n\t}", "@Override\n BinaryArrayReadWrite clone();", "public Builder setCached(\n int index, com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureCachedIsMutable();\n cached_.set(index, value);\n onChanged();\n return this;\n }", "public void put(long position, ByteBuffer src);", "@Override\n\tpublic void setNClob(int parameterIndex, NClob value) throws SQLException {\n\t\t\n\t}", "public void setSubImage(int index, RenderedImage image,\n\t\t\t\tint width, int height,\n int srcX, int srcY, int dstX, int dstY) {\n if (isLiveOrCompiled() &&\n !this.getCapability(ALLOW_IMAGE_WRITE)) {\n throw new CapabilityNotSetException(\n J3dI18N.getString(\"ImageComponent3D5\"));\n }\n\n if (((ImageComponent3DRetained)this.retained).isByReference()) {\n throw new IllegalStateException(\n J3dI18N.getString(\"ImageComponent3D8\"));\n }\n\n int w = ((ImageComponent3DRetained)this.retained).getWidth();\n int h = ((ImageComponent3DRetained)this.retained).getHeight();\n\n if ((srcX < 0) || (srcY < 0) ||\n ((srcX + width) > w) || ((srcY + height) > h) ||\n (dstX < 0) || (dstY < 0) ||\n ((dstX + width) > w) || ((dstY + height) > h)) {\n throw new IllegalArgumentException(\n J3dI18N.getString(\"ImageComponent3D7\"));\n }\n\n ((ImageComponent3DRetained)this.retained).setSubImage(\n index, image, width, height, srcX, srcY, dstX, dstY);\n }", "void setArrayElement(int index, Object value);", "void setArrayElement(int index, Object value);", "public void setObject(int parameterIndex, Object x) throws SQLException {\n currentPreparedStatement.setObject(parameterIndex, x);\n }", "protected void _setInt(int index, int value)\r\n/* 483: */ {\r\n/* 484:497 */ HeapByteBufUtil.setInt(this.array, index, value);\r\n/* 485: */ }", "@Override\n\tpublic synchronized void reset() {\n\t\tiOBuffer.reset();\n\t}", "public void write(ByteBuffer buffer) throws IOException {\n _channel.write(buffer);\n }", "public FFTMaterial setBuffers(FloatBuffer vertexBuffer, FloatBuffer texCoordBuffer,\r\n ShortBuffer indexBuffer, int numIndices) {\n this.vertexBuffer = vertexBuffer;\r\n this.texCoordBuffer = texCoordBuffer;\r\n this.indexBuffer = indexBuffer;\r\n this.numIndices = numIndices;\r\n return this;\r\n }", "public void setBlob(int parameterIndex, Blob x) throws SQLException {\n currentPreparedStatement.setBlob(parameterIndex, x);\n }", "@Override\n public final void set(int index, E newValue) {\n array[index] = newValue;\n }", "@Override\n public T set(final int index, final T element) {\n this.checkIndex(index);\n final T prevElment = get(index);\n this.data[index] = element;\n return prevElment;\n }", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "public final void setBufferInt(final byte[] buffer, final int data, final int i, final boolean endianess) {\r\n\r\n if (endianess == FileDicomBaseInner.BIG_ENDIAN) {\r\n buffer[i] = (byte) (data >>> 24);\r\n buffer[i + 1] = (byte) (data >>> 16);\r\n buffer[i + 2] = (byte) (data >>> 8);\r\n buffer[i + 3] = (byte) (data & 0xff);\r\n } else {\r\n buffer[i] = (byte) (data & 0xff);\r\n buffer[i + 1] = (byte) (data >>> 8);\r\n buffer[i + 2] = (byte) (data >>> 16);\r\n buffer[i + 3] = (byte) (data >>> 24);\r\n }\r\n }", "public static native void SetAt(long lpjFbxArrayVector2, int pIndex, long pElement);", "@Deprecated\n/* */ protected void setTextureIndex(int idx) {\n/* 94 */ setData((byte)(getData() & 0x8 | idx));\n/* */ }", "public ByteBuf setMedium(int index, int value)\r\n/* 283: */ {\r\n/* 284:298 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 285:299 */ return super.setMedium(index, value);\r\n/* 286: */ }", "public CoreResourceHandle set(int index, CoreResourceHandle e) {\n if (index >= 0 && index < doSize()) {\n return doSet(index, e);\n }\n throw new IndexOutOfBoundsException();\n }", "private void resetBuffer() {\n\t\tbufferWidth = getSize().width;\n\t\tbufferHeight = getSize().height;\n\n\t\t// clean up the previous image\n\t\tif (bufferGraphics != null) {\n\t\t\tbufferGraphics.dispose();\n\t\t\tbufferGraphics = null;\n\t\t}\n\t\tif (bufferImage != null) {\n\t\t\tbufferImage.flush();\n\t\t\tbufferImage = null;\n\t\t}\n\t\tSystem.gc();\n\n\t\tbufferImage = new BufferedImage(bufferWidth, bufferHeight,\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\n\t\tbufferGraphics = bufferImage.createGraphics();\n\t\tbufferGraphics.setRenderingHint (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t}", "public void setTextureCoordsBuffer(ByteBuffer coords) {\n this.texCoordsBuf = coords;\n }", "public void setByte(int index, byte b) throws ArrayIndexOutOfBoundsException\n\t{\n\t\tbytes[index] = b;\n\t}", "void setObject(int index, Object value) throws SQLException;", "public void set(int index, Object value) {\n\n\t\t// the right portion of values of the array -> room is not available\n\t\tif(index >= arr.length) {\n\t\t\tObject[] tmpArr = new Object[index+1]; // keep all values of the variable arr\n\t\t\t\n\t\t\t// keep all items of arr\n\t\t\tfor(int i=0; i<arr.length; i++) {\n\t\t\t\ttmpArr[i] = arr[i];\n\t\t\t}\n\t\t\t\n\t\t\tarr = tmpArr; // exchange addresses\n \t\t}\t\n\t\t\n\t\tarr[index] = value;\n\t\t\n\t}", "public PointF set(int index, PointF point)\n {\n flushCache();\n int realIndex = wrap(index, size());\n return points.set(realIndex, Geometry.clone(point));\n }", "public void updateBuffer(int voxel){\n\t\tint y = (voxel>>>12)&0x3ff;\n\t\tint x = (voxel>>>22)&0x3ff;\n\t\tint c = ((voxel&0xf00)<<8) | ((voxel&0xf0)<<4) | (voxel&0xf);\n\t\t//c<<4 turns colors 0x00..0x30..0xf0 to colors 0x00..0x33..0xff\n\t\tint colorARGB = 0xff000000 | c | (c<<4);\n\t\tbi.setRGB(x, y, colorARGB);\n\t}", "public ByteBuf setFloat(int index, float value)\r\n/* 307: */ {\r\n/* 308:322 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 309:323 */ return super.setFloat(index, value);\r\n/* 310: */ }", "public void setObject(int i, T obj);", "public void setDataMemory(int index, int value)\n {\n try \n {\n // If the memory address hasn't changed, don't notify any observers\n if (data_memory[index].intValue() != value)\n {\n data_memory[index].setValue(value); \n this.setChanged();\n notifyObservers(new MemoryChangeDetails(index, HexTableModel.OBSERVE_DATA_MEMORY));\n } \n }\n catch (ArrayIndexOutOfBoundsException OOB) { }\n }", "public ByteBuffer[] nioBuffers(int index, int length)\r\n/* 721: */ {\r\n/* 722:730 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 723:731 */ return super.nioBuffers(index, length);\r\n/* 724: */ }", "@Override\n public void put(long position, ByteBuffer src) {\n final ByteBuffer bd = this.getOrCreateBackingBB(position).duplicate();\n final long offset = this.getBackingBBOffset();\n bd.position(NumbersUtils.asInt(position-offset));\n bd.put(src);\n }", "public static void bgfx_encoder_set_instance_data_buffer(@NativeType(\"bgfx_encoder_t *\") long _this, @NativeType(\"bgfx_instance_data_buffer_t const *\") BGFXInstanceDataBuffer _idb, @NativeType(\"uint32_t\") int _start, @NativeType(\"uint32_t\") int _num) {\n nbgfx_encoder_set_instance_data_buffer(_this, _idb.address(), _start, _num);\n }", "@Override\r\n\tpublic Buffer setInt(int pos, int i) {\n\t\treturn null;\r\n\t}", "public void setObject(Spatial objChange, int index, int parentIndex) {\n toChange[index]=objChange;\n parentIndexes[index]=parentIndex;\n }", "public void setNClob(int parameterIndex, Reader reader) throws SQLException {\n currentPreparedStatement.setNClob(parameterIndex, reader);\n\n }", "public void mo133129a(ByteBuffer byteBuffer) {\n this.f113329c = byteBuffer;\n }", "public static void bgfx_set_instance_data_buffer(@NativeType(\"bgfx_instance_data_buffer_t const *\") BGFXInstanceDataBuffer _idb, @NativeType(\"uint32_t\") int _start, @NativeType(\"uint32_t\") int _num) {\n nbgfx_set_instance_data_buffer(_idb.address(), _start, _num);\n }" ]
[ "0.6273577", "0.607364", "0.5930382", "0.59055096", "0.5833876", "0.58118737", "0.5755573", "0.5682504", "0.5599867", "0.5586097", "0.55557674", "0.5540615", "0.55148745", "0.5514669", "0.55110216", "0.55006146", "0.5495586", "0.54899204", "0.5413523", "0.5397833", "0.5397564", "0.5388471", "0.53657085", "0.53647304", "0.534774", "0.5306963", "0.5299326", "0.5281573", "0.5222173", "0.51795095", "0.514994", "0.51467955", "0.5139122", "0.51323277", "0.5129651", "0.5106081", "0.50924885", "0.5067778", "0.5043871", "0.50208324", "0.50090975", "0.49978802", "0.49604484", "0.49507195", "0.49428323", "0.49254906", "0.49213228", "0.49213228", "0.48933968", "0.4891712", "0.48819503", "0.48805153", "0.4864639", "0.48644397", "0.4843634", "0.48313686", "0.48307878", "0.48288298", "0.48284975", "0.4823043", "0.48114285", "0.48068488", "0.48057732", "0.479523", "0.47881725", "0.47751075", "0.47746697", "0.47746697", "0.47727242", "0.47408414", "0.4738811", "0.4737156", "0.47361317", "0.4727307", "0.47259384", "0.47219032", "0.4720289", "0.47134912", "0.4712326", "0.47045952", "0.4703296", "0.4694268", "0.46904787", "0.4690333", "0.46899116", "0.46817365", "0.46815526", "0.46795684", "0.4678974", "0.46757475", "0.4668993", "0.46651232", "0.46580455", "0.46579662", "0.46568534", "0.46556762", "0.46547112", "0.46513897", "0.46487498", "0.4644971" ]
0.75937784
0
Retrieves the images from this ImageComponent3D object. If the data access mode is not byreference, then a copy of the images is made. If the data access mode is byreference, then the references are returned.
public BufferedImage[] getImage() { if (isLiveOrCompiled()) if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("ImageComponent3D3")); return ((ImageComponent3DRetained)this.retained).getImage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Image> getImages() {\r\n\t\treturn immutableImageList;\r\n\t}", "public Image[] getImages() {\n return images;\n }", "public RenderedImage[] getRenderedImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getRenderedImage();\n }", "@Basic @Immutable\n\tpublic Sprite[] getImages() {\n\t\treturn this.images;\n\t}", "public Image getImg(){\n\t\treturn imgs[count];\n\t}", "public ArrayList<ImageView> getImages() {\n\t return images;\n\t}", "public byte[] getImages() {\n return images;\n }", "public Collection<GPImageLinkComponent> getImages()\n\t{\n\t\treturn getImages( getSession().getSessionContext() );\n\t}", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "@Generated(hash = 1057346450)\n public List<Image> getImageList() {\n if (imageList == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n ImageDao targetDao = daoSession.getImageDao();\n List<Image> imageListNew = targetDao._queryEvent_ImageList(id);\n synchronized (this) {\n if (imageList == null) {\n imageList = imageListNew;\n }\n }\n }\n return imageList;\n }", "public ArrayList<Image> getImages() {\n\t\treturn getPageObjects(Image.class);\n\t}", "private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }", "public ImageIcon[] getImages() {\n\t\treturn imageList;\n\t}", "public Image getThree();", "public Map<ID, List<Image>> getEntityImages() {\n return entityImages;\n }", "@Override\n\tprotected byte[] getReferenceImageData() {\n\t\treturn createBufferedImageData(resolveURI(refImageURI));\n\t}", "public List<WebResource> getImages() {\r\n\t\tList<WebResource> result = new Vector<WebResource>();\r\n\t\tList<WebComponent> images = wcDao.getImages();\r\n\t\t// settare l'href corretto...\r\n\t\tfor (Iterator<WebComponent> iter = images.iterator(); iter.hasNext();) {\r\n\t\t\tresult.add((WebResource) iter.next());\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public int[][] getImage() {\n return m_img;\n }", "Images getImages(){\n return images;\n }", "public BufferedImage queryImage() {\n\t\treturn cloud;\n\t}", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public LinkedHashMap<String, Stack<ColorImage>> getImageCache() {\n return imageCache;\n }", "private byte[] getData() {\n\t\tStorage storage;\n\t\tint cont = 0;\n\t\tbyte[] data = null;\n\t\tsynchronized (store) {\n\t\t\tstorage = (Storage) store.getContents();\n\t\t\tif (storage != null && storage.data != null) {\n\t\t\t\tdata = storage.data;\n\t\t\t\tcont = storage.cont;\n\t\t\t}\n\t\t}\n\t\tif (cont == 0 || data == null) {\n\t\t\tdata = getImage();\n\t\t\tif (data == null)\n\t\t\t\treturn null;\n\t\t\tcont++;// It increments twice so on the next run it doesn't get\n\t\t\t// updated again\n\t\t}\n\t\tif (cont > 5)\n\t\t\tcont = 0; // it increments just next, so it never stays 0 (wich\n\t\t// is only initial state)\n\t\tcont++;\n\t\tsynchronized (store) {\n\t\t\tif (storage == null) {\n\t\t\t\tstorage = new Storage();\n\t\t\t}\n\t\t\tstorage.cont = cont;\n\t\t\tstore.setContents(storage);\n\t\t\tstore.commit();\n\t\t}\n\n\t\treturn data;\n\t}", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public List<ImageResourceWrapper> getMap() {\n // Declare a new list to hold the rendering info for the physics objects.\n List<ImageResourceWrapper> rtrnResources = new ArrayList<>();\n for(PhysicsEntity physicsEntity : this.physModel.getEntities()) {\n // Get the graphics entity corresponding to the current physics entity.\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(physicsEntity.getId());\n String imgResource = graphicsEntity.getImgResId(physicsEntity.getOrientation());\n rtrnResources.add(new ImageResourceWrapper(new Point(physicsEntity.getPosition().x, physicsEntity.getPosition().y), imgResource));\n }\n for(Objective objective : this.gameStateModel.getObjectives()) {\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(objective.getId());\n // TODO: Orientation for objectives\n String imgResource = graphicsEntity.getImgResId(0);\n rtrnResources.add(new ImageResourceWrapper(new Point(objective.getPosition().x, objective.getPosition().y), imgResource));\n }\n return rtrnResources;\n }", "public List<Image> getAllImages() {\n\t\treturn list;\n\t}", "@Nullable\n public List<PictureCollection> getPictures() {\n return mPictures == null ? null : new ArrayList<>(mPictures);\n }", "public ReactorResult<DataObject> getAllAttachedPicture_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ATTACHEDPICTURE, DataObject.class);\r\n\t}", "public ArrayList<ImageFile> getImageFiles() {\n return new ArrayList<>(imageFiles);\n }", "public PhotoContainer getImageLibrary() {\n\t\treturn imageLibrary;\n\t}", "public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}", "public LiveData<List<ImageModel>> getImageList()\n {\n return mImagesList;\n }", "java.util.List<com.google.protobuf.ByteString> getImgDataList();", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public List<Image> getAllImage()\n {\n GetAllImageQuery getAllImageQuery = new GetAllImageQuery();\n return super.queryResult(getAllImageQuery);\n }", "public java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> getImagesByTransformList() {\n return imagesByTransform_;\n }", "public BufferedImage getDati()\n { \n return imgDati;\n }", "public Image getInstanceImage() {\r\n return this.image;\r\n }", "final RenderedImage[] getSourceArray() {\n return sources.clone();\n }", "public List<Image> getAllImage() {\n\t\treturn null;\n\t}", "@Nullable\n public abstract Image images();", "final Reference<ComputedImage> reference() {\n return reference;\n }", "public String [] getImageIds() {\n return this.ImageIds;\n }", "public String getImages() {\n\t\treturn this.images;\n\t}", "public final ImageMap getImageMap() {\n return this.imageMap;\n }", "@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}", "public Bitmap getImage(){\n return images[currentFrame];\n }", "private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}", "public Image getImage() {\n\t\treturn image;\r\n\t}", "public List<? extends PictureData> getAllPictures() {\n\t\treturn null;\n\t}", "public ArrayList<Group> GetImageStorageMelanoma() {\n\t\tExListViewController selImagens = new ExListViewController();\n\t\treturn selImagens.SelectPicsOnMelanomaDirectory(CreateListFiles());\n\t}", "public Image getImage() {\r\n return image;\r\n }", "public Image getImage() {\r\n\t\treturn image;\r\n\t}", "public Long[] getImageViews() {\n if (this.cleanedUp) {\n throw new IllegalStateException(\"Tried fetch image views from cleaned up swapchain!\");\n }\n return Arrays.stream(this.imageViews)\n .map(GPUImage.View::getHandle)\n .toArray(Long[]::new);\n }", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public Collection<GPImageLinkComponent> getImages(final SessionContext ctx)\n\t{\n\t\tfinal List<GPImageLinkComponent> items = getLinkedItems( \n\t\t\tctx,\n\t\t\ttrue,\n\t\t\tGpcommonaddonConstants.Relations.BRANDBAR2GPIMAGELINKRELATION,\n\t\t\t\"GPImageLinkComponent\",\n\t\t\tnull,\n\t\t\tfalse,\n\t\t\tfalse\n\t\t);\n\t\treturn items;\n\t}", "Object getChannelData() {\r\n return imageData;\r\n }", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "public List<ImageInformation> imageInformation() {\n return this.innerProperties() == null ? null : this.innerProperties().imageInformation();\n }", "public Image getImage() {\n return image;\n }", "public java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> getImagesByTransformList() {\n if (imagesByTransformBuilder_ == null) {\n return java.util.Collections.unmodifiableList(imagesByTransform_);\n } else {\n return imagesByTransformBuilder_.getMessageList();\n }\n }", "public List<Pic> list() {\n\t\treturn picDao.list();\n\t}", "public ImageReference imageReference() {\n return this.imageReference;\n }", "public Image getFour();", "public BufferedImage getImage() { // operates every 10 ms\n\t\tif(isLife()) { // alive\n\t\t\treturn images[0]; // return images[0]\n\t\t}else if(isDead()) { // dead\n\t\t\tBufferedImage img = images[index++]; // start from the second image\n\t\t\tif(index==images.length) { // if at the last image\n\t\t\t\tstate = REMOVE; // change the state to REMOVE\n\t\t\t}\n\t\t\treturn img; // return explosion image\n\t\t}\n\t\treturn null; // return null when state removed\n\t\t/*\n\t\t * index=1\n\t\t * 10M img=images[1] index=2 return images[1]\n\t\t * 20M img=images[2] index=3 return images[2]\n\t\t * 30M img=images[3] index=4 return images[3]\n\t\t * 40M img=images[4] index=5(REMOVE) \t\treturn images[4]\n\t\t * 50M return null\n\t\t */\n\t}", "public java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList() {\n return imagesByTransform_;\n }", "private Cursor initilizeData(){\n\t String[] dataToAccess = new String[]{\n\t\t \tMediaStore.Images.Media._ID,\t\t\t// This is image file ID\n\t\t MediaStore.Images.Media.DISPLAY_NAME, // filename\n\t\t MediaStore.Images.Media.DATE_TAKEN\t\t// creation date\n\t\t };\n\t String limitSize = MediaStore.Images.Media.DATE_TAKEN + \" desc limit 25\"; // desc: says descending order (in reverse newest first), limit 5: 5, e.g., can also do: \"%s limit 5\"\n\t \n\t // Make the query.\n\t System.out.println(dataToAccess.toString());\n\t Context c = getActivity().getApplicationContext();\n\t mImageRef = c.getContentResolver().query(\n\t \t\tMediaStore.Images.Media.EXTERNAL_CONTENT_URI, // Get the base URI for all of the images\n\t dataToAccess, \t// Which columns to return\n\t \"\", \t// Which rows to return (all rows)\n\t null, \t// Selection arguments (none)\n\t limitSize // Ordering\n\t \t);\n\t \n\t\t// make sure there is something to move to! \n\t\t// \t(otherwise, this will crash if there are no photos) \n\t System.out.println(\"Count: \" + mImageRef.getCount());\n\t\tif (mImageRef.getCount() > 0)\n\t\t\tmImageRef.moveToFirst();\n\t\t\n\t\t\n\t\treturn mImageRef;\n\t}", "@Transactional\n\tpublic Set<ProductImages> loadProductImagess() {\n\t\treturn productImagesDAO.findAllProductImagess();\n\t}", "public Image getImage() {\n return image;\n }", "public LiveData<List<PhotoData>> getGeoLocatedImages(){\n locationImages = mRepository.findGeoLocatedImages();\n\n return locationImages;\n }", "public BufferedImage getImage() {\t\r\n\t\treturn this.image;\t\t\t\r\n\t}", "public BufferedImage getImage() {\n\t\t return img;\n\t}", "@Override\n\tpublic ArrayList<ImgRep> getAll(int imgNum) {\n\t\treturn dao.selectAll(imgNum);\n\t}", "public ImageArray getCurrentImage() {\n return currentIm;\n }", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public JQImageMap getImageMap()\n {\n return imageMap;\n }", "public ImageInfo getImage() {\n return image;\n }", "public java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList() {\n if (imagesByTransformBuilder_ != null) {\n return imagesByTransformBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(imagesByTransform_);\n }\n }", "public BufferedImage getImage() {\n\t\treturn this.image;\n\t}", "public Image read()\n throws MleRuntimeException\n {\n Image image = null;\n \n // Get the data associated with the media reference.\n byte[] buffer = m_references.m_buffer;\n \n // Read Image from external reference.\n if (buffer != null)\n \t{\n // Set the reference for the converter.\n \t\tm_converter.setReference(buffer);\n \t\t\n \t\t// Invoke the converter to prepare the local file.\n \t\tString filename = m_converter.getFilename();\n\n \t\t// true return means we downloaded successfully to a\n \t\t// local file referred to by filename.\n \t\tif (m_converter.conversionComplete())\n \t\t{\n \t // Attempt to load the file.\n \t if (filename.endsWith(\".gif\"))\n \t {\n \t // Load a GIF image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if (filename.endsWith(\".png\"))\n \t {\n \t // Load a PNG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if ((filename.endsWith(\".jpg\")) || (filename.endsWith(\".jpeg\")))\n \t {\n \t // Loag a JPEG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t }\n \t\t}\n }\n \n return image;\n }", "public com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index) {\n return imagesByTransform_.get(index);\n }", "public ImageData getImageData() {\n\t\treturn this.data.getImageData();\n\t}", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public PImage getImage() {\n return this.image;\n }", "public final ImageProcessor getImage() {\r\n return image;\r\n }", "@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}", "public List<DataDiskImageEncryption> dataDiskImages() {\n return this.dataDiskImages;\n }", "public List<String> getImagesUrl() {\n\t\tif (imagesUrl == null) {\n\t\t\timagesUrl = new ArrayList<String>();\n\t\t}\n\t\treturn imagesUrl;\n\t}", "public BufferedImage getImage() {\n return image;\n }", "@Override\n\tpublic List<Image> findAll() {\n\t\treturn imageRepository.findAll();\n\t}", "@Override\n\tpublic void readImages() {\n\t\t\n\t}", "public List<Document> getArticlePhotoList() {\n if (articlePhotoList == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n DocumentDao targetDao = daoSession.getDocumentDao();\n List<Document> articlePhotoListNew = targetDao._queryArticle_ArticlePhotoList(objectId);\n synchronized (this) {\n if(articlePhotoList == null) {\n articlePhotoList = articlePhotoListNew;\n }\n }\n }\n return articlePhotoList;\n }", "public byte[] getImageData() {\r\n return imageData;\r\n }", "@Override\n\tpublic List<ImageEntity> getAll() {\n\t\treturn DatabaseContext.findAll(ImageEntity.class);\n\t}" ]
[ "0.6029264", "0.59378564", "0.5898646", "0.5779092", "0.5770385", "0.57371974", "0.57237893", "0.5708291", "0.56423974", "0.56245524", "0.5608515", "0.55626434", "0.5534968", "0.55137855", "0.5501159", "0.54815096", "0.5478178", "0.54181284", "0.54032737", "0.5359582", "0.53542453", "0.53455853", "0.5281512", "0.52728695", "0.5267596", "0.52597404", "0.525881", "0.52518606", "0.52500117", "0.52490854", "0.52450806", "0.5234161", "0.5232099", "0.5230703", "0.5208338", "0.5204794", "0.52025926", "0.5192359", "0.51884", "0.5156789", "0.51435435", "0.51312166", "0.5128562", "0.51235145", "0.5114549", "0.5110762", "0.50811476", "0.5063892", "0.50541604", "0.5049359", "0.50471777", "0.50416654", "0.50304186", "0.50192845", "0.50163144", "0.5015726", "0.5015438", "0.5015231", "0.5015231", "0.5008861", "0.50023884", "0.5002359", "0.4984764", "0.4979245", "0.49747962", "0.49663818", "0.49657696", "0.49575287", "0.49551728", "0.49508095", "0.49473974", "0.4944275", "0.49420047", "0.4938628", "0.49349305", "0.4923312", "0.49232206", "0.49204123", "0.49170044", "0.49094313", "0.49093845", "0.49062374", "0.4898263", "0.48969328", "0.48966932", "0.4894801", "0.48944864", "0.48944864", "0.48944864", "0.48943323", "0.48791036", "0.4877676", "0.4876802", "0.48708075", "0.4868597", "0.4865416", "0.48503482", "0.48404592", "0.48349482", "0.48348662" ]
0.70325696
0
Retrieves the images from this ImageComponent3D object. If the data access mode is not byreference, then a copy of the images is made. If the data access mode is byreference, then the references are returned.
public RenderedImage[] getRenderedImage() { if (isLiveOrCompiled()) if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("ImageComponent3D3")); return ((ImageComponent3DRetained)this.retained).getRenderedImage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "public List<Image> getImages() {\r\n\t\treturn immutableImageList;\r\n\t}", "public Image[] getImages() {\n return images;\n }", "@Basic @Immutable\n\tpublic Sprite[] getImages() {\n\t\treturn this.images;\n\t}", "public Image getImg(){\n\t\treturn imgs[count];\n\t}", "public ArrayList<ImageView> getImages() {\n\t return images;\n\t}", "public byte[] getImages() {\n return images;\n }", "public Collection<GPImageLinkComponent> getImages()\n\t{\n\t\treturn getImages( getSession().getSessionContext() );\n\t}", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "@Generated(hash = 1057346450)\n public List<Image> getImageList() {\n if (imageList == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n ImageDao targetDao = daoSession.getImageDao();\n List<Image> imageListNew = targetDao._queryEvent_ImageList(id);\n synchronized (this) {\n if (imageList == null) {\n imageList = imageListNew;\n }\n }\n }\n return imageList;\n }", "public ArrayList<Image> getImages() {\n\t\treturn getPageObjects(Image.class);\n\t}", "private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }", "public ImageIcon[] getImages() {\n\t\treturn imageList;\n\t}", "public Image getThree();", "public Map<ID, List<Image>> getEntityImages() {\n return entityImages;\n }", "@Override\n\tprotected byte[] getReferenceImageData() {\n\t\treturn createBufferedImageData(resolveURI(refImageURI));\n\t}", "public List<WebResource> getImages() {\r\n\t\tList<WebResource> result = new Vector<WebResource>();\r\n\t\tList<WebComponent> images = wcDao.getImages();\r\n\t\t// settare l'href corretto...\r\n\t\tfor (Iterator<WebComponent> iter = images.iterator(); iter.hasNext();) {\r\n\t\t\tresult.add((WebResource) iter.next());\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public int[][] getImage() {\n return m_img;\n }", "Images getImages(){\n return images;\n }", "public BufferedImage queryImage() {\n\t\treturn cloud;\n\t}", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public LinkedHashMap<String, Stack<ColorImage>> getImageCache() {\n return imageCache;\n }", "private byte[] getData() {\n\t\tStorage storage;\n\t\tint cont = 0;\n\t\tbyte[] data = null;\n\t\tsynchronized (store) {\n\t\t\tstorage = (Storage) store.getContents();\n\t\t\tif (storage != null && storage.data != null) {\n\t\t\t\tdata = storage.data;\n\t\t\t\tcont = storage.cont;\n\t\t\t}\n\t\t}\n\t\tif (cont == 0 || data == null) {\n\t\t\tdata = getImage();\n\t\t\tif (data == null)\n\t\t\t\treturn null;\n\t\t\tcont++;// It increments twice so on the next run it doesn't get\n\t\t\t// updated again\n\t\t}\n\t\tif (cont > 5)\n\t\t\tcont = 0; // it increments just next, so it never stays 0 (wich\n\t\t// is only initial state)\n\t\tcont++;\n\t\tsynchronized (store) {\n\t\t\tif (storage == null) {\n\t\t\t\tstorage = new Storage();\n\t\t\t}\n\t\t\tstorage.cont = cont;\n\t\t\tstore.setContents(storage);\n\t\t\tstore.commit();\n\t\t}\n\n\t\treturn data;\n\t}", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public List<ImageResourceWrapper> getMap() {\n // Declare a new list to hold the rendering info for the physics objects.\n List<ImageResourceWrapper> rtrnResources = new ArrayList<>();\n for(PhysicsEntity physicsEntity : this.physModel.getEntities()) {\n // Get the graphics entity corresponding to the current physics entity.\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(physicsEntity.getId());\n String imgResource = graphicsEntity.getImgResId(physicsEntity.getOrientation());\n rtrnResources.add(new ImageResourceWrapper(new Point(physicsEntity.getPosition().x, physicsEntity.getPosition().y), imgResource));\n }\n for(Objective objective : this.gameStateModel.getObjectives()) {\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(objective.getId());\n // TODO: Orientation for objectives\n String imgResource = graphicsEntity.getImgResId(0);\n rtrnResources.add(new ImageResourceWrapper(new Point(objective.getPosition().x, objective.getPosition().y), imgResource));\n }\n return rtrnResources;\n }", "public List<Image> getAllImages() {\n\t\treturn list;\n\t}", "@Nullable\n public List<PictureCollection> getPictures() {\n return mPictures == null ? null : new ArrayList<>(mPictures);\n }", "public ArrayList<ImageFile> getImageFiles() {\n return new ArrayList<>(imageFiles);\n }", "public ReactorResult<DataObject> getAllAttachedPicture_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ATTACHEDPICTURE, DataObject.class);\r\n\t}", "public PhotoContainer getImageLibrary() {\n\t\treturn imageLibrary;\n\t}", "public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}", "public LiveData<List<ImageModel>> getImageList()\n {\n return mImagesList;\n }", "java.util.List<com.google.protobuf.ByteString> getImgDataList();", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public List<Image> getAllImage()\n {\n GetAllImageQuery getAllImageQuery = new GetAllImageQuery();\n return super.queryResult(getAllImageQuery);\n }", "public java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> getImagesByTransformList() {\n return imagesByTransform_;\n }", "public BufferedImage getDati()\n { \n return imgDati;\n }", "public Image getInstanceImage() {\r\n return this.image;\r\n }", "final RenderedImage[] getSourceArray() {\n return sources.clone();\n }", "public List<Image> getAllImage() {\n\t\treturn null;\n\t}", "@Nullable\n public abstract Image images();", "final Reference<ComputedImage> reference() {\n return reference;\n }", "public String [] getImageIds() {\n return this.ImageIds;\n }", "public String getImages() {\n\t\treturn this.images;\n\t}", "public final ImageMap getImageMap() {\n return this.imageMap;\n }", "@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}", "public Bitmap getImage(){\n return images[currentFrame];\n }", "private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}", "public Image getImage() {\n\t\treturn image;\r\n\t}", "public List<? extends PictureData> getAllPictures() {\n\t\treturn null;\n\t}", "public ArrayList<Group> GetImageStorageMelanoma() {\n\t\tExListViewController selImagens = new ExListViewController();\n\t\treturn selImagens.SelectPicsOnMelanomaDirectory(CreateListFiles());\n\t}", "public Image getImage() {\r\n return image;\r\n }", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public Image getImage() {\r\n\t\treturn image;\r\n\t}", "public Long[] getImageViews() {\n if (this.cleanedUp) {\n throw new IllegalStateException(\"Tried fetch image views from cleaned up swapchain!\");\n }\n return Arrays.stream(this.imageViews)\n .map(GPUImage.View::getHandle)\n .toArray(Long[]::new);\n }", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public Collection<GPImageLinkComponent> getImages(final SessionContext ctx)\n\t{\n\t\tfinal List<GPImageLinkComponent> items = getLinkedItems( \n\t\t\tctx,\n\t\t\ttrue,\n\t\t\tGpcommonaddonConstants.Relations.BRANDBAR2GPIMAGELINKRELATION,\n\t\t\t\"GPImageLinkComponent\",\n\t\t\tnull,\n\t\t\tfalse,\n\t\t\tfalse\n\t\t);\n\t\treturn items;\n\t}", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "Object getChannelData() {\r\n return imageData;\r\n }", "public List<ImageInformation> imageInformation() {\n return this.innerProperties() == null ? null : this.innerProperties().imageInformation();\n }", "public Image getImage() {\n return image;\n }", "public java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> getImagesByTransformList() {\n if (imagesByTransformBuilder_ == null) {\n return java.util.Collections.unmodifiableList(imagesByTransform_);\n } else {\n return imagesByTransformBuilder_.getMessageList();\n }\n }", "public List<Pic> list() {\n\t\treturn picDao.list();\n\t}", "public ImageReference imageReference() {\n return this.imageReference;\n }", "public Image getFour();", "public BufferedImage getImage() { // operates every 10 ms\n\t\tif(isLife()) { // alive\n\t\t\treturn images[0]; // return images[0]\n\t\t}else if(isDead()) { // dead\n\t\t\tBufferedImage img = images[index++]; // start from the second image\n\t\t\tif(index==images.length) { // if at the last image\n\t\t\t\tstate = REMOVE; // change the state to REMOVE\n\t\t\t}\n\t\t\treturn img; // return explosion image\n\t\t}\n\t\treturn null; // return null when state removed\n\t\t/*\n\t\t * index=1\n\t\t * 10M img=images[1] index=2 return images[1]\n\t\t * 20M img=images[2] index=3 return images[2]\n\t\t * 30M img=images[3] index=4 return images[3]\n\t\t * 40M img=images[4] index=5(REMOVE) \t\treturn images[4]\n\t\t * 50M return null\n\t\t */\n\t}", "public java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList() {\n return imagesByTransform_;\n }", "private Cursor initilizeData(){\n\t String[] dataToAccess = new String[]{\n\t\t \tMediaStore.Images.Media._ID,\t\t\t// This is image file ID\n\t\t MediaStore.Images.Media.DISPLAY_NAME, // filename\n\t\t MediaStore.Images.Media.DATE_TAKEN\t\t// creation date\n\t\t };\n\t String limitSize = MediaStore.Images.Media.DATE_TAKEN + \" desc limit 25\"; // desc: says descending order (in reverse newest first), limit 5: 5, e.g., can also do: \"%s limit 5\"\n\t \n\t // Make the query.\n\t System.out.println(dataToAccess.toString());\n\t Context c = getActivity().getApplicationContext();\n\t mImageRef = c.getContentResolver().query(\n\t \t\tMediaStore.Images.Media.EXTERNAL_CONTENT_URI, // Get the base URI for all of the images\n\t dataToAccess, \t// Which columns to return\n\t \"\", \t// Which rows to return (all rows)\n\t null, \t// Selection arguments (none)\n\t limitSize // Ordering\n\t \t);\n\t \n\t\t// make sure there is something to move to! \n\t\t// \t(otherwise, this will crash if there are no photos) \n\t System.out.println(\"Count: \" + mImageRef.getCount());\n\t\tif (mImageRef.getCount() > 0)\n\t\t\tmImageRef.moveToFirst();\n\t\t\n\t\t\n\t\treturn mImageRef;\n\t}", "@Transactional\n\tpublic Set<ProductImages> loadProductImagess() {\n\t\treturn productImagesDAO.findAllProductImagess();\n\t}", "public Image getImage() {\n return image;\n }", "public LiveData<List<PhotoData>> getGeoLocatedImages(){\n locationImages = mRepository.findGeoLocatedImages();\n\n return locationImages;\n }", "public BufferedImage getImage() {\t\r\n\t\treturn this.image;\t\t\t\r\n\t}", "@Override\n\tpublic ArrayList<ImgRep> getAll(int imgNum) {\n\t\treturn dao.selectAll(imgNum);\n\t}", "public BufferedImage getImage() {\n\t\t return img;\n\t}", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public ImageArray getCurrentImage() {\n return currentIm;\n }", "public ImageInfo getImage() {\n return image;\n }", "public JQImageMap getImageMap()\n {\n return imageMap;\n }", "public java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList() {\n if (imagesByTransformBuilder_ != null) {\n return imagesByTransformBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(imagesByTransform_);\n }\n }", "public BufferedImage getImage() {\n\t\treturn this.image;\n\t}", "public Image read()\n throws MleRuntimeException\n {\n Image image = null;\n \n // Get the data associated with the media reference.\n byte[] buffer = m_references.m_buffer;\n \n // Read Image from external reference.\n if (buffer != null)\n \t{\n // Set the reference for the converter.\n \t\tm_converter.setReference(buffer);\n \t\t\n \t\t// Invoke the converter to prepare the local file.\n \t\tString filename = m_converter.getFilename();\n\n \t\t// true return means we downloaded successfully to a\n \t\t// local file referred to by filename.\n \t\tif (m_converter.conversionComplete())\n \t\t{\n \t // Attempt to load the file.\n \t if (filename.endsWith(\".gif\"))\n \t {\n \t // Load a GIF image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if (filename.endsWith(\".png\"))\n \t {\n \t // Load a PNG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if ((filename.endsWith(\".jpg\")) || (filename.endsWith(\".jpeg\")))\n \t {\n \t // Loag a JPEG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t }\n \t\t}\n }\n \n return image;\n }", "public com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index) {\n return imagesByTransform_.get(index);\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public PImage getImage() {\n return this.image;\n }", "public ImageData getImageData() {\n\t\treturn this.data.getImageData();\n\t}", "public final ImageProcessor getImage() {\r\n return image;\r\n }", "@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}", "public List<DataDiskImageEncryption> dataDiskImages() {\n return this.dataDiskImages;\n }", "public List<String> getImagesUrl() {\n\t\tif (imagesUrl == null) {\n\t\t\timagesUrl = new ArrayList<String>();\n\t\t}\n\t\treturn imagesUrl;\n\t}", "public BufferedImage getImage() {\n return image;\n }", "@Override\n\tpublic List<Image> findAll() {\n\t\treturn imageRepository.findAll();\n\t}", "@Override\n\tpublic void readImages() {\n\t\t\n\t}", "public List<Document> getArticlePhotoList() {\n if (articlePhotoList == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n DocumentDao targetDao = daoSession.getDocumentDao();\n List<Document> articlePhotoListNew = targetDao._queryArticle_ArticlePhotoList(objectId);\n synchronized (this) {\n if(articlePhotoList == null) {\n articlePhotoList = articlePhotoListNew;\n }\n }\n }\n return articlePhotoList;\n }", "@Override\n\tpublic List<ImageEntity> getAll() {\n\t\treturn DatabaseContext.findAll(ImageEntity.class);\n\t}", "public byte[] getImageData() {\r\n return imageData;\r\n }" ]
[ "0.70336044", "0.60281706", "0.5936707", "0.57782835", "0.5769978", "0.5736389", "0.5723085", "0.570654", "0.56440943", "0.5623706", "0.5607293", "0.55626804", "0.55336696", "0.55150324", "0.5500532", "0.5480634", "0.54773444", "0.5417552", "0.54023415", "0.53598154", "0.53545666", "0.5346903", "0.52820736", "0.5275743", "0.5270314", "0.5260327", "0.5258435", "0.5250715", "0.52486324", "0.52481115", "0.52453035", "0.5233739", "0.52316415", "0.52302873", "0.5211231", "0.5204766", "0.5202117", "0.51913494", "0.5188111", "0.5156588", "0.5143101", "0.5129918", "0.51280886", "0.5122523", "0.51136297", "0.5110662", "0.50806135", "0.50632036", "0.50543135", "0.504936", "0.50470716", "0.5040834", "0.5029056", "0.5019157", "0.5018687", "0.50162363", "0.5015574", "0.50151134", "0.50151134", "0.5006874", "0.5004752", "0.50022304", "0.49840805", "0.49790758", "0.49743152", "0.49665326", "0.49653202", "0.49566826", "0.49550715", "0.4950546", "0.4947354", "0.49438372", "0.49418414", "0.4937591", "0.4934367", "0.49232206", "0.49229056", "0.49205175", "0.49195543", "0.49092087", "0.49090046", "0.49059272", "0.48976278", "0.48975524", "0.48969135", "0.48944953", "0.48944953", "0.48944953", "0.48940927", "0.48938712", "0.48790047", "0.48770803", "0.48759657", "0.48708102", "0.48679966", "0.4864808", "0.48504373", "0.48402184", "0.48350236", "0.48342168" ]
0.59000236
3
Retrieves the images from this ImageComponent3D object. If the data access mode is not byreference, then a copy of the images is made. If the data access mode is byreference, then the references are returned.
public NioImageBuffer[] getNioImage() { throw new UnsupportedOperationException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "public List<Image> getImages() {\r\n\t\treturn immutableImageList;\r\n\t}", "public Image[] getImages() {\n return images;\n }", "public RenderedImage[] getRenderedImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getRenderedImage();\n }", "@Basic @Immutable\n\tpublic Sprite[] getImages() {\n\t\treturn this.images;\n\t}", "public Image getImg(){\n\t\treturn imgs[count];\n\t}", "public ArrayList<ImageView> getImages() {\n\t return images;\n\t}", "public byte[] getImages() {\n return images;\n }", "public Collection<GPImageLinkComponent> getImages()\n\t{\n\t\treturn getImages( getSession().getSessionContext() );\n\t}", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "@Generated(hash = 1057346450)\n public List<Image> getImageList() {\n if (imageList == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n ImageDao targetDao = daoSession.getImageDao();\n List<Image> imageListNew = targetDao._queryEvent_ImageList(id);\n synchronized (this) {\n if (imageList == null) {\n imageList = imageListNew;\n }\n }\n }\n return imageList;\n }", "public ArrayList<Image> getImages() {\n\t\treturn getPageObjects(Image.class);\n\t}", "private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }", "public ImageIcon[] getImages() {\n\t\treturn imageList;\n\t}", "public Image getThree();", "public Map<ID, List<Image>> getEntityImages() {\n return entityImages;\n }", "@Override\n\tprotected byte[] getReferenceImageData() {\n\t\treturn createBufferedImageData(resolveURI(refImageURI));\n\t}", "public List<WebResource> getImages() {\r\n\t\tList<WebResource> result = new Vector<WebResource>();\r\n\t\tList<WebComponent> images = wcDao.getImages();\r\n\t\t// settare l'href corretto...\r\n\t\tfor (Iterator<WebComponent> iter = images.iterator(); iter.hasNext();) {\r\n\t\t\tresult.add((WebResource) iter.next());\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public int[][] getImage() {\n return m_img;\n }", "Images getImages(){\n return images;\n }", "public BufferedImage queryImage() {\n\t\treturn cloud;\n\t}", "@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}", "public LinkedHashMap<String, Stack<ColorImage>> getImageCache() {\n return imageCache;\n }", "private byte[] getData() {\n\t\tStorage storage;\n\t\tint cont = 0;\n\t\tbyte[] data = null;\n\t\tsynchronized (store) {\n\t\t\tstorage = (Storage) store.getContents();\n\t\t\tif (storage != null && storage.data != null) {\n\t\t\t\tdata = storage.data;\n\t\t\t\tcont = storage.cont;\n\t\t\t}\n\t\t}\n\t\tif (cont == 0 || data == null) {\n\t\t\tdata = getImage();\n\t\t\tif (data == null)\n\t\t\t\treturn null;\n\t\t\tcont++;// It increments twice so on the next run it doesn't get\n\t\t\t// updated again\n\t\t}\n\t\tif (cont > 5)\n\t\t\tcont = 0; // it increments just next, so it never stays 0 (wich\n\t\t// is only initial state)\n\t\tcont++;\n\t\tsynchronized (store) {\n\t\t\tif (storage == null) {\n\t\t\t\tstorage = new Storage();\n\t\t\t}\n\t\t\tstorage.cont = cont;\n\t\t\tstore.setContents(storage);\n\t\t\tstore.commit();\n\t\t}\n\n\t\treturn data;\n\t}", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public List<ImageResourceWrapper> getMap() {\n // Declare a new list to hold the rendering info for the physics objects.\n List<ImageResourceWrapper> rtrnResources = new ArrayList<>();\n for(PhysicsEntity physicsEntity : this.physModel.getEntities()) {\n // Get the graphics entity corresponding to the current physics entity.\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(physicsEntity.getId());\n String imgResource = graphicsEntity.getImgResId(physicsEntity.getOrientation());\n rtrnResources.add(new ImageResourceWrapper(new Point(physicsEntity.getPosition().x, physicsEntity.getPosition().y), imgResource));\n }\n for(Objective objective : this.gameStateModel.getObjectives()) {\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(objective.getId());\n // TODO: Orientation for objectives\n String imgResource = graphicsEntity.getImgResId(0);\n rtrnResources.add(new ImageResourceWrapper(new Point(objective.getPosition().x, objective.getPosition().y), imgResource));\n }\n return rtrnResources;\n }", "public List<Image> getAllImages() {\n\t\treturn list;\n\t}", "@Nullable\n public List<PictureCollection> getPictures() {\n return mPictures == null ? null : new ArrayList<>(mPictures);\n }", "public ArrayList<ImageFile> getImageFiles() {\n return new ArrayList<>(imageFiles);\n }", "public ReactorResult<DataObject> getAllAttachedPicture_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ATTACHEDPICTURE, DataObject.class);\r\n\t}", "public PhotoContainer getImageLibrary() {\n\t\treturn imageLibrary;\n\t}", "public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}", "public LiveData<List<ImageModel>> getImageList()\n {\n return mImagesList;\n }", "java.util.List<com.google.protobuf.ByteString> getImgDataList();", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public List<Image> getAllImage()\n {\n GetAllImageQuery getAllImageQuery = new GetAllImageQuery();\n return super.queryResult(getAllImageQuery);\n }", "public java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> getImagesByTransformList() {\n return imagesByTransform_;\n }", "public BufferedImage getDati()\n { \n return imgDati;\n }", "public Image getInstanceImage() {\r\n return this.image;\r\n }", "final RenderedImage[] getSourceArray() {\n return sources.clone();\n }", "public List<Image> getAllImage() {\n\t\treturn null;\n\t}", "@Nullable\n public abstract Image images();", "final Reference<ComputedImage> reference() {\n return reference;\n }", "public String [] getImageIds() {\n return this.ImageIds;\n }", "public String getImages() {\n\t\treturn this.images;\n\t}", "public final ImageMap getImageMap() {\n return this.imageMap;\n }", "@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}", "public Bitmap getImage(){\n return images[currentFrame];\n }", "private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}", "public Image getImage() {\n\t\treturn image;\r\n\t}", "public List<? extends PictureData> getAllPictures() {\n\t\treturn null;\n\t}", "public ArrayList<Group> GetImageStorageMelanoma() {\n\t\tExListViewController selImagens = new ExListViewController();\n\t\treturn selImagens.SelectPicsOnMelanomaDirectory(CreateListFiles());\n\t}", "public Image getImage() {\r\n return image;\r\n }", "public Image getImage() {\r\n\t\treturn image;\r\n\t}", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public Long[] getImageViews() {\n if (this.cleanedUp) {\n throw new IllegalStateException(\"Tried fetch image views from cleaned up swapchain!\");\n }\n return Arrays.stream(this.imageViews)\n .map(GPUImage.View::getHandle)\n .toArray(Long[]::new);\n }", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public Collection<GPImageLinkComponent> getImages(final SessionContext ctx)\n\t{\n\t\tfinal List<GPImageLinkComponent> items = getLinkedItems( \n\t\t\tctx,\n\t\t\ttrue,\n\t\t\tGpcommonaddonConstants.Relations.BRANDBAR2GPIMAGELINKRELATION,\n\t\t\t\"GPImageLinkComponent\",\n\t\t\tnull,\n\t\t\tfalse,\n\t\t\tfalse\n\t\t);\n\t\treturn items;\n\t}", "Object getChannelData() {\r\n return imageData;\r\n }", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "public List<ImageInformation> imageInformation() {\n return this.innerProperties() == null ? null : this.innerProperties().imageInformation();\n }", "public Image getImage() {\n return image;\n }", "public java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> getImagesByTransformList() {\n if (imagesByTransformBuilder_ == null) {\n return java.util.Collections.unmodifiableList(imagesByTransform_);\n } else {\n return imagesByTransformBuilder_.getMessageList();\n }\n }", "public List<Pic> list() {\n\t\treturn picDao.list();\n\t}", "public ImageReference imageReference() {\n return this.imageReference;\n }", "public Image getFour();", "public BufferedImage getImage() { // operates every 10 ms\n\t\tif(isLife()) { // alive\n\t\t\treturn images[0]; // return images[0]\n\t\t}else if(isDead()) { // dead\n\t\t\tBufferedImage img = images[index++]; // start from the second image\n\t\t\tif(index==images.length) { // if at the last image\n\t\t\t\tstate = REMOVE; // change the state to REMOVE\n\t\t\t}\n\t\t\treturn img; // return explosion image\n\t\t}\n\t\treturn null; // return null when state removed\n\t\t/*\n\t\t * index=1\n\t\t * 10M img=images[1] index=2 return images[1]\n\t\t * 20M img=images[2] index=3 return images[2]\n\t\t * 30M img=images[3] index=4 return images[3]\n\t\t * 40M img=images[4] index=5(REMOVE) \t\treturn images[4]\n\t\t * 50M return null\n\t\t */\n\t}", "public java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList() {\n return imagesByTransform_;\n }", "private Cursor initilizeData(){\n\t String[] dataToAccess = new String[]{\n\t\t \tMediaStore.Images.Media._ID,\t\t\t// This is image file ID\n\t\t MediaStore.Images.Media.DISPLAY_NAME, // filename\n\t\t MediaStore.Images.Media.DATE_TAKEN\t\t// creation date\n\t\t };\n\t String limitSize = MediaStore.Images.Media.DATE_TAKEN + \" desc limit 25\"; // desc: says descending order (in reverse newest first), limit 5: 5, e.g., can also do: \"%s limit 5\"\n\t \n\t // Make the query.\n\t System.out.println(dataToAccess.toString());\n\t Context c = getActivity().getApplicationContext();\n\t mImageRef = c.getContentResolver().query(\n\t \t\tMediaStore.Images.Media.EXTERNAL_CONTENT_URI, // Get the base URI for all of the images\n\t dataToAccess, \t// Which columns to return\n\t \"\", \t// Which rows to return (all rows)\n\t null, \t// Selection arguments (none)\n\t limitSize // Ordering\n\t \t);\n\t \n\t\t// make sure there is something to move to! \n\t\t// \t(otherwise, this will crash if there are no photos) \n\t System.out.println(\"Count: \" + mImageRef.getCount());\n\t\tif (mImageRef.getCount() > 0)\n\t\t\tmImageRef.moveToFirst();\n\t\t\n\t\t\n\t\treturn mImageRef;\n\t}", "@Transactional\n\tpublic Set<ProductImages> loadProductImagess() {\n\t\treturn productImagesDAO.findAllProductImagess();\n\t}", "public Image getImage() {\n return image;\n }", "public LiveData<List<PhotoData>> getGeoLocatedImages(){\n locationImages = mRepository.findGeoLocatedImages();\n\n return locationImages;\n }", "public BufferedImage getImage() {\t\r\n\t\treturn this.image;\t\t\t\r\n\t}", "public BufferedImage getImage() {\n\t\t return img;\n\t}", "@Override\n\tpublic ArrayList<ImgRep> getAll(int imgNum) {\n\t\treturn dao.selectAll(imgNum);\n\t}", "public ImageArray getCurrentImage() {\n return currentIm;\n }", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public JQImageMap getImageMap()\n {\n return imageMap;\n }", "public ImageInfo getImage() {\n return image;\n }", "public java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList() {\n if (imagesByTransformBuilder_ != null) {\n return imagesByTransformBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(imagesByTransform_);\n }\n }", "public BufferedImage getImage() {\n\t\treturn this.image;\n\t}", "public Image read()\n throws MleRuntimeException\n {\n Image image = null;\n \n // Get the data associated with the media reference.\n byte[] buffer = m_references.m_buffer;\n \n // Read Image from external reference.\n if (buffer != null)\n \t{\n // Set the reference for the converter.\n \t\tm_converter.setReference(buffer);\n \t\t\n \t\t// Invoke the converter to prepare the local file.\n \t\tString filename = m_converter.getFilename();\n\n \t\t// true return means we downloaded successfully to a\n \t\t// local file referred to by filename.\n \t\tif (m_converter.conversionComplete())\n \t\t{\n \t // Attempt to load the file.\n \t if (filename.endsWith(\".gif\"))\n \t {\n \t // Load a GIF image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if (filename.endsWith(\".png\"))\n \t {\n \t // Load a PNG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if ((filename.endsWith(\".jpg\")) || (filename.endsWith(\".jpeg\")))\n \t {\n \t // Loag a JPEG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t }\n \t\t}\n }\n \n return image;\n }", "public com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index) {\n return imagesByTransform_.get(index);\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public PImage getImage() {\n return this.image;\n }", "public ImageData getImageData() {\n\t\treturn this.data.getImageData();\n\t}", "public final ImageProcessor getImage() {\r\n return image;\r\n }", "@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}", "public List<DataDiskImageEncryption> dataDiskImages() {\n return this.dataDiskImages;\n }", "public List<String> getImagesUrl() {\n\t\tif (imagesUrl == null) {\n\t\t\timagesUrl = new ArrayList<String>();\n\t\t}\n\t\treturn imagesUrl;\n\t}", "public BufferedImage getImage() {\n return image;\n }", "@Override\n\tpublic List<Image> findAll() {\n\t\treturn imageRepository.findAll();\n\t}", "@Override\n\tpublic void readImages() {\n\t\t\n\t}", "public List<Document> getArticlePhotoList() {\n if (articlePhotoList == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n DocumentDao targetDao = daoSession.getDocumentDao();\n List<Document> articlePhotoListNew = targetDao._queryArticle_ArticlePhotoList(objectId);\n synchronized (this) {\n if(articlePhotoList == null) {\n articlePhotoList = articlePhotoListNew;\n }\n }\n }\n return articlePhotoList;\n }", "@Override\n\tpublic List<ImageEntity> getAll() {\n\t\treturn DatabaseContext.findAll(ImageEntity.class);\n\t}", "public byte[] getImageData() {\r\n return imageData;\r\n }" ]
[ "0.703248", "0.6029943", "0.5938105", "0.5898445", "0.57789624", "0.57700974", "0.57374424", "0.5724316", "0.5708578", "0.56426215", "0.56254566", "0.5608307", "0.55629313", "0.5535373", "0.5512993", "0.5501496", "0.548154", "0.54782706", "0.54182124", "0.5403722", "0.535962", "0.53544307", "0.5345817", "0.52809054", "0.5273793", "0.52682424", "0.5260364", "0.52590644", "0.525136", "0.52495223", "0.5249275", "0.52453434", "0.52344716", "0.52329445", "0.5231212", "0.52089745", "0.5204956", "0.5202317", "0.5191143", "0.5188987", "0.5157159", "0.51436", "0.51310617", "0.51290935", "0.51240593", "0.5114996", "0.51113605", "0.5081046", "0.5063781", "0.5054783", "0.5048969", "0.5047826", "0.50408554", "0.5029481", "0.501999", "0.5017018", "0.5016383", "0.5015923", "0.50159025", "0.50159025", "0.50090295", "0.50027454", "0.50024074", "0.49851403", "0.49799287", "0.49747658", "0.49666783", "0.49664056", "0.49572137", "0.4954405", "0.49508253", "0.4947586", "0.49444455", "0.49427128", "0.49377212", "0.49350983", "0.4923677", "0.49231264", "0.49205896", "0.49179915", "0.49100292", "0.49097586", "0.490635", "0.48984376", "0.48978835", "0.48961282", "0.48952067", "0.48952067", "0.48952067", "0.4894486", "0.48942345", "0.48800462", "0.48776615", "0.48767495", "0.48711234", "0.4868945", "0.48653534", "0.48513943", "0.48410246", "0.483544", "0.48351374" ]
0.0
-1
Retrieves one of the images from this ImageComponent3D object. If the data access mode is not byreference, then a copy of the image is made. If the data access mode is byreference, then the reference is returned.
public BufferedImage getImage(int index) { if (isLiveOrCompiled()) if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("ImageComponent3D3")); RenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index); if ((img != null) && !(img instanceof BufferedImage)) { throw new IllegalStateException(J3dI18N.getString("ImageComponent3D9")); } return (BufferedImage) img; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "final Reference<ComputedImage> reference() {\n return reference;\n }", "public RenderedImage[] getRenderedImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getRenderedImage();\n }", "public Image getInstanceImage() {\r\n return this.image;\r\n }", "public Image getThree();", "public BufferedImage queryImage() {\n\t\treturn cloud;\n\t}", "public Image getOne();", "public ImageReference imageReference() {\n return this.imageReference;\n }", "public Image getImage()\n {\n if (fill instanceof ImageFill)\n {\n return ((ImageFill) fill).getImage();\n }\n else\n {\n return null;\n }\n }", "public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}", "public Image getImg(){\n\t\treturn imgs[count];\n\t}", "public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}", "@Override\n\tprotected byte[] getReferenceImageData() {\n\t\treturn createBufferedImageData(resolveURI(refImageURI));\n\t}", "public Image getImage() {\n\t\treturn image;\r\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\r\n\t\treturn image;\r\n\t}", "public Image getImage() {\r\n return image;\r\n }", "public PImage getImage() {\n return this.image;\n }", "public ImageInfo getImage() {\n return image;\n }", "public Image getImage() {\n return image;\n }", "public BufferedImage getImage() {\t\r\n\t\treturn this.image;\t\t\t\r\n\t}", "public Image getImage() {\n return image;\n }", "@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}", "public PhotoContainer getImageLibrary() {\n\t\treturn imageLibrary;\n\t}", "private Image getImage(boolean isSelected) {\n\t\tString key = isSelected ? CHECKED_IMAGE : UNCHECKED_IMAGE;\n\t\treturn imageRegistry.get(key);\n\t}", "public final ImageProcessor getImage() {\r\n return image;\r\n }", "public BufferedImage getImage() {\n\t\treturn this.image;\n\t}", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "private PlanarImage getImage() {\n PlanarImage img = roiImage;\n if (img == null) {\n synchronized (this) {\n img = roiImage;\n if (img == null) {\n roiImage = img = roi.getAsImage();\n }\n }\n }\n return img;\n }", "public ImageArray getCurrentImage() {\n return currentIm;\n }", "public int[][] getImage() {\n return m_img;\n }", "public ObjectImage getObjectImage ()\r\n {\r\n return recoverable_.getObjectImage ();\r\n }", "public BufferedImage getImage() {\n\t\t return img;\n\t}", "public Image read()\n throws MleRuntimeException\n {\n Image image = null;\n \n // Get the data associated with the media reference.\n byte[] buffer = m_references.m_buffer;\n \n // Read Image from external reference.\n if (buffer != null)\n \t{\n // Set the reference for the converter.\n \t\tm_converter.setReference(buffer);\n \t\t\n \t\t// Invoke the converter to prepare the local file.\n \t\tString filename = m_converter.getFilename();\n\n \t\t// true return means we downloaded successfully to a\n \t\t// local file referred to by filename.\n \t\tif (m_converter.conversionComplete())\n \t\t{\n \t // Attempt to load the file.\n \t if (filename.endsWith(\".gif\"))\n \t {\n \t // Load a GIF image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if (filename.endsWith(\".png\"))\n \t {\n \t // Load a PNG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if ((filename.endsWith(\".jpg\")) || (filename.endsWith(\".jpeg\")))\n \t {\n \t // Loag a JPEG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t }\n \t\t}\n }\n \n return image;\n }", "public BufferedImage getImage() {\n return image;\n }", "public Bitmap getImage(){\n return images[currentFrame];\n }", "public HippoGalleryImageSetBean getImage() {\n return getLinkedBean(\"myspringbasedhippoproject:image\", HippoGalleryImageSetBean.class);\n }", "public Drawable getImage(){\n\t\treturn mImage;\n\t}", "public BufferedImage getDati()\n { \n return imgDati;\n }", "public ImageLayer getActiveImageLayer() {\n checkInvariant();\n if (activeLayer instanceof ImageLayer) {\n ImageLayer imageLayer = (ImageLayer) activeLayer;\n return imageLayer;\n }\n throw new IllegalStateException(\"active layer is not image layer\");\n }", "public BufferedImage getImage() { // operates every 10 ms\n\t\tif(isLife()) { // alive\n\t\t\treturn images[0]; // return images[0]\n\t\t}else if(isDead()) { // dead\n\t\t\tBufferedImage img = images[index++]; // start from the second image\n\t\t\tif(index==images.length) { // if at the last image\n\t\t\t\tstate = REMOVE; // change the state to REMOVE\n\t\t\t}\n\t\t\treturn img; // return explosion image\n\t\t}\n\t\treturn null; // return null when state removed\n\t\t/*\n\t\t * index=1\n\t\t * 10M img=images[1] index=2 return images[1]\n\t\t * 20M img=images[2] index=3 return images[2]\n\t\t * 30M img=images[3] index=4 return images[3]\n\t\t * 40M img=images[4] index=5(REMOVE) \t\treturn images[4]\n\t\t * 50M return null\n\t\t */\n\t}", "public BufferedImage getImage() {\n\t\tTelaInterna ti = ( TelaInterna )contentPane.getSelectedFrame();\n\t\tBufferedImage img;\n\t\timg = ti.getImage();\n\t\treturn img;\n\t}", "public Bitmap getImage() {\n return image;\n }", "public Image getImage() {\n\t\t// Check we have frames\n\t\tif(frames.size() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn getFrame(currentFrameIndex).image;\n\t\t}\n\t}", "public Image getFour();", "public Image getImage() {\n if (tamagoStats.getAge() <= 0) {\n return images.get(\"oeuf\").get(\"noeuf\");\n } else if (tamagoStats.getAge() <= 3) {\n return images.get(\"bebe\").get(\"metamorph\");\n } else if (tamagoStats.getAge() <= 7) {\n return images.get(\"enfant\").get(\"evoli\");\n } else {\n return images.get(\"adulte\").get(\"noctali\");\n }\n }", "public Image getTwo();", "@HippoEssentialsGenerated(internalName = \"katharsisexampleshippo:image\")\n public HippoGalleryImageSet getImage() {\n return getLinkedBean(IMAGE, HippoGalleryImageSet.class);\n }", "public ColorImage getImagem(){\n\t\treturn copiaFoto(this.fotografia);\n\t}", "public ImageObj currentImage() {\n if (model.getImageList().size() == 0) {\n noImages = true;\n return new ImageObj(\"http://www.xn--flawiler-fachgeschfte-n2b.ch/wp-content/uploads/2016/09/sample-image.jpg\", \"No Image\");\n }\n return model.getImageList().get(position);\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}", "Object getChannelData() {\r\n return imageData;\r\n }", "public com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform() {\n return imageByTransform_;\n }", "@Override\n\tpublic Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage(int imageID) {\n\t if(imageID >= 0 && imageID < images.size()) {\n\t return images.get(imageID).getImage();\n\t }\n\t \n\t return null;\n\t}", "public ImageData getImageData() {\n\t\treturn this.data.getImageData();\n\t}", "public List<Image> getImages() {\r\n\t\treturn immutableImageList;\r\n\t}", "public Rectangle getImage() {\n\t\treturn image;\n\t}", "public Optional<ImageLayer> getActiveImageLayerOpt() {\n if (activeLayer instanceof ImageLayer) {\n ImageLayer imageLayer = (ImageLayer) activeLayer;\n return Optional.of(imageLayer);\n }\n return Optional.empty();\n }", "public PImage getImg() {\n \treturn img;\n }", "PImage getImage() {\n return _img;\n }", "public Image getImage() {\r\n\t\treturn GDAssemblerUI.getImage(GDAssemblerUI.IMAGE_GD);\r\n\t}", "public Image getImage() {\n return null;\r\n }", "public INTexture2D getTexture()\n {\n return this.texture.clone();\n }", "public Image getImage()\n {\n return null;\n }", "public final Image getDiffuse() {\n int scaleFactor;\n if (width * height >= RESOLUTION_HIGH) {\n scaleFactor = 2;\n } else {\n scaleFactor = 1;\n }\n\n int widthScaled = (int) Math.ceil((double) width / scaleFactor);\n int heightScaled = (int) Math.ceil((double) height / scaleFactor);\n WritableImage img = new WritableImage(widthScaled, heightScaled);\n PixelWriter writer = img.getPixelWriter();\n diffuseLoop:\n for (int j = 0; j < heightScaled; j++) {\n for (int i = 0; i < widthScaled; i++) {\n if (Thread.interrupted()) {\n break diffuseLoop;\n }\n writer.setColor(i, j, colors.getColor(\n noiseBuffer[j * scaleFactor][i * scaleFactor]));\n }\n }\n return img;\n }", "public BufferedImage GetImage(String name) { return ImageList.get(name); }", "public final ImageMap getImageMap() {\n return this.imageMap;\n }", "public ImageObj prevImage() {\n if (position != 0) {\n position--;\n }\n else {\n position = model.getImageList().size() - 1;\n }\n\n return model.getImageList().get(position);\n }", "public Integer getImageResource(){\n return mImageResource;\n }", "public Image getImage() {\n return (isFacingRight) ? Images.get(\"rightTedhaun\") : Images.get(\"leftTedhaun\");\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public LinkedHashMap<String, Stack<ColorImage>> getImageCache() {\n return imageCache;\n }", "public ImageComponent fetchImageComponent(String filename)\n throws IOException\n {\n ImageComponent ret_val = (ImageComponent)componentMap.get(filename);\n \n if(ret_val == null)\n {\n ret_val = load2DImage(filename);\n componentMap.put(filename, ret_val);\n }\n \n return ret_val;\n }", "public abstract Image getImage();", "public abstract Image getImage();", "public Image getSnapshot(int mode) {\n\t\treturn null;\n\t}", "public ReferenceDataAssetElement getReferenceDataAsset()\n {\n return referenceDataAsset;\n }", "public WritableImage getImage(){\n\t\tWritableImage image = SwingFXUtils.toFXImage(BfImage, null);\r\n\t\treturn image;\r\n\t}", "final RenderedImage getSource() {\n return sources[0];\n }", "public Image getEight();", "public BufferedImage getImage() {\n return embeddedImage;\n }", "public String getImage() {\n return this.Image;\n }", "private byte[] getData() {\n\t\tStorage storage;\n\t\tint cont = 0;\n\t\tbyte[] data = null;\n\t\tsynchronized (store) {\n\t\t\tstorage = (Storage) store.getContents();\n\t\t\tif (storage != null && storage.data != null) {\n\t\t\t\tdata = storage.data;\n\t\t\t\tcont = storage.cont;\n\t\t\t}\n\t\t}\n\t\tif (cont == 0 || data == null) {\n\t\t\tdata = getImage();\n\t\t\tif (data == null)\n\t\t\t\treturn null;\n\t\t\tcont++;// It increments twice so on the next run it doesn't get\n\t\t\t// updated again\n\t\t}\n\t\tif (cont > 5)\n\t\t\tcont = 0; // it increments just next, so it never stays 0 (wich\n\t\t// is only initial state)\n\t\tcont++;\n\t\tsynchronized (store) {\n\t\t\tif (storage == null) {\n\t\t\t\tstorage = new Storage();\n\t\t\t}\n\t\t\tstorage.cont = cont;\n\t\t\tstore.setContents(storage);\n\t\t\tstore.commit();\n\t\t}\n\n\t\treturn data;\n\t}", "public byte[] getImageData() {\r\n return imageData;\r\n }", "public Image getImage(Object element) {\n\t\t\t\treturn null;\n\t\t\t}", "public Image getImage(Object element) {\n\t\t\t\treturn null;\n\t\t\t}", "public Image getImage(Object element) {\n\t\t\t\treturn null;\n\t\t\t}", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public Bitmap get() {\n Throwable throwable2222222;\n Object object;\n block4: {\n boolean bl2 = this.zali;\n if (bl2) return this.zalh;\n Object object2 = this.zalg;\n Object object3 = new ParcelFileDescriptor.AutoCloseInputStream(object2);\n object = new DataInputStream((InputStream)object3);\n int n10 = ((DataInputStream)object).readInt();\n object3 = new byte[n10];\n int n11 = ((DataInputStream)object).readInt();\n int n12 = ((DataInputStream)object).readInt();\n String string2 = ((DataInputStream)object).readUTF();\n string2 = Bitmap.Config.valueOf((String)string2);\n ((DataInputStream)object).read((byte[])object3);\n {\n catch (Throwable throwable2222222) {\n break block4;\n }\n catch (IOException iOException) {}\n {\n String string3 = \"Could not read from parcel file descriptor\";\n object2 = new IllegalStateException(string3, iOException);\n throw object2;\n }\n }\n BitmapTeleporter.zaa((Closeable)object);\n object = ByteBuffer.wrap((byte[])object3);\n object3 = Bitmap.createBitmap((int)n11, (int)n12, (Bitmap.Config)string2);\n object3.copyPixelsFromBuffer((Buffer)object);\n this.zalh = object3;\n this.zali = bl2 = true;\n return this.zalh;\n }\n BitmapTeleporter.zaa((Closeable)object);\n throw throwable2222222;\n }", "public Uri getImageURI() {\n return mImageURI;\n }" ]
[ "0.7090989", "0.61585504", "0.614816", "0.6134999", "0.60432434", "0.6015029", "0.59839356", "0.59285605", "0.58899605", "0.5869743", "0.5863255", "0.5837111", "0.5828118", "0.58141536", "0.58094555", "0.58094555", "0.5797015", "0.57822925", "0.5774002", "0.57453066", "0.57320374", "0.5723766", "0.57224715", "0.5711487", "0.5695904", "0.5692024", "0.5685238", "0.5683975", "0.56833076", "0.566433", "0.5653453", "0.56499606", "0.5633428", "0.5584141", "0.554597", "0.55261344", "0.5525702", "0.5525569", "0.5523204", "0.55215245", "0.551799", "0.5502961", "0.54979366", "0.54895073", "0.5487958", "0.54679954", "0.54482967", "0.5444115", "0.5442931", "0.54245996", "0.5419276", "0.5411363", "0.5411363", "0.5411363", "0.5403892", "0.5403892", "0.5403892", "0.5401946", "0.5401161", "0.5400195", "0.5385918", "0.5372948", "0.534943", "0.53459686", "0.5338766", "0.53379214", "0.5336315", "0.5335307", "0.52963406", "0.5278272", "0.5278065", "0.5266334", "0.5259487", "0.5257783", "0.5255112", "0.52501976", "0.52419543", "0.52413124", "0.52347016", "0.52347016", "0.52347016", "0.5234132", "0.5230849", "0.52270675", "0.52270675", "0.5226482", "0.5212367", "0.5205731", "0.5200764", "0.5195751", "0.5194278", "0.51675415", "0.51616436", "0.51390535", "0.5135778", "0.5135778", "0.5135778", "0.5120099", "0.50986075", "0.5097375" ]
0.62184554
1
Retrieves one of the images from this ImageComponent3D object. If the data access mode is not byreference, then a copy of the image is made. If the data access mode is byreference, then the reference is returned.
public RenderedImage getRenderedImage(int index) { if (isLiveOrCompiled()) if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("ImageComponent3D3")); return ((ImageComponent3DRetained)this.retained).getImage(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "final Reference<ComputedImage> reference() {\n return reference;\n }", "public RenderedImage[] getRenderedImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getRenderedImage();\n }", "public Image getInstanceImage() {\r\n return this.image;\r\n }", "public Image getThree();", "public BufferedImage queryImage() {\n\t\treturn cloud;\n\t}", "public Image getOne();", "public ImageReference imageReference() {\n return this.imageReference;\n }", "public Image getImage()\n {\n if (fill instanceof ImageFill)\n {\n return ((ImageFill) fill).getImage();\n }\n else\n {\n return null;\n }\n }", "public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}", "public Image getImg(){\n\t\treturn imgs[count];\n\t}", "public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}", "@Override\n\tprotected byte[] getReferenceImageData() {\n\t\treturn createBufferedImageData(resolveURI(refImageURI));\n\t}", "public Image getImage() {\n\t\treturn image;\r\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\r\n\t\treturn image;\r\n\t}", "public Image getImage() {\r\n return image;\r\n }", "public PImage getImage() {\n return this.image;\n }", "public ImageInfo getImage() {\n return image;\n }", "public Image getImage() {\n return image;\n }", "public BufferedImage getImage() {\t\r\n\t\treturn this.image;\t\t\t\r\n\t}", "public Image getImage() {\n return image;\n }", "@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}", "public PhotoContainer getImageLibrary() {\n\t\treturn imageLibrary;\n\t}", "private Image getImage(boolean isSelected) {\n\t\tString key = isSelected ? CHECKED_IMAGE : UNCHECKED_IMAGE;\n\t\treturn imageRegistry.get(key);\n\t}", "public final ImageProcessor getImage() {\r\n return image;\r\n }", "public BufferedImage getImage() {\n\t\treturn this.image;\n\t}", "private PlanarImage getImage() {\n PlanarImage img = roiImage;\n if (img == null) {\n synchronized (this) {\n img = roiImage;\n if (img == null) {\n roiImage = img = roi.getAsImage();\n }\n }\n }\n return img;\n }", "public ImageArray getCurrentImage() {\n return currentIm;\n }", "public int[][] getImage() {\n return m_img;\n }", "public ObjectImage getObjectImage ()\r\n {\r\n return recoverable_.getObjectImage ();\r\n }", "public BufferedImage getImage() {\n\t\t return img;\n\t}", "public Image read()\n throws MleRuntimeException\n {\n Image image = null;\n \n // Get the data associated with the media reference.\n byte[] buffer = m_references.m_buffer;\n \n // Read Image from external reference.\n if (buffer != null)\n \t{\n // Set the reference for the converter.\n \t\tm_converter.setReference(buffer);\n \t\t\n \t\t// Invoke the converter to prepare the local file.\n \t\tString filename = m_converter.getFilename();\n\n \t\t// true return means we downloaded successfully to a\n \t\t// local file referred to by filename.\n \t\tif (m_converter.conversionComplete())\n \t\t{\n \t // Attempt to load the file.\n \t if (filename.endsWith(\".gif\"))\n \t {\n \t // Load a GIF image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if (filename.endsWith(\".png\"))\n \t {\n \t // Load a PNG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if ((filename.endsWith(\".jpg\")) || (filename.endsWith(\".jpeg\")))\n \t {\n \t // Loag a JPEG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t }\n \t\t}\n }\n \n return image;\n }", "public Bitmap getImage(){\n return images[currentFrame];\n }", "public BufferedImage getImage() {\n return image;\n }", "public HippoGalleryImageSetBean getImage() {\n return getLinkedBean(\"myspringbasedhippoproject:image\", HippoGalleryImageSetBean.class);\n }", "public Drawable getImage(){\n\t\treturn mImage;\n\t}", "public BufferedImage getDati()\n { \n return imgDati;\n }", "public ImageLayer getActiveImageLayer() {\n checkInvariant();\n if (activeLayer instanceof ImageLayer) {\n ImageLayer imageLayer = (ImageLayer) activeLayer;\n return imageLayer;\n }\n throw new IllegalStateException(\"active layer is not image layer\");\n }", "public BufferedImage getImage() { // operates every 10 ms\n\t\tif(isLife()) { // alive\n\t\t\treturn images[0]; // return images[0]\n\t\t}else if(isDead()) { // dead\n\t\t\tBufferedImage img = images[index++]; // start from the second image\n\t\t\tif(index==images.length) { // if at the last image\n\t\t\t\tstate = REMOVE; // change the state to REMOVE\n\t\t\t}\n\t\t\treturn img; // return explosion image\n\t\t}\n\t\treturn null; // return null when state removed\n\t\t/*\n\t\t * index=1\n\t\t * 10M img=images[1] index=2 return images[1]\n\t\t * 20M img=images[2] index=3 return images[2]\n\t\t * 30M img=images[3] index=4 return images[3]\n\t\t * 40M img=images[4] index=5(REMOVE) \t\treturn images[4]\n\t\t * 50M return null\n\t\t */\n\t}", "public BufferedImage getImage() {\n\t\tTelaInterna ti = ( TelaInterna )contentPane.getSelectedFrame();\n\t\tBufferedImage img;\n\t\timg = ti.getImage();\n\t\treturn img;\n\t}", "public Bitmap getImage() {\n return image;\n }", "public Image getImage() {\n\t\t// Check we have frames\n\t\tif(frames.size() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn getFrame(currentFrameIndex).image;\n\t\t}\n\t}", "public Image getFour();", "public Image getImage() {\n if (tamagoStats.getAge() <= 0) {\n return images.get(\"oeuf\").get(\"noeuf\");\n } else if (tamagoStats.getAge() <= 3) {\n return images.get(\"bebe\").get(\"metamorph\");\n } else if (tamagoStats.getAge() <= 7) {\n return images.get(\"enfant\").get(\"evoli\");\n } else {\n return images.get(\"adulte\").get(\"noctali\");\n }\n }", "public Image getTwo();", "@HippoEssentialsGenerated(internalName = \"katharsisexampleshippo:image\")\n public HippoGalleryImageSet getImage() {\n return getLinkedBean(IMAGE, HippoGalleryImageSet.class);\n }", "public ColorImage getImagem(){\n\t\treturn copiaFoto(this.fotografia);\n\t}", "public ImageObj currentImage() {\n if (model.getImageList().size() == 0) {\n noImages = true;\n return new ImageObj(\"http://www.xn--flawiler-fachgeschfte-n2b.ch/wp-content/uploads/2016/09/sample-image.jpg\", \"No Image\");\n }\n return model.getImageList().get(position);\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}", "Object getChannelData() {\r\n return imageData;\r\n }", "public com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform() {\n return imageByTransform_;\n }", "@Override\n\tpublic Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage(int imageID) {\n\t if(imageID >= 0 && imageID < images.size()) {\n\t return images.get(imageID).getImage();\n\t }\n\t \n\t return null;\n\t}", "public ImageData getImageData() {\n\t\treturn this.data.getImageData();\n\t}", "public List<Image> getImages() {\r\n\t\treturn immutableImageList;\r\n\t}", "public Rectangle getImage() {\n\t\treturn image;\n\t}", "public Optional<ImageLayer> getActiveImageLayerOpt() {\n if (activeLayer instanceof ImageLayer) {\n ImageLayer imageLayer = (ImageLayer) activeLayer;\n return Optional.of(imageLayer);\n }\n return Optional.empty();\n }", "public PImage getImg() {\n \treturn img;\n }", "PImage getImage() {\n return _img;\n }", "public Image getImage() {\r\n\t\treturn GDAssemblerUI.getImage(GDAssemblerUI.IMAGE_GD);\r\n\t}", "public INTexture2D getTexture()\n {\n return this.texture.clone();\n }", "public Image getImage() {\n return null;\r\n }", "public Image getImage()\n {\n return null;\n }", "public final Image getDiffuse() {\n int scaleFactor;\n if (width * height >= RESOLUTION_HIGH) {\n scaleFactor = 2;\n } else {\n scaleFactor = 1;\n }\n\n int widthScaled = (int) Math.ceil((double) width / scaleFactor);\n int heightScaled = (int) Math.ceil((double) height / scaleFactor);\n WritableImage img = new WritableImage(widthScaled, heightScaled);\n PixelWriter writer = img.getPixelWriter();\n diffuseLoop:\n for (int j = 0; j < heightScaled; j++) {\n for (int i = 0; i < widthScaled; i++) {\n if (Thread.interrupted()) {\n break diffuseLoop;\n }\n writer.setColor(i, j, colors.getColor(\n noiseBuffer[j * scaleFactor][i * scaleFactor]));\n }\n }\n return img;\n }", "public BufferedImage GetImage(String name) { return ImageList.get(name); }", "public final ImageMap getImageMap() {\n return this.imageMap;\n }", "public ImageObj prevImage() {\n if (position != 0) {\n position--;\n }\n else {\n position = model.getImageList().size() - 1;\n }\n\n return model.getImageList().get(position);\n }", "public Integer getImageResource(){\n return mImageResource;\n }", "public Image getImage() {\n return (isFacingRight) ? Images.get(\"rightTedhaun\") : Images.get(\"leftTedhaun\");\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public LinkedHashMap<String, Stack<ColorImage>> getImageCache() {\n return imageCache;\n }", "public ImageComponent fetchImageComponent(String filename)\n throws IOException\n {\n ImageComponent ret_val = (ImageComponent)componentMap.get(filename);\n \n if(ret_val == null)\n {\n ret_val = load2DImage(filename);\n componentMap.put(filename, ret_val);\n }\n \n return ret_val;\n }", "public abstract Image getImage();", "public abstract Image getImage();", "public Image getSnapshot(int mode) {\n\t\treturn null;\n\t}", "public ReferenceDataAssetElement getReferenceDataAsset()\n {\n return referenceDataAsset;\n }", "public WritableImage getImage(){\n\t\tWritableImage image = SwingFXUtils.toFXImage(BfImage, null);\r\n\t\treturn image;\r\n\t}", "final RenderedImage getSource() {\n return sources[0];\n }", "public Image getEight();", "public BufferedImage getImage() {\n return embeddedImage;\n }", "public String getImage() {\n return this.Image;\n }", "private byte[] getData() {\n\t\tStorage storage;\n\t\tint cont = 0;\n\t\tbyte[] data = null;\n\t\tsynchronized (store) {\n\t\t\tstorage = (Storage) store.getContents();\n\t\t\tif (storage != null && storage.data != null) {\n\t\t\t\tdata = storage.data;\n\t\t\t\tcont = storage.cont;\n\t\t\t}\n\t\t}\n\t\tif (cont == 0 || data == null) {\n\t\t\tdata = getImage();\n\t\t\tif (data == null)\n\t\t\t\treturn null;\n\t\t\tcont++;// It increments twice so on the next run it doesn't get\n\t\t\t// updated again\n\t\t}\n\t\tif (cont > 5)\n\t\t\tcont = 0; // it increments just next, so it never stays 0 (wich\n\t\t// is only initial state)\n\t\tcont++;\n\t\tsynchronized (store) {\n\t\t\tif (storage == null) {\n\t\t\t\tstorage = new Storage();\n\t\t\t}\n\t\t\tstorage.cont = cont;\n\t\t\tstore.setContents(storage);\n\t\t\tstore.commit();\n\t\t}\n\n\t\treturn data;\n\t}", "public byte[] getImageData() {\r\n return imageData;\r\n }", "public Image getImage(Object element) {\n\t\t\t\treturn null;\n\t\t\t}", "public Image getImage(Object element) {\n\t\t\t\treturn null;\n\t\t\t}", "public Image getImage(Object element) {\n\t\t\t\treturn null;\n\t\t\t}", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public Bitmap get() {\n Throwable throwable2222222;\n Object object;\n block4: {\n boolean bl2 = this.zali;\n if (bl2) return this.zalh;\n Object object2 = this.zalg;\n Object object3 = new ParcelFileDescriptor.AutoCloseInputStream(object2);\n object = new DataInputStream((InputStream)object3);\n int n10 = ((DataInputStream)object).readInt();\n object3 = new byte[n10];\n int n11 = ((DataInputStream)object).readInt();\n int n12 = ((DataInputStream)object).readInt();\n String string2 = ((DataInputStream)object).readUTF();\n string2 = Bitmap.Config.valueOf((String)string2);\n ((DataInputStream)object).read((byte[])object3);\n {\n catch (Throwable throwable2222222) {\n break block4;\n }\n catch (IOException iOException) {}\n {\n String string3 = \"Could not read from parcel file descriptor\";\n object2 = new IllegalStateException(string3, iOException);\n throw object2;\n }\n }\n BitmapTeleporter.zaa((Closeable)object);\n object = ByteBuffer.wrap((byte[])object3);\n object3 = Bitmap.createBitmap((int)n11, (int)n12, (Bitmap.Config)string2);\n object3.copyPixelsFromBuffer((Buffer)object);\n this.zalh = object3;\n this.zali = bl2 = true;\n return this.zalh;\n }\n BitmapTeleporter.zaa((Closeable)object);\n throw throwable2222222;\n }", "public Uri getImageURI() {\n return mImageURI;\n }" ]
[ "0.70906514", "0.6218486", "0.615849", "0.6147704", "0.6134895", "0.6042987", "0.60146284", "0.59828335", "0.59280217", "0.5889677", "0.5869646", "0.5863222", "0.58364964", "0.5828702", "0.58135283", "0.58088124", "0.58088124", "0.5796371", "0.5781569", "0.5772981", "0.5744556", "0.5731264", "0.57232535", "0.57217366", "0.57109857", "0.56947345", "0.5692214", "0.56844735", "0.56833833", "0.56637347", "0.56524795", "0.564957", "0.5633359", "0.55834365", "0.5545737", "0.5525434", "0.55253685", "0.55243784", "0.552291", "0.5521823", "0.5517596", "0.55030525", "0.5497864", "0.54886496", "0.5487442", "0.5467743", "0.54481506", "0.5443064", "0.54416114", "0.5424225", "0.54183143", "0.5410035", "0.5410035", "0.5410035", "0.540314", "0.540314", "0.540314", "0.5401346", "0.5400676", "0.5399717", "0.5385283", "0.5372803", "0.53493124", "0.53458035", "0.53382444", "0.5336842", "0.53354967", "0.53347486", "0.52962387", "0.5278226", "0.52779335", "0.5265928", "0.5260204", "0.5257299", "0.52554506", "0.5250254", "0.5242075", "0.5240598", "0.52343744", "0.52343744", "0.52343744", "0.52339786", "0.52301455", "0.52270395", "0.52270395", "0.52267843", "0.52121276", "0.520579", "0.5199366", "0.51953065", "0.519398", "0.5166819", "0.5162078", "0.51385295", "0.5135558", "0.5135558", "0.5135558", "0.5120222", "0.509887", "0.5097158" ]
0.5683152
29
Retrieves one of the images from this ImageComponent3D object. If the data access mode is not byreference, then a copy of the image is made. If the data access mode is byreference, then the reference is returned.
public NioImageBuffer getNioImage(int index) { throw new UnsupportedOperationException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }", "final Reference<ComputedImage> reference() {\n return reference;\n }", "public RenderedImage[] getRenderedImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getRenderedImage();\n }", "public Image getInstanceImage() {\r\n return this.image;\r\n }", "public Image getThree();", "public BufferedImage queryImage() {\n\t\treturn cloud;\n\t}", "public Image getOne();", "public ImageReference imageReference() {\n return this.imageReference;\n }", "public Image getImage()\n {\n if (fill instanceof ImageFill)\n {\n return ((ImageFill) fill).getImage();\n }\n else\n {\n return null;\n }\n }", "public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}", "public Image getImg(){\n\t\treturn imgs[count];\n\t}", "public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}", "@Override\n\tprotected byte[] getReferenceImageData() {\n\t\treturn createBufferedImageData(resolveURI(refImageURI));\n\t}", "public Image getImage() {\n\t\treturn image;\r\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\r\n\t\treturn image;\r\n\t}", "public Image getImage() {\r\n return image;\r\n }", "public PImage getImage() {\n return this.image;\n }", "public ImageInfo getImage() {\n return image;\n }", "public Image getImage() {\n return image;\n }", "public BufferedImage getImage() {\t\r\n\t\treturn this.image;\t\t\t\r\n\t}", "public Image getImage() {\n return image;\n }", "@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}", "public PhotoContainer getImageLibrary() {\n\t\treturn imageLibrary;\n\t}", "private Image getImage(boolean isSelected) {\n\t\tString key = isSelected ? CHECKED_IMAGE : UNCHECKED_IMAGE;\n\t\treturn imageRegistry.get(key);\n\t}", "public final ImageProcessor getImage() {\r\n return image;\r\n }", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "public BufferedImage getImage() {\n\t\treturn this.image;\n\t}", "private PlanarImage getImage() {\n PlanarImage img = roiImage;\n if (img == null) {\n synchronized (this) {\n img = roiImage;\n if (img == null) {\n roiImage = img = roi.getAsImage();\n }\n }\n }\n return img;\n }", "public ImageArray getCurrentImage() {\n return currentIm;\n }", "public int[][] getImage() {\n return m_img;\n }", "public ObjectImage getObjectImage ()\r\n {\r\n return recoverable_.getObjectImage ();\r\n }", "public BufferedImage getImage() {\n\t\t return img;\n\t}", "public Image read()\n throws MleRuntimeException\n {\n Image image = null;\n \n // Get the data associated with the media reference.\n byte[] buffer = m_references.m_buffer;\n \n // Read Image from external reference.\n if (buffer != null)\n \t{\n // Set the reference for the converter.\n \t\tm_converter.setReference(buffer);\n \t\t\n \t\t// Invoke the converter to prepare the local file.\n \t\tString filename = m_converter.getFilename();\n\n \t\t// true return means we downloaded successfully to a\n \t\t// local file referred to by filename.\n \t\tif (m_converter.conversionComplete())\n \t\t{\n \t // Attempt to load the file.\n \t if (filename.endsWith(\".gif\"))\n \t {\n \t // Load a GIF image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if (filename.endsWith(\".png\"))\n \t {\n \t // Load a PNG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t } else if ((filename.endsWith(\".jpg\")) || (filename.endsWith(\".jpeg\")))\n \t {\n \t // Loag a JPEG image.\n \t image = MleBufferedImage.blockingLoad(filename);\n \t }\n \t\t}\n }\n \n return image;\n }", "public Bitmap getImage(){\n return images[currentFrame];\n }", "public BufferedImage getImage() {\n return image;\n }", "public HippoGalleryImageSetBean getImage() {\n return getLinkedBean(\"myspringbasedhippoproject:image\", HippoGalleryImageSetBean.class);\n }", "public Drawable getImage(){\n\t\treturn mImage;\n\t}", "public BufferedImage getDati()\n { \n return imgDati;\n }", "public ImageLayer getActiveImageLayer() {\n checkInvariant();\n if (activeLayer instanceof ImageLayer) {\n ImageLayer imageLayer = (ImageLayer) activeLayer;\n return imageLayer;\n }\n throw new IllegalStateException(\"active layer is not image layer\");\n }", "public BufferedImage getImage() { // operates every 10 ms\n\t\tif(isLife()) { // alive\n\t\t\treturn images[0]; // return images[0]\n\t\t}else if(isDead()) { // dead\n\t\t\tBufferedImage img = images[index++]; // start from the second image\n\t\t\tif(index==images.length) { // if at the last image\n\t\t\t\tstate = REMOVE; // change the state to REMOVE\n\t\t\t}\n\t\t\treturn img; // return explosion image\n\t\t}\n\t\treturn null; // return null when state removed\n\t\t/*\n\t\t * index=1\n\t\t * 10M img=images[1] index=2 return images[1]\n\t\t * 20M img=images[2] index=3 return images[2]\n\t\t * 30M img=images[3] index=4 return images[3]\n\t\t * 40M img=images[4] index=5(REMOVE) \t\treturn images[4]\n\t\t * 50M return null\n\t\t */\n\t}", "public BufferedImage getImage() {\n\t\tTelaInterna ti = ( TelaInterna )contentPane.getSelectedFrame();\n\t\tBufferedImage img;\n\t\timg = ti.getImage();\n\t\treturn img;\n\t}", "public Bitmap getImage() {\n return image;\n }", "public Image getImage() {\n\t\t// Check we have frames\n\t\tif(frames.size() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn getFrame(currentFrameIndex).image;\n\t\t}\n\t}", "public Image getFour();", "public Image getImage() {\n if (tamagoStats.getAge() <= 0) {\n return images.get(\"oeuf\").get(\"noeuf\");\n } else if (tamagoStats.getAge() <= 3) {\n return images.get(\"bebe\").get(\"metamorph\");\n } else if (tamagoStats.getAge() <= 7) {\n return images.get(\"enfant\").get(\"evoli\");\n } else {\n return images.get(\"adulte\").get(\"noctali\");\n }\n }", "public Image getTwo();", "@HippoEssentialsGenerated(internalName = \"katharsisexampleshippo:image\")\n public HippoGalleryImageSet getImage() {\n return getLinkedBean(IMAGE, HippoGalleryImageSet.class);\n }", "public ColorImage getImagem(){\n\t\treturn copiaFoto(this.fotografia);\n\t}", "public ImageObj currentImage() {\n if (model.getImageList().size() == 0) {\n noImages = true;\n return new ImageObj(\"http://www.xn--flawiler-fachgeschfte-n2b.ch/wp-content/uploads/2016/09/sample-image.jpg\", \"No Image\");\n }\n return model.getImageList().get(position);\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}", "Object getChannelData() {\r\n return imageData;\r\n }", "public com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform() {\n return imageByTransform_;\n }", "@Override\n\tpublic Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage(int imageID) {\n\t if(imageID >= 0 && imageID < images.size()) {\n\t return images.get(imageID).getImage();\n\t }\n\t \n\t return null;\n\t}", "public ImageData getImageData() {\n\t\treturn this.data.getImageData();\n\t}", "public List<Image> getImages() {\r\n\t\treturn immutableImageList;\r\n\t}", "public Rectangle getImage() {\n\t\treturn image;\n\t}", "public Optional<ImageLayer> getActiveImageLayerOpt() {\n if (activeLayer instanceof ImageLayer) {\n ImageLayer imageLayer = (ImageLayer) activeLayer;\n return Optional.of(imageLayer);\n }\n return Optional.empty();\n }", "public PImage getImg() {\n \treturn img;\n }", "PImage getImage() {\n return _img;\n }", "public Image getImage() {\r\n\t\treturn GDAssemblerUI.getImage(GDAssemblerUI.IMAGE_GD);\r\n\t}", "public INTexture2D getTexture()\n {\n return this.texture.clone();\n }", "public Image getImage() {\n return null;\r\n }", "public Image getImage()\n {\n return null;\n }", "public final Image getDiffuse() {\n int scaleFactor;\n if (width * height >= RESOLUTION_HIGH) {\n scaleFactor = 2;\n } else {\n scaleFactor = 1;\n }\n\n int widthScaled = (int) Math.ceil((double) width / scaleFactor);\n int heightScaled = (int) Math.ceil((double) height / scaleFactor);\n WritableImage img = new WritableImage(widthScaled, heightScaled);\n PixelWriter writer = img.getPixelWriter();\n diffuseLoop:\n for (int j = 0; j < heightScaled; j++) {\n for (int i = 0; i < widthScaled; i++) {\n if (Thread.interrupted()) {\n break diffuseLoop;\n }\n writer.setColor(i, j, colors.getColor(\n noiseBuffer[j * scaleFactor][i * scaleFactor]));\n }\n }\n return img;\n }", "public BufferedImage GetImage(String name) { return ImageList.get(name); }", "public final ImageMap getImageMap() {\n return this.imageMap;\n }", "public ImageObj prevImage() {\n if (position != 0) {\n position--;\n }\n else {\n position = model.getImageList().size() - 1;\n }\n\n return model.getImageList().get(position);\n }", "public Integer getImageResource(){\n return mImageResource;\n }", "public Image getImage() {\n return (isFacingRight) ? Images.get(\"rightTedhaun\") : Images.get(\"leftTedhaun\");\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public LinkedHashMap<String, Stack<ColorImage>> getImageCache() {\n return imageCache;\n }", "public ImageComponent fetchImageComponent(String filename)\n throws IOException\n {\n ImageComponent ret_val = (ImageComponent)componentMap.get(filename);\n \n if(ret_val == null)\n {\n ret_val = load2DImage(filename);\n componentMap.put(filename, ret_val);\n }\n \n return ret_val;\n }", "public Image getSnapshot(int mode) {\n\t\treturn null;\n\t}", "public abstract Image getImage();", "public abstract Image getImage();", "public ReferenceDataAssetElement getReferenceDataAsset()\n {\n return referenceDataAsset;\n }", "public WritableImage getImage(){\n\t\tWritableImage image = SwingFXUtils.toFXImage(BfImage, null);\r\n\t\treturn image;\r\n\t}", "final RenderedImage getSource() {\n return sources[0];\n }", "public Image getEight();", "public BufferedImage getImage() {\n return embeddedImage;\n }", "public String getImage() {\n return this.Image;\n }", "private byte[] getData() {\n\t\tStorage storage;\n\t\tint cont = 0;\n\t\tbyte[] data = null;\n\t\tsynchronized (store) {\n\t\t\tstorage = (Storage) store.getContents();\n\t\t\tif (storage != null && storage.data != null) {\n\t\t\t\tdata = storage.data;\n\t\t\t\tcont = storage.cont;\n\t\t\t}\n\t\t}\n\t\tif (cont == 0 || data == null) {\n\t\t\tdata = getImage();\n\t\t\tif (data == null)\n\t\t\t\treturn null;\n\t\t\tcont++;// It increments twice so on the next run it doesn't get\n\t\t\t// updated again\n\t\t}\n\t\tif (cont > 5)\n\t\t\tcont = 0; // it increments just next, so it never stays 0 (wich\n\t\t// is only initial state)\n\t\tcont++;\n\t\tsynchronized (store) {\n\t\t\tif (storage == null) {\n\t\t\t\tstorage = new Storage();\n\t\t\t}\n\t\t\tstorage.cont = cont;\n\t\t\tstore.setContents(storage);\n\t\t\tstore.commit();\n\t\t}\n\n\t\treturn data;\n\t}", "public byte[] getImageData() {\r\n return imageData;\r\n }", "public Image getImage(Object element) {\n\t\t\t\treturn null;\n\t\t\t}", "public Image getImage(Object element) {\n\t\t\t\treturn null;\n\t\t\t}", "public Image getImage(Object element) {\n\t\t\t\treturn null;\n\t\t\t}", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public Bitmap get() {\n Throwable throwable2222222;\n Object object;\n block4: {\n boolean bl2 = this.zali;\n if (bl2) return this.zalh;\n Object object2 = this.zalg;\n Object object3 = new ParcelFileDescriptor.AutoCloseInputStream(object2);\n object = new DataInputStream((InputStream)object3);\n int n10 = ((DataInputStream)object).readInt();\n object3 = new byte[n10];\n int n11 = ((DataInputStream)object).readInt();\n int n12 = ((DataInputStream)object).readInt();\n String string2 = ((DataInputStream)object).readUTF();\n string2 = Bitmap.Config.valueOf((String)string2);\n ((DataInputStream)object).read((byte[])object3);\n {\n catch (Throwable throwable2222222) {\n break block4;\n }\n catch (IOException iOException) {}\n {\n String string3 = \"Could not read from parcel file descriptor\";\n object2 = new IllegalStateException(string3, iOException);\n throw object2;\n }\n }\n BitmapTeleporter.zaa((Closeable)object);\n object = ByteBuffer.wrap((byte[])object3);\n object3 = Bitmap.createBitmap((int)n11, (int)n12, (Bitmap.Config)string2);\n object3.copyPixelsFromBuffer((Buffer)object);\n this.zalh = object3;\n this.zali = bl2 = true;\n return this.zalh;\n }\n BitmapTeleporter.zaa((Closeable)object);\n throw throwable2222222;\n }", "public Uri getImageURI() {\n return mImageURI;\n }" ]
[ "0.7090416", "0.62184423", "0.6159018", "0.61476105", "0.61344814", "0.604382", "0.60146034", "0.59833205", "0.5928762", "0.5889039", "0.5868887", "0.5862638", "0.5836322", "0.5827837", "0.581318", "0.58084846", "0.58084846", "0.57960564", "0.5781221", "0.57726264", "0.5744585", "0.5730902", "0.5722629", "0.57214165", "0.5710501", "0.56954443", "0.5692132", "0.5683897", "0.5683563", "0.56827617", "0.5663691", "0.56531334", "0.56485075", "0.5633563", "0.5582965", "0.5545382", "0.55249053", "0.5524795", "0.5524041", "0.5521936", "0.5520653", "0.5518323", "0.5501933", "0.5497839", "0.54881376", "0.5487127", "0.5468183", "0.544783", "0.5443116", "0.5441344", "0.5424624", "0.5419143", "0.5410118", "0.5410118", "0.5410118", "0.5402918", "0.5402918", "0.5402918", "0.5400873", "0.5399932", "0.53993213", "0.5384859", "0.53715205", "0.5348088", "0.5345137", "0.5337597", "0.5337247", "0.5335273", "0.5334139", "0.52958024", "0.52777016", "0.52772945", "0.52654046", "0.52598894", "0.5256926", "0.52545655", "0.5251", "0.52418125", "0.52408236", "0.5234189", "0.5234189", "0.5234189", "0.5233823", "0.52298254", "0.5228121", "0.52269727", "0.52269727", "0.52119184", "0.5205786", "0.51996505", "0.51955885", "0.51930904", "0.5166596", "0.5161265", "0.5137766", "0.51350635", "0.51350635", "0.51350635", "0.51210916", "0.50980425", "0.5096942" ]
0.0
-1
Modifies a contiguous subregion of a particular slice of image of this ImageComponent3D object. Block of data of dimension (width height) starting at the offset (srcX, srcY) of the specified RenderedImage object will be copied into the particular slice of image component starting at the offset (dstX, dstY) of this ImageComponent3D object. The specified RenderedImage object must be of the same format as the current format of this object. This method can only be used if the data access mode is bycopy. If it is byreference, see updateData().
public void setSubImage(int index, RenderedImage image, int width, int height, int srcX, int srcY, int dstX, int dstY) { if (isLiveOrCompiled() && !this.getCapability(ALLOW_IMAGE_WRITE)) { throw new CapabilityNotSetException( J3dI18N.getString("ImageComponent3D5")); } if (((ImageComponent3DRetained)this.retained).isByReference()) { throw new IllegalStateException( J3dI18N.getString("ImageComponent3D8")); } int w = ((ImageComponent3DRetained)this.retained).getWidth(); int h = ((ImageComponent3DRetained)this.retained).getHeight(); if ((srcX < 0) || (srcY < 0) || ((srcX + width) > w) || ((srcY + height) > h) || (dstX < 0) || (dstY < 0) || ((dstX + width) > w) || ((dstY + height) > h)) { throw new IllegalArgumentException( J3dI18N.getString("ImageComponent3D7")); } ((ImageComponent3DRetained)this.retained).setSubImage( index, image, width, height, srcX, srcY, dstX, dstY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "public AlgorithmPadWithSlices(ModelImage srcImage, ModelImage destImage, int padMode) {\r\n super(destImage, srcImage);\r\n this.padMode = padMode;\r\n\r\n // get local attributes from this.srcImage\r\n Xdim = srcImage.getExtents()[0];\r\n Ydim = srcImage.getExtents()[1];\r\n sliceArea = Xdim * Ydim; // one slice has sliceArea number of pixels\r\n\r\n oldZdim = srcImage.getExtents()[2];\r\n }", "@Override\n public WritableRaster copyData(WritableRaster dest) {\n Rectangle bounds;\n Raster tile;\n\n if (dest == null) {\n bounds = getBounds();\n final Point p = new Point(this.minX, this.minY);\n /* A SampleModel to hold the entire image. */\n final SampleModel sm = this.sampleModel\n .createCompatibleSampleModel(this.width, this.height);\n dest = Raster.createWritableRaster(sm, p);\n } else {\n bounds = dest.getBounds();\n }\n\n final int startX = convertXToTileX(bounds.x);\n final int startY = convertYToTileY(bounds.y);\n final int endX = convertXToTileX(bounds.x + bounds.width - 1);\n final int endY = convertYToTileY(bounds.y + bounds.height - 1);\n\n for (int j = startY; j <= endY; j++) {\n for (int i = startX; i <= endX; ++i) {\n tile = getTile(i, j);\n final Rectangle intersectRect = bounds.intersection(tile\n .getBounds());\n final Raster liveRaster = tile.createChild(intersectRect.x,\n intersectRect.y, intersectRect.width,\n intersectRect.height, intersectRect.x, intersectRect.y,\n null);\n\n /*\n * WritableRaster.setDataElements takes into account of\n * inRaster's minX and minY and add these to x and y. Since\n * liveRaster has the origin at the correct location, the\n * following call should not again give these coordinates in\n * places of x and y.\n */\n dest.setDataElements(0, 0, liveRaster);\n }\n }\n return dest;\n }", "public void nextSlice() {\n\t\tfinal int nextIndex = \n\t\t\t\t((mBuffer[mLimit]&0xff)<<24) + ((mBuffer[1+mLimit]&0xff)<<16) + \n\t\t\t\t((mBuffer[2+mLimit]&0xff)<<8) + (mBuffer[3+mLimit]&0xff);\n\n\t\tmLevel = BytePool.nextLevelArray[mLevel];\n\t\tfinal int newSize = BytePool.levelSizeArray[mLevel];\n\n\t\tmBufferUpto = nextIndex / BytePool.BYTE_BLOCK_SIZE;\n\t\tmBufferOffset = mBufferUpto * BytePool.BYTE_BLOCK_SIZE;\n\n\t\tmBuffer = mPool.getBufferAt(mBufferUpto);\n\t\tmUpto = nextIndex & BytePool.BYTE_BLOCK_MASK;\n\n\t\tif (nextIndex + newSize >= mEndIndex) {\n\t\t\t// We are advancing to the final slice\n\t\t\tassert mEndIndex - nextIndex > 0;\n\t\t\tmLimit = mEndIndex - mBufferOffset;\n\t\t} else {\n\t\t\t// This is not the final slice (subtract 4 for the\n\t\t\t// forwarding address at the end of this new slice)\n\t\t\tmLimit = mUpto+newSize-4;\n\t\t}\n\t}", "public AlgorithmPadWithSlices(ModelImage srcImage, int padMode) {\r\n super(null, srcImage);\r\n this.padMode = padMode;\r\n\r\n // get local attributes from this.srcImage\r\n Xdim = srcImage.getExtents()[0];\r\n Ydim = srcImage.getExtents()[1];\r\n sliceArea = Xdim * Ydim; // one slice has sliceArea number of pixels\r\n\r\n oldZdim = srcImage.getExtents()[2];\r\n }", "public VectorFieldSliceRenderer2D(ImageData img,\r\n\t\t\tVisualizationProcessing applet) {\r\n\t\tsuper(img, applet);\r\n\t\tif (img.getComponents() < 2) {\r\n\t\t\tslices = 1;\r\n\t\t} else {\r\n\t\t\tslice = slices / 2;\r\n\t\t}\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "Buffer slice();", "@Override\n public void updateTextureSubImage(final Texture dstTexture, final int dstX, final int dstY, final Image srcImage,\n final int srcX, final int srcY, final int width, final int height) throws Ardor3dException,\n UnsupportedOperationException {\n if (dstTexture.getType() != Texture.Type.TwoDimensional) {\n throw new UnsupportedOperationException(\"Unsupported Texture Type: \" + dstTexture.getType());\n }\n\n // Determine the original texture configuration, so that this method can\n // restore the texture configuration to its original state.\n final IntBuffer intBuf = BufferUtils.createIntBuffer(16);\n GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D, intBuf);\n final int origTexBinding = intBuf.get(0);\n GL11.glGetInteger(GL11.GL_UNPACK_ALIGNMENT, intBuf);\n final int origAlignment = intBuf.get(0);\n final int origRowLength = 0;\n final int origSkipPixels = 0;\n final int origSkipRows = 0;\n\n final int alignment = 1;\n int rowLength;\n if (srcImage.getWidth() == width) {\n // When the row length is zero, then the width parameter is used.\n // We use zero in these cases in the hope that we can avoid two\n // unnecessary calls to glPixelStorei.\n rowLength = 0;\n } else {\n // The number of pixels in a row is different than the number of\n // pixels in the region to be uploaded to the texture.\n rowLength = srcImage.getWidth();\n }\n // Consider moving these conversion methods.\n final int pixelFormat = LwjglTextureUtil.getGLPixelFormat(srcImage.getFormat());\n final ByteBuffer data = srcImage.getData(0);\n data.rewind();\n\n // Update the texture configuration (when necessary).\n if (origTexBinding != dstTexture.getTextureId()) {\n GL11.glBindTexture(GL11.GL_TEXTURE_2D, dstTexture.getTextureId());\n }\n if (origAlignment != alignment) {\n GL11.glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, alignment);\n }\n if (origRowLength != rowLength) {\n GL11.glPixelStorei(GL11.GL_UNPACK_ROW_LENGTH, rowLength);\n }\n if (origSkipPixels != srcX) {\n GL11.glPixelStorei(GL11.GL_UNPACK_SKIP_PIXELS, srcX);\n }\n if (origSkipRows != srcY) {\n GL11.glPixelStorei(GL11.GL_UNPACK_SKIP_ROWS, srcY);\n }\n\n // Upload the image region into the texture.\n GL11\n .glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, dstX, dstY, width, height, pixelFormat, GL11.GL_UNSIGNED_BYTE,\n data);\n\n // Restore the texture configuration (when necessary).\n // Restore the texture binding.\n if (origTexBinding != dstTexture.getTextureId()) {\n GL11.glBindTexture(GL11.GL_TEXTURE_2D, origTexBinding);\n }\n // Restore alignment.\n if (origAlignment != alignment) {\n GL11.glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, origAlignment);\n }\n // Restore row length.\n if (origRowLength != rowLength) {\n GL11.glPixelStorei(GL11.GL_UNPACK_ROW_LENGTH, origRowLength);\n }\n // Restore skip pixels.\n if (origSkipPixels != srcX) {\n GL11.glPixelStorei(GL11.GL_UNPACK_SKIP_PIXELS, origSkipPixels);\n }\n // Restore skip rows.\n if (origSkipRows != srcY) {\n GL11.glPixelStorei(GL11.GL_UNPACK_SKIP_ROWS, origSkipRows);\n }\n }", "public void set(int index, RenderedImage image) {\n\n checkForLiveOrCompiled();\n // For RenderedImage the width and height checking is done in the retained.\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "private static void copyArea(BufferedImage image, int x, int y, int width, int height, int dx, int dy) {\n/* 158 */ Graphics2D g = (Graphics2D)image.getGraphics();\n/* */ \n/* 160 */ g.drawImage(image.getSubimage(x, y, width, height), x + dx, y + dy, null);\n/* */ }", "public void updateChunkyPixel(int[] location, int[] dimension, double[] parameters);", "public ByteBuf slice(int index, int length)\r\n/* 65: */ {\r\n/* 66: 82 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 67: 83 */ return super.slice(index, length);\r\n/* 68: */ }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "SliceDto updateSliceDto(final SliceDto registeredSlice, final Integer nBandWidth, final Integer nLatency) {\n\t\tint nTotalFlowIdx = 0;\n\t\tint portNo = CE_PORT_NO_OFFSET;\n\t\tSliceDto sliceDto = new SliceDto();\n\t\tsliceDto.id = registeredSlice.id;\n\t\tsliceDto.flows = new ArrayList<FlowDto>();\n\t\tfor (FlowDto flow : registeredSlice.flows) {\n\t\t\tString flowName = String.format(\"flow%08d\", nTotalFlowIdx);\n\t\t\tFlowDto updateFlow = createRequestFlowDto(flowName, portNo, nBandWidth, nLatency);\n\t\t\tupdateFlow.type = \"mod\";\n\t\t\tupdateFlow.id = flow.id;\n\t\t\tsliceDto.flows.add(updateFlow);\n\t\t\tnTotalFlowIdx += 1;\n\t\t\tportNo += 1;\n\t\t}\n\t\treturn sliceDto;\n\t}", "public void render () {\n image (img, xC, yC, xLength * getPixelSize(), yLength * getPixelSize());\n }", "public void beginSlice() throws IOException {}", "public ByteBuf slice()\r\n/* 59: */ {\r\n/* 60: 76 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 61: 77 */ return super.slice();\r\n/* 62: */ }", "@SuppressWarnings(\"unused\")\r\n private void JCATsegmentSubcutaneousFat2D() {\r\n \r\n // a buffer to store a slice from the source Image\r\n short[] srcBuffer;\r\n try {\r\n srcBuffer = new short [sliceSize];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"JCATsegmentVisceralFat2D(): Can NOT allocate srcBuffer\");\r\n return;\r\n }\r\n \r\n // get the data from the segmented abdomenImage and the srcImage\r\n try {\r\n abdomenImage.exportData(0, sliceSize, sliceBuffer);\r\n srcImage.exportData(0, sliceSize, srcBuffer);\r\n } catch (IOException ex) {\r\n// System.err.println(\"JCATsegmentVisceralFat2D(): Error exporting data\");\r\n MipavUtil.displayError(\"JCATsegmentVisceralFat2D(): Error exporting data\");\r\n return;\r\n }\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n\r\n // Use the CM, the abdomenImage, and the srcImage to define points on the\r\n // abdomen and visceral VOI's\r\n ArrayList<Integer> xArrAbdom = new ArrayList<Integer>();\r\n ArrayList<Integer> yArrAbdom = new ArrayList<Integer>();\r\n ArrayList<Integer> xArrVis = new ArrayList<Integer>();\r\n ArrayList<Integer> yArrVis = new ArrayList<Integer>();\r\n findVOIs(centerOfMass, xArrAbdom, yArrAbdom, srcBuffer, xArrVis, yArrVis);\r\n \r\n int[] x1 = new int[xArrAbdom.size()];\r\n int[] y1 = new int[xArrAbdom.size()];\r\n int[] z1 = new int[xArrAbdom.size()];\r\n for(int idx = 0; idx < xArrAbdom.size(); idx++) {\r\n x1[idx] = xArrAbdom.get(idx);\r\n y1[idx] = yArrAbdom.get(idx);\r\n z1[idx] = 0;\r\n }\r\n\r\n // make the VOI's and add the points to them\r\n abdomenVOI = new VOI((short)0, \"Abdomen\");\r\n abdomenVOI.importCurve(x1, y1, z1);\r\n \r\n\r\n for(int idx = 0; idx < xArrVis.size(); idx++) {\r\n x1[idx] = xArrVis.get(idx);\r\n y1[idx] = yArrVis.get(idx);\r\n }\r\n\r\n subcutaneousVOI = new VOI((short)0, \"Subcutaneous area\");\r\n subcutaneousVOI.importCurve(x1, y1, z1);\r\n \r\n/*\r\n ViewUserInterface.getReference().getMessageFrame().append(\"Xcm: \" +xcm +\" Ycm: \" +ycm);\r\n sliceBuffer[ycm * xDim + xcm] = 20;\r\n for (int idx = 0; idx < xArr.size(); idx++) {\r\n sliceBuffer[yArr.get(idx) * xDim + xArr.get(idx)] = 20;\r\n sliceBuffer[yArrVis.get(idx) * xDim + xArrVis.get(idx)] = 30;\r\n }\r\n // save the sliceBuffer into the abdomenImage\r\n try {\r\n abdomenImage.importData(0, sliceBuffer, false);\r\n } catch (IOException ex) {\r\n System.err.println(\"segmentThighTissue(): Error importing data\");\r\n }\r\n*/\r\n// ShowImage(srcImage, \"Segmented Abdomen\");\r\n\r\n\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"Abdomen VOI points:\");\r\n// for (int idx = 0; idx < xArr.size(); idx++) {\r\n// ViewUserInterface.getReference().getMessageFrame().append(xArr.get(idx) +\" \" + yArr.get(idx));\r\n// }\r\n\r\n }", "private void sliceSetPattern(int newColorChange) {\n ArrayList<Integer> newPattern = new ArrayList<>(slice);\n ArrayList<Boolean> isSelected = patternAdapter.getIsSelectedList();\n for (int ind = 0; ind < slice.size(); ind++) {\n if (isSelected.get(ind)) {\n // If this color is selected, then set this color\n newPattern.set(ind, newColorChange);\n }\n }\n\n // Save the new pattern\n patternSpecific = newPattern;\n\n // Set the new pattern to slice\n setSlice(newPattern);\n }", "protected AbstractMatrix3D vSliceFlip() {\n\tif (slices>0) {\n\t\tsliceZero += (slices-1)*sliceStride;\n\t\tsliceStride = -sliceStride;\n\t\tthis.isNoView = false;\n\t}\n\treturn this;\n}", "Buffer slice(int start, int length);", "SliceDto operate(SliceDataManager sliceDataManager, SliceDto reqSliceDto) throws MloClientException;", "public static boolean addSlice (\r\n\t\tImagePlus source,\r\n\t\tImagePlus target,\r\n\t\tint dim,\t// 1-based dimension XYCZT\r\n\t\tint sourceIdx,\r\n\t\tint targetIdx,\t// insert at (before current) targetIdx, if targetIdx=0, add slice in the end\r\n\t\tboolean keepSliceInSource\r\n\t\t) {\r\n\t\tif (source==null || target==null || source.getNSlices()==0) return false;\r\n\t\t// check source and target size, and replace index\r\n\t\tint[] dim1 = source.getDimensions();\r\n\t\tint[] dim2 = target.getDimensions();\r\n\t\tif (dim<3 || dim>5 || sourceIdx<1 || sourceIdx>dim1[dim-1] || targetIdx<0 || targetIdx>dim2[dim-1])\treturn false;\t// dimension out of range\r\n\t\tboolean resize = (dim1[0]!=dim2[0] || dim2[1]!=dim2[1]);\r\n\t\tfor (int i=3; i<=5; i++) {\r\n\t\t\tif (i == dim) continue;\r\n\t\t\tif (dim1[i-1] != dim2[i-1]) return false;\t// dimension mismatch between source and target\r\n\t\t}\r\n\t\t\r\n\t\t//\tPrepare the substack (slice) image to be copied over\r\n\t\tint numC = dim1[2]; int numZ = dim1[3]; int numT = dim1[4];\r\n\t\tint[] range = {1, numC, 1, numZ, 1, numT};\r\n\t\trange[2*dim-6] = sourceIdx;\trange[2*dim-5] = sourceIdx;\t\t\t\t\t\r\n\t\tImagePlus sliceImp = new Duplicator().run(source, range[0], range[1], range[2], range[3], range[4], range[5]);\r\n\t\tint nSlices = sliceImp.getStackSize();\r\n\t\tif (resize)\r\n\t\t\tIJ.run(sliceImp, \"Size...\", \"width=[\"+target.getWidth()+\"] height=[\"+target.getHeight()+\"] average interpolation=Bicubic\");\r\n\t\t// check if the slice has already exist in the target\r\n\t\tint dupSlice = checkDuplicate(sliceImp, target, dim, 0);\r\n\t\tif (dupSlice!=0) {\r\n\t\t\tif (dim==3) target.setC(dupSlice);\r\n\t\t\telse if (dim==4) target.setZ(dupSlice);\r\n\t\t\telse if (dim==5) target.setT(dupSlice);\r\n\t\t\tSystem.out.println(\"Sample already exist in \" + target.getTitle() + \" at \" + String.valueOf(dupSlice));\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// add slice to target stack, update target overlay, repaint window\r\n\t\tImageStack sourceStack = source.getStack();\r\n\t\tImageStack targetStack = target.getStack();\r\n\t\t\r\n\t\tint[] targetHyperStackIndex = {1, 1, 1};\r\n\t\ttargetHyperStackIndex[dim-3] = targetIdx==0 ? dim2[dim-1]+1 : targetIdx;\r\n\t\tint nStart = target.getStackIndex(\r\n\t\t\ttargetHyperStackIndex[0],\r\n\t\t\ttargetHyperStackIndex[1],\r\n\t\t\ttargetHyperStackIndex[2]) - 1;\r\n\t\t\t\r\n\t\tfor (int i=nSlices; i>=1; i--) {\r\n\t\t\tif (targetIdx==0)\r\n\t\t\t\ttargetStack.addSlice(sliceImp.getStack().getSliceLabel(nSlices-i+1), sliceImp.getStack().getProcessor(nSlices-i+1));\r\n\t\t\telse\r\n\t\t\t\ttargetStack.addSlice(sliceImp.getStack().getSliceLabel(i), sliceImp.getStack().getProcessor(i), nStart);\r\n\t\t}\r\n\t\tdim2[dim-1] += 1;\r\n \t//after added slice to imagestack, shift overlay and copy overlay from source\r\n \tOverlay tOverlay = target.getOverlay();\r\n \t//Point targetWindowLocation = target.getWindow().getLocation();\r\n \t//target.hide();\r\n \ttarget.setStack(targetStack, dim2[2], dim2[3], dim2[4]);\r\n \ttarget.setOverlay(tOverlay);\r\n \tif (targetIdx>0) shiftOverlay(target, dim, targetIdx, 1);\r\n \tcopyOverlay(source, target, dim, sourceIdx, targetIdx==0 ? dim2[dim-1] : targetIdx);\r\n \ttarget.setPosition(targetHyperStackIndex[0], targetHyperStackIndex[1], targetHyperStackIndex[2]);\r\n \t//target.show();\r\n \t//target.getWindow().setLocation(targetWindowLocation);\r\n \ttarget.changes = true;\r\n \ttarget.getWindow().updateImage(target);\r\n \ttarget.getWindow().pack();\r\n \tWindowManager.setWindow(target.getWindow());\r\n\t\tnew Zoom().run(\"100%\");\r\n\t\ttarget.setDisplayMode(IJ.COLOR);\r\n\t\ttarget.setDisplayMode(IJ.COMPOSITE);\r\n \t/* if keep slice, finised \r\n \t * otherwise delete the slice from source, \r\n \t * update the source overlay, repaint window\r\n \t */ \r\n \tif (!keepSliceInSource) {\r\n \t\tif (dim1[dim-1]==1) {\r\n \t\t\tsource.changes = false;\r\n \t\t\tsource.close();\r\n \t\t\tSystem.gc();\r\n \t\t} else {\r\n \t\t\tif (!deleteSlice(source, dim, sourceIdx))\r\n \t\t\t\tSystem.out.println(\" Could not delete slice \" + sourceIdx + \" in source image \" + source.getTitle());\r\n \t\t\tWindowManager.setWindow(source.getWindow());\r\n\t\t\t\tnew Zoom().run(\"100%\");\r\n\t\t\t\tsource.setDisplayMode(IJ.COLOR);\r\n\t\t\t\tsource.setDisplayMode(IJ.COMPOSITE);\r\n \t\t}\r\n \t}\r\n\t\treturn true;\t\r\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void cloneImage() {\n//\t\tColorModel cm = offimg.getColorModel();\n//\t\t boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();\n//\t\t WritableRaster raster = offimg.copyData(null);\n//\t\t offimg2 = new BufferedImage(cm, raster, isAlphaPremultiplied, null);\n//\t\t BufferedImage currentImage = new BufferedImage(width,height,BufferedImage.TYPE_3BYTE_BGR);\n\n\t//Fastest method to clone the image (DOES NOT WORK for MACOS)\n//\t\t int[] frame = ((DataBufferInt)offimg.getRaster().getDataBuffer()).getData();\n//\t\t int[] imgData = ((DataBufferInt)offimg2.getRaster().getDataBuffer()).getData();\n//\t\t System.arraycopy(frame,0,imgData,0,frame.length);\n\t}", "private void readInterleaved(final ImageReadParam param, final BufferedImage destination, final ImageInputStream input) throws IOException {\n final int width = header.width();\n final int height = header.height();\n\n final Rectangle aoi = getSourceRegion(param, width, height);\n final Point offset = param == null ? new Point(0, 0) : param.getDestinationOffset();\n\n // Set everything to default values\n int sourceXSubsampling = 1;\n int sourceYSubsampling = 1;\n int[] sourceBands = null;\n int[] destinationBands = null;\n\n // Get values from the ImageReadParam, if any\n if (param != null) {\n sourceXSubsampling = param.getSourceXSubsampling();\n sourceYSubsampling = param.getSourceYSubsampling();\n\n sourceBands = param.getSourceBands();\n destinationBands = param.getDestinationBands();\n }\n\n // Ensure band settings from param are compatible with images\n checkReadParamBandSettings(param, header.bitplanes() / 8, destination.getSampleModel().getNumBands());\n\n // NOTE: Each row of the image is stored in an integral number of 16 bit words.\n // The number of words per row is words=((w+15)/16)\n int planeWidth = 2 * ((width + 15) / 16);\n final byte[] planeData = new byte[8 * planeWidth];\n\n WritableRaster destRaster = destination.getRaster();\n if (destinationBands != null || offset.x != 0 || offset.y != 0) {\n destRaster = destRaster.createWritableChild(0, 0, destRaster.getWidth(), destRaster.getHeight(), offset.x, offset.y, destinationBands);\n }\n\n WritableRaster rowRaster = destination.getRaster().createCompatibleWritableRaster(8 * planeWidth, 1);\n Raster sourceRow = rowRaster.createChild(aoi.x, 0, aoi.width, 1, 0, 0, sourceBands);\n\n final byte[] data = ((DataBufferByte) rowRaster.getDataBuffer()).getData();\n final int channels = (header.bitplanes() + 7) / 8;\n final int planesPerChannel = 8;\n Object dataElements = null;\n\n for (int srcY = 0; srcY < height; srcY++) {\n for (int c = 0; c < channels; c++) {\n for (int p = 0; p < planesPerChannel; p++) {\n readPlaneData(planeData, p * planeWidth, planeWidth, input);\n }\n\n // Skip rows outside AOI\n if (srcY >= (aoi.y + aoi.height)) {\n return;\n }\n else if (srcY < aoi.y || (srcY - aoi.y) % sourceYSubsampling != 0) {\n continue;\n }\n\n if (header.formType == IFF.TYPE_ILBM) {\n // NOTE: Using (channels - c - 1) instead of just c,\n // effectively reverses the channel order from RGBA to ABGR\n int off = (channels - c - 1);\n\n int pixelPos = 0;\n for (int planePos = 0; planePos < planeWidth; planePos++) {\n IFFUtil.bitRotateCW(planeData, planePos, planeWidth, data, off + pixelPos * channels, channels);\n pixelPos += 8;\n }\n }\n else if (header.formType == IFF.TYPE_PBM) {\n System.arraycopy(planeData, 0, data, srcY * 8 * planeWidth, planeWidth);\n }\n else {\n throw new AssertionError(String.format(\"Unsupported FORM type: %s\", toChunkStr(header.formType)));\n }\n }\n\n if (srcY >= aoi.y && (srcY - aoi.y) % sourceYSubsampling == 0) {\n int dstY = (srcY - aoi.y) / sourceYSubsampling;\n // TODO: Avoid createChild if no region?\n if (sourceXSubsampling == 1) {\n destRaster.setRect(0, dstY, sourceRow);\n }\n else {\n for (int srcX = 0; srcX < sourceRow.getWidth(); srcX += sourceXSubsampling) {\n dataElements = sourceRow.getDataElements(srcX, 0, dataElements);\n int dstX = srcX / sourceXSubsampling;\n destRaster.setDataElements(dstX, dstY, dataElements);\n }\n }\n }\n\n processImageProgress(srcY * 100f / width);\n if (abortRequested()) {\n processReadAborted();\n break;\n }\n }\n }", "public static boolean replaceSlice(\r\n\t\tImagePlus source,\r\n\t\tImagePlus target,\r\n\t\tint dim,\t// 1-based dimension XYCZT\r\n\t\tint sourceIdx,\t// 1-based slice index, currently using Z index\r\n\t\tint targetIdx,\t// 1-based slice index, currently using Z index\r\n\t\tboolean keepSliceInSource\r\n\t\t) {\n\t\tif (source==null || target==null || source.getNSlices()==0) return false;\r\n\t\t// check source and target size, and replace index\r\n\t\tint[] dim1 = source.getDimensions();\r\n\t\tint[] dim2 = target.getDimensions();\r\n\t\tif (dim<3 || dim>5 || dim1[dim-1]<sourceIdx || dim2[dim-1]<targetIdx)\treturn false;\t// dimension out of range\r\n\r\n\t\tboolean resize = (dim1[0]!=dim2[0] || dim2[1]!=dim2[1]);\r\n\t\tfor (int i=3; i<=5; i++) {\r\n\t\t\tif (i == dim) continue;\r\n\t\t\tif (dim1[i-1] != dim2[i-1]) return false;\t// dimension mismatch between source and target\r\n\t\t}\t\r\n\t\tint numC = dim1[2]; int numZ = dim1[3]; int numT = dim1[4];\r\n\t\t\r\n\t\t// add slice to target with label and overlay, repaint window\r\n\t\tint[] range = {1, numC, 1, numZ, 1, numT};\r\n\t\trange[2*dim-6] = sourceIdx;\trange[2*dim-5] = sourceIdx;\t\t\t\t\t\r\n\t\tImagePlus sliceImp = new Duplicator().run(source, range[0], range[1], range[2], range[3], range[4], range[5]);\r\n\t\tint nSlices = sliceImp.getStackSize();\r\n\t\t\r\n\t\tif (resize) {\r\n\t\t\tIJ.run(sliceImp, \"Size...\", \"width=[\"+target.getWidth()+\"] height=[\"+target.getHeight()+\"] average interpolation=Bicubic\");\r\n\t\t}\r\n\t\t\r\n\t\t// check if the slice has already exist in the target\r\n\t\tint dupSlice = checkDuplicate(sliceImp, target, dim, 0);\r\n\t\tif (dupSlice!=0) {\r\n\t\t\tif (dim==3) target.setC(dupSlice);\r\n\t\t\telse if (dim==4) target.setZ(dupSlice);\r\n\t\t\telse if (dim==5) target.setT(dupSlice);\r\n\t\t\tSystem.out.println(\"Sample already exist in \" + target.getTitle() + \" at \" + String.valueOf(dupSlice));\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// add slice to target stack, update target overlay, repaint window\r\n\t\tImageStack sourceStack = source.getStack();\r\n\t\tImageStack targetStack = target.getStack();\r\n\r\n\t\tint[] targetHyperStackIndex = {1, 1, 1};\r\n\t\ttargetHyperStackIndex[dim-3] = targetIdx;\r\n\t\tint nEnd = target.getStackIndex(\r\n\t\t\ttargetHyperStackIndex[0],\r\n\t\t\ttargetHyperStackIndex[1],\r\n\t\t\ttargetHyperStackIndex[2]);\r\n\t\t\r\n\t\tfor (int i=1; i<=nSlices; i++) {\r\n\t\t\ttargetStack.setProcessor(sliceImp.getStack().getProcessor(i), nEnd+i-1);\r\n\t\t\t// update slice label\r\n\t\t\ttargetStack.setSliceLabel(sliceImp.getStack().getSliceLabel(i), targetIdx);\r\n\t\t}\r\n \ttarget.setStack(targetStack);\r\n \tcopyOverlay(source, target, dim, sourceIdx, targetIdx);\t// only copy(replace) to target without updating the source\r\n \ttarget.setPosition(targetHyperStackIndex[0], targetHyperStackIndex[1], targetHyperStackIndex[2]);\r\n \ttarget.changes = true;\r\n \ttarget.getWindow().updateImage(target);\r\n \ttarget.getWindow().pack();\r\n \tWindowManager.setWindow(target.getWindow());\r\n\t\tnew Zoom().run(\"100%\");\r\n\t\ttarget.setDisplayMode(IJ.COLOR);\r\n\t\ttarget.setDisplayMode(IJ.COMPOSITE);\r\n \t\r\n\t\t/* if keep slice, finised \r\n \t * otherwise delete the slice from source, \r\n \t * update the source overlay, repaint window\r\n \t */ \r\n \tif (!keepSliceInSource) {\r\n \t\tif (dim1[dim-1]==1) {\r\n \t\t\tsource.changes = false;\r\n \t\t\tsource.close();\r\n \t\t\tSystem.gc();\r\n \t\t} else {\r\n \t\t\tif (!deleteSlice(source, dim, sourceIdx))\r\n \t\t\t\tSystem.out.println(\" Could not delete slice \" + sourceIdx + \" in source image \" + source.getTitle());\r\n \t\t\tWindowManager.setWindow(source.getWindow());\r\n\t\t\t\tnew Zoom().run(\"100%\");\r\n\t\t\t\tsource.setDisplayMode(IJ.COLOR);\r\n\t\t\t\tsource.setDisplayMode(IJ.COMPOSITE);\r\n \t\t}\r\n \t}\t\r\n\t\treturn true;\r\n\t}", "@Override\n BinaryArrayReadWrite clone();", "private void sliceSetColor(int colorPosition) {\n ArrayList<Integer> newPattern = new ArrayList<>(Collections.nCopies(slice.size(), colorPosition)); // Build a new pattern based on this color\n\n // Save the new color\n patternBasic = colorPosition;\n\n // Set the new pattern to slice\n setSlice(newPattern);\n }", "public ArrayList<Integer> getNewImage() {\n int centerPatternOffset = -Math.round(slice.size() / 2); // The offset needed to make sure that the center of the slice is located at the first index\n float repeatSliceOffset;\n int thisNumRepeats;\n if (doRepeat) {\n if (doEqualSpacedRepeats) {\n repeatSliceOffset = (float) thisNumLEDs / (float)numRepeats; // The offset between the centers of each repeat of the pattern\n } else {\n repeatSliceOffset = slice.size();\n }\n thisNumRepeats = numRepeats;\n } else {\n repeatSliceOffset = 0;\n thisNumRepeats = 1;\n }\n\n // Create a thisNumLEDs size array out of the slice, depending on how it should be repeated. Simultaneously generate the selected array, which should be selected for all colors in the pattern/slice\n // TO_DO: If/when pattern is not properly rotated, fix it here. Probably need to add a round(thisNumLEDs/4) offset?\n ArrayList<Integer> newImage = new ArrayList<>(originalImage); // Initialize the newImage as the original image sent to this fragment in the beginning. Overwrite it with the \"processed\" slice to produce the new image\n\n for (int repeatNum = 0; repeatNum < thisNumRepeats; repeatNum++) {\n // Go through each repeat of the slice\n // TO_DO: Add error-checking for overlap? Meh...\n int thisStartInd = ROTATION_OFFSET + centerPatternOffset + (int)((float)repeatNum * repeatSliceOffset) + getRotation(); // Where to start this pattern\n for (int sliceInd = 0; sliceInd < slice.size(); sliceInd++) {\n // \"Inlay\" this repeat of the slice into the newImage\n\n // Modulus thisStartInd + sliceInd into newImage.size (requires 2 lines because Java is stupid)\n int newInd = (thisStartInd + sliceInd) % newImage.size();\n if (newInd < 0) newInd += newImage.size();\n\n newImage.set(newInd, slice.get(sliceInd));\n }\n }\n\n return newImage;\n }", "private void rebuildImageIfNeeded() {\n Rectangle origRect = this.getBounds(); //g.getClipBounds();\n// System.out.println(\"origRect \" + origRect.x + \" \" + origRect.y + \" \" + origRect.width + \" \" + origRect.height);\n\n backBuffer = createImage(origRect.width, origRect.height);\n// System.out.println(\"Image w \" + backBuffer.getWidth(null) + \", h\" + backBuffer.getHeight(null));\n Graphics backGC = backBuffer.getGraphics();\n backGC.setColor(Color.BLACK);\n backGC.fillRect(0, 0, origRect.width, origRect.height);\n// updateCSysEntList(combinedRotatingMatrix);\n paintWorld(backGC);\n }", "public static interface Updater {\n\t/**\n\t * Updates image data that is accessed by reference.\n\t * This method is called by the updateData method of an\n\t * ImageComponent object to effect\n\t * safe updates to image data that\n\t * is referenced by that object. Applications that wish to modify\n\t * such data must implement this method and perform all updates\n\t * within it.\n\t * <br>\n\t * NOTE: Applications should <i>not</i> call this method directly.\n\t *\n\t * @param imageComponent the ImageComponent object being updated.\n\t * @param index index of the image to be modified.\n\t * @param x starting X offset of the subregion.\n\t * @param y starting Y offset of the subregion.\n\t * @param width width of the subregion.\n\t * @param height height of the subregion.\n\t *\n\t * @see ImageComponent3D#updateData\n\t */\n\tpublic void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);\n }", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "public void derivative3p2o(ImagePlus img, ImageStack stack, int width, int height, int slices, int mul){\r\n\t\t\r\n\t\tImageProcessor resIp = img.getProcessor();\r\n\r\n\t\tfloat f_[] = new float[slices+1];\r\n\t\tfloat out[] = new float[slices+1];\r\n\r\n\t\tfor(int x = 0; x < height; x++){\r\n\t\t\tfor(int y = 0 ; y < width; y++){\r\n\t\t\t\t\tfor(int z=1;z<slices+1;z++){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresIp = stack.getProcessor(z);\r\n\t\t\t\t\t\tf_[z] = resIp.getf(x,y);\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\tfor(int w=2;w<slices;w++){\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tout[w] = mul * (f_[w+1]+f_[w-1] - (2*f_[w]));\r\n\t\t\t\t\t\tresIp = stack.getProcessor(w);\r\n\t\t\t\t\t\tresIp.setf(x,y,out[w]);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(1);\r\n\t\t\t\t\tout[1] = mul * (f_[1]-2*f_[1+1]+ f_[1+2]);\r\n\t\t\t\t\tresIp.setf(x,y,(out[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(slices);\r\n\t\t\t\t\tout[slices] = mul*(f_[slices-2]-2*f_[slices-1] + f_[slices]);\r\n\t\t\t\t\tresIp.setf(x,y,(out[slices]));\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public @NotNull Image flipV()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int i = this.height - 1, offsetSize = 0; i >= 0; i--)\n {\n long src = srcPtr + Integer.toUnsignedLong(i * this.width) * this.format.sizeof;\n \n MemoryUtil.memCopy(src, dstPtr + offsetSize, bytesPerLine);\n offsetSize += bytesPerLine;\n }\n \n this.data.free();\n this.data = output;\n this.mipmaps = 1;\n }\n return this;\n }", "private void fuzPixel(int rPix, int cPix, ImageArray iCopy){\n \n /*int rgb= currentIm.getPixel(rPix,cPix);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);*/\n \n int rgb = 0;\n double red = 0.0;\n double blue = 0.0;\n double green = 0.0;\n int alpha = 0;\n \n for(int rr = rPix-1; rr < rPix+2; rr++){\n \n for(int cc = cPix-1; cc <cPix+2; cc++){\n rgb = currentIm.getPixel(rr,cc);\n red = red + DM.getRed(rgb);\n blue = blue + DM.getBlue(rgb);\n green = green + DM.getGreen(rgb);\n alpha= alpha + DM.getAlpha(rgb);\n \n }\n \n }\n \n red = red/9;\n blue = blue/9;\n green = green/9;\n \n iCopy.setPixel(rPix, cPix,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }", "LocalMaterialData withBlockData(int newData);", "public interface decode_slice_callback extends Callback {\n\t\tint apply(AVCodecContext avctx, Pointer buf, int buf_size);\n\t}", "public static void swapSlices(final double[] rdata, final double[] idata, final int xdim, final int ydim,\r\n final int zdim, final int plane) {\r\n int[] indices = null;\r\n final int sliceLength = xdim * ydim;\r\n\r\n if (plane == AlgorithmFFT2.SLICE_XY) {\r\n indices = AlgorithmFFT2.generateFFTIndices(zdim);\r\n double rtemp, itemp;\r\n for (int i = 0; i < indices.length; i++) {\r\n if (indices[i] < 0 || indices[indices[i]] == indices[i]) {\r\n continue;\r\n }\r\n for (int j = 0; j < sliceLength; j++) {\r\n rtemp = rdata[indices[i] * sliceLength + j];\r\n itemp = idata[indices[i] * sliceLength + j];\r\n rdata[indices[i] * sliceLength + j] = rdata[indices[indices[i]] * sliceLength + j];\r\n idata[indices[i] * sliceLength + j] = idata[indices[indices[i]] * sliceLength + j];\r\n rdata[indices[indices[i]] * sliceLength + j] = rtemp;\r\n idata[indices[indices[i]] * sliceLength + j] = itemp;\r\n }\r\n indices[indices[i]] = -1;\r\n indices[i] = -1;\r\n }\r\n } else if (plane == AlgorithmFFT2.SLICE_YZ) {\r\n indices = AlgorithmFFT2.generateFFTIndices(xdim);\r\n double rtemp, itemp;\r\n final int step = xdim;\r\n for (int i = 0; i < indices.length; i++) {\r\n if (indices[i] < 0 || indices[indices[i]] == indices[i]) {\r\n continue;\r\n }\r\n int index1 = indices[i];\r\n int index2 = indices[indices[i]];\r\n indices[indices[i]] = -1;\r\n indices[i] = -1;\r\n\r\n while (index1 < xdim * ydim * zdim) {\r\n rtemp = rdata[index1];\r\n itemp = idata[index1];\r\n rdata[index1] = rdata[index2];\r\n idata[index1] = idata[index2];\r\n rdata[index2] = rtemp;\r\n idata[index2] = itemp;\r\n index1 += step;\r\n index2 += step;\r\n }\r\n }\r\n } else if (plane == AlgorithmFFT2.SLICE_ZX) {\r\n indices = AlgorithmFFT2.generateFFTIndices(ydim);\r\n double rtemp, itemp;\r\n for (int i = 0; i < indices.length; i++) {\r\n if (indices[i] < 0 || indices[indices[i]] == indices[i]) {\r\n continue;\r\n }\r\n for (int j = 0; j < zdim; j++) {\r\n for (int k = 0; k < xdim; k++) {\r\n rtemp = rdata[k + indices[i] * ydim + sliceLength * j];\r\n itemp = idata[k + indices[i] * ydim + sliceLength * j];\r\n rdata[k + indices[i] * ydim + sliceLength * j] = rdata[k + indices[indices[i]] * ydim\r\n + sliceLength * j];\r\n idata[k + indices[i] * ydim + sliceLength * j] = idata[k + indices[indices[i]] * ydim\r\n + sliceLength * j];\r\n rdata[k + indices[indices[i]] * ydim + sliceLength * j] = rtemp;\r\n idata[k + indices[indices[i]] * ydim + sliceLength * j] = itemp;\r\n }\r\n }\r\n indices[indices[i]] = -1;\r\n indices[i] = -1;\r\n }\r\n } else {\r\n throw new IllegalArgumentException(\"The value of variable plane is illeagal: \" + plane);\r\n }\r\n }", "@Override\r\n\tpublic Buffer slice(int start, int end) {\n\t\t\r\n\t\treturn null;\r\n\t}", "public void endSlice() throws IOException {}", "public void setPixel(int x, int y, int iArray[], DataBuffer data) {\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n int pixelOffset = y * scanlineStride + x * pixelStride;\n for (int i = 0; i < numBands; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], iArray[i]);\n }\n }", "public int applySlice(int pool_num){\n checkPoolNum(pool_num);\n int ind = slice_indexs[pool_num].incrementAndGet();\n slice_pools.get(pool_num).put(ind, new int[SLICE_SIZE[pool_num]]);\n return ind;\n }", "public ByteBuf retainedSlice(int index, int length)\r\n/* 77: */ {\r\n/* 78: 94 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 79: 95 */ return super.retainedSlice(index, length);\r\n/* 80: */ }", "public ParticleRenderData copy()\n\t{\n\t\tRenderData copy = super.copy();\n\t\tParticleRenderData pcopy = new ParticleRenderData(new Vector3f(), new Euler(), new Vector3f());\n\t\tpcopy.transform = copy.transform;\n\t\tpcopy.postStage = this.postStage;\n\t\tpcopy.currStage = this.currStage;\n\t\tpcopy.particleColor = this.particleColor;\n\t\treturn pcopy;\n\t}", "public @NotNull Image rotateCCW()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n long src = Integer.toUnsignedLong(y * this.width + this.width - x - 1) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(x * this.height + y) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, this.format.sizeof);\n }\n }\n \n this.data.free();\n this.data = output;\n }\n return this;\n }", "private void resampleAbdomenVOI( int sliceIdx, VOIContour curve ) {\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM(sliceIdx);\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"Xcm: \" +xcm +\" Ycm: \" +ycm);\r\n \r\n\r\n ArrayList<Integer> xValsAbdomenVOI = new ArrayList<Integer>();\r\n ArrayList<Integer> yValsAbdomenVOI = new ArrayList<Integer>();\r\n\r\n // angle in radians\r\n double angleRad;\r\n \r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n int x = xcm;\r\n int y = ycm;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xDim && curve.contains(x, y)) {\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > 0 && curve.contains(x, y)) {\r\n\r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > 0 && curve.contains(x, y)) {\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yDim && curve.contains(x, y)) {\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n }\r\n } // end for (angle = 0; ...\r\n \r\n// ViewUserInterface.getReference().getMessageFrame().append(\"resample VOI number of points: \" +xValsAbdomenVOI.size());\r\n\r\n curve.clear();\r\n for(int idx = 0; idx < xValsAbdomenVOI.size(); idx++) {\r\n curve.add( new Vector3f( xValsAbdomenVOI.get(idx), yValsAbdomenVOI.get(idx), sliceIdx ) );\r\n }\r\n }", "@Override\n public void setData(final Raster data) {\n int count;\n synchronized (this) {\n count = writeCount++;\n }\n fireTileUpdate(count, true);\n try {\n // Do not use super.setData(…) because it does not handle correctly the float and double types.\n getRaster().setRect(data);\n } finally {\n synchronized (this) {\n // Similar to `releaseWritableTile(…)` but without throwing exception.\n writeCount = count = Math.max(0, writeCount - 1);\n }\n fireTileUpdate(count, false);\n }\n }", "@Override\r\n public void draw(final BufferedImage image) {\r\n for (int i = xStart; i < xStart + length; i++) {\r\n for (int j = yStart; j < yStart + height; j++) {\r\n if (i >= image.getWidth()) {\r\n break;\r\n } else if (j >= image.getHeight()) {\r\n break;\r\n }\r\n if (i == xStart) {\r\n image.setRGB(i, j, rgbaLat.getRGB());\r\n continue;\r\n } else if (j == yStart) {\r\n image.setRGB(i, j, rgbaLat.getRGB());\r\n continue;\r\n } else if (i == xStart + length - 1) {\r\n image.setRGB(i, j, rgbaLat.getRGB());\r\n continue;\r\n } else if (j == yStart + height - 1) {\r\n image.setRGB(i, j, rgbaLat.getRGB());\r\n continue;\r\n }\r\n image.setRGB(i, j, rgbaInt.getRGB());\r\n }\r\n }\r\n }", "public void renderImage(BufferedImage image, int xPosition, int yPosition)\n {\n int[] imagePixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();\n\n for(int y = 0; y < image.getHeight(); y++ ) \n {\n for(int x = 0; x < image.getWidth(); x++ ) \n {\n pixels[(x + xPosition) + (y + yPosition) * view.getWidth() ] = imagePixels[x + y * image.getWidth()];\n }\n }\n }", "public void derivative3p1o(ImagePlus img, ImageStack stack, int width, int height, int slices, int mul){\r\n\t\t\r\n\t\tImageProcessor resIp = img.getProcessor();\r\n\r\n\t\tfloat f_[] = new float[slices+1];\r\n\t\tfloat out[] = new float[slices+1];\r\n\r\n\t\tfor(int x = 0; x < height; x++){\r\n\t\t\tfor(int y = 0 ; y < width; y++){\r\n\t\t\t\t\tfor(int z=1;z<slices+1;z++){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresIp = stack.getProcessor(z);\r\n\t\t\t\t\t\tf_[z] = resIp.getf(x,y);\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\tfor(int w=2;w<slices;w++){\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tout[w] = mul * ((-1*f_[w-1] + 0* f_[w] + f_[w+1])/2);\r\n\t\t\t\t\t\tresIp = stack.getProcessor(w);\r\n\t\t\t\t\t\tresIp.setf(x,y,out[w]);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(1);\r\n\t\t\t\t\tout[1] = mul * ((-3*f_[1]+4*f_[1+1]-1*f_[1+2])/2);\r\n\t\t\t\t\tresIp.setf(x,y,(out[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(slices);\r\n\t\t\t\t\tout[slices] = mul * ((f_[slices-2]-4*f_[slices-1] + 3*f_[slices])/2);\r\n\t\t\t\t\tresIp.setf(x,y,(out[slices]));\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public void updateData(Updater updater, int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height) {\n if (isLiveOrCompiled() &&\n !this.getCapability(ALLOW_IMAGE_WRITE)) {\n throw new CapabilityNotSetException(\n J3dI18N.getString(\"ImageComponent3D5\"));\n }\n\n if (!((ImageComponent3DRetained)this.retained).isByReference()) {\n throw new IllegalStateException(\n J3dI18N.getString(\"ImageComponent3D6\"));\n }\n\n int w = ((ImageComponent3DRetained)this.retained).getWidth();\n int h = ((ImageComponent3DRetained)this.retained).getHeight();\n\n if ((x < 0) || (y < 0) || ((x + width) > w) || ((y + height) > h)) {\n throw new IllegalArgumentException(\n J3dI18N.getString(\"ImageComponent3D7\"));\n }\n\n ((ImageComponent3DRetained)this.retained).updateData(\n updater, index, x, y, width, height);\n }", "public abstract PaintObject[][] separate(\n \t\tbyte[][] _r, Point _pnt_shiftRectangle);", "BufferedImage getSubimage(BufferedImage image, Rectangle rect) {\n Gui.iconPosX = rect.x;\n Gui.iconPosY = rect.y;\n\n Gui.imageWidth = image.getWidth();\n Gui.imageHeight = image.getHeight();\n\n Gui.iconHeight = rect.height;\n Gui.iconWidth = rect.width;\n\n int height = Gui.iconHeight + Gui.iconMargin * 2;\n int width = Gui.iconWidth + Gui.iconMargin * 2;\n\n while (width + Gui.iconPosX > image.getWidth() + 1) {\n width -= 1;\n }\n\n while (height + Gui.iconPosY > image.getHeight() + 1) {\n height -= 1;\n }\n\n BufferedImage subImage = image.getSubimage(Math.max(0, Math.min(Gui.imageWidth - 1, Gui.iconPosX - Gui.iconMargin)),\n Math.max(0, Math.min(Gui.imageHeight - 1, Gui.iconPosY - Gui.iconMargin)),\n width,\n height\n );\n\n return subImage;\n }", "private void reanderImage(ImageData data) {\n \n }", "interface SliceOperation {\n\t/**\n\t * Executes to operate slice.\n\t * @param sliceDataManager the slice data manager.\n\t * @param reqSliceDto the requested slice DTO.\n\t * @return the received slice DTO.\n\t * @throws MloClientException Failed to operate.\n\t */\n\tSliceDto operate(SliceDataManager sliceDataManager, SliceDto reqSliceDto) throws MloClientException;\n}", "@Override\n void createRetained() {\n this.retained = new ImageComponent3DRetained();\n this.retained.setSource(this);\n }", "public void render() { image.drawFromTopLeft(getX(), getY()); }", "public abstract WorldImage drawRow(int blocks);", "public RegularSlicer(Slicer parentSlicer) {\n super(parentSlicer);\n setImage(\"res/images/slicer.png\");\n setSpeed(2);\n setHealth(1);\n setREWARD(2);\n setPenalty(1);\n setBoundingBox(new Image(getImage()).getBoundingBoxAt(getCurrentPoint()));\n }", "public Spritesheet(BufferedImage image, int subImageWidth, int subImageHeight, int numRows, int numCols){\n\t\timages = new BufferedImage[numRows][numCols];\n\t\tsplit(image, subImageWidth, subImageHeight, numRows, numCols);\n\t}", "public void updateLayer() {\n bufferedImage = null;\n repaint();\n panelResized();\n }", "public void draw(Pixmap pixmap, int srcx, int srcy, int srcWidth, int srcHeight, int dstx, int dsty, int dstWidth, int dstHeight, boolean filtering, boolean blending){\n int width = this.width, height = this.height, owidth = pixmap.width, oheight = pixmap.height;\n\n //don't bother drawing invalid regions\n if(srcWidth == 0 || srcHeight == 0 || dstWidth == 0 || dstHeight == 0){\n return;\n }\n\n if(srcWidth == dstWidth && srcHeight == dstHeight){\n\n //same-size blit, no filtering\n int sx, dx;\n int sy = srcy, dy = dsty;\n\n if(blending){\n for(; sy < srcy + srcHeight; sy++, dy++){\n if(sy < 0 || dy < 0) continue;\n if(sy >= oheight || dy >= height) break;\n\n for(sx = srcx, dx = dstx; sx < srcx + srcWidth; sx++, dx++){\n if(sx < 0 || dx < 0) continue;\n if(sx >= owidth || dx >= width) break;\n setRaw(dx, dy, blend(pixmap.getRaw(sx, sy), getRaw(dx, dy)));\n }\n }\n }else{\n //TODO this can be optimized with scanlines, potentially\n for(; sy < srcy + srcHeight; sy++, dy++){\n if(sy < 0 || dy < 0) continue;\n if(sy >= oheight || dy >= height) break;\n\n for(sx = srcx, dx = dstx; sx < srcx + srcWidth; sx++, dx++){\n if(sx < 0 || dx < 0) continue;\n if(sx >= owidth || dx >= width) break;\n setRaw(dx, dy, pixmap.getRaw(sx, sy));\n }\n }\n }\n }else{\n if(filtering){\n //blit with bilinear filtering\n float x_ratio = ((float)srcWidth - 1) / dstWidth;\n float y_ratio = ((float)srcHeight - 1) / dstHeight;\n int rX = Math.max(Mathf.round(x_ratio), 1), rY = Math.max(Mathf.round(y_ratio), 1);\n float xdiff, ydiff;\n int spitch = 4 * owidth;\n int dx, dy, sx, sy, i = 0, j;\n ByteBuffer spixels = pixmap.pixels;\n\n for(; i < dstHeight; i++){\n sy = (int)(i * y_ratio) + srcy;\n dy = i + dsty;\n ydiff = (y_ratio * i + srcy) - sy;\n if(sy < 0 || dy < 0) continue;\n if(sy >= oheight || dy >= height) break;\n\n for(j = 0; j < dstWidth; j++){\n sx = (int)(j * x_ratio) + srcx;\n dx = j + dstx;\n xdiff = (x_ratio * j + srcx) - sx;\n if(sx < 0 || dx < 0) continue;\n if(sx >= owidth || dx >= width) break;\n\n int\n srcp = (sx + sy * owidth) * 4,\n c1 = spixels.getInt(srcp),\n c2 = sx + rX < srcWidth ? spixels.getInt(srcp + 4 *rX) : c1,\n c3 = sy + rY < srcHeight ? spixels.getInt(srcp + spitch * rY) : c1,\n c4 = sx + rX < srcWidth && sy + rY < srcHeight ? spixels.getInt(srcp + 4 * rX + spitch * rY) : c1;\n\n float ta = (1 - xdiff) * (1 - ydiff);\n float tb = (xdiff) * (1 - ydiff);\n float tc = (1 - xdiff) * (ydiff);\n float td = (xdiff) * (ydiff);\n\n int r = (int)(((c1 & 0xff000000) >>> 24) * ta + ((c2 & 0xff000000) >>> 24) * tb + ((c3 & 0xff000000) >>> 24) * tc + ((c4 & 0xff000000) >>> 24) * td) & 0xff;\n int g = (int)(((c1 & 0xff0000) >>> 16) * ta + ((c2 & 0xff0000) >>> 16) * tb + ((c3 & 0xff0000) >>> 16) * tc + ((c4 & 0xff0000) >>> 16) * td) & 0xff;\n int b = (int)(((c1 & 0xff00) >>> 8) * ta + ((c2 & 0xff00) >>> 8) * tb + ((c3 & 0xff00) >>> 8) * tc + ((c4 & 0xff00) >>> 8) * td) & 0xff;\n int a = (int)((c1 & 0xff) * ta + (c2 & 0xff) * tb + (c3 & 0xff) * tc + (c4 & 0xff) * td) & 0xff;\n int srccol = (r << 24) | (g << 16) | (b << 8) | a;\n\n setRaw(dx, dy, !blending ? srccol : blend(srccol, getRaw(dx, dy)));\n }\n }\n }else{\n //blit with nearest neighbor filtering\n int xratio = (srcWidth << 16) / dstWidth + 1;\n int yratio = (srcHeight << 16) / dstHeight + 1;\n int dx, dy, sx, sy;\n\n for(int i = 0; i < dstHeight; i++){\n sy = ((i * yratio) >> 16) + srcy;\n dy = i + dsty;\n if(sy < 0 || dy < 0) continue;\n if(sy >= oheight || dy >= height) break;\n\n for(int j = 0; j < dstWidth; j++){\n sx = ((j * xratio) >> 16) + srcx;\n dx = j + dstx;\n if(sx < 0 || dx < 0) continue;\n if(sx >= owidth || dx >= width) break;\n\n setRaw(dx, dy, !blending ? pixmap.getRaw(sx, sy) : blend(pixmap.getRaw(sx, sy), getRaw(dx, dy)));\n }\n }\n }\n }\n }", "protected AbstractMatrix3D vPart(int slice, int row, int column, int depth, int height, int width) {\n\tcheckBox(slice,row,column,depth,height,width);\n\t\n\tthis.sliceZero += this.sliceStride * slice;\n\tthis.rowZero += this.rowStride * row;\n\tthis.columnZero += this.columnStride * column;\n\t\n\tthis.slices = depth;\n\tthis.rows = height;\n\tthis.columns = width;\n\t\n\tthis.isNoView = false;\n\treturn this;\n}", "public void setSliceSize(int newSize) {\n ArrayList<Integer> newSlice = new ArrayList<>(slice);\n if (newSize > slice.size()) {\n if (slice.size() == 0) {\n newSlice = new ArrayList<>(Collections.nCopies(newSize, 0));\n patternSpecific = new ArrayList<>(Collections.nCopies(newSize, 0));\n } else {\n // If the new size is larger, then add a few extra values\n newSlice.addAll(new ArrayList<>(Collections.nCopies(newSize - newSlice.size(), newSlice.get(newSlice.size() - 1))));\n patternSpecific.addAll(new ArrayList<>(Collections.nCopies(newSize - patternSpecific.size(), patternSpecific.get(patternSpecific.size() - 1)))); // Also modify the patternSpecific array\n }\n } else if (newSize < newSlice.size()) {\n // If the new size is smaller, then remove the extra values\n newSlice.subList(newSize, newSlice.size()).clear(); // Remove the extra elements\n patternSpecific.subList(newSize, patternSpecific.size()).clear(); // Remove the extra elements (Also modify the patternSpecific array)\n } else {\n return;\n }\n\n // Assign the new slice value\n setSlice(newSlice);\n }", "public StdVideoEncodeH265SliceHeader set(StdVideoEncodeH265SliceHeader src) {\n memCopy(src.address(), address(), SIZEOF);\n return this;\n }", "void copy(int offset, int size);", "SerializableState copyData(Long id, Rectangle bounds)\n\tthrows RemoteException;", "@Test\n public void rectEqualImageWriteWithinReadImageTest() {\n final Rectangle rect = new Rectangle(10, 10, 5, 2);\n minx = 0;\n miny = 0;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n final SampleModel sampleMW = new PixelInterleavedSampleModel(getDataBufferType(), tilesWidth, tilesHeight, numBand, tilesWidth*numBand, new int[]{0, 1, 2});\n final WritableRenderedImage rendWriteImage = new TiledImage(rect.x, rect.y, rect.width, rect.height, renderedImage.getTileGridXOffset(), renderedImage.getTileGridYOffset(), sampleMW, null);\n setPixelIterator(renderedImage, rendWriteImage, rect);\n while (pixIterator.next()) pixIterator.setSample(1);\n setPixelIterator(rendWriteImage);\n while (pixIterator.next()) assertTrue(pixIterator.getSampleDouble() == 1);\n }", "public @NotNull Image flipH()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n if (this.format != ColorFormat.RGBA)\n {\n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n // OPTION 1: Move pixels with memCopy()\n long src = Integer.toUnsignedLong(y * this.width + this.width - 1 - x) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(y * this.width + x) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, bytesPerLine);\n \n // OPTION 2: Just copy data pixel by pixel\n // output.put(y * this.width + x, this.data.getBytes(y * this.width + (this.width - 1 - x)));\n }\n }\n \n this.data.free();\n \n this.data = output;\n }\n else\n {\n // OPTION 3: Faster implementation (specific for 32bit pixels)\n // NOTE: It does not require additional allocations\n IntBuffer ptr = this.data.toBuffer().asIntBuffer();\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width / 2; x++)\n {\n int backup = ptr.get(y * this.width + x);\n ptr.put(y * this.width + x, ptr.get(y * this.width + this.width - 1 - x));\n ptr.put(y * this.width + this.width - 1 - x, backup);\n }\n }\n }\n this.mipmaps = 1;\n }\n \n return this;\n }", "private Picture copy(Picture p) {\n\t\tif (p == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot create a copy of a null Picture\");\n\t\t}\n\t\tPicture replica = new PictureImpl(p.getWidth(), p.getHeight());\n\n\t\tfor (int i = 0; i < p.getWidth(); i++) {\n\t\t\tfor (int j = 0; j < p.getHeight(); j++) {\n\t\t\t\treplica.setPixel(i, j, p.getPixel(i, j));\n\t\t\t}\n\t\t}\n\t\treturn replica;\n\t}", "private BufferedImage user_space(BufferedImage image) {\n // create new_img with the attributes of image\n BufferedImage new_img = new BufferedImage(image.getWidth(),\n image.getHeight(), BufferedImage.TYPE_3BYTE_BGR);\n Graphics2D graphics = new_img.createGraphics();\n graphics.drawRenderedImage(image, null);\n graphics.dispose(); // release all allocated memory for this image\n return new_img;\n }", "public void read(int [][] buffer_image, int start, int finish, int col){\n\t\tfor(int i = start; i< finish; i++){\n\t\t\tfor(int j=0;j < col; j++){\n\t\t\t\tpicture.setRGB(j, i, buffer_image[i-start][j]);\n\t\t\t}\n\t\t}\n\t}", "Subdivision update(Subdivision subdivision);", "@Test\n\tpublic void copy_test2() {\n\t\tSystem.out.println(\"copy前:\" + Arrays.toString(intArr));\t\n\t\tintArr = Arrays.copyOf(intArr, 20);\n//\t\tSystem.arraycopy(intArr, 0, intArr, 0, 20);\n\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\t\n\t}", "public BufferedImage bitPlaneSlicing(BufferedImage image, int bit) {\r\n int[][][] arr = convertToArray(image);\r\n for (int y = 0; y < image.getHeight(); y++) {\r\n for (int x = 0; x < image.getWidth(); x++) {\r\n arr[x][y][1] = (arr[x][y][1] >> bit) & 1;\r\n arr[x][y][2] = (arr[x][y][2] >> bit) & 1;\r\n arr[x][y][3] = (arr[x][y][3] >> bit) & 1;\r\n if (arr[x][y][1] == 1) {\r\n arr[x][y][1] = 255;\r\n }\r\n if (arr[x][y][2] == 1) {\r\n arr[x][y][2] = 255;\r\n }\r\n if (arr[x][y][3] == 1) {\r\n arr[x][y][3] = 255;\r\n }\r\n }\r\n }\r\n return convertToBimage(arr);\r\n }", "@Override\n public Raster getData(final Rectangle bounds) {\n final int startX = convertXToTileX(bounds.x);\n final int startY = convertYToTileY(bounds.y);\n final int endX = convertXToTileX(bounds.x + bounds.width - 1);\n final int endY = convertYToTileY(bounds.y + bounds.height - 1);\n Raster tile;\n\n if (startX == endX && startY == endY) {\n tile = getTile(startX, startY);\n return tile.createChild(bounds.x, bounds.y, bounds.width,\n bounds.height, bounds.x, bounds.y, null);\n } else {\n // Create a WritableRaster of the desired size\n final SampleModel sm = this.sampleModel\n .createCompatibleSampleModel(bounds.width, bounds.height);\n\n // Translate it\n final WritableRaster dest = Raster.createWritableRaster(sm,\n bounds.getLocation());\n\n for (int j = startY; j <= endY; j++) {\n for (int i = startX; i <= endX; ++i) {\n tile = getTile(i, j);\n final Rectangle intersectRect = bounds.intersection(tile\n .getBounds());\n final Raster liveRaster = tile.createChild(intersectRect.x,\n intersectRect.y, intersectRect.width,\n intersectRect.height, intersectRect.x,\n intersectRect.y, null);\n dest.setDataElements(0, 0, liveRaster);\n }\n }\n return dest;\n }\n }", "@VTID(21)\n void setVisibleSlicerItemsList(\n @MarshalAs(NativeType.VARIANT) java.lang.Object rhs);", "public abstract BufferedImage applyTo(BufferedImage image);", "public void add(final BaseTextureRegion pTextureRegion) {\n\t\tfinal ITexture texture = pTextureRegion.getTexture();\n\n\t\tif(texture == null) { // TODO Check really needed?\n\t\t\treturn;\n\t\t}\n\n\t\tfinal int x1 = Float.floatToRawIntBits(pTextureRegion.getTextureCoordinateX1());\n\t\tfinal int y1 = Float.floatToRawIntBits(pTextureRegion.getTextureCoordinateY1());\n\t\tfinal int x2 = Float.floatToRawIntBits(pTextureRegion.getTextureCoordinateX2());\n\t\tfinal int y2 = Float.floatToRawIntBits(pTextureRegion.getTextureCoordinateY2());\n\n\t\tfinal int[] bufferData = this.mBufferData;\n\n\t\tint index = this.mIndex;\n\t\tbufferData[index++] = x1;\n\t\tbufferData[index++] = y1;\n\n\t\tbufferData[index++] = x1;\n\t\tbufferData[index++] = y2;\n\n\t\tbufferData[index++] = x2;\n\t\tbufferData[index++] = y1;\n\n\t\tbufferData[index++] = x2;\n\t\tbufferData[index++] = y1;\n\n\t\tbufferData[index++] = x1;\n\t\tbufferData[index++] = y2;\n\n\t\tbufferData[index++] = x2;\n\t\tbufferData[index++] = y2;\n\t\tthis.mIndex = index;\n\t}", "@Test\n\tpublic void testSetSliceWithoutUpdate() {\n\t}", "public WeatherGridSlice(WeatherGridSlice rhs) {\n this(rhs, false);\n }", "public Image clone() {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, width, height);\r\n\t}", "public Boolean changeSlice(String sliceName, String key, String value)\n\t\t\tthrows MalformedURLException, InvalidSliceName,\n\t\t\tPermissionDeniedException, InvalidUserInfoKey, DuplicateControllerException;", "@Override\r\n public boolean RenderBlock( RenderBlocks renderer, int i, int j, int k )\r\n {\r\n renderer.setRenderBounds( GetBlockBoundsFromPoolBasedOnState( \r\n \trenderer.blockAccess, i, j, k ) );\r\n \r\n \treturn renderer.renderBlockRepeater( this, i, j, k );\r\n }", "public abstract void render(PixelImage canvas);", "public ByteBuf retainedSlice()\r\n/* 71: */ {\r\n/* 72: 88 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 73: 89 */ return super.retainedSlice();\r\n/* 74: */ }", "public void RenderObject(int[] obj_pixel_data, int obj_xPos, int obj_yPos, int obj_width, int obj_height) {\n\t\t// Go through the objects pixel data blending it with the current screen back buffer pixel data\n\t\tfor (int y = 0; y < obj_height; y++) {\n\t\t\tint screenY = y + obj_yPos + camera_yPos;\n\t\t\tfor (int x = 0; x < obj_width; x++) {\n\t\t\t\tint screenX = x + obj_xPos + camera_xPos;\n\t\t\t\t// calculate the pixel indexes for both the obj and the back buffer\n\t\t\t\tint obj_pixelIndex = x + y * obj_width,\n\t\t\t\t\tbuff_pixelIndex = screenX + screenY * width;\n\t\t\t\t// make sure this value is within the screen\n\t\t\t\tif ((screenY >= 0 && screenY < height && screenX >= 0 && screenX < width)) {\n\t\t\t\t\t// extra sanity check to make sure the buffer is not exceeded\n\t\t\t\t\tif (buff_pixelIndex >= 0 && buff_pixelIndex < pixel_data.length) {\n\t\t\t\t\t\tpixel_data[buff_pixelIndex] = Blend(pixel_data[buff_pixelIndex], obj_pixel_data[obj_pixelIndex]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void updatePixel(int[] location, double[] parameters);", "public abstract boolean isInSelectionImage(final byte[][] _field, \n final Point _pnt_shiftRectangle);", "@RemoteServiceRelativePath(\"slice\")\npublic interface SlicedFileService extends RemoteService {\n\tFileSliceResponse sendSlice(FileSlice slice) throws IllegalArgumentException;\n}", "@Override\n\tpublic void render() {\n\t\tgl.glEnableClientState(GL2.GL_VERTEX_ARRAY);\n\t\tgl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);\n\t\tgl.glEnableClientState(GL2.GL_NORMAL_ARRAY);\n\t\tfloat posx = startxPos;\n\t\tint[] vboIds;\n\t\tfor(int i=0;i<nbWidth;i++) {\n//\t\t\tindexBuffer = cacheBands.getDataLocalIndex(i); // mapIndexBands[i]\n//\t\t\tindexBuffer.rewind();\n\t\t\tvboIds = cacheBands.getDataLocalIndex(i);\n\t\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboIds[1]);\n\t\t\tgl.glVertexPointer(3, GL.GL_FLOAT, 0, 0);\n\t\t\tgl.glBindBuffer(GL2.GL_ARRAY_BUFFER, vboIds[2]);\n\t\t\tgl.glTexCoordPointer(2, GL.GL_FLOAT, 0, 0);\n\t\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboIds[3]);\n\t\t\tgl.glNormalPointer(GL.GL_FLOAT, 0, 0);\n\n\t\t\t\n\t\t\tgl.glPushMatrix();\n\t\t\tgl.glTranslatef(posx, startyPos,0);\n\t\t\t//gl.glCallList(cacheBands.getDataLocalIndex(i));\n\t // gl.glDrawElements(GL2.GL_QUADS, indices.capacity(), GL.GL_UNSIGNED_SHORT, 0);\n\t gl.glDrawArrays(GL2.GL_QUADS, 0, vboIds[0]); \n\t\t\tgl.glPopMatrix();\n\t\t\tposx+=blockWidth;\n\t\t}\n\t\t// unbind vbo\n\t\tgl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);\n\t\tgl.glDisableClientState(GL2.GL_NORMAL_ARRAY);\n gl.glDisableClientState(GL2.GL_TEXTURE_COORD_ARRAY);\n gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);\n\n\t}", "public void changeAction()\r\n {\r\n bufferedImage = imageCopy[0];\r\n edited = imageCopy[1];\r\n cropedPart = imageCopy[2];\r\n bufferedImage = imageCopy[3];\r\n\r\n isBlured = statesCopy[0];\r\n isReadyToSave = statesCopy[1];\r\n isChanged = statesCopy[2];\r\n isInverted = statesCopy[3];\r\n isRectangularCrop = statesCopy[4];\r\n isCircularCrop = statesCopy[5];\r\n isImageLoaded = statesCopy[6];\r\n }", "@Override\n\tpublic void run(ImageProcessor ip) {\n\t\twidth = ip.getWidth();\n\t\theight = ip.getHeight();\n\n\t\tbyte[] pixels = (byte[]) ip.getPixels();\n\t\tij.gui.Roi[] rois = new ij.gui.Roi[0];\n\t\tbyte[] output = trimSperm(pixels, width, height, rois);\n\n\t\tByteProcessor bp = new ByteProcessor(width, height, output);\n\t\tip.copyBits(bp, 0, 0, Blitter.COPY);\n\t\timage.show();\n\t\timage.updateAndDraw();\n\t}", "public void blurImage()\r\n {\r\n if (!isChanged && !isBlured )\r\n {\r\n cropedEdited = cropedPart;\r\n }\r\n\t float[] elements = {1/9f, 1/9f, 1/9f, 1/9f,1/9f,1/9f,1/9f,1/9f,1/9f,1/9f}; \r\n\t Kernel kernel = new Kernel(3, 3, elements); \r\n\t BufferedImageOp blur = new ConvolveOp(kernel); \r\n\t cropedEdited = blur.filter(cropedEdited, null);\r\n repaint();\r\n }", "private void copyToBuffer(int sourceOffset, int[] buffer, int bufferOffset, int length, int backgroundGrey) {\n if (length < 1) {\n return;\n }\n synchronized (backingData) {\n try {\n backingData.position(origo + sourceOffset);\n backingData.get(bulkGetBuffer, 0, length);\n } catch (IndexOutOfBoundsException e) {\n throw new RuntimeException(String.format(\n \"IndexOutOfBounds for origo=%d, sourceOffset=%d, length=%d, o+d+l=%d, backing.limit=%d\",\n origo, sourceOffset, length, origo+sourceOffset+length, backingData.limit()));\n }\n for (int i = 0; i < length; i++) {\n final int grey = 0xFF & bulkGetBuffer[i];\n buffer[bufferOffset + i] = grey == Util.MISSING_GREY ? backgroundGrey : grey;\n }\n/* for (int i = 0 ; i < length ; i++) {\n // TODO: Bulk loading of each row should speed this up, but requires a synchronized bulk method\n int grey = getByteAsInt(sourceOffset+i);\n buffer[bufferOffset+i] = grey;\n }*/\n }\n }", "public TwoStateSituativeControlSliceVisualization(PanelControl panelControl, Control c, int bitpos,\n\t\t\tControlSliceVisualization neighborControlSliceVisualization) {\n\t\t// name: aus control, wenn da\n\t\tsuper((c == null) ? \"\" : c.name + \".\" + bitpos, panelControl, c, bitpos);\n\t\tthis.imageFilename = new String[2][2];\n this.neighborControlSliceVisualization = neighborControlSliceVisualization ;\n\t}", "abstract public void modifyImage(long dt, long curTime, BufferedImage image) ;", "public abstract BufferedImage paint(final BufferedImage _bi, \n final boolean _final, final BufferedImage _g, final int _x, \n final int _y, final DRect _rectRepaint);", "public void Scale(SurfaceData param1SurfaceData1, SurfaceData param1SurfaceData2, Composite param1Composite, Region param1Region, int param1Int1, int param1Int2, int param1Int3, int param1Int4, double param1Double1, double param1Double2, double param1Double3, double param1Double4) {\n/* 150 */ tracePrimitive(this.target);\n/* 151 */ this.target.Scale(param1SurfaceData1, param1SurfaceData2, param1Composite, param1Region, param1Int1, param1Int2, param1Int3, param1Int4, param1Double1, param1Double2, param1Double3, param1Double4);\n/* */ }" ]
[ "0.5459166", "0.51064116", "0.5054761", "0.49898422", "0.49149117", "0.48002547", "0.47638837", "0.4745934", "0.46948427", "0.46269658", "0.4623095", "0.4607551", "0.4595011", "0.45518476", "0.45454565", "0.45410672", "0.45285928", "0.45115203", "0.4437694", "0.44061702", "0.43932506", "0.4388008", "0.4386729", "0.43863505", "0.43838933", "0.43554854", "0.4333249", "0.4310051", "0.4309133", "0.4292013", "0.42902657", "0.42842346", "0.42812777", "0.4278084", "0.42475796", "0.42334938", "0.42264107", "0.42118368", "0.42103857", "0.4184152", "0.41825753", "0.4174049", "0.41715863", "0.41498747", "0.4147415", "0.4141448", "0.41365838", "0.41309336", "0.41232678", "0.4115127", "0.4108407", "0.41065162", "0.40936506", "0.4088726", "0.40886676", "0.40883565", "0.4076238", "0.40672198", "0.40668407", "0.4058514", "0.4056729", "0.40567228", "0.40514898", "0.40464178", "0.4039179", "0.40374684", "0.4032084", "0.40308052", "0.40301463", "0.40296873", "0.40275925", "0.40245622", "0.40230405", "0.40183467", "0.4011109", "0.40032881", "0.4000815", "0.3999287", "0.39937735", "0.399329", "0.3991864", "0.39902407", "0.3989557", "0.39783758", "0.3977284", "0.39702183", "0.39699087", "0.39553067", "0.3953366", "0.39501607", "0.39495993", "0.39478514", "0.39379898", "0.39368737", "0.3935031", "0.39324048", "0.3931373", "0.39312476", "0.3930899", "0.39261824" ]
0.59864956
0
Updates a particular slice of image data that is accessed by reference. This method calls the updateData method of the specified ImageComponent3D.Updater object to synchronize updates to the image data that is referenced by this ImageComponent3D object. Applications that wish to modify such data must perform all updates via this method. The data to be modified has to be within the boundary of the subregion specified by the offset (x, y) and the dimension (widthheight). It is illegal to modify data outside this boundary. If any referenced data is modified outside the updateData method, or any data outside the specified boundary is modified, the results are undefined.
public void updateData(Updater updater, int index, int x, int y, int width, int height) { if (isLiveOrCompiled() && !this.getCapability(ALLOW_IMAGE_WRITE)) { throw new CapabilityNotSetException( J3dI18N.getString("ImageComponent3D5")); } if (!((ImageComponent3DRetained)this.retained).isByReference()) { throw new IllegalStateException( J3dI18N.getString("ImageComponent3D6")); } int w = ((ImageComponent3DRetained)this.retained).getWidth(); int h = ((ImageComponent3DRetained)this.retained).getHeight(); if ((x < 0) || (y < 0) || ((x + width) > w) || ((y + height) > h)) { throw new IllegalArgumentException( J3dI18N.getString("ImageComponent3D7")); } ((ImageComponent3DRetained)this.retained).updateData( updater, index, x, y, width, height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "public static interface Updater {\n\t/**\n\t * Updates image data that is accessed by reference.\n\t * This method is called by the updateData method of an\n\t * ImageComponent object to effect\n\t * safe updates to image data that\n\t * is referenced by that object. Applications that wish to modify\n\t * such data must implement this method and perform all updates\n\t * within it.\n\t * <br>\n\t * NOTE: Applications should <i>not</i> call this method directly.\n\t *\n\t * @param imageComponent the ImageComponent object being updated.\n\t * @param index index of the image to be modified.\n\t * @param x starting X offset of the subregion.\n\t * @param y starting Y offset of the subregion.\n\t * @param width width of the subregion.\n\t * @param height height of the subregion.\n\t *\n\t * @see ImageComponent3D#updateData\n\t */\n\tpublic void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);\n }", "void update(byte[] data, int offset, int length);", "public void updatePixel(int[] location, double[] parameters);", "public void updateData() {}", "public void updateChunkyPixel(int[] location, int[] dimension, double[] parameters);", "public void update(byte[] input, int offs, int len);", "void update(ReferenceData instance) throws DataException;", "void updateData();", "public abstract void update(byte[] buf, int off, int len);", "private synchronized void updateData() {\n if (nanoseconds >= 1000000000) {\n fps = frames;\n ups = updates;\n nanoseconds = nanoseconds - 1000000000;\n frames = 0;\n updates = 0;\n }\n\n long elapsedTime = System.nanoTime() - oldTime;\n oldTime = oldTime + elapsedTime;\n nanoseconds = nanoseconds + elapsedTime;\n\n particleSimulator.update(elapsedTime * 1e-9);\n\n // An update occurred, increment.\n updates++;\n\n // Ask for a repaint if we know of a component to repaint\n if (gameDrawingComponent != null) {\n gameDrawingComponent.repaint();\n }\n }", "Subdivision update(Subdivision subdivision);", "@Override\n public void setData(final Raster data) {\n int count;\n synchronized (this) {\n count = writeCount++;\n }\n fireTileUpdate(count, true);\n try {\n // Do not use super.setData(…) because it does not handle correctly the float and double types.\n getRaster().setRect(data);\n } finally {\n synchronized (this) {\n // Similar to `releaseWritableTile(…)` but without throwing exception.\n writeCount = count = Math.max(0, writeCount - 1);\n }\n fireTileUpdate(count, false);\n }\n }", "public void setPixel(int x, int y, int iArray[], DataBuffer data) {\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n int pixelOffset = y * scanlineStride + x * pixelStride;\n for (int i = 0; i < numBands; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], iArray[i]);\n }\n }", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "public void setPixels(int x, int y, int w, int h, int iArray[], DataBuffer data) {\n int x1 = x + w;\n int y1 = y + h;\n\n if (x < 0 || x >= width || w > width || x1 < 0 || x1 > width || y < 0 || y >= height || h > height\n || y1 < 0 || y1 > height) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n\n int lineOffset = y * scanlineStride + x * pixelStride;\n int srcOffset = 0;\n\n for (int i = 0; i < h; i++) {\n int pixelOffset = lineOffset;\n for (int j = 0; j < w; j++) {\n for (int k = 0; k < numBands; k++) {\n data.setElem(bankIndices[k], pixelOffset + bandOffsets[k], iArray[srcOffset++]);\n }\n pixelOffset += pixelStride;\n }\n lineOffset += scanlineStride;\n }\n }", "public void updatePositioningData(PositioningData data);", "public void update() {\n\t\tif (c.getResamplingFactor() != 1) return;\n\t\trenderer.getVolume().updateData();\n\t}", "public void update(double[][] data) {\n for (double[] x : data) {\n update(x);\n }\n }", "public synchronized void updateData() {\n updateDataFields(this::defaultFetcher);\n }", "public void update(int i, int i2, int i3) {\n float f = (float) i;\n this.scale *= this.width / f;\n this.width = f;\n this.height = (float) i2;\n updateMinimumScale();\n this.matrix.getValues(CropView.this.values);\n this.matrix.reset();\n Matrix matrix2 = this.matrix;\n float f2 = this.scale;\n matrix2.postScale(f2, f2);\n Matrix matrix3 = this.matrix;\n float[] fArr = CropView.this.values;\n matrix3.postTranslate(fArr[2], fArr[5]);\n CropView.this.updateMatrix();\n }", "abstract public Vector3[][] update();", "public void updateData(int fromSample, int toSample) {\r\n\t\trepaintSampleRange(fromSample - pv.samplesOnePixel - 1, toSample\r\n\t\t\t\t+ pv.samplesOnePixel + 1);\r\n\t}", "public abstract void offset(DataType x, DataType y, DataType z);", "public void updateDataCell();", "public int update(int data) {\n data &= 0xff;\n int local = storage;\n for(int i = 0; i < 4; i++) {\n if((local & 0xff) == data) {\n storage = data\n | (storage & high[i])\n | ((storage & low[i]) << 010);\n return i;\n }\n local >>= 010;\n }\n storage = (storage << 010) | data;\n return -1;\n }", "void update(byte data);", "public synchronized void setData(byte[] data, int level, int fx, int fy) {\n final int edge = getTileEdge(level);\n final int tileOffset = getTileOffset(level, fx, fy);\n final int blockSize = edge*edge;\n// log.debug(this.data.array().length + \" - \" + (origo+tileOffset) + \" - \" + blockSize);\n backingData.position(origo+tileOffset);\n backingData.put(data, 0, blockSize);\n syncMemData();\n }", "public void setDataElements(int x, int y, Object obj, DataBuffer data) {\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n\n int type = getTransferType();\n int numDataElems = getNumDataElements();\n int pixelOffset = y * scanlineStride + x * pixelStride;\n\n switch (type) {\n\n case DataBuffer.TYPE_BYTE:\n\n byte[] barray = (byte[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], ((int) barray[i]) & 0xff);\n }\n break;\n\n case DataBuffer.TYPE_USHORT:\n case DataBuffer.TYPE_SHORT:\n\n short[] sarray = (short[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], ((int) sarray[i]) & 0xffff);\n }\n break;\n\n case DataBuffer.TYPE_INT:\n\n int[] iarray = (int[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], iarray[i]);\n }\n break;\n\n case DataBuffer.TYPE_FLOAT:\n\n float[] farray = (float[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElemFloat(bankIndices[i], pixelOffset + bandOffsets[i], farray[i]);\n }\n break;\n\n case DataBuffer.TYPE_DOUBLE:\n\n double[] darray = (double[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElemDouble(bankIndices[i], pixelOffset + bandOffsets[i], darray[i]);\n }\n break;\n\n }\n }", "protected void update(byte[] b, int off, int len) {\n/* 56 */ for (int i = off; i < off + len; i++) {\n/* 57 */ update(b[i]);\n/* */ }\n/* */ }", "public int update (Section section) throws DataAccessException;", "public abstract void update(DataAction data, DataRequest source) throws ConnectorOperationException;", "public void update() {\n\t\tfor (byte r = 0; r < b.length; r++) {\n\t\t\tfor (byte c = 0; c < b[r].length; c++) {\n\t\t\t\tb[r][c].update(this);\n\t\t\t}\n\t\t}\n\t}", "public void updateOnCtWindowChange() {\n int[] displayImageData = resolveRaw(imgData[currentLayer]);\n raster.setPixels(0, 0, imgWidth, imgHeight, displayImageData);\n image.setData(raster);\n }", "abstract public String updateData(String userId, String resourceName, long lastUpdate) throws IOException;", "public synchronized void updateData(final Function<Table<?>, Result<? extends Record>> fetcher) {\n updateDataFields(fetcher);\n }", "protected void updateLocalData(Building[] data){\n new DBHandler(cx).updateBuildings(data);\n }", "public void update() {\n\t\t//Start updting the image\n\t\timg.loadPixels();\n\t\t\n\t\t//for every cell apply a color\n\t\tGridCell[] cells = grid.getCells();\n\t\tfor(int i = 0 ; i < cells.length; i++) {\n\t\t\timg.pixels[i] = cells[i].getMiniMapColor(ignoreDiscovered);\n\t\t}\n\t\t\n\t\t//Now update the image\n\t\timg.updatePixels();\n\t}", "@Test\n\tpublic void testSetSliceWithoutUpdate() {\n\t}", "public void updateDimensions() {\n }", "abstract void update(int i);", "public void update(long timestamp, double[] data)\n { \n \tlock.AcquireWrite();\n \ttry {\n \t\tif (timestamp > time) {\n \t\t\tif (this.data == null)\n \t\t\t\tthis.data = new double[data.length];\n \t\t\ttime = timestamp;\n \t\t\tfor (int i=0; i<data.length;++i)\n \t\t\t\tthis.data[i]= data[i];\n \t\t}\n \t}\n \tfinally{\n \t\tlock.ReleaseWrite();\n \t}\n }", "public void updatePlayerdata(float[] d) { //6 floats\r\n\t\tint player = (int) d[5];\r\n\t\tdata[player] = d; //updates player values in data[][]\r\n\t\tmoved[player] = true;\r\n\t\tplayers[player].setX(d[0]);\r\n\t\tplayers[player].setY(d[1]);\r\n\t\tplayers[player].setXVelocity(d[2]);\r\n\t\tplayers[player].setYVelocity(d[3]);\r\n\t\tplayers[player].setTheta(d[4]);\r\n\t\t\r\n\t}", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "void update(byte[] data)\n\t{\n\t\tObservableList<Row> a = FXCollections.observableArrayList();\n\n\t\tint srcIndex = 0;\n\t\twhile (srcIndex < data.length){\n\t\t\tbyte[] rowBytes = Arrays.copyOfRange(data, srcIndex, srcIndex + NUM_COLUMNS);\n\t\t\ta.add(new Row(rowBytes));\n\t\t\tsrcIndex += NUM_COLUMNS;\n\t\t}\n\t\tsetItems(a);\n\t}", "public void updateOnMaskChange() {\n if(maskList != null) {\n int[] displayMaskData = resolveMasks();\n maskRaster.setDataElements(0, 0, imgWidth, imgHeight, displayMaskData);\n maskImage.setData(maskRaster);\n }\n }", "@Override\r\n\tpublic void update(String[] getdata) {\n\r\n\t}", "public void handler(int offset, int data)\n\t{\n\t\tif (sprite_overdraw_enabled != (data & 1))\n\t\t{\n\t\t\tsprite_overdraw_enabled = data & 1;\n\t\t\tfillbitmap(bitmap_sp, 15, Machine . visible_area);\n\t\t}\n\t}", "public void updateData(Trick completedTrick);", "public void update(byte[] b, int off, int len) {\n if (b == null) {\n throw new NullPointerException();\n }\n if (off < 0 || len < 0 || off > b.length - len) {\n throw new ArrayIndexOutOfBoundsException();\n }\n updateBytes(b, off, len);\n }", "private void updateImage() {\r\n\r\n final BufferedImage image = imageCanvas.getImage();\r\n\r\n //\r\n // no image, no size\r\n\r\n if (image == null) {\r\n imageCanvas.setPreferredSize(new Dimension(0, 0));\r\n }\r\n\r\n else {\r\n\r\n final int imageWidth = image.getWidth();\r\n final int imageHeight = image.getHeight();\r\n\r\n //\r\n // if zoom is set to real size there is no need for calculations\r\n\r\n if (zoom == ZOOM_REAL_SIZE) {\r\n imageCanvas.setPreferredSize(new Dimension(imageWidth, imageWidth));\r\n }\r\n\r\n //\r\n // apply the zoom ratio to the image size\r\n\r\n else {\r\n\r\n final double ratio = ((double) zoom) / ((double) ZOOM_REAL_SIZE);\r\n\r\n final double imageCanvasMaxWidth = ((double) imageWidth) * ratio;\r\n final double imageCanvasMaxHeight = ((double) imageHeight) * ratio;\r\n\r\n imageCanvas.setPreferredSize(new Dimension((int) imageCanvasMaxWidth, (int) imageCanvasMaxHeight));\r\n }\r\n }\r\n\r\n //\r\n // revalidation\r\n // do not use #revaliade() method, validation will occur after all currently\r\n // pending events have been dispatched, use invalidate/validate/repaint\r\n\r\n imageCanvas. invalidate();\r\n imageCanvas.validate();\r\n imageCanvas.repaint();\r\n \r\n// imageCanvas.revalidate();\r\n \r\n invalidate();\r\n validate();\r\n repaint();\r\n\r\n// revalidate();\r\n \r\n //\r\n // this is the best place to update the cursor\r\n // since all actions on the image will call this method\r\n\r\n updateCursor(false);\r\n }", "public void loadImageData(int[][] data, int width, int height, CTWindow ctWindow, String orientation) {\n assert data != null;\n imgData = data;\n maxLayerIndex = imgData.length - 1;\n assert width > 0 && height > 0 && width * height == data[0].length;\n imgWidth = width;\n imgHeight = height;\n currentLayer = 0;\n this.ctWindow = ctWindow;\n image = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_GRAY);\n raster = (WritableRaster) image.getData();\n assert ORIENT_FRONT.equals(orientation) || ORIENT_BOTTOM.equals(orientation) || ORIENT_RIGHT.equals(orientation);\n this.orientation = orientation;\n maskImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n maskRaster = (WritableRaster) maskImage.getData();\n // set initial layer to middle\n changeLayer(data.length / 2);\n }", "public void onDataChanged(IData data) {\r\n\t this.data = data;\r\n\t repaint();\r\n\t}", "SliceDto updateSliceDto(final SliceDto registeredSlice, final Integer nBandWidth, final Integer nLatency) {\n\t\tint nTotalFlowIdx = 0;\n\t\tint portNo = CE_PORT_NO_OFFSET;\n\t\tSliceDto sliceDto = new SliceDto();\n\t\tsliceDto.id = registeredSlice.id;\n\t\tsliceDto.flows = new ArrayList<FlowDto>();\n\t\tfor (FlowDto flow : registeredSlice.flows) {\n\t\t\tString flowName = String.format(\"flow%08d\", nTotalFlowIdx);\n\t\t\tFlowDto updateFlow = createRequestFlowDto(flowName, portNo, nBandWidth, nLatency);\n\t\t\tupdateFlow.type = \"mod\";\n\t\t\tupdateFlow.id = flow.id;\n\t\t\tsliceDto.flows.add(updateFlow);\n\t\t\tnTotalFlowIdx += 1;\n\t\t\tportNo += 1;\n\t\t}\n\t\treturn sliceDto;\n\t}", "public void update(byte[] input, int inOff, int length) {\n digest.update(input, inOff, length);\n }", "@Override \n protected void engineUpdate(byte[] input, int offset, int len) {\n for (int index = offset; index < offset + len; index++) \n engineUpdate(input[index]); \n }", "public void dataUpdateEvent();", "public void update(double[] point) {\n checkNotNull(point, \"point must not be null\");\n checkArgument(point.length == dimensions, String.format(\"point.length must equal %d\", dimensions));\n executor.update(point);\n }", "@Override\n\tpublic boolean imageUpdate(Image arg0, int arg1, int arg2, int arg3, int arg4, int arg5) {\n\t\treturn false;\n\t}", "public void update(ImageObject nImage) { \r\n selectedImage = nImage;\r\n \r\n update();\r\n }", "public void onDataChanged(IData data) {\r\n\tthis.canvas.onDataChanged(data);\r\n }", "public void setSubImage(int index, RenderedImage image,\n\t\t\t\tint width, int height,\n int srcX, int srcY, int dstX, int dstY) {\n if (isLiveOrCompiled() &&\n !this.getCapability(ALLOW_IMAGE_WRITE)) {\n throw new CapabilityNotSetException(\n J3dI18N.getString(\"ImageComponent3D5\"));\n }\n\n if (((ImageComponent3DRetained)this.retained).isByReference()) {\n throw new IllegalStateException(\n J3dI18N.getString(\"ImageComponent3D8\"));\n }\n\n int w = ((ImageComponent3DRetained)this.retained).getWidth();\n int h = ((ImageComponent3DRetained)this.retained).getHeight();\n\n if ((srcX < 0) || (srcY < 0) ||\n ((srcX + width) > w) || ((srcY + height) > h) ||\n (dstX < 0) || (dstY < 0) ||\n ((dstX + width) > w) || ((dstY + height) > h)) {\n throw new IllegalArgumentException(\n J3dI18N.getString(\"ImageComponent3D7\"));\n }\n\n ((ImageComponent3DRetained)this.retained).setSubImage(\n index, image, width, height, srcX, srcY, dstX, dstY);\n }", "public void updateField() {\n\n boolean[][] tempField = new boolean[getLength()][getHeight()];\n for (int y = 0; y < getHeight(); y++) {\n for (int x = 0; x < getLength(); x++) {\n tempField[x][y] = checkSurrounding(x, y);\n }\n }\n setFields(tempField);\n }", "private void updateFrame(@NotNull final BaseInterpolationData data, @NotNull final ParticleData particleData) {\n\n final ParticleEmitterNode emitterNode = particleData.getEmitterNode();\n\n if (frameSequence == null) {\n\n particleData.spriteCol++;\n\n if (particleData.spriteCol == emitterNode.getSpriteColCount()) {\n particleData.spriteCol = 0;\n particleData.spriteRow++;\n\n if (particleData.spriteRow == emitterNode.getSpriteRowCount()) {\n particleData.spriteRow = 0;\n }\n }\n\n } else {\n\n data.index++;\n\n if (data.index == frameSequence.length) {\n data.index = 0;\n }\n\n final int frame = frameSequence[data.index];\n\n particleData.spriteRow = (int) FastMath.floor(frame / emitterNode.getSpriteRowCount()) - 2;\n particleData.spriteCol = frame % emitterNode.getSpriteColCount();\n }\n\n data.interval -= targetInterval;\n }", "public void update() {\n\t\tgetLocation().offsetX(getDirection().getXOffset());\n\t\tgetLocation().offsetY(getDirection().getYOffset());\n\t\t\n\t\tChunk center = World.getMap().getCenterChunk();\n\t\t\n\t\tint localX = (int) (getLocation().getX() - center.getData().getRealX());\n\t\tint localY = (int) (getLocation().getY() - center.getData().getRealY());\n\t\t\n\t\tif(localX < 0 ||localY< 0\n\t\t\t|| localX > 256 || localY > 256) {\n\t\t\t\tWorld.getMap().load(getLocation());\n\t\t}\n\t}", "SliceDto operate(SliceDataManager sliceDataManager, SliceDto reqSliceDto) throws MloClientException;", "public synchronized void update(@NonNull INDArray array) {\n Preconditions.checkArgument(!array.isView() || array.elementWiseStride() != 1, \"View can't be used in DeviceLocalNDArray\");\n\n val numDevices = Nd4j.getAffinityManager().getNumberOfDevices();\n val device = Nd4j.getAffinityManager().getDeviceForCurrentThread();\n val currentArray = backingMap.get(device);\n boolean wasDelayed = false;\n\n if (Arrays.equals(currentArray.shapeInfoJava(), array.shapeInfoJava())) {\n // if arrays are the same - we'll just issue memcpy\n for (int k = 0; k < numDevices; k++) {\n val lock = locksMap.get(k);\n try {\n lock.writeLock().lock();\n val v = backingMap.get(k);\n if (v == null) {\n if (!wasDelayed) {\n delayedArray = array.dup(array.ordering()).detach();\n wasDelayed = true;\n }\n updatesMap.get(k).set(device);\n continue;\n }\n\n Nd4j.getMemoryManager().memcpy(v.data(), array.data());\n Nd4j.getExecutioner().commit();\n } finally {\n lock.writeLock().unlock();\n }\n }\n } else {\n // if arrays are not the same - we'll issue broadcast call\n broadcast(array);\n }\n }", "private void updateReceivedData(byte[] data) {\n }", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public static void swapSlices(final double[] rdata, final double[] idata, final int xdim, final int ydim,\r\n final int zdim, final int plane) {\r\n int[] indices = null;\r\n final int sliceLength = xdim * ydim;\r\n\r\n if (plane == AlgorithmFFT2.SLICE_XY) {\r\n indices = AlgorithmFFT2.generateFFTIndices(zdim);\r\n double rtemp, itemp;\r\n for (int i = 0; i < indices.length; i++) {\r\n if (indices[i] < 0 || indices[indices[i]] == indices[i]) {\r\n continue;\r\n }\r\n for (int j = 0; j < sliceLength; j++) {\r\n rtemp = rdata[indices[i] * sliceLength + j];\r\n itemp = idata[indices[i] * sliceLength + j];\r\n rdata[indices[i] * sliceLength + j] = rdata[indices[indices[i]] * sliceLength + j];\r\n idata[indices[i] * sliceLength + j] = idata[indices[indices[i]] * sliceLength + j];\r\n rdata[indices[indices[i]] * sliceLength + j] = rtemp;\r\n idata[indices[indices[i]] * sliceLength + j] = itemp;\r\n }\r\n indices[indices[i]] = -1;\r\n indices[i] = -1;\r\n }\r\n } else if (plane == AlgorithmFFT2.SLICE_YZ) {\r\n indices = AlgorithmFFT2.generateFFTIndices(xdim);\r\n double rtemp, itemp;\r\n final int step = xdim;\r\n for (int i = 0; i < indices.length; i++) {\r\n if (indices[i] < 0 || indices[indices[i]] == indices[i]) {\r\n continue;\r\n }\r\n int index1 = indices[i];\r\n int index2 = indices[indices[i]];\r\n indices[indices[i]] = -1;\r\n indices[i] = -1;\r\n\r\n while (index1 < xdim * ydim * zdim) {\r\n rtemp = rdata[index1];\r\n itemp = idata[index1];\r\n rdata[index1] = rdata[index2];\r\n idata[index1] = idata[index2];\r\n rdata[index2] = rtemp;\r\n idata[index2] = itemp;\r\n index1 += step;\r\n index2 += step;\r\n }\r\n }\r\n } else if (plane == AlgorithmFFT2.SLICE_ZX) {\r\n indices = AlgorithmFFT2.generateFFTIndices(ydim);\r\n double rtemp, itemp;\r\n for (int i = 0; i < indices.length; i++) {\r\n if (indices[i] < 0 || indices[indices[i]] == indices[i]) {\r\n continue;\r\n }\r\n for (int j = 0; j < zdim; j++) {\r\n for (int k = 0; k < xdim; k++) {\r\n rtemp = rdata[k + indices[i] * ydim + sliceLength * j];\r\n itemp = idata[k + indices[i] * ydim + sliceLength * j];\r\n rdata[k + indices[i] * ydim + sliceLength * j] = rdata[k + indices[indices[i]] * ydim\r\n + sliceLength * j];\r\n idata[k + indices[i] * ydim + sliceLength * j] = idata[k + indices[indices[i]] * ydim\r\n + sliceLength * j];\r\n rdata[k + indices[indices[i]] * ydim + sliceLength * j] = rtemp;\r\n idata[k + indices[indices[i]] * ydim + sliceLength * j] = itemp;\r\n }\r\n }\r\n indices[indices[i]] = -1;\r\n indices[i] = -1;\r\n }\r\n } else {\r\n throw new IllegalArgumentException(\"The value of variable plane is illeagal: \" + plane);\r\n }\r\n }", "public native void replaceData(double offset, double count, String arg) /*-{\r\n\t\tvar jso = [email protected]::getJsObj()();\r\n\t\tjso.replaceData(offset, count, arg);\r\n }-*/;", "@Override\n\tpublic void update(float[] val) {\n\t\t\n\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "public void updateDrawing() {\n\n\t\tdrawingContainer.setDrawing(controller.getDrawing());\n\t\tscrollpane.setPreferredSize(new Dimension(drawingContainer\n\t\t\t\t.getPreferredSize().width + 100, drawingContainer\n\t\t\t\t.getPreferredSize().height + 100));\n\t\tpack();\n\t\trepaint();\n\t}", "public void set(int index, RenderedImage image) {\n\n checkForLiveOrCompiled();\n // For RenderedImage the width and height checking is done in the retained.\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "@Override\n public void update(byte[] in, int off, int len) {\n digest.update(in, off, len);\n }", "public void updatePainter(Painter painter);", "public void updateLocation()\r\n {\r\n\t\timg.setUserCoordinator(latitude, longitude);\r\n\t\timg.invalidate();\r\n\t}", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public VectorFieldSliceRenderer2D(ImageData img,\r\n\t\t\tVisualizationProcessing applet) {\r\n\t\tsuper(img, applet);\r\n\t\tif (img.getComponents() < 2) {\r\n\t\t\tslices = 1;\r\n\t\t} else {\r\n\t\t\tslice = slices / 2;\r\n\t\t}\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "private void run3D() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBuffer[];\r\n float resultBuffer[];\r\n float gaussianBuffer[];\r\n float gradientBuffer[];\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n sourceBuffer = new float[length];\r\n resultBuffer = new float[length];\r\n gaussianBuffer = new float[length];\r\n gradientBuffer = new float[length];\r\n } catch (OutOfMemoryError e){\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n srcImage.exportData(0, length, sourceBuffer);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n algoSepConvolver = new AlgorithmSeparableConvolver(gaussianBuffer, sourceBuffer,\r\n extents, xDataRound, yDataRound, zDataRound, srcImage.isColorImage());\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) / (numIterations - 1) * 100)), activeImage);\r\n }\r\n\r\n algoSepConvolver.run();\r\n gradientMagnitude3D(gaussianBuffer, gradientBuffer);\r\n upDateImage3D(resultBuffer, sourceBuffer, gradientBuffer);\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n for (int i = 0; i < length; i++) { sourceBuffer[i] = resultBuffer[i]; }\r\n }\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n algoSepConvolver.finalize();\r\n algoSepConvolver = null;\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n destImage.importData(0, resultBuffer, true);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public void imageUpdate() {\n this.notifyDataSetChanged();\n }", "public void setImageData(byte[] imageData) {\n if (tile != null) {\n tile.setImageData(imageData);\n } else {\n this.data = imageData;\n }\n }", "protected abstract void update();", "protected abstract void update();", "protected int\n engineUpdate (byte[] in, int inOffset, int inLen, byte[] out, int outOffset) {\n byte[] temp = des1.update(in, inOffset, inLen);\n des2.update(temp, 0, temp.length, temp, 0);\n return des3.update(temp, 0, temp.length, out, outOffset);\n }", "private void updateDataFields(final Function<Table<?>, Result<? extends Record>> fetcher) {\n final long updateData = System.nanoTime();\n for (final Map.Entry<Table<? extends Record>, IRTable> entry : jooqTableToIRTable.entrySet()) {\n final Table<? extends Record> table = entry.getKey();\n final IRTable irTable = entry.getValue();\n final long start = System.nanoTime();\n final Result<? extends Record> recentData = fetcher.apply(table);\n Objects.requireNonNull(recentData, \"Table Result<?> was null\");\n final long select = System.nanoTime();\n irTable.updateValues(recentData);\n final long updateValues = System.nanoTime();\n LOG.info(\"updateDataFields for table {} took {} ns to fetch {} rows from DB, \" +\n \"and {} ns to reflect in IRTables\",\n table.getName(), (select - start), recentData.size(), (System.nanoTime() - updateValues));\n }\n compiler.updateData(irContext, backend);\n LOG.info(\"compiler.updateData() took {}ns to complete\", (System.nanoTime() - updateData));\n }", "LocalMaterialData withBlockData(int newData);", "private void reanderImage(ImageData data) {\n \n }", "abstract protected DataValue updateValue(String key);", "public abstract float scaleIntensityData(float rawData, int mid, int gid,\n int sampleNbr);", "public void update() {\n\t\tupdateParticles();\n\t\tupdateSprings();\n\n\t\tif (groups != null) {\n\t\t\tfor (VParticleGroup g : groups) {\n\t\t\t\tg.update();\n\t\t\t}\n\t\t}\n\t}", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "@Override\n\tpublic void update() {\n\n\t\t// Update camera coordinates based off of the width and height.\n\t\tif (cameraStalk != null) {\n\t\t\tint width = dc.getWidth();\n\t\t\tint height = dc.getHeight();\n\n\t\t\tcamera[0] = cameraStalk.coor_x - (width - m.cellWidth) / 2;\n\t\t\tcamera[1] = cameraStalk.coor_y - (height - m.cellHeight) / 2;\n\t\t\tif (camera[0] < 0) {\n\t\t\t\tcamera[0] = 0;\n\t\t\t} else {\n\t\t\t\tint x;\n\t\t\t\tif (camera[0] > (x = m.mapWmax - width + m.cellWidth)) {\n\t\t\t\t\tcamera[0] = x;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (camera[1] < 0) {\n\t\t\t\tcamera[1] = 0;\n\t\t\t} else {\n\t\t\t\tint y;\n\t\t\t\tif (camera[1] > (y = m.mapHmax - height + m.cellHeight)) {\n\t\t\t\t\tcamera[1] = y;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Draw in the background.\n\t\tif (background != NullImg.getInstance()) {\n\t\t\tint bg_width = background.getWidth();\n\t\t\tint bg_height = background.getHeight();\n\t\t\t// The offset of the image must decrease as the camera's position\n\t\t\t// increases.\n\t\t\tfor (int x = (-camera[0] % -bg_width); x < dc.getWidth(); x += bg_width) {\n\t\t\t\tfor (int y = (-camera[1] % -bg_height); y < dc\n\t\t\t\t\t\t.getHeight(); y += bg_height) {\n\t\t\t\t\tbackground.drawSlide(x, y, dc);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Update all objects.\n\t\tif (update) {\n\t\t\tfor (SimpleObject s = m.getDrawBegin(); s != null; s = s.updateNext) {\n\t\t\t\ts.newUpdate();\n\t\t\t}\n\t\t}\n\n\t\t// Paint all objects.\n\t\tfor (SimpleObject s = m.getDrawBegin(); s != null; s = s.drawNext) {\n\t\t\ts.updateNext = s.drawNext;\n\t\t\ts.i.drawSlide(s.coor_x + s.off[0] - camera[0], s.coor_y + s.off[1]\n\t\t\t\t\t- camera[1], dc);\n\t\t}\n\n\t\t// Update the world object last.\n\t\tswo.update();\n\t\tdc.paint();\n\t}", "public void derivative3p1o(ImagePlus img, ImageStack stack, int width, int height, int slices, int mul){\r\n\t\t\r\n\t\tImageProcessor resIp = img.getProcessor();\r\n\r\n\t\tfloat f_[] = new float[slices+1];\r\n\t\tfloat out[] = new float[slices+1];\r\n\r\n\t\tfor(int x = 0; x < height; x++){\r\n\t\t\tfor(int y = 0 ; y < width; y++){\r\n\t\t\t\t\tfor(int z=1;z<slices+1;z++){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresIp = stack.getProcessor(z);\r\n\t\t\t\t\t\tf_[z] = resIp.getf(x,y);\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\tfor(int w=2;w<slices;w++){\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tout[w] = mul * ((-1*f_[w-1] + 0* f_[w] + f_[w+1])/2);\r\n\t\t\t\t\t\tresIp = stack.getProcessor(w);\r\n\t\t\t\t\t\tresIp.setf(x,y,out[w]);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(1);\r\n\t\t\t\t\tout[1] = mul * ((-3*f_[1]+4*f_[1+1]-1*f_[1+2])/2);\r\n\t\t\t\t\tresIp.setf(x,y,(out[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(slices);\r\n\t\t\t\t\tout[slices] = mul * ((f_[slices-2]-4*f_[slices-1] + 3*f_[slices])/2);\r\n\t\t\t\t\tresIp.setf(x,y,(out[slices]));\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public void update()\n {\n if(x + image.getWidth(null) < 0)\n {\n x = 0;\n }\n else\n {\n x--;\n }\n }", "public void update(byte[] block, int startIndex, int endIndex) {\n this.block = block;\n for (int i = startIndex; i <= endIndex; i++) {\n first16Bit += block[i];\n }\n first16Bit %= Constants.MOD_M;\n for (int j = startIndex; j <= endIndex; j++) {\n second16Bit += ((endIndex - j + 1) * block[j]);\n }\n second16Bit %= Constants.MOD_M;\n }", "@Override\n\tprotected void updateDataFromRead(CountedData counter, final GATKSAMRecord gatkRead, final int offset, final byte refBase) {\n Object[][] covars;\n\t\ttry {\n\t\t\tcovars = (Comparable[][]) gatkRead.getTemporaryAttribute(getCovarsAttribute());\n\t\t\t// Using the list of covariate values as a key, pick out the RecalDatum from the data HashMap\n\t NestedHashMap data;\n\t data = dataManager.data;\n\t final Object[] key = covars[offset];\n\t\t\tBisulfiteRecalDatumOptimized datum = (BisulfiteRecalDatumOptimized) data.get( key );\n\t if( datum == null ) { // key doesn't exist yet in the map so make a new bucket and add it\n\t // initialized with zeros, will be incremented at end of method\n\t datum = (BisulfiteRecalDatumOptimized)data.put( new BisulfiteRecalDatumOptimized(), true, (Object[])key );\n\t }\n\n\t // Need the bases to determine whether or not we have a mismatch\n\t final byte base = gatkRead.getReadBases()[offset];\n\t final long curMismatches = datum.getNumMismatches();\n\t final byte baseQual = gatkRead.getBaseQualities()[offset];\n\n\t // Add one to the number of observations and potentially one to the number of mismatches\n\t datum.incrementBaseCounts( base, refBase, baseQual );\n\t increaseCountedBases(counter,1);\n\t\t\tincreaseNovelCountsBases(counter,1);\n\t\t\tincreaseNovelCountsMM(counter,(datum.getNumMismatches() - curMismatches));\n\t \n\t\t} catch (IllegalArgumentException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n //counter.novelCountsBases++;\n \n //counter.novelCountsMM += datum.getNumMismatches() - curMismatches; // For sanity check to ensure novel mismatch rate vs dnsnp mismatch rate is reasonable\n \n }", "public void update(int delta)\r\n/* 103: */ throws SlickException\r\n/* 104: */ {\r\n/* 105:117 */ this.highlight = new int[getWidthInTiles()][getHeightInTiles()];\r\n/* 106: */ \r\n/* 107:119 */ super.update(delta);\r\n/* 108: */ }" ]
[ "0.7169478", "0.67070466", "0.6043746", "0.5419386", "0.53612196", "0.51907533", "0.5166817", "0.5138923", "0.50920665", "0.5039216", "0.50171757", "0.49662423", "0.49557495", "0.49511752", "0.48887807", "0.48502272", "0.4847328", "0.48057723", "0.48055807", "0.47259003", "0.47194576", "0.47175962", "0.46751574", "0.46439105", "0.46422324", "0.4615323", "0.4597711", "0.4584118", "0.45505342", "0.4540715", "0.45155105", "0.44943595", "0.44896686", "0.44739702", "0.4452345", "0.4445055", "0.44183797", "0.44163045", "0.4401011", "0.43974122", "0.4370042", "0.43620718", "0.43597984", "0.43561897", "0.4353207", "0.4349503", "0.4348738", "0.4338454", "0.43378592", "0.433098", "0.43303353", "0.43232512", "0.43165973", "0.43153125", "0.42929488", "0.4284279", "0.42820978", "0.42758727", "0.42753395", "0.42639393", "0.4250588", "0.42291126", "0.42149135", "0.42139828", "0.42135796", "0.42103162", "0.42087796", "0.4207678", "0.42018104", "0.42005518", "0.41978255", "0.419544", "0.41787446", "0.41787446", "0.4177047", "0.41736045", "0.4172794", "0.4164719", "0.4164017", "0.41564125", "0.4143022", "0.41358763", "0.4134536", "0.41324043", "0.41297677", "0.41297677", "0.41181704", "0.4105198", "0.40962672", "0.40927297", "0.40921193", "0.40918586", "0.40862462", "0.40839687", "0.4083477", "0.40829813", "0.4075231", "0.40675554", "0.40628153", "0.40617204" ]
0.6808289
1
Creates a retained mode ImageComponent3DRetained object that this ImageComponent3D component object will point to.
@Override void createRetained() { this.retained = new ImageComponent3DRetained(); this.retained.setSource(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ImageComponent3D() {}", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "public ImageComponent3D(int\t\tformat,\n\t\t\t int\t\twidth,\n\t\t\t int\t\theight,\n\t\t\t int\t\tdepth,\n\t\t\t boolean\tbyReference,\n\t\t\t boolean\tyUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format, width, height, depth);\n }", "public three_d_object(int ob_x, int ob_y, int ob_z, int new_ob_size, int new_ob_rotation_X,\n\t\t\t\t\tint new_ob_rotation_Y) {\n\t\t\t\tx = ob_x;\n\t\t\t\ty = ob_y;\n\t\t\t\tz = ob_z;\n\t\t\t\tob_size = new_ob_size;\n\t\t\t\trotation_X = new_ob_rotation_X;\n\t\t\t\trotation_Y = new_ob_rotation_Y;\n\n\t\t\t}", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public J3DAttribute () {}", "public ImageComponent3D(int format, BufferedImage[] images) {\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\t\timages[0].getWidth(null), images[0].getHeight(null), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "@Override\n\tpublic boolean is3D() {\n\t\treturn true;\n\t}", "@Override\n void duplicateAttributes(NodeComponent originalNodeComponent,\n\t\t\t boolean forceDuplicate) {\n super.duplicateAttributes(originalNodeComponent, forceDuplicate);\n // TODO : Handle NioImageBuffer if its supported.\n RenderedImage imgs[] = ((ImageComponent3DRetained)\n\t\t\t originalNodeComponent.retained).getImage();\n\n if (imgs != null) {\n\t ImageComponent3DRetained rt = (ImageComponent3DRetained) retained;\n\n\t for (int i=rt.depth-1; i>=0; i--) {\n\t if (imgs[i] != null) {\n\t\t rt.set(i, imgs[i]);\n\t }\n\t }\n }\n }", "public ImageComponent3D(int format, RenderedImage[] images) {\n\n ((ImageComponent3DRetained)this.retained).processParams(format,\n\timages[0].getWidth(), images[0].getHeight(), images.length);\n for (int i=0; i<images.length; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "public boolean is3D() {\n return _is3D;\n }", "protected AbstractMatrix3D() {}", "@DISPID(1611005964) //= 0x6006000c. The runtime will prefer the VTID if present\n @VTID(40)\n void newWith3DSupport(\n boolean o3DSupportCreated);", "public static JTensor newWithStorage3d(\n JStorage storage, long storageOffset,\n long size0, long stride0,\n long size1, long stride1,\n long size2, long stride2) {\n return new JTensor(\n TH.THTensor_(newWithStorage3d)(storage, storageOffset,\n size0, stride0, size1, stride1, size2, stride2)\n );\n }", "public Plane3(Plane3 p) {\n this.a = p.a; this.b = p.b; this.c = p.c; this.v = p.v; this.d = p.d;\n }", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "public Vec3(Vec3 copy){\n\t\tthis(copy.x, copy.y, copy.z);\n\t}", "public Vertex3D(Vertex3D c) {\n this(c.x, c.y, c.z);\n }", "public Vec3D() {\n\t\tx = y = z = 0.0f;\n\t}", "public Point3(Point3 p) {\n this.x = p.x; this.y = p.y; this.z = p.z;\n }", "public Project3() {\n\t\tcreateComponent();\n\t\twireComponent();\n\t}", "public static D3 getInstance() {\n \n if(instance == null) {\n instance = new D3();\n }\n \n return instance;\n }", "public Restart3() {\n getImage().scale(200,80);\n }", "public Point3D(Point3D point) {\n\t this.x = point.x;\n\t this.y = point.y;\n\t this.z = point.z;\n }", "public Vector3 clone(){\r\n\t\tVector3 vec = new Vector3();\r\n\t\tvec.set(this.x, this.y, this.z);\r\n\t\treturn vec;\r\n\t}", "public ViewerPosition3D()\n {\n }", "@DISPID(1611005964) //= 0x6006000c. The runtime will prefer the VTID if present\n @VTID(39)\n boolean newWith3DSupport();", "public static Vect3 mk(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "private D3() {\n super(3);\n }", "public BoundingBox3d() {\n reset();\n }", "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "public Builder clearC3() {\n bitField0_ = (bitField0_ & ~0x00000002);\n c3_ = getDefaultInstance().getC3();\n onChanged();\n return this;\n }", "public Vertex3D() {\n this(0.0, 0.0, 0.0);\n }", "public Pj3dObj Pj3dObj(String file)\r\n\t{\r\n \tPj3dObj obj = new Pj3dObj(this, file);\r\n\t\treturn obj;\r\n\t}", "public Vec3 toVec3()\n {\n return Vec3.createVectorHelper(this.x, this.y, this.z);\n }", "public Pj3dPlane Pj3dPlane(int x, int z)\r\n\t{\r\n \tPj3dPlane plane = new Pj3dPlane(this, x, z);\r\n\t\treturn plane;\r\n\t}", "public static Coordinate create3D(double x, double y, double z) {\r\n return new Coordinate(x, y, z, Double.NaN);\r\n }", "public Vector3D(float x, float y, float z)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.z = z;\r\n\t}", "public BufferedImage[] getImage() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage();\n }", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public Constructor3DAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = Constructor3DPackage.eINSTANCE;\n\t\t}\n\t}", "public FMOD_OUTPUT_OBJECT3DINFO set(FMOD_OUTPUT_OBJECT3DINFO src) {\n memCopy(src.address(), address(), SIZEOF);\n return this;\n }", "public Vector3<T> build() {\n return new Vector3<>(x, y, z);\n }", "public\n\tVector3( Point3 point )\n\t{\n\t\tdata = new double[3];\n\t\tcopy( point );\n\t}", "public r3inputlayer(double[] inputarray, int depth){\r\n double[][][] newarray = new double[inputarray.length][1][depth + 2];\r\n for(int i = 0; i < inputarray.length; i++){\r\n newarray[i][0][0] = inputarray[i];\r\n }\r\n this.state = newarray;\r\n this.width = inputarray.length;\r\n }", "public Vector3D(double x, double y, double z) {\n this.xCoord = x;\n this.yCoord = y;\n this.zCoord = z;\n }", "public CMLVector3() {\r\n }", "public AffineTransform3D() {\r\n\t\tthis.M11 = 1;\r\n\t\tthis.M12 = 0;\r\n\t\tthis.M13 = 0;\r\n\t\tthis.M14 = 0;\r\n\t\tthis.M21 = 0;\r\n\t\tthis.M22 = 1;\r\n\t\tthis.M23 = 0;\r\n\t\tthis.M24 = 0;\r\n\t\tthis.M31 = 0;\r\n\t\tthis.M32 = 0;\r\n\t\tthis.M33 = 1;\r\n\t\tthis.M34 = 0;\r\n\t\tthis.M41 = 0;\r\n\t\tthis.M42 = 0;\r\n\t\tthis.M43 = 0;\r\n\t\tthis.M44 = 1;\r\n\t}", "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "public X3DObject getX3dModel()\n {\t \n\t return x3dModel;\n }", "public static final PS3 create(int index){\n if( !libraryLoaded() ){\n System.out.println(\"PS3-ERROR: cannot create camera, dll not loaded\");\n return null;\n }\n \n PS3_Library.GUID guid = LIBRARY.CLEyeGetCameraUUID( index );\n if( guid.Data1 == 0){\n System.out.println(\"PS3-ERROR: index(\"+index+\") is not valid\");\n return null;\n }\n return new PS3(index, guid);\n }", "@Override\n\tpublic EuclidianView3D getEuclidianView3D() {\n\t\tif (this.euclidianView3D == null) {\n\t\t\tinitEuclidianController3D();\n\t\t\tif (euclidianController3D.hasInput3D()) {\n\t\t\t\teuclidianView3D = new EuclidianViewInput3D(\n\t\t\t\t\t\teuclidianController3D, getSettings().getEuclidian(3));\n\t\t\t} else {\n\t\t\t\teuclidianView3D = new EuclidianView3DD(euclidianController3D,\n\t\t\t\t\t\tgetSettings().getEuclidian(3));\n\t\t\t}\n\t\t}\n\t\treturn euclidianView3D;\n\t}", "public MRG32k3a clone() {\n MRG32k3a retour = null;\n\n retour = (MRG32k3a)super.clone();\n retour.Bg = new double[6];\n retour.Ig = new double[6];\n for (int i = 0; i<6; i++) {\n retour.Bg[i] = Bg[i];\n retour.Ig[i] = Ig[i];\n }\n return retour;\n }", "public CMLVector3(double[] array) {\r\n this.setXYZ3(array);\r\n }", "public BranchGroup InitPj3d(int mWinWidth, int mWinHeight)\r\n\t{\t\r\n\t\t//toolbox = new PJ3DToolbox();\r\n\t\tsetLayout( new BorderLayout( ) );\r\n\t\t//parent.width = 640;\r\n\t\t//parent.resize(640, 480);\r\n\r\n\t\t//Frame frame = new Frame(\"pj3d\");\r\n\t frame.pack();\r\n\t frame.show();\r\n\t frame.setSize(mWinWidth, mWinHeight);\r\n\r\n\t GraphicsConfiguration gc = parent.getGraphicsConfiguration();\r\n\t \r\n\t // default colors\r\n\t backgroundColor = new Color3f(0f, 0f, 0f);\r\n\t ambientColor = new Color3f(0.2f, 0.2f, 0.2f);\r\n\t diffuseColor = new Color3f(0.8f, 0.8f, 0.8f);\r\n\t emissiveColor = new Color3f(0.5f, 0.5f, 0.5f);\r\n\t specularColor = new Color3f(1.0f, 1.0f, 1.0f);\r\n\t textColor = new Color3f(0.5f, 0.5f, 0.5f);\r\n\t shininess = DEFAULTCOLOR;\r\n\t alpha = 0.0f;\r\n\t \r\n\t // default background um spaeter drauf zugreifen zu koennen\r\n\t //bg = new Background();\r\n\t bg = InitBackground();\r\n\t \r\n\t mb = new Pj3dScene(frame, gc, bg);\r\n\t branch = mb.InitBranch();\r\n\t \r\n\t // get the canvas3d to add the mouse and keylisteners\r\n\t canvas = mb.getMBCanvas3D();\r\n\t canvas.addKeyListener(this);\r\n\t canvas.addMouseListener(this);\r\n\t canvas.addMouseMotionListener(this);\r\n\t frame.add( \"Center\", canvas );\r\n\t \r\n\t frame.show( );\r\n\t frame.addWindowListener(new Pj3dWindowClosingAdapter(true));\r\n\t \r\n\t return branch;\r\n\t}", "public Vector3 () {\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tz = 0;\r\n\t}", "public Pj3dCamera Camera()\r\n\t{\r\n\t\tPj3dCamera cam = new Pj3dCamera(this);\r\n\t\treturn cam;\r\n\t}", "public Vector3D(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Vector3D() {\r\n\t\tthis(0.0);\r\n\t}", "public void assign(Point3D target){\n\t\tthis.x = target.x;\n\t\tthis.y = target.y;\n\t\tthis.z = target.z;\n\t\tthis.w = target.w;\n\t}", "public Point3D subtract(Point3D p) {\n\t\treturn new Point3D(x - p.x, y - p.y, z - p.z);\n\t}", "public Image getThree();", "public MultiShape3D( Geometry geometry )\n {\n this( geometry, (Appearance)null );\n }", "public void Compute3d(long With3d) {\n OCCwrapJavaJNI.BRepAlgo_NormalProjection_Compute3d__SWIG_0(swigCPtr, this, With3d);\n }", "Point3D (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public WB_Normal3d() {\r\n\t\tsuper();\r\n\t}", "public AffineTransform3D(AffineTransform3D T) {\r\n\t\tthis.M11 = T.M11;\r\n\t\tthis.M12 = T.M12;\r\n\t\tthis.M13 = T.M13;\r\n\t\tthis.M14 = T.M13;\r\n\t\tthis.M21 = T.M21;\r\n\t\tthis.M22 = T.M22;\r\n\t\tthis.M23 = T.M23;\r\n\t\tthis.M24 = T.M24;\r\n\t\tthis.M31 = T.M31;\r\n\t\tthis.M32 = T.M32;\r\n\t\tthis.M33 = T.M33;\r\n\t\tthis.M34 = T.M34;\r\n\t\tthis.M41 = T.M41;\r\n\t\tthis.M42 = T.M42;\r\n\t\tthis.M43 = T.M43;\r\n\t\tthis.M44 = T.M44;\r\n\t}", "@Override\r\n\tpublic WB_Normal3d addAndCopy(final double x, final double y, final double z) {\r\n\t\treturn new WB_Normal3d(this.x + x, this.y + y, this.z + z);\r\n\t}", "@Override\r\n\tpublic WB_Normal3d addAndCopy(final WB_Point3d p) {\r\n\t\treturn new WB_Normal3d(x + p.x, y + p.y, z + p.z);\r\n\t}", "public void setTargetComponent(IMTComponent3D targetComponent) {\n\t\tthis.targetComponent = targetComponent;\n\t}", "public GeometricController(Item3D item){\r\n\t\tit = item;\r\n\t\t\r\n\t}", "public\n\tVector3()\n\t{\n\t\tdata = new double[3];\n\t\tdata[0] = 0;\n\t\tdata[1] = 0;\n\t\tdata[2] = 0;\n\t}", "public Point3D(double x,double y,double z)\n {\n _x=x;\n _y=y;\n _z=z;\n }", "public Builder setC3Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n c3_ = value;\n onChanged();\n return this;\n }", "public Limelight(String name, boolean mode3D) {\n this(name);\n this.mode3d = mode3D; \n }", "public Vector3(double x, double y, double z) {\n this.x = x; this.y = y; this.z = z;\n }", "public Builder setC3(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n c3_ = value;\n onChanged();\n return this;\n }", "public int getDepth() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_SIZE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D0\"));\n return ((ImageComponent3DRetained)this.retained).getDepth();\n }", "@Override\n public Vector3 clone()\n {\n return new Vector3(this);\n }", "public Vector3D() {\n zero();\n }", "public AbstractCube7Idx3D() {\n super(7, 8, 5 * 12, 5 * 5 * 6, 1);\n init();\n }", "public Vector3D(double x, double y, double z) {\r\n super(x, y, z);\r\n\t}", "public void setIs3D(boolean is3D) {\n _is3D = is3D;\n setDirty(true);\n }", "public Vector3 (float x, float y, float z) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.z = z;\r\n\t}", "synchronized public VectorString3D asVectorString3D() {\n \t\t// local pointers, since they may be transformed\n \t\tint n_points = this.n_points;\n \t\tdouble[][] p = this.p;\n \t\tif (!this.at.isIdentity()) {\n \t\t\tfinal Object[] ob = getTransformedData();\n \t\t\tp = (double[][])ob[0];\n \t\t\tn_points = p[0].length;\n \t\t}\n \t\tdouble[] z_values = new double[n_points];\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tz_values[i] = layer_set.getLayer(p_layer[i]).getZ();\n \t\t}\n \n \t\tfinal double[] px = p[0];\n \t\tfinal double[] py = p[1];\n \t\tfinal double[] pz = z_values;\n \t\tVectorString3D vs = null;\n \t\ttry {\n \t\t\tvs = new VectorString3D(px, py, pz, false);\n \t\t} catch (Exception e) { IJError.print(e); }\n \t\treturn vs;\n \t}", "private javax.swing.JPanel getJPanel3() {\n\t\tif(jPanel3 == null) {\n\t\t\tjPanel3 = new javax.swing.JPanel();\n\t\t\tjava.awt.FlowLayout layFlowLayout12 = new java.awt.FlowLayout();\n\t\t\tlayFlowLayout12.setHgap(0);\n\t\t\tlayFlowLayout12.setVgap(0);\n\t\t\tjPanel3.setLayout(layFlowLayout12);\n\t\t\tjPanel3.add(getJPanel4(), null);\n\t\t\tjPanel3.add(getJPanel5(), null);\n\t\t\tjPanel3.setPreferredSize(new java.awt.Dimension(410,210));\n\t\t\tjPanel3.setBackground(new java.awt.Color(242,242,238));\n\t\t\tjPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(69,107,127),1));\n\t\t}\n\t\treturn jPanel3;\n\t}", "public FMOD_OUTPUT_OBJECT3DINFO set(\n FloatBuffer buffer,\n FMOD_VECTOR position$,\n float gain,\n float spread,\n float priority\n ) {\n buffer(buffer);\n position$(position$);\n gain(gain);\n spread(spread);\n priority(priority);\n\n return this;\n }", "public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }", "public Pj3dLight Light()\r\n\t{\r\n\t\tPj3dLight light = new Pj3dLight(this);\r\n\t\treturn light;\r\n\t}", "private Vector3D(int x, int y, int z) {\n this(x, y, z, null);\n }", "public Vertex3D(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public T3 _3() {\n return _3;\n }", "public\n\tVector3( Vector3 other )\n\t{\n\t\tdata = new double[3];\n\t\tcopy( other );\n\t}", "public com.google.protobuf.ByteString\n getC3Bytes() {\n java.lang.Object ref = c3_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n c3_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getC3Bytes() {\n java.lang.Object ref = c3_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n c3_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Vector3(double x, double y, double z)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t}", "public IImageData3D getLabelledComponents() {\n return Data.wrap(labelledVolume, imageMask.getImageSpace());\n }" ]
[ "0.63390094", "0.5940483", "0.58187854", "0.5685973", "0.5666042", "0.5665862", "0.5639731", "0.5593723", "0.5480853", "0.54594886", "0.54399043", "0.5413866", "0.5388845", "0.5332703", "0.5255686", "0.52371943", "0.5229077", "0.51590765", "0.51573646", "0.51455086", "0.5114566", "0.51127833", "0.507863", "0.50706947", "0.5062684", "0.504118", "0.502565", "0.501555", "0.5000616", "0.4999115", "0.49921936", "0.49869263", "0.49862954", "0.49778003", "0.4976157", "0.49661", "0.49642625", "0.495639", "0.49358025", "0.4929788", "0.49175322", "0.49158704", "0.49107504", "0.48882818", "0.48852164", "0.48801795", "0.48673868", "0.48621035", "0.48532555", "0.4845587", "0.48219213", "0.4821536", "0.4820738", "0.48187196", "0.48053643", "0.48027152", "0.4797319", "0.4793588", "0.47935483", "0.47926912", "0.47860917", "0.47857633", "0.47814018", "0.47788823", "0.4776752", "0.4771226", "0.47553143", "0.4755081", "0.47547096", "0.47511828", "0.47363597", "0.4725787", "0.47236693", "0.47227645", "0.47206286", "0.47156638", "0.4700974", "0.4697028", "0.46925703", "0.4687138", "0.46865335", "0.4677286", "0.46723318", "0.46678668", "0.46664816", "0.46619406", "0.4661547", "0.4658198", "0.46562693", "0.4648644", "0.46371663", "0.46304932", "0.4628444", "0.46272558", "0.4618838", "0.4618823", "0.461858", "0.4612495", "0.4605931", "0.46047705" ]
0.75820357
0
Copies all node information from originalNodeComponent into the current node. This method is called from the duplicateNode method. This routine does the actual duplication of all "local data" (any data defined in this object).
@Override void duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate) { super.duplicateAttributes(originalNodeComponent, forceDuplicate); // TODO : Handle NioImageBuffer if its supported. RenderedImage imgs[] = ((ImageComponent3DRetained) originalNodeComponent.retained).getImage(); if (imgs != null) { ImageComponent3DRetained rt = (ImageComponent3DRetained) retained; for (int i=rt.depth-1; i>=0; i--) { if (imgs[i] != null) { rt.set(i, imgs[i]); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node(Node cloneNode) {\n\t\tthis.name = cloneNode.getName();\n\t\tthis.type = cloneNode.getType();\n\t\tthis.setX(cloneNode.getX());\n\t\tthis.setY(cloneNode.getY());\n\t\tthis.position = new Vector2(cloneNode.getPosition());\n\t}", "private Node clone(Node node, Node parent, String overrideName) {\n Node clone = null;\n try {\n clone = parent.addNode(overrideName, node.getPrimaryNodeType().getName());\n\n\n // copy properties\n PropertyIterator properties = node.getProperties();\n\n while (properties.hasNext()) {\n Property property = properties.nextProperty();\n if (!property.getName().startsWith(\"jcr:\") && !property.getName().startsWith(\"mgnl:\")) {\n PropertyUtil.setProperty(clone, property.getName(), property.getValue());\n }\n }\n\n // copy subnodes\n NodeIterator children = node.getNodes();\n\n while (children.hasNext()) {\n Node child = children.nextNode();\n clone(child, clone, child.getName());\n }\n\n return clone;\n\n } catch (RepositoryException e) {\n //todo exception\n throw new RuntimeException(e);\n }\n }", "public abstract Node copy();", "private void clone(Node<T> sourceNode, Node<T> cloneNode) {\n Node<T> tmp;\n Collection<Node<T>> collection = sourceNode.getChildren();\n for (Node<T> child : collection) {\n tmp = child.clone();\n if (sourceNode.getParent() != null) tmp.setParent(cloneNode);\n cloneNode.addChildren(tmp);\n clone(child, tmp);\n }\n }", "private void copy(Node node){\n parent_ = node.parent_;\n size_ = node.size_;\n for(int i = 0; i < size_; i++)\n children_[i] = node.children_[i];\n }", "public XmlNode duplicateDataFieldNode(XmlNode highlightedField) {\n\t\tLinkedHashMap<String, String> allAttributes = highlightedField.getXmlElement().getAllAttributes();\n//\t\t get all attributes of the datafield\n\t\tLinkedHashMap<String, String> newAttributes = new LinkedHashMap<String, String>(allAttributes);\n\t\t\n\t\tXmlNode newNode = new XmlNode(newAttributes, this);\n\t\t\n\t\treturn newNode;\n\t}", "public node_data copyNode(node_data node) {\n NodeData nodeUpCasted = (NodeData) node;\n return new NodeData(nodeUpCasted);\n }", "public void copyTree(Node original, Node copy) {\n\t\tcopy.setLeafNode(original.isLeafNode());\n\t\tcopy.setName(original.getName());\n\t\tcopy.setLeafValue(original.getLeafValue());\n\n\t\tif (!original.isLeafNode()) {\n\t\t\tcopy.setLeft(new Node());\n\t\t\tcopy.setRight(new Node());\n\n\t\t\tcopyTree(original.getLeft(), copy.getLeft());\n\t\t\tcopyTree(original.getRight(), copy.getRight());\n\t\t}\n\t}", "public abstract TreeNode copy();", "Component deepClone();", "public void copyAndInsertElement(XmlNode node) {\n\t\t\t\n\t\tXmlNode newNode = duplicateDataFieldNode(node);\n\t\tduplicateDataFieldTree(node, newNode);\n\t\t\t\n\t\taddElement(newNode);\n\t\t\n\t}", "private void updateOriginalNodesInMirror() {\n for (Node node : originalGraph.nodes()) {\n if (!mirrorGraph.has(node)) {\n mirrorGraph.add(node);\n }\n originalAttributesToMirror(node);\n }\n }", "public Node clone() {\n Node n = new Node((float) this.getSimPos().getX(), (float) this.getSimPos().getY(), radius*2, isStationary, this.renderColor);\n n.node_uuid = this.node_uuid;\n return n;\n }", "public void setToOriginals(){\n\t\t//set all occupied nodes as empty\n\t\tif(nodeStatus == Status.occupied){\n\t\t\tsetAsEmpty();\n\t\t}\n\t\t//if the node had a unit end on it, reset that value\n\t\tif(ended == true){\n\t\t\tended=false;\n\t\t}\n\t\tf=0;\n\t\tg=0;\n\t\th=0;\n\t}", "public abstract OtTreeNodeWidget copy();", "@Override\n\tpublic MapNode clone()\n\t{\n\t\t// Create copy of this map node\n\t\tMapNode copy = (MapNode)super.clone();\n\n\t\t// Copy KV pairs\n\t\tcopy.pairs = new LinkedHashMap<>();\n\t\tfor (Map.Entry<String, AbstractNode> pair : pairs.entrySet())\n\t\t{\n\t\t\tAbstractNode value = pair.getValue().clone();\n\t\t\tcopy.pairs.put(pair.getKey(), value);\n\t\t\tvalue.setParent(copy);\n\t\t}\n\n\t\t// Return copy\n\t\treturn copy;\n\t}", "@Override\n public Node clone() {\n Node node = null;\n try {\n node = (Node) super.clone();\n } catch (Exception e) {\n System.err.println(\"Unable to clone!\");\n e.printStackTrace();\n }\n return node;\n }", "public Node cloneNode () {\n return new VcsGroupFileNode(shadowObject, originalNode);\n }", "public NodeInfo(NodeInfo other) {\n if (other.isSetHost()) {\n this.host = TBaseHelper.deepCopy(other.host);\n }\n if (other.isSetDir()) {\n this.dir = TBaseHelper.deepCopy(other.dir);\n }\n }", "public Node copyNodes(Node N) {\n if(N != null){\n Node cp = new Node();\n cp.setData(N.getData()); //copying contents into new node\n cp.setLeft(copyNodes(N.getLeft()));\n cp.setRight(copyNodes(N.getRight()));\n return cp;\n }\n return N;\n }", "@Override\n public VariableListNode deepCopy(BsjNodeFactory factory);", "public void updateOriginal() {\n for (Node node : originalGraph.nodes()) {\n mirrorAttributesToOriginal(node);\n }\n for (Edge edge : originalGraph.edges()) {\n mirrorAttributesToOriginal(directEdgeMap.get(edge));\n }\n }", "public void Duplicate()\n {\n\n tacc2 = tacc.clone();\n px2 = px.clone();\n py2 = py.clone();\n pz2 = pz.clone();\n\n tgyro2 = tgyro.clone();\n\n accx2 = accx.clone();\n accy2 = accy.clone();\n accz2 = accz.clone();\n\n lng2 = lng.clone();\n lat2 = lat.clone();\n }", "public BinaryNode copy() {\n\t\tBinaryNode newRoot = new BinaryNode(data);\n\t\tif(leftChild != null)\n\t\t\tnewRoot.setLeftChild(leftChild.copy());\n\t\tif(rightChild != null)\n\t\t\tnewRoot.setRightChild(rightChild.copy());\n\t\treturn newRoot;\n\t}", "public void copyNode ()\n {\n Clipboard clipboard = _tree.getToolkit().getSystemClipboard();\n clipboard.setContents(_tree.createClipboardTransferable(), ConfigEditor.this);\n _clipclass = group.getConfigClass();\n _paste.setEnabled(!_readOnly);\n }", "public UndirectedGraphNode cloneGraph_old1(UndirectedGraphNode node) {\n if (node == null) {\n return null;\n }\n\n Map<UndirectedGraphNode, UndirectedGraphNode> map = new HashMap<>();\n return implClone(node, map);\n }", "public LSGNode copy(LSGNode lsgNode){\n\t\tPartitionNodeElement partitionNodeElement = new PartitionNodeElement(_groupNodeData.copy(), _partitionFlags, _fileName, Helper.copy(_boundingBox), _area, Helper.copy(_vertexCountRange), Helper.copy(_nodeCountRange), Helper.copy(_polygonCountRange), Helper.copy(_untransformedBoundingBox));\n\t\tpartitionNodeElement.setAttributeNodes(getAttributeNodes());\n\t\tpartitionNodeElement.setPropertyNodes(getPropertyNodes());\n\t\tpartitionNodeElement.setParentLSGNode(lsgNode);\n\t\tfor(LSGNode childNode : getChildLSGNodes()){\n\t\t\tpartitionNodeElement.addChildLSGNode(childNode.copy(partitionNodeElement));\n\t\t}\n\t\treturn partitionNodeElement;\n\t}", "@Override\n\tpublic Component clone() {\n\t\treturn null;\n\t}", "public void deepCopy(SL_Obj fromObj,SL_ContainerObj trgContainer) {\n rootObj.set_patchRefsMap(new HashMap<SL_Obj, SL_Obj>());\n _deepCopyInternal(fromObj, trgContainer);\n _patchReferencesInternal(fromObj);\n rootObj.set_patchRefsMap(null);\n\n }", "protected Node deepCopyInto(Node n) {\n\t\tsuper.deepCopyInto(n);\n\t\tRCPOMDocument sd = (RCPOMDocument) n;\n\t\tsd.localizableSupport = new LocalizableSupport(RESOURCES, getClass()\n\t\t\t\t.getClassLoader());\n\t\tsd.url = url;\n\t\treturn n;\n\t}", "@Override\r\n\t\tpublic Node cloneNode(boolean deep)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public PlainGraph cloneGraph(PlainGraph graph) {\n PlainGraph g = graph.clone();\n Map<String, PlainNode> nodeMap = cloneNodeMap(graph);\n\n g.setName(getUniqueGraphName());\n graphNodeMap.put(g, nodeMap);\n return g;\n }", "public void copy(DataRequest original){\n\t\t//potential problems with object sharing\n\t\tfilters = \toriginal.get_filters();\n\t\tsort_by = \toriginal.get_sort_by();\n\t\tcount = \toriginal.get_count();\n\t\tstart = \toriginal.get_start();\n\t\tsource = \toriginal.get_source();\n\t\tfieldset =\toriginal.get_fieldset();\n\t\trelation = \toriginal.get_relation();\n\t}", "public NetworkNode(Node treeNode) {\n height = treeNode.getHeight();\n label = treeNode.getID();\n metaDataString = treeNode.metaDataString;\n for (String metaDataKey: treeNode.getMetaDataNames()) {\n Object metaDataValue = treeNode.getMetaData(metaDataKey);\n metaData.put(metaDataKey, metaDataValue);\n }\n }", "public void updateNodeDataChanges(Object src) {\n\t}", "@Override\r\n\tpublic BinaryNodeInterface<E> copy() {\n\t\treturn null;\r\n\t}", "private void duplicate(Node nodo) {\n int reference_page = nodo.getReference();\n if(this.debug)\n System.out.println(\"ExtHash::duplicate >> duplicando nodo con referencia \" + reference_page);\n\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n if(this.debug) {\n System.out.println(\"ExtHash::duplicate >> contenido de la pagina:\");\n for(int i=1; i<content.get(0); i++) {\n System.out.println(\" \" + content.get(i));\n }\n }\n\n int shift = nodo.getAltura();\n nodo.activateReference(false);\n\n ArrayList<Integer> left = new ArrayList<>();\n ArrayList<Integer> right = new ArrayList<>();\n\n for(int i=1; i<=content.get(0); i++) {\n int chain = content.get(i);\n if((chain & (1 << shift)) == 0) {\n left.add(chain);\n } else {\n right.add(chain);\n }\n }\n\n left.add(0, left.size());\n right.add(0, right.size());\n\n this.fm.write(left, reference_page); this.out_counter++;\n Node l = new Node(reference_page);\n l.setAltura(shift + 1);\n\n this.fm.write(right, this.last); this.out_counter++;\n Node r = new Node(this.last); this.last++;\n r.setAltura(shift + 1);\n\n total_active_block++;\n\n if(this.debug) {\n System.out.println(\"ExtHash::duplicate >> contentido de paginas duplicadas(left), ref: \" + reference_page);\n for(int i=0; i<left.size(); i++) {\n System.out.println(\" \" + left.get(i));\n }\n }\n\n if(this.debug) {\n System.out.println(\"ExtHash::duplicate >> contentido de paginas duplicadas(right), ref: \" + (this.last - 1));\n for(int i=0; i<right.size(); i++) {\n System.out.println(\" \" + right.get(i));\n }\n }\n\n nodo.addLeftNode(l);\n nodo.addRightNode(r);\n\n ArrayList<Integer> last = new ArrayList<>();\n last.add(0);\n if(left.get(0) == B-2 && shift + 1 < 30) {\n this.duplicate(l);\n } else if(left.get(0) == B-2 && shift + 1 == 30) {\n left.add(this.last);\n this.fm.write(left, l.getReference()); this.out_counter++;\n\n this.fm.write(last, this.last); this.out_counter++;\n this.last++;\n }\n\n if(right.get(0) == B-2 && shift + 1 < 30) {\n this.duplicate(r);\n } else if(right.get(0) == B-2 && shift + 1 == 30) {\n right.add(this.last);\n this.fm.write(right, r.getReference()); this.out_counter++;\n\n this.fm.write(last, this.last); this.out_counter++;\n this.last++;\n }\n }", "public synchronized void paste(CachedRootedTree destTree, PhyloNode destNode) {\n PhyloTree tree = loadClip();\n // Add the clone's vertices and edges to the destination tree.\n\n synchronized (destTree) {\n destTree.setHoldCalculations(true);\n Graphs.addGraph(destTree, tree);\n // Insert the clone's root vertex into the midpoint above destNode.\n if (destTree.getParentOf(destNode) == null) {\n destTree.addEdge(destNode, tree.getRoot());\n } else {\n DefaultVertex internalVertex = destTree.createAndAddVertex();\n ((PhyloNode) internalVertex).setPosition(origVertex);\n destTree.insertNodeBetween(destTree.getParentOf(destNode),\n destNode, internalVertex);\n destTree.addEdge(internalVertex, tree.getRoot());\n }\n destTree.setHoldCalculations(false);\n destTree.modPlus();\n\n clearCutNodes();\n }\n }", "public ProcessedDynamicData deepCopy( ) {\r\n\r\n ProcessedDynamicData copy = new ProcessedDynamicData( this.channelId );\r\n\r\n copy.channelId = this.channelId;\r\n copy.dateTimeStamp = new java.util.Date( this.dateTimeStamp.getTime() );\r\n copy.samplingRate = this.samplingRate;\r\n copy.eu = this.eu;\r\n\r\n copy.min = this.min;\r\n copy.max = this.max;\r\n\r\n copy.measurementType = this.measurementType;\r\n copy.measurementUnit = this.measurementUnit;\r\n\r\n // data and labels\r\n List<Double> dataCopy = new Vector<Double>();\r\n for( int i = 0; i < this.data.size(); i++ ) {\r\n dataCopy.add( new Double( this.data.get( i ) ) );\r\n }\r\n copy.setData( dataCopy );\r\n\r\n List<Double> dataLabels = new Vector<Double>();\r\n for( int i = 0; i < this.dataLabels.size(); i++ ) {\r\n dataLabels.add( new Double( this.dataLabels.get( i ) ) );\r\n }\r\n copy.setDataLabels( dataLabels );\r\n\r\n // create a deep copy of overalls\r\n if( overalls != null ) {\r\n copy.overalls = new OverallLevels( this.overalls.getChannelId() );\r\n copy.overalls.setDateTimeStampMillis( this.getDateTimeStampMillis() );\r\n Vector<String> overallKeys = this.overalls.getKeys();\r\n for( int i = 0; i < overallKeys.size(); i++ ) {\r\n copy.overalls.addOverall( new String( overallKeys.elementAt( i ) ),\r\n new Double( this.overalls.getOverall( overallKeys.elementAt( i ) ) ) );\r\n }\r\n }\r\n\r\n copy.xEUnit = this.xEUnit;\r\n copy.yEUnit = this.yEUnit;\r\n\r\n copy.xSymbol = this.xSymbol;\r\n copy.ySymbol = this.ySymbol;\r\n copy.xPhysDomain = this.xPhysDomain;\r\n copy.yPhysDomain = this.yPhysDomain;\r\n \r\n copy.noOfAppendedZeros = this.noOfAppendedZeros;\r\n\r\n return copy;\r\n }", "public LSGNode copy(LSGNode lsgNode){\n\t\tRangeLODNodeElement rangeLODNodeElement = new RangeLODNodeElement(_lodNodeData.copy(), Helper.copy(_rangeLimits), Helper.copy(_center));\n\t\trangeLODNodeElement.setAttributeNodes(getAttributeNodes());\n\t\trangeLODNodeElement.setPropertyNodes(getPropertyNodes());\n\t\trangeLODNodeElement.setParentLSGNode(lsgNode);\n\t\tfor(LSGNode childNode : getChildLSGNodes()){\n\t\t\trangeLODNodeElement.addChildLSGNode(childNode.copy(rangeLODNodeElement));\n\t\t}\n\t\treturn rangeLODNodeElement;\n\t}", "public directed_weighted_graph deepCopy() {\n DWGraph_DS copyGraph = new DWGraph_DS(this); //create a new graph with the original graph data (only primitives)\n HashMap<Integer, node_data> copyNodesMap = new HashMap<>(); //create a new nodes HashMap for the new graph\n for (node_data node : nodes.values()) { //loop through all nodes in the original graph\n copyNodesMap.put(node.getKey(), new NodeData((NodeData) node)); //makes a duplicate of the original HashMap\n }\n copyGraph.nodes = copyNodesMap; //set the new graph nodes to the new HashMap we made.\n return copyGraph;\n }", "public Node duplicate() {\r\n Variable alterEgo = new Variable(index);\r\n return alterEgo;\r\n }", "public Node cloneGraph(Node node) {\n if (node == null) return node;\n return helper(node, new HashMap<Node, Node>());\n }", "public SegmentNode(SegmentNode p_OriginalCopy)\n {\n m_strSegment = new String(p_OriginalCopy.m_strSegment);\n m_iWordCount = p_OriginalCopy.m_iWordCount;\n }", "public abstract CTxDestination clone();", "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }", "public VNode duplicate() throws VlException\n\t{\n\t\tthrow new nl.uva.vlet.exception.NotImplementedException(\"Duplicate method not implemented\"); \n\t}", "public Node cloneNode(boolean deep) {\n/* 320 */ cloneDeepCheck(deep);\n/* */ \n/* 322 */ return new PoaMaestroMultivaloresHTML(this);\n/* */ }", "public abstract Type treeCopy();", "public Object cloner(Sommet origine, Sommet destination) {\n // assert(origine.graphe() == destination.graphe() == graphe)\n try {\n Arete le_clone = (Arete)super.clone();\n le_clone.graph = origine.graphe();\n le_clone.position = le_clone.graph.edges.ajouterElement(le_clone);\n le_clone.origine = origine;\n le_clone.destination = destination;\n origine.successeurs.inserer(destination);\n destination.predecesseurs.inserer(origine);\n origine.aretes_sortantes.inserer(le_clone);\n destination.aretes_entrantes.inserer(le_clone);\n return le_clone;\n } catch(CloneNotSupportedException e) {\n return null;\n }\n }", "public Node clone01(Node head) {\n Map<Node, Node> map = new HashMap<>();\n\n Node originNode = head, cloneNode = null;\n\n while (originNode != null) {\n cloneNode = new Node(originNode.data);\n\n map.put(originNode, cloneNode);\n originNode = originNode.next;\n }\n\n originNode = head;\n while (originNode != null) {\n cloneNode = map.get(originNode);\n cloneNode.next = map.get(originNode.next);\n cloneNode.random = map.get(originNode.random);\n\n originNode = originNode.next;\n }\n\n return map.get(head);\n }", "protected Node copyInto(Node n) {\n\t\tsuper.copyInto(n);\n\t\tRCPOMDocument sd = (RCPOMDocument) n;\n\t\tsd.localizableSupport = new LocalizableSupport(RESOURCES, getClass()\n\t\t\t\t.getClassLoader());\n\t\tsd.url = url;\n\t\treturn n;\n\t}", "@Override\n public String prepareCloneForItemToClone() {\n cloneCreateItemElementPlaceholders = true;\n newItemsToAdd = null;\n\n return super.prepareCloneForItemToClone();\n }", "public Object cloner() {\n return cloner((Sommet)origine.cloner(), (Sommet)destination.cloner());\n }", "@Override\r\n public weighted_graph copy() {\n weighted_graph copy = new WGraph_DS();\r\n for (node_info curr : this.Graph.getV()) { //The loop passes through all the ver' of the graph\r\n Nodes t = new Nodes(curr); //create new node\r\n copy.addNode(t.key); //copy the the old node to the new node\r\n }\r\n for (node_info curr0 : this.Graph.getV()) {\r\n for (node_info curr1 : this.Graph.getV(curr0.getKey())) { //this loops pass over the all nodes and copy the connection\r\n double i = this.Graph.getEdge(curr0.getKey(), curr1.getKey());\r\n if (i != -1) {\r\n copy.connect(curr0.getKey(), curr1.getKey(), i);\r\n }\r\n }\r\n }\r\n return copy;\r\n\r\n }", "private void cloneProjectAux(Company cloneCompany, Project cloneProj, Project originalProj) {\n\tString key = ProjectAux.constructKey(originalProj);\n\tProjectAux originalAux = this.projectAuxValueRepo.get(key);\n\tProjectAux cloneAux = originalAux.clone();\n\tcloneAux.setCompany(cloneCompany);\n\tcloneAux.setProject(cloneProj);\n\tthis.projectAuxValueRepo.set(cloneAux);\n }", "@Override\n protected Workflow copy(CompoundWorkflow parent) {\n return copyImpl(new AssignmentWorkflow(getNode().clone(), parent, newTaskTemplate, newTaskClass, newTaskOutcomes));\n }", "@Override\n \tpublic void mouseMoved(MouseEvent e) {\n \t\tif (nodeVisualDummy == null) return;\n \t\t// update the coordinates of the dummy-node to the mouselocation so the tempEdge is drawn to the mouselocation too\n \t\td.getAbsoluteCoordinate(e.getPoint(), mousePosition);\n \t\tnodeVisualDummy.setX(mousePosition.getX());\n \t\tnodeVisualDummy.setY(mousePosition.getY());\n \t}", "@Override\n public Data clone() {\n final Data data = new Data(name, code, numeric, symbol, fractionSymbol, fractionsPerUnit, rounding, formatString,\n triangulated.clone());\n return data;\n }", "public static void saveCurrentNode() {\r\n TreeElement node = TreePanel.getSelectedNode();\r\n if (node != null) {\r\n node.updateDataFromEditor(); // it should update from editor\r\n }\r\n }", "private void originalAttributesToMirror(Node node) {\n for (NodeAttributeToPreserve attribute : nodeAttributesToPreserve) {\n NodeAttribute<Object> originalAttribute = originalGraph.nodeAttribute(attribute.id);\n NodeAttribute<Object> mirrorAttribute = mirrorGraph.nodeAttribute(attribute.id);\n copyAttributeValue(originalAttribute, node, mirrorAttribute, node);\n }\n copyPosition(originalPositions, mirrorPositions, node);\n }", "private static Document createCopiedDocument(Document originalDocument) {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db;\n Document copiedDocument = null;\n try {\n db = dbf.newDocumentBuilder();\n Node originalRoot = originalDocument.getDocumentElement();\n copiedDocument = db.newDocument();\n Node copiedRoot = copiedDocument.importNode(originalRoot, true);\n copiedDocument.appendChild(copiedRoot);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return copiedDocument;\n }", "public SceneLabelObjectState copy(){\n\n\t\t//get a copy of the generic data from the supertype\n\t\tSceneDivObjectState genericCopy = super.copy(); \n\n\t\t//then generate a copy of this specific data using it (which is easier then specifying all the fields\n\t\t//Separately like we used too)\n\t\tSceneLabelObjectState newObject = new SceneLabelObjectState(\n\t\t\t\tgenericCopy,\n\t\t\t\tObjectsCurrentText,\t\t\n\t\t\t\tCSSname,\n\t\t\t\tcursorVisible,\n\t\t\t\tTypedText,\n\t\t\t\tCustom_Key_Beep,\n\t\t\t\tCustom_Space_Beep);\n\n\t\treturn newObject;\n\n\n\t}", "private void resizeAndTransfer() {\r\n Node<K, V>[] newData = new Node[data.length * 2];\r\n\r\n for (int i = 0; i < data.length; i++) {\r\n if (data[i] != null) {\r\n addExistingElement(new Node(data[i].key, data[i].value), newData);\r\n Node currentElement = data[i];\r\n while (currentElement.next != null) {\r\n currentElement = currentElement.next;\r\n addExistingElement(new Node(currentElement.key, currentElement.value), newData);\r\n }\r\n }\r\n }\r\n data = newData;\r\n }", "@Override\n\tpublic graph copy() {\n\t\tgraph copy = new DGraph();\n\t\tCollection<node_data> nColl = this.GA.getV();\n\t\tfor (node_data node : nColl) {\n\t\t\tnode_data temp = new Node((Node) node );\n\t\t\tcopy.addNode(node);\n\t\t}\n\t\tCollection<node_data> nColl2 = this.GA.getV();\n\t\tfor (node_data node1 : nColl2) {\n\t\t\tCollection<edge_data> eColl = this.GA.getE(node1.getKey());\n\t\t\tif (eColl!=null) {\n\t\t\t\tfor (edge_data edge : eColl) {\n\t\t\t\t\tcopy.connect(edge.getSrc(), edge.getDest(), edge.getWeight());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn copy;\n\t}", "public ImageData duplicate() {\r\n\t\treturn new ImageData(imageProcessor.duplicate(), label);\r\n\t}", "Object writeReplace() {\n return NodeSerialization.from(this);\n }", "@Override\n public FieldEntity copy()\n {\n return state.copy();\n }", "protected void restoreSelf() {\n if (removed && parentNode != null && componentNode != null) {\n // Add self back BEFORE sibling (keeps original order)\n parentNode.insertBefore(componentNode, siblingNode);\n // Reset removed flag\n removed = false;\n }\n }", "Node copy(Node r) {\r\n\t\tif (r == null)\r\n\t\t\treturn null;\r\n\t\tNode leftTree = copy(r.left);\r\n\t\tNode rightTree = copy(r.right);\r\n\t\treturn new Node(r.element, leftTree, rightTree);\r\n\t}", "public abstract Type treeCopyNoTransform();", "abstract public Vertex cloneMe();", "@Override\n public Object clone()\n {\n try\n {\n DefaultConfigurationNode copy = (DefaultConfigurationNode) super\n .clone();\n copy.initSubNodes();\n return copy;\n }\n catch (CloneNotSupportedException cex)\n {\n // should not happen\n throw new ConfigurationRuntimeException(\"Cannot clone \" + getClass());\n }\n }", "private void copyAttributes(StyleContext.NamedStyle fromNode, StyleContext.NamedStyle toNode)\n\t{\n\n\t\tNamedStyle copy = new NamedStyle();\n\t\tcopy.addAttributes(fromNode);\n\t\tcopy.removeAttribute(StyleConstants.ResolveAttribute);\n\t\tcopy.removeAttribute(\"children\");\n\n\t\ttoNode.addAttributes(copy);\n\t}", "public SubtreeCopyResult copySubtree(int originalPCR,\n\t\t\tNsMapping newNsMapping, QNm newName) throws DocumentException;", "public Node clone02(Node head) {\n Node originNode = head, tmp = null;\n\n while (originNode != null) {\n tmp = originNode.next;\n originNode.next = new Node(originNode.data);\n originNode.next.next = tmp;\n originNode = tmp;\n }\n\n originNode = head;\n while (originNode != null) {\n originNode.next.random = originNode.random.next;\n originNode = originNode.next != null ? originNode.next.next : originNode.next;\n }\n\n originNode = head;\n tmp = head.next;\n Node cloneNode = tmp;\n\n while (originNode != null) {\n originNode.next = originNode.next != null ? originNode.next.next : originNode.next;\n originNode = originNode.next;\n\n tmp.next = tmp.next != null ? tmp.next.next : tmp.next;\n tmp = tmp.next;\n }\n\n return cloneNode;\n }", "public void duplicateAndInsertElements() {\n\t\t\n\t\tif (highlightedFields.isEmpty()) return;\n\t\t\n\t\t// highlighted fields change while adding. Make a copy first\n\t\tArrayList<XmlNode> tempArray = new ArrayList<XmlNode>(highlightedFields);\n\t\t\n\t\tcopyAndInsertElements(tempArray);\n\t}", "private Node hubInsertNode(HubNode hubNode, Pane canvas , ContextMenu contextMenu) {\n\n\t\tImage image = new Image(\"root/Images/Hub.png\");\n\t\tImagePattern imagePattern = new ImagePattern(image);\n\n\t\tRectangle node = new Rectangle(NODE_LENGTH, NODE_WIDTH);\n\t\tnode.setFill(imagePattern);\n\n\t\tLabel lnodeName = new Label(\"HUB: \" + hubNode.getName()+ \"\\n\" + \"IP: \" + hubNode.getSubnet() + \"\\n\" + \"NetMask: \" + hubNode.getNetmask());\n\n\t\t//lnodeName.setOpacity(0.5);\n\t\tlnodeName.setStyle(\"-fx-background-color: rgba(255,255,255,0.6); -fx-font-size: 8; \");\n\n\n\t\tStackPane nodeContainer = new StackPane();\n\t\tnodeContainer.getChildren().addAll(node, lnodeName);\n\t\tnodeContainer.relocate(hubNode.getPosx(), hubNode.getPosy());\n\t\thubNode.setCanvasNode(nodeContainer); //for removing\n\n\t\tnodeContainer.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\tNodeController nodeController = NodeController.getNodeController();\n\t\t\t\tif (event.getButton() == MouseButton.SECONDARY) {\n\t\t\t\t\tcontextMenu.getItems().get(2).setDisable(false);//allows deletion option of the stack pane object 'nodeContainer'\n\t\t\t\t\tcontextMenu.getItems().get(2).setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handle(ActionEvent e) {\n\t\t\t\t\t\t\tString hubName = hubNode.getName();\n\t\t\t\t\t\t\tnodeController.removeHubNode(hubName);\n\t\t\t\t\t\t\trefreshAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tcontextMenu.setOnHidden(new EventHandler<WindowEvent>() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handle(WindowEvent e) {\n\t\t\t\t\t\t\tcontextMenu.getItems().get(2).setDisable(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\n\t\treturn nodeContainer;\n\t}", "public static void appendClonedChildNodes(final Node destinationNode, final Node sourceNode, final boolean deep) {\n\t\tfinal NodeList sourceNodeList = sourceNode.getChildNodes(); //get the list of child nodes\n\t\tfinal int sourceNodeCount = sourceNodeList.getLength(); //find out how many nodes there are\n\t\tfor(int i = 0; i < sourceNodeCount; ++i) { //look at each of the source nodes\n\t\t\tfinal Node sourceChildNode = sourceNodeList.item(i); //get a reference to this child node\n\t\t\tdestinationNode.appendChild(sourceChildNode.cloneNode(deep)); //clone the node and add it to the destination node\n\t\t}\n\t}", "public Node cloneNode(boolean deep) {\n/* 258 */ cloneDeepCheck(deep);\n/* */ \n/* 260 */ return new AdmClientePreferencialHTML(this);\n/* */ }", "protected void copy(){\n\t\tthis.model.copy(this.color.getBackground());\n\t}", "public Matrix originalData(){\n if(!this.pcaDone)this.pca();\n return this.data;\n }", "public Cell(Cell original){\n this.i = original.i;\n this.j = original.j;\n this.type = original.type;\n if (original.entity != null) {\n if (original.entity instanceof Agent) {\n Agent agent = (Agent) original.entity;\n this.entity = new Agent(agent);\n }\n else if (original.entity instanceof Box) {\n Box box = (Box) original.entity;\n this.entity = new Box(box);\n }\n }\n else {\n this.entity = null;\n }\n this.goalLetter = original.goalLetter;\n }", "private void copyPosition(NodeAttribute<Coordinates> sourceAttribute, NodeAttribute<Coordinates> destinationAttribute, Node node) {\n Coordinates sourceValue = sourceAttribute.get(node);\n if (!sourceAttribute.isDefault(node)\n && (destinationAttribute.isDefault(node) || !sourceValue.equals(destinationAttribute.get(node)))) {\n destinationAttribute.set(node, sourceValue);\n }\n }", "private static <K, V> void recursiveCloner(Position<Entry<K, V>> v, AVLTree<K, V> original, Position<Entry<K, V>> v2, AVLTree<K, V> NewTree) {\n\n if (original.hasLeft(v)) {\n NewTree.insertLeft(v2, original.left(v).element());\n recursiveCloner(original.left(v), original, NewTree.left(v2), NewTree);\n }\n if (original.hasRight(v)) {\n NewTree.insertRight(v2, original.right(v).element());\n recursiveCloner(original.right(v), original, NewTree.right(v2), NewTree);\n }\n if(v2.element()!=null) {\n \t//assign the height to current parent node\n\t\t\tNewTree.setHeight(v2);\n\t\t}\n }", "@Override\n\tpublic AbstractTreeAdjacencyGraph<N, E> cloneAdd(final E newEdge)\n\t{\n\t\treturn (AbstractTreeAdjacencyGraph<N, E>) super.cloneAdd(newEdge);\n\t}", "private RootBlock copy(RootBlock sourceRootBlock) {\n\t\tCopier copier = new Copier(true);\n\t\tRootBlock result = (RootBlock) copier.copy(sourceRootBlock);\n\t\tcopier.copyReferences();\n\t\treturn result;\n\t}", "private void cloneUserAux(Company cloneCompany, SystemUser cloneUser, SystemUser originalUser) {\n\tString key = UserAux.constructKey(originalUser);\n\tUserAux originalAux = this.userAuxValueRepo.get(key);\n\tUserAux cloneAux = originalAux.clone();\n\tcloneAux.setCompany(cloneCompany);\n\tcloneAux.setUser(cloneUser);\n\tthis.userAuxValueRepo.set(cloneAux);\n }", "public Node cloneGraph(Node node) {\r\n if (node == null) return null;\r\n dfs(node);\r\n return map.get(node.val);\r\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "public void cloneList(){\n Node insert = Head;\n while(insert != null){\n Node temp = new Node(insert.data);\n temp.next = insert.next;\n insert.next = temp;\n insert = temp.next;\n }\n\n //Adjusting arbitrary pointers\n\n Node move = Head;\n while(move != null){\n move.next.arbt = move.arbt;\n move = move.next.next;\n }\n\n //cloning linked list by removing copied nodes from original list\n\n copyList = Head.next;\n move = Head.next;\n while(move.next != null){\n move.next = move.next.next;\n move = move.next;\n }\n }", "public void copy() {\n\n\t}", "@Override\n public void newBundlesRoot(Bundles new_root) {\n // Adjust state of super\n super.newBundlesRoot(new_root);\n // Save some state\n Map<String,Point2D> wxy_copy = entity_to_wxy;\n // Reset stateful variables for this class\n digraph = new SimpleMyGraph<Bundle>();\n graph = new SimpleMyGraph<Bundle>();\n entity_to_shape = new HashMap<String,Utils.Symbol>();\n entity_to_wxy = new HashMap<String,Point2D>();\n entity_to_sxy = new HashMap<String,String>();\n entity_to_sx = new HashMap<String,Integer>();\n entity_to_sy = new HashMap<String,Integer>();\n // Reapply all the relationships\n for (int i=0;i<active_relationships.size();i++) {\n // System.err.println(\"newBundlesRoot(): Adding In Relationship \\\"\" + active_relationships.get(i) + \"\\\"... bundles.size() = \" + new_root.size());\n addRelationship(active_relationships.get(i), false, new_root);\n }\n // Reapply the world coordinates\n Iterator<String> it = entity_to_wxy.keySet().iterator();\n while (it.hasNext()) {\n String entity = it.next();\n if (wxy_copy.containsKey(entity)) entity_to_wxy.put(entity, wxy_copy.get(entity));\n }\n transform();\n }", "public Node cloneNode(boolean deep) {\n/* 230 */ cloneDeepCheck(deep);\n/* */ \n/* 232 */ return new IndicadoresEficaciaHTML(this);\n/* */ }", "public NamedNodeMapImpl cloneMap(NodeImpl ownerNode) {\n \tAttributeMap newmap =\n new AttributeMap((ElementImpl) ownerNode, null);\n newmap.hasDefaults(hasDefaults());\n newmap.cloneContent(this);\n \treturn newmap;\n }", "@Override\n\tpublic void copyReferences() {\n\t\tlateCopies = new LinkedHashMap<>();\n\n\t\tsuper.copyReferences();\n\n\t\tputAll(lateCopies);\n\t\tlateCopies = null;\n\t}", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "private static void testDeepCopyValidity(Node start, Node clonedList) {\n System.out.println(\"Address of original head: \" + start );\n System.out.println(\"Address of cloned head: \" + clonedList);\n System.out.println(\"Data of original head: \" + start.data);\n System.out.println(\"Data of cloned head: \" + clonedList.data);\n\n// Test address and data of next\n System.out.println(\"Address of original head: \" + start.next );\n System.out.println(\"Address of cloned head: \" + clonedList.next);\n System.out.println(\"Data of original head: \" + start.next.data);\n System.out.println(\"Data of cloned head: \" + clonedList.next.data);\n\n// Test address and data of next.next\n System.out.println(\"Address of original head: \" + start.next.next );\n System.out.println(\"Address of cloned head: \" + clonedList.next.next);\n System.out.println(\"Data of original head: \" + start.next.next.data);\n System.out.println(\"Data of cloned head: \" + clonedList.next.next.data);\n\n System.out.println(\"------------------------------------------------------------\");\n\n// Test address and of arbitrary data of head\n System.out.println(\"Address of original head: \" + start.arbitrary );\n System.out.println(\"Address of cloned head: \" + clonedList.arbitrary);\n System.out.println(\"Data of original head: \" + start.arbitrary.data);\n System.out.println(\"Data of cloned head: \" + clonedList.arbitrary.data);\n\n // Test address and of arbitrary data of next.next\n System.out.println(\"Address of original head: \" + start.next.next.arbitrary );\n System.out.println(\"Address of cloned head: \" + clonedList.next.next.arbitrary);\n System.out.println(\"Data of original head: \" + start.next.next.arbitrary.data);\n System.out.println(\"Data of cloned head: \" + clonedList.next.next.arbitrary.data);\n\n\n }", "private void mirrorAttributesToOriginal(Node node) {\n assert (!isPartOfMirrorEdge(node)) : \"The method should not be called on node bends.\";\n for (NodeAttributeToPreserve attribute : nodeAttributesToPreserve) {\n NodeAttribute<Object> originalAttribute = originalGraph.nodeAttribute(attribute.id);\n NodeAttribute<Object> mirrorAttribute = mirrorGraph.nodeAttribute(attribute.id);\n copyAttributeValue(mirrorAttribute, node, originalAttribute, node);\n }\n copyPosition(mirrorPositions, originalPositions, node);\n }", "public CommitNode(CommitNode parent, CommitNode toCopy) {\r\n\t\tparentCommit = parent;\r\n\t\t//ID to be set in Gitlet.java\r\n\t\tmessage = toCopy.message();\r\n\t\tdate = Calendar.getInstance().getTime();\r\n\t\ttrackedFiles = toCopy.trackedFiles();\r\n\t\tbranchesPartOf = toCopy.branches();\r\n\t\tchildren = toCopy.getChildren();\r\n\t}" ]
[ "0.63025904", "0.6046168", "0.6043179", "0.5924438", "0.5921631", "0.5914533", "0.582651", "0.57296264", "0.5685582", "0.56267273", "0.5591683", "0.55743116", "0.55664545", "0.5513796", "0.54674745", "0.54610807", "0.5452962", "0.54061246", "0.53888625", "0.5337286", "0.53158367", "0.5281928", "0.5265863", "0.52568847", "0.5227577", "0.522079", "0.5218687", "0.52179176", "0.5193021", "0.51736075", "0.5168325", "0.51597", "0.51552707", "0.512834", "0.5110333", "0.5105501", "0.5095499", "0.5090667", "0.507437", "0.5071088", "0.5062201", "0.50604796", "0.5055717", "0.50393456", "0.5032928", "0.50308293", "0.5026066", "0.5012176", "0.5002504", "0.5000688", "0.49983692", "0.49976766", "0.49895167", "0.49892437", "0.49753645", "0.49571547", "0.49505898", "0.49471077", "0.49371088", "0.49354035", "0.4932821", "0.49239868", "0.49198303", "0.49196878", "0.49130094", "0.49094293", "0.49070886", "0.4903727", "0.48951718", "0.48801053", "0.48691586", "0.48416644", "0.483601", "0.481883", "0.48177204", "0.48176515", "0.48093054", "0.4804313", "0.4801446", "0.47999772", "0.47951978", "0.47948352", "0.4784348", "0.47833237", "0.4777953", "0.47730407", "0.4772171", "0.47590405", "0.4758517", "0.47526094", "0.4747", "0.47331753", "0.4730016", "0.47220144", "0.4719163", "0.47107813", "0.4709455", "0.47033298", "0.4699698", "0.46993572" ]
0.6000468
3
The ImageComponent3D.Updater interface is used in updating image data that is accessed by reference from a live or compiled ImageComponent object. Applications that wish to modify such data must define a class that implements this interface. An instance of that class is then passed to the updateData method of the ImageComponent object to be modified.
public static interface Updater { /** * Updates image data that is accessed by reference. * This method is called by the updateData method of an * ImageComponent object to effect * safe updates to image data that * is referenced by that object. Applications that wish to modify * such data must implement this method and perform all updates * within it. * <br> * NOTE: Applications should <i>not</i> call this method directly. * * @param imageComponent the ImageComponent object being updated. * @param index index of the image to be modified. * @param x starting X offset of the subregion. * @param y starting Y offset of the subregion. * @param width width of the subregion. * @param height height of the subregion. * * @see ImageComponent3D#updateData */ public void updateData(ImageComponent3D imageComponent, int index, int x, int y, int width, int height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);", "public void updateData(Updater updater, int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height) {\n if (isLiveOrCompiled() &&\n !this.getCapability(ALLOW_IMAGE_WRITE)) {\n throw new CapabilityNotSetException(\n J3dI18N.getString(\"ImageComponent3D5\"));\n }\n\n if (!((ImageComponent3DRetained)this.retained).isByReference()) {\n throw new IllegalStateException(\n J3dI18N.getString(\"ImageComponent3D6\"));\n }\n\n int w = ((ImageComponent3DRetained)this.retained).getWidth();\n int h = ((ImageComponent3DRetained)this.retained).getHeight();\n\n if ((x < 0) || (y < 0) || ((x + width) > w) || ((y + height) > h)) {\n throw new IllegalArgumentException(\n J3dI18N.getString(\"ImageComponent3D7\"));\n }\n\n ((ImageComponent3DRetained)this.retained).updateData(\n updater, index, x, y, width, height);\n }", "void update(ReferenceData instance) throws DataException;", "protected abstract void update();", "protected abstract void update();", "public void updateData() {}", "abstract public void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update(Object obj) ;", "public interface Updatable {\n\n\tpublic void update(Simulation simulation);\n\tpublic void update(double x, double y);\n\n}", "private synchronized void updateData() {\n if (nanoseconds >= 1000000000) {\n fps = frames;\n ups = updates;\n nanoseconds = nanoseconds - 1000000000;\n frames = 0;\n updates = 0;\n }\n\n long elapsedTime = System.nanoTime() - oldTime;\n oldTime = oldTime + elapsedTime;\n nanoseconds = nanoseconds + elapsedTime;\n\n particleSimulator.update(elapsedTime * 1e-9);\n\n // An update occurred, increment.\n updates++;\n\n // Ask for a repaint if we know of a component to repaint\n if (gameDrawingComponent != null) {\n gameDrawingComponent.repaint();\n }\n }", "abstract public Vector3[][] update();", "public void update() {}", "protected abstract void update();", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "@Override\n\tpublic boolean imageUpdate(Image arg0, int arg1, int arg2, int arg3, int arg4, int arg5) {\n\t\treturn false;\n\t}", "public abstract void update ();", "void updateData();", "public void update(IComponent c);", "public void update() ;", "public abstract void update(Input input);", "public interface Updateable {\n public void update();\n}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "void onUpdate(IMirrorable o);", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "public void update() {\n\n }", "public void update() {\n\n }", "@Override\n\tpublic void update() { }", "public void update() {\n }", "public interface UpdateDelegate {\n /** Performs some actions in response to a user's updating controls. */\n void updateControls();\n }", "public ImageComponent3D(int format,\n\t\t\t RenderedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public void update();", "public void update();", "public void update();", "public void update();", "public void update();", "public void update();", "public void update();", "public void update(){}", "public void update(){}", "abstract void update(int i);", "public ImageComponent3D(int format,\n\t\t\t BufferedImage[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(null), images[0].getHeight(null), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n }", "public abstract void update(int delta);", "public void dataUpdateEvent();", "public abstract void objectUpdate(int x,int y, int delta);", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "public ImageComponent3D(int format,\n\t\t\t NioImageBuffer[] images,\n\t\t\t boolean byReference,\n\t\t\t boolean yUp) {\n\n\n \tthrow new UnsupportedOperationException();\n /*\n \t((ImageComponentRetained)this.retained).setByReference(byReference);\n \t((ImageComponentRetained)this.retained).setYUp(yUp);\n \t((ImageComponent3DRetained)this.retained).processParams(format,\n images[0].getWidth(), images[0].getHeight(), images.length);\n \tfor (int i=0; i<images.length; i++) {\n \t ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n \t}\n */\n }", "@Override\r\n\tpublic void update() {\r\n\t}", "@Override\n\tpublic void update() {\n\t\tobj.update();\n\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "@Override\n public void update() {\n }", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "interface Update {}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\n\tpublic void update(UpdateInfo updateInfo) {\n\t\t\n\t}", "public void update() {\n\t\t\n\t}", "public void update(){\r\n }" ]
[ "0.77783227", "0.7247816", "0.6355467", "0.596873", "0.596873", "0.59517115", "0.58496857", "0.581843", "0.581843", "0.581843", "0.581843", "0.581843", "0.581843", "0.581843", "0.581843", "0.581843", "0.581843", "0.581843", "0.581843", "0.5812459", "0.580914", "0.58088464", "0.57980853", "0.5790554", "0.5734426", "0.5724512", "0.5724053", "0.57104105", "0.5705474", "0.5688458", "0.5666674", "0.5626684", "0.55884176", "0.55833405", "0.55833405", "0.5582912", "0.55824006", "0.55824006", "0.55824006", "0.5582068", "0.5582068", "0.5580529", "0.5566434", "0.55572945", "0.5556719", "0.5554818", "0.5554818", "0.5554818", "0.5554818", "0.5554818", "0.5554818", "0.5554818", "0.55487305", "0.55487305", "0.55465394", "0.5535236", "0.5526769", "0.5495526", "0.5482685", "0.5477571", "0.5477571", "0.5477571", "0.5477571", "0.5477571", "0.5477571", "0.5461222", "0.5461222", "0.5461222", "0.54557174", "0.54533714", "0.54394263", "0.5437836", "0.5437836", "0.54358816", "0.54353034", "0.5435064", "0.5435064", "0.54315346", "0.54315346", "0.54315346", "0.54315346", "0.54315346", "0.54315346", "0.54315346", "0.54315346", "0.54315346", "0.54315346", "0.5429422", "0.54179037", "0.54179037", "0.54179037", "0.54179037", "0.54170454", "0.54170454", "0.54170454", "0.54170454", "0.54170454", "0.54143447", "0.54090184", "0.537623" ]
0.85110474
0
Updates image data that is accessed by reference. This method is called by the updateData method of an ImageComponent object to effect safe updates to image data that is referenced by that object. Applications that wish to modify such data must implement this method and perform all updates within it. NOTE: Applications should not call this method directly.
public void updateData(ImageComponent3D imageComponent, int index, int x, int y, int width, int height);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static interface Updater {\n\t/**\n\t * Updates image data that is accessed by reference.\n\t * This method is called by the updateData method of an\n\t * ImageComponent object to effect\n\t * safe updates to image data that\n\t * is referenced by that object. Applications that wish to modify\n\t * such data must implement this method and perform all updates\n\t * within it.\n\t * <br>\n\t * NOTE: Applications should <i>not</i> call this method directly.\n\t *\n\t * @param imageComponent the ImageComponent object being updated.\n\t * @param index index of the image to be modified.\n\t * @param x starting X offset of the subregion.\n\t * @param y starting Y offset of the subregion.\n\t * @param width width of the subregion.\n\t * @param height height of the subregion.\n\t *\n\t * @see ImageComponent3D#updateData\n\t */\n\tpublic void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);\n }", "private void updateImage() {\r\n\r\n final BufferedImage image = imageCanvas.getImage();\r\n\r\n //\r\n // no image, no size\r\n\r\n if (image == null) {\r\n imageCanvas.setPreferredSize(new Dimension(0, 0));\r\n }\r\n\r\n else {\r\n\r\n final int imageWidth = image.getWidth();\r\n final int imageHeight = image.getHeight();\r\n\r\n //\r\n // if zoom is set to real size there is no need for calculations\r\n\r\n if (zoom == ZOOM_REAL_SIZE) {\r\n imageCanvas.setPreferredSize(new Dimension(imageWidth, imageWidth));\r\n }\r\n\r\n //\r\n // apply the zoom ratio to the image size\r\n\r\n else {\r\n\r\n final double ratio = ((double) zoom) / ((double) ZOOM_REAL_SIZE);\r\n\r\n final double imageCanvasMaxWidth = ((double) imageWidth) * ratio;\r\n final double imageCanvasMaxHeight = ((double) imageHeight) * ratio;\r\n\r\n imageCanvas.setPreferredSize(new Dimension((int) imageCanvasMaxWidth, (int) imageCanvasMaxHeight));\r\n }\r\n }\r\n\r\n //\r\n // revalidation\r\n // do not use #revaliade() method, validation will occur after all currently\r\n // pending events have been dispatched, use invalidate/validate/repaint\r\n\r\n imageCanvas. invalidate();\r\n imageCanvas.validate();\r\n imageCanvas.repaint();\r\n \r\n// imageCanvas.revalidate();\r\n \r\n invalidate();\r\n validate();\r\n repaint();\r\n\r\n// revalidate();\r\n \r\n //\r\n // this is the best place to update the cursor\r\n // since all actions on the image will call this method\r\n\r\n updateCursor(false);\r\n }", "private void updateImgCanvas() {\n\t\timgCanvas.updateCanvasImage(source.source);\n\t\tthis.revalidate();\n\t\tthis.repaint();\n\t}", "public void update(ImageObject nImage) { \r\n selectedImage = nImage;\r\n \r\n update();\r\n }", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "public void update() {\n if (this.active) {\n GameObject.processing.image(this.image, this.xPosition, this.yPosition);\n }\n }", "public void update() {\n\t\t//Start updting the image\n\t\timg.loadPixels();\n\t\t\n\t\t//for every cell apply a color\n\t\tGridCell[] cells = grid.getCells();\n\t\tfor(int i = 0 ; i < cells.length; i++) {\n\t\t\timg.pixels[i] = cells[i].getMiniMapColor(ignoreDiscovered);\n\t\t}\n\t\t\n\t\t//Now update the image\n\t\timg.updatePixels();\n\t}", "@Override\n\tpublic boolean imageUpdate(Image arg0, int arg1, int arg2, int arg3, int arg4, int arg5) {\n\t\treturn false;\n\t}", "public void updateLayer() {\n bufferedImage = null;\n repaint();\n panelResized();\n }", "public void updateOnCtWindowChange() {\n int[] displayImageData = resolveRaw(imgData[currentLayer]);\n raster.setPixels(0, 0, imgWidth, imgHeight, displayImageData);\n image.setData(raster);\n }", "public void updateData() {}", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "public void updateData(Updater updater, int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height) {\n if (isLiveOrCompiled() &&\n !this.getCapability(ALLOW_IMAGE_WRITE)) {\n throw new CapabilityNotSetException(\n J3dI18N.getString(\"ImageComponent3D5\"));\n }\n\n if (!((ImageComponent3DRetained)this.retained).isByReference()) {\n throw new IllegalStateException(\n J3dI18N.getString(\"ImageComponent3D6\"));\n }\n\n int w = ((ImageComponent3DRetained)this.retained).getWidth();\n int h = ((ImageComponent3DRetained)this.retained).getHeight();\n\n if ((x < 0) || (y < 0) || ((x + width) > w) || ((y + height) > h)) {\n throw new IllegalArgumentException(\n J3dI18N.getString(\"ImageComponent3D7\"));\n }\n\n ((ImageComponent3DRetained)this.retained).updateData(\n updater, index, x, y, width, height);\n }", "public final boolean imageUpdate(java.awt.Image image, int infoflags, int x, int y, int width, int height) {\r\n\treturn false;\r\n}", "public void setImageData(byte[] imageData) {\n if (tile != null) {\n tile.setImageData(imageData);\n } else {\n this.data = imageData;\n }\n }", "public void updateImage(ColorImage newImage) {\n currentImage.push(newImage);\n }", "@Override\n public Action update() {\n // draws the image \"image\" at position \"this.x\" and \"this.y\" and then returns null\n Thing.getProcessing().image(this.image, this.x, this.y);\n return null;\n }", "private synchronized void updateData() {\n if (nanoseconds >= 1000000000) {\n fps = frames;\n ups = updates;\n nanoseconds = nanoseconds - 1000000000;\n frames = 0;\n updates = 0;\n }\n\n long elapsedTime = System.nanoTime() - oldTime;\n oldTime = oldTime + elapsedTime;\n nanoseconds = nanoseconds + elapsedTime;\n\n particleSimulator.update(elapsedTime * 1e-9);\n\n // An update occurred, increment.\n updates++;\n\n // Ask for a repaint if we know of a component to repaint\n if (gameDrawingComponent != null) {\n gameDrawingComponent.repaint();\n }\n }", "public void update()\n {\n modifier = coral.getCurrentSubject();\n modified = new Date();\n try\n {\n persistence.save(this);\n }\n catch(SQLException e)\n {\n throw new BackendException(\"failed to update resource's persitent image\", e);\n }\n try\n {\n Resource impl = coral.getStore().getResource(getId());\n coralEventHub.getGlobal().fireResourceChangeEvent(impl, modifier);\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"inconsistent data\", e);\n }\n }", "void update(ReferenceData instance) throws DataException;", "@Override\n\tprotected byte[] getReferenceImageData() {\n\t\treturn createBufferedImageData(resolveURI(refImageURI));\n\t}", "public void imageUpdate() {\n this.notifyDataSetChanged();\n }", "public void setImageData(byte[] value) {\r\n this.imageData = ((byte[]) value);\r\n }", "@Override\r\n\tprotected void updateImage(final IScope scope) {\n\t}", "public void updateImage() {\n \t\tAnimation anim = this.animationCollection.at(\n \t\t\t\tfak.getCurrentAnimationTextualId());\n \n \t\t// if animation is set to something bad, then set it to back to initial\n \t\tif(anim==null)\n \t\t{\n \t\t\tfak.setCurrentAnimationTextualId(ConstantsForAPI.INITIAL);\n \t\t\tanim = this.animationCollection.at(\n \t\t\t\t\tfak.getCurrentAnimationTextualId());\n \t\t}\n \n \t\tif(anim==null)\n \t\t{\n \t\t\tanim = this.animationCollection.at(0);\n \t\t\tfak.setCurrentAnimationTextualId(anim.getTextualId());\n \t\t}\n \n \t\tif (anim != null) {\n \t\t\tif (fak.getCurrentFrame()\n \t\t\t\t\t>= anim.getLength()) {\n \t\t\t\tfak.setCurrentFrame(\n \t\t\t\t\t\tanim.getLength() - 1);\n \t\t\t}\n \n \t\t\tcom.github.a2g.core.objectmodel.Image current = anim.getImageAndPosCollection().at(\n \t\t\t\t\tfak.getCurrentFrame());\n \n \t\t\t// yes current can equal null in some weird cases where I place breakpoints...\n \t\t\tif (current != null\n \t\t\t\t\t&& !current.equals(this)) {\n \t\t\t\tif (this.currentImage != null) {\n \t\t\t\t\tthis.currentImage.setVisible(\n \t\t\t\t\t\t\tfalse, new Point(this.left,this.top));\n \t\t\t\t}\n \t\t\t\tthis.currentImage = current;\n \t\t\t}\n \t\t}\n \t\t// 2, but do this always\n \t\tif (this.currentImage != null) {\n \t\t\tthis.currentImage.setVisible(\n \t\t\t\t\tthis.visible, new Point(this.left,\n \t\t\t\t\t\t\tthis.top));\n \t\t}\n \n \t}", "@Test\n\tpublic void testUpdateImage() {\n\n\t\tip = new ImagePlus();\n\t\t//assertNull(ip.img);\n\t\tip.updateImage();\n\t\t//assertNull(ip.img);\n\n\t\tip = new ImagePlus(DataConstants.DATA_DIR + \"head8bit.tif\");\n\t\t//assertNull(ip.img);\n\t\tip.updateImage();\n\t\t//assertNotNull(ip.img);\n\t}", "private void reanderImage(ImageData data) {\n \n }", "public void updateOnMaskChange() {\n if(maskList != null) {\n int[] displayMaskData = resolveMasks();\n maskRaster.setDataElements(0, 0, imgWidth, imgHeight, displayMaskData);\n maskImage.setData(maskRaster);\n }\n }", "public void updateImage(final Image image) { //The Reason that we have Set the Image to final over here is because once we fetch the Image from the AbsolutePath then after scaling this should be the Final Image in which we detect the Faces \n\t\timagelabel.setIcon(new ImageIcon(scaleImage(image))); \n\t}", "public void render () {\n image (img, xC, yC, xLength * getPixelSize(), yLength * getPixelSize());\n }", "void updateData();", "public void updateObjectImage() {\r\n\t\tif (this.objectDescriptionTabItem != null) this.objectDescriptionTabItem.redrawImageCanvas();\r\n\t}", "public byte[] getImageData() {\r\n return imageData;\r\n }", "public void updateImage() {\n Graphics2D g = img.createGraphics();\n for (Circle gene : genes) {\n gene.paint(g);\n }\n g.dispose();\n }", "public void update(Graphics g) {\n\t\tjava.awt.Image i = image;\n\t\tg.drawImage(i, 0, 0, this);\n\t\t// Graphics gr = this.getGraphics();\n\n\t}", "public synchronized void updateData() {\n updateDataFields(this::defaultFetcher);\n }", "public void updateImage(BufferedImage displayImage) {\n this.imageToDisplay = new ImageIcon(displayImage);\n this.revalidate();\n this.repaint();\n }", "public void updateLocation()\r\n {\r\n\t\timg.setUserCoordinator(latitude, longitude);\r\n\t\timg.invalidate();\r\n\t}", "Object getChannelData() {\r\n return imageData;\r\n }", "public void redraw() {\n\t\tif(this.getGraphics() != null){\n\t\t\tthis.getGraphics().drawImage(imageBuffer, 0, 0, this); // Swap\n\t\t}\n\t}", "protected void setImageData(BufferedImage img) {\n \t\tif (format == null || format == Format.TEXT || format == Format.COLOR16_8x8)\n \t\t\treturn;\n \t\n \t\tequalize(img);\n \t\t\n \t\t//denoise(img);\n \t\t\n \t\tupdatePaletteMapping();\n \t\n \t\tflatten(img);\n \t\t\n \t\tif (!importDirectMappedImage(img)) {\n \t\t\tconvertImageToColorMap(img);\n \t\t}\n \t\n \t\treplaceImageData(img);\n \t}", "@Override\n public IIOMetadata getImageData() {\n return super.imageData;\n }", "public void update() {\n\t\tif (c.getResamplingFactor() != 1) return;\n\t\trenderer.getVolume().updateData();\n\t}", "public void updateDataComp() {\n\t\tdataEntryDao.updateDataComp();\n\t}", "public ImageData getImageData() {\n\t\treturn this.data.getImageData();\n\t}", "private void updateSourceImageRef(@javax.annotation.Nullable com.facebook.common.references.CloseableReference<com.facebook.imagepipeline.image.CloseableImage> r3, int r4) {\n /*\n r2 = this;\n monitor-enter(r2);\n r0 = r2.mIsClosed;\t Catch:{ all -> 0x0022 }\n if (r0 == 0) goto L_0x0007;\n L_0x0005:\n monitor-exit(r2);\t Catch:{ all -> 0x0022 }\n L_0x0006:\n return;\n L_0x0007:\n r0 = r2.mSourceImageRef;\t Catch:{ all -> 0x0022 }\n r1 = com.facebook.common.references.CloseableReference.cloneOrNull(r3);\t Catch:{ all -> 0x0022 }\n r2.mSourceImageRef = r1;\t Catch:{ all -> 0x0022 }\n r2.mStatus = r4;\t Catch:{ all -> 0x0022 }\n r1 = 1;\n r2.mIsDirty = r1;\t Catch:{ all -> 0x0022 }\n r1 = r2.setRunningIfDirtyAndNotRunning();\t Catch:{ all -> 0x0022 }\n monitor-exit(r2);\t Catch:{ all -> 0x0022 }\n com.facebook.common.references.CloseableReference.closeSafely(r0);\n if (r1 == 0) goto L_0x0006;\n L_0x001e:\n r2.submitPostprocessing();\n goto L_0x0006;\n L_0x0022:\n r0 = move-exception;\n monitor-exit(r2);\t Catch:{ all -> 0x0022 }\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.imagepipeline.producers.PostprocessorProducer$PostprocessorConsumer.updateSourceImageRef(com.facebook.common.references.CloseableReference, int):void\");\n }", "public void updateFromDeserialization() {\n\t\tif (inSerializedState) {\n\t\t\tframes = new KeyFrames();\n\t\t\tfor(Integer key : pixelsMap.keySet()) {\n\t\t\t\tint[][] pixels = pixelsMap.get(key);\n\t\t\t\tDrawFrame image = new DrawFrame(serializedWidth, serializedHeight);\n\t\t\t\tfor(int r = 0; r < serializedHeight; r++) {\n\t\t\t\t\tfor (int c = 0; c < serializedWidth; c++) {\n\t\t\t\t\t\timage.setRGB(c, r, pixels[r][c]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*\n\t\t WritableRaster raster = (WritableRaster) image.getData();\n\t\t raster.setPixels(0,0, serializedWidth, serializedHeight, pixels);\n\t\t image.setData(raster);\n\t\t */\n\t\t\t\tframes.put(key, image);\n\t\t\t}\n\t\t\tinitializeTransientUIComponents();\n\t\t\tinSerializedState = false;\t\n\t\t}\n\t}", "public void update()\n {\n if(x + image.getWidth(null) < 0)\n {\n x = 0;\n }\n else\n {\n x--;\n }\n }", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "public void updateData(Trick completedTrick);", "public void set(int index, RenderedImage image) {\n\n checkForLiveOrCompiled();\n // For RenderedImage the width and height checking is done in the retained.\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "@Override\n\tpublic ImageEntity update(Object entity) {\n\t\tDatabaseContext.merge(entity);\n\t\treturn (ImageEntity) entity;\n\t}", "public void update() {\r\n if(selectedImage == null) {\r\n xStartProperty.setText(\"\");\r\n yStartProperty.setText(\"\");\r\n xEndProperty.setText(\"\");\r\n yEndProperty.setText(\"\");\r\n rotationProperty.setText(\"\");\r\n } else {\r\n xStartProperty.setText(String.valueOf(selectedImage.getXStart()));\r\n yStartProperty.setText(String.valueOf(selectedImage.getYStart()));\r\n xEndProperty.setText(String.valueOf(selectedImage.getXEnd()));\r\n yEndProperty.setText(String.valueOf(selectedImage.getYEnd()));\r\n rotationProperty.setText(String.valueOf(selectedImage.getRotation()));\r\n }\r\n }", "abstract public void modifyImage(long dt, long curTime, BufferedImage image) ;", "public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h)\r\n\t\t{\n\t\t\tif ((flags & ALLBITS) != 0) {\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t\treturn ((flags & (ALLBITS | ERROR)) == 0);\r\n\t\t}", "public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h)\r\n\t\t{\n\t\t\tif ((flags & ALLBITS) != 0) {\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t\treturn ((flags & (ALLBITS | ERROR)) == 0);\r\n\t\t}", "public void updateImage(GameObject.Direction direction) {\n switch (direction) {\n case NORTH:\n currentImage = north;\n break;\n\n case SOUTH:\n currentImage = south;\n break;\n\n case WEST:\n currentImage = west;\n break;\n\n case EAST:\n currentImage = east;\n break;\n }\n }", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "@Override\n public void setData(final Raster data) {\n int count;\n synchronized (this) {\n count = writeCount++;\n }\n fireTileUpdate(count, true);\n try {\n // Do not use super.setData(…) because it does not handle correctly the float and double types.\n getRaster().setRect(data);\n } finally {\n synchronized (this) {\n // Similar to `releaseWritableTile(…)` but without throwing exception.\n writeCount = count = Math.max(0, writeCount - 1);\n }\n fireTileUpdate(count, false);\n }\n }", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "public void changeAction()\r\n {\r\n bufferedImage = imageCopy[0];\r\n edited = imageCopy[1];\r\n cropedPart = imageCopy[2];\r\n bufferedImage = imageCopy[3];\r\n\r\n isBlured = statesCopy[0];\r\n isReadyToSave = statesCopy[1];\r\n isChanged = statesCopy[2];\r\n isInverted = statesCopy[3];\r\n isRectangularCrop = statesCopy[4];\r\n isCircularCrop = statesCopy[5];\r\n isImageLoaded = statesCopy[6];\r\n }", "private void updateImage() {\r\n \tfor(int i=0;i<rows;i++){\r\n for(int j=0;j<cols;j++){\r\n if(complexArray[i][j].escapeTime(RADIUS, maxIterations)!=-1){//the complex escaped\r\n mandelbrotColor[i][j]=new RGBColor(palette[complexArray[i][j].escapeTime(RADIUS, maxIterations)]);\r\n }\r\n else{\r\n mandelbrotColor[i][j]=palette[complexArray[i][j].escapeTime(RADIUS, maxIterations)+1];//the complex didnt escaped\r\n }\r\n }\r\n }\r\n }", "public void imageChanged(ImageChangeActions actions) {\n compositeImageUpToDate = false;\n\n if(actions.isRepaint()) {\n if (ic != null) {\n ic.repaint();\n }\n }\n\n if(actions.isUpdateHistogram()) {\n HistogramsPanel.INSTANCE.updateFromCompIfShown(this);\n }\n }", "@Override\n\tpublic void update() {\n\t\tobj.update();\n\t}", "public void update(BufferedImage newImg, structs.ScreenRegion frame) {\r\n\t\tfeed.updateImage(newImg, frame);\r\n\t}", "public void updateImageForIndex(int index) {\n\t\t//Nothing to do\n\t}", "@Override\n public void drawImage(Image image, double x, double y) {\n Object nativeImage = graphicsEnvironmentImpl.drawImage(canvas, image, x, y, image.getCached());\n image.cache(nativeImage);\n }", "@Override\n public void update(Observable o, Object arg) {\n videoImage = data.getVideoImage();\n }", "public void updatePixel(int[] location, double[] parameters);", "@Override\n public void onComplicationDataUpdate(\n int complicationId, ComplicationData complicationData) {\n mActiveComplicationDataSparseArray.put(complicationId, complicationData);\n\n // Updates correct ComplicationDrawable with updated data.\n ComplicationDrawable complicationDrawable =\n mComplicationDrawableSparseArray.get(complicationId);\n complicationDrawable.setComplicationData(complicationData);\n\n invalidate();\n }", "public void update(OpenCLManager openCLManager)\n {\n if (subscribedImageAvailable.poll())\n {\n if (!initialized)\n {\n imageWidth = imageMessage.getImageWidth();\n imageHeight = imageMessage.getImageHeight();\n totalNumberOfPixels = imageHeight * imageWidth;\n int bytesPerPixel = ImageMessageFormat.getFormat(imageMessage).getBytesPerPixel();\n decompressionInputSwapReference.initializeBoth(decompressionInput -> decompressionInput.setup(totalNumberOfPixels * bytesPerPixel));\n\n initialize(openCLManager);\n initialized = true;\n }\n\n fx = imageMessage.getFocalLengthXPixels();\n fy = imageMessage.getFocalLengthYPixels();\n cx = imageMessage.getPrincipalPointXPixels();\n cy = imageMessage.getPrincipalPointYPixels();\n depthDiscretization = imageMessage.getDepthDiscretization();\n translationToWorld.set(imageMessage.getPosition());\n rotationMatrixToWorld.set(imageMessage.getOrientation());\n\n // We decompress outside of the incoming message synchronization block.\n // Using an internal swap reference to the unpacked data, we can allow ROS 2\n // to not have to wait for compression to finish and also not have to copy\n // the unpacked result to a decompression input buffer.\n decompressionInputSwapReference.getForThreadOne().extract(imageMessage);\n decompressionInputSwapReference.swap();\n // FIXME: This call prints \"no afterExecute handlers\" warnings whe the Ouster Fisheye point cloud's refresh rate is too fast\n channelDecompressionThreadExecutor.clearQueueAndExecute(decompressionAsynchronousThread);\n\n messageSizeReadout.update(imageMessage.getData().size());\n sequenceDiscontinuityPlot.update(imageMessage.getSequenceNumber());\n delayPlot.addValue(MessageTools.calculateDelay(imageMessage));\n\n cameraModel = CameraModel.getCameraModel(imageMessage);\n MessageTools.extractIDLSequence(imageMessage.getOusterBeamAltitudeAngles(), ousterBeamAltitudeAnglesBuffer);\n MessageTools.extractIDLSequence(imageMessage.getOusterBeamAzimuthAngles(), ousterBeamAzimuthAnglesBuffer);\n }\n }", "protected void onReloadImage() {\n String url = DataProvider.SCREEN + DataProvider.SCREEN_INDEX + mScreenId + \"&time=\" + System.currentTimeMillis();\n image.setUrl(url); //just to avoid caching\n loadTree();\n }", "public interface Image {\n\n /**\n * Get number of pixels horizontally\n *\n * @return int number of pixels horizontally\n */\n int getWidth();\n\n /**\n * Get number of pixels vertically\n *\n * @return int number of pixels vertically\n */\n int getHeight();\n\n /**\n * Get the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the red value\n */\n int getRed(int x, int y);\n\n\n /**\n * Get the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the green value\n */\n int getGreen(int x, int y);\n\n /**\n * Get the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the blue value\n */\n int getBlue(int x, int y);\n\n /**\n * Set the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setRed(int x, int y, int value);\n\n\n /**\n * Set the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setGreen(int x, int y, int value);\n\n /**\n * Set the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setBlue(int x, int y, int value);\n}", "@Override\n public void update() {\n updateBuffs();\n }", "public void update() {\n\t\tif (MainClass.getPlayer().isJumping()) {\n\t\t\tcurrentImage = characterJumped;\n\t\t} else if(Math.abs(MainClass.getPlayer().getSpeedY()) > Player.getFallspeed() ) {\n\t\t\tcurrentImage = characterJumped;\n\t\t} else if(MainClass.getPlayer().isCovered() == true) {\n\t\t\tcurrentImage = characterCover;\n\t\t} else if(MainClass.getPlayer().isJumping() == false && MainClass.getPlayer().isCovered() == false) {\n\t\t\tcurrentImage = super.getCurrentImage();\n\t\t}\n\t\tthis.update(25);\n\t\n\t}", "public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }", "public void update() {\n\t\tfor (byte r = 0; r < b.length; r++) {\n\t\t\tfor (byte c = 0; c < b[r].length; c++) {\n\t\t\t\tb[r][c].update(this);\n\t\t\t}\n\t\t}\n\t}", "public void reload() {\n mHandle = new Texture(mBitmap, mMinMode, mMagMode, mWrapS, mWrapT).getHandle();\n }", "public void setImage(BufferedImage i) {\n // Paint image object\n paint = true;\n image = i;\n this.repaint();\n }", "@PutMapping(value = KekMappingValues.GUID)\n @PreAuthorize(KekRoles.USER_ADMIN)\n public ResponseEntity<String> modifyData(@PathVariable String guid, @RequestBody String image) {\n logger.info(\"Accepted modified data from the client \");\n\n byte[] encodedByte = Base64.decodeBase64(image.getBytes());\n\n ICloudStorageObject cloudStorageObject = cloudStorageService.updateBinaryData(guid, encodedByte);\n\n String modifiedUrl = cloudStorageObject.getUrlString();\n\n logger.info(\"Sending the modified url to the client:\\n{}\", modifiedUrl);\n return ResponseEntity\n .status(HttpStatus.OK)\n .body(modifiedUrl);\n }", "private void updateData() {\n // store if checkbox is enabled and update the label accordingly\n updateOneItem(jcbMaxTracks, jsMaxTracks, jnMaxTracks, Variable.MAXTRACKS,\n Variable.MAXTRACKS_ENABLED);\n updateOneItem(jcbMaxSize, jsMaxSize, jnMaxSize, Variable.MAXSIZE, Variable.MAXSIZE_ENABLED);\n updateOneItem(jcbMaxLength, jsMaxLength, jnMaxLength, Variable.MAXLENGTH,\n Variable.MAXLENGTH_ENABLED);\n if (jcbOneMedia.isSelected()) {\n data.put(Variable.ONE_MEDIA, jcbMedia.getSelectedItem());\n data.put(Variable.ONE_MEDIA_ENABLED, Boolean.TRUE);\n } else {\n // keep old value... data.remove(Variable.KEY_MEDIA);\n data.put(Variable.ONE_MEDIA_ENABLED, Boolean.FALSE);\n }\n data.put(Variable.CONVERT_MEDIA, jcbConvertMedia.isSelected());\n data.put(Variable.RATING_LEVEL, jsRatingLevel.getValue());\n data.put(Variable.NORMALIZE_FILENAME, jcbNormalizeFilename.isSelected());\n }", "void setImage(PImage img) {\n _img = img;\n }", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "private void updateImage(final String token, final GMImage image) throws JSONException {\n httpRequest.updateImage(image.getHash(), token, image.getJson().toString()).enqueue(new Callback<ResponseBody>() {\n @Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> res) {\n if (res.code() == 200) {\n // change sync state to modified\n image.setSyncState(GMTable.GMSyncState.SYNC);\n dbHelper.update(image);\n\n // Notify\n notifyUploadSuccess();\n } else {\n notifyUploadFail();\n }\n }\n\n @Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n t.printStackTrace();\n\n // notify fail after retry reach limit\n if (((Integer) image.getTag(TAG_RETRY)) >= GMGlobal.RETRY_LIMIT) {\n notifyUploadFail();\n }\n\n // retry upload image information\n new Retry() {\n @Override\n protected void handle(Object... params) {\n try {\n updateImage((String) params[0], (GMImage) params[1]);\n } catch (JSONException e) {\n e.printStackTrace();\n notifyUploadFail();\n }\n }\n }.execute(token, image);\n }\n });\n }", "@Override\r\n\tpublic boolean updateImageRecordBuildingInfo(ImageRecordBuildingInfo info) {\n\t\treturn update(info);\r\n\t}", "private void refreshImage() {\n Bitmap image = drawableToBitmap(getDrawable());\n int canvasSize = Math.min(canvasWidth, canvasHeight);\n if (canvasSize > 0 && image != null) {\n //Preserve image ratio if it is not square\n BitmapShader shader = new BitmapShader(ThumbnailUtils.extractThumbnail(image, canvasSize, canvasSize),\n Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);\n mPaint.setShader(shader);\n }\n }", "@Override\n public void feedRawData(Image data) {\n mARGSession.feedRawData(data);\n }", "private void rebuildImageIfNeeded() {\n Rectangle origRect = this.getBounds(); //g.getClipBounds();\n// System.out.println(\"origRect \" + origRect.x + \" \" + origRect.y + \" \" + origRect.width + \" \" + origRect.height);\n\n backBuffer = createImage(origRect.width, origRect.height);\n// System.out.println(\"Image w \" + backBuffer.getWidth(null) + \", h\" + backBuffer.getHeight(null));\n Graphics backGC = backBuffer.getGraphics();\n backGC.setColor(Color.BLACK);\n backGC.fillRect(0, 0, origRect.width, origRect.height);\n// updateCSysEntList(combinedRotatingMatrix);\n paintWorld(backGC);\n }", "public void setImage(Image img) {\r\n this.img = img;\r\n }", "public void run() {\n sight.setImageBitmap(bmp);\n // old = null;\n }", "@Override\n public boolean updateGraphicsData(GraphicsConfiguration gc) {\n // TODO: not implemented\n// throw new RuntimeException(\"Has not been implemented yet.\");\n return false;\n }", "public void setImage(byte[] value) {\n this.image = ((byte[]) value);\n }", "void lSetImage(Image img);", "private void update() {\n if (_dirty) {\n _fmin = _clips.getClipMin();\n _fmax = _clips.getClipMax();\n _fscale = 256.0f/(_fmax-_fmin);\n _flower = _fmin;\n _fupper = _flower+255.5f/_fscale;\n _dirty = false;\n }\n }", "@Override\n public void drawImage(Image image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh) {\n Object nativeImage = graphicsEnvironmentImpl.drawImage(canvas, image, sx, sy, sw, sh, dx, dy, dw, dh, image.getCached());\n image.cache(nativeImage);\n }", "public void update(ImagePlus imp) {\n if (this.isVisible()) {\n if (imp == null) {\n imageMetadataModel_.setMetadata(null);\n summaryCommentsTextArea.setText(null);\n } else {\n AcquisitionVirtualStack stack = getAcquisitionStack(imp);\n if (stack != null) {\n int slice = imp.getCurrentSlice();\n TaggedImage taggedImg = stack.getTaggedImage(slice);\n if (taggedImg == null) {\n imageMetadataModel_.setMetadata(null);\n } else {\n Map<String,String> md = stack.getTaggedImage(slice).tags;\n if (!showUnchangingKeys_)\n md = selectChangingTags(md);\n imageMetadataModel_.setMetadata(md);\n }\n if (imp instanceof CompositeImage) {\n CompositeImage cimp = (CompositeImage) imp;\n displayModeCombo.setSelectedIndex(cimp.getMode()-1);\n }\n } else {\n imageMetadataModel_.setMetadata(null);\n }\n \n }\n }\n }", "public interface ImageModListener {\n void setImage(ArrayList<Integer> image);\n }" ]
[ "0.6749145", "0.6366678", "0.63331735", "0.6323653", "0.62221634", "0.62221634", "0.62193704", "0.61473596", "0.6076186", "0.6066272", "0.6060531", "0.60558164", "0.6040003", "0.6026968", "0.600866", "0.599326", "0.597466", "0.5945993", "0.5886846", "0.5839015", "0.58067805", "0.5788455", "0.5770695", "0.5720205", "0.5719469", "0.57087874", "0.5708565", "0.5700234", "0.56782067", "0.56678337", "0.56463224", "0.5645214", "0.5610654", "0.5607589", "0.5597927", "0.55978686", "0.55670476", "0.55530554", "0.5539117", "0.55383855", "0.55242115", "0.55110395", "0.5501371", "0.5488219", "0.5476687", "0.546997", "0.54557896", "0.54482555", "0.5426107", "0.54185325", "0.5416652", "0.5407341", "0.53894144", "0.5376097", "0.5371368", "0.5359517", "0.5359517", "0.5346358", "0.5345358", "0.5327942", "0.53264606", "0.5312233", "0.52783245", "0.52773225", "0.5276917", "0.5258832", "0.52504516", "0.52473015", "0.5230108", "0.5224362", "0.5215957", "0.5212999", "0.5203824", "0.5200358", "0.51863366", "0.5185157", "0.517827", "0.5172229", "0.51670456", "0.51663774", "0.5161846", "0.51403624", "0.5139412", "0.5135731", "0.5135731", "0.5135731", "0.5129117", "0.5127698", "0.51229674", "0.51212245", "0.51190686", "0.5115157", "0.51114845", "0.5110942", "0.5110608", "0.5106976", "0.51011324", "0.5090308", "0.5088274", "0.5084705" ]
0.7025244
0
/ init / try to close team who close already result negative
@Test public void temporaryTeamClosingUnavalableOption() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void resetMyTeam();", "void resetMyTeam(Team team);", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "public void setUpTheGame() throws UserCancelsException{\n played = true;\n ui.printToUser(\"Close the game at any time by inputting letters instead of numbers.\");\n currentOcean = new OceanImpl();\n currentOcean.placeAllShipsRandomly();\n \n currentScore = 0;\n playTheGame();\n if(currentScore<highestScore\n ||highestScore == 0){\n highestScore = currentScore;\n ui.printToUser(\"New High Score! : \" + highestScore);\n }\n }", "@Override\n public void resetQuestion() {\n super.resetQuestion();\n hadSecondChance = false;\n currentTeam = null;\n originalTeam = null;\n teamHasAnswered.clear();\n //reset teamHasAnswered map so all teams get a chance to anaswer again\n for (int i = 0; i < numTeams; i++) teamHasAnswered.put(i, false);\n }", "private void endGame() {\r\n\r\n m_state.setState(State.ENDING_GAME);\r\n\r\n /* find winner */\r\n for(KimTeam team : m_survivingTeams) {\r\n if(team != null) {\r\n if(!team.isOut()) {\r\n m_winner = team;\r\n }\r\n\r\n //remove survivors from m_teams so not to duplicate stats\r\n m_teams[team.m_freq] = null;\r\n }\r\n }\r\n\r\n /* end poll */\r\n if(m_poll != null) {\r\n m_poll.endPoll(m_winner, m_connectionName);\r\n m_poll = null;\r\n }\r\n\r\n /* display scoresheet */\r\n m_botAction.sendArenaMessage(\"--------Base1--------W--L --------Base2--------W--L --------Base3--------W--L --------Base4--------W--L\");\r\n\r\n if(!m_skipFirstRound) {\r\n printFormattedTeams(m_teams, m_numTeams);\r\n m_botAction.sendArenaMessage(\"------------------------- ------------------------- ------------------------- -------------------------\");\r\n }\r\n\r\n printFormattedTeams(m_survivingTeams, 4);\r\n m_botAction.sendArenaMessage(\"-------------------------------------------------------------------------------------------------------\");\r\n\r\n if(m_winner != null) {\r\n m_botAction.sendArenaMessage(\"Winner: \" + m_winner.toString(), 5);\r\n\r\n for(KimPlayer kp : m_winner) {\r\n Player p = m_botAction.getPlayer(kp.m_name);\r\n\r\n if(p != null && p.isPlaying()) {\r\n m_botAction.warpTo(p.getPlayerID(), 512, 277);\r\n }\r\n }\r\n } else {\r\n m_botAction.sendArenaMessage(\"No winner.\");\r\n }\r\n\r\n updateDB();\r\n\r\n /* announce mvp and clean up */\r\n m_botAction.scheduleTask(new TimerTask() {\r\n public void run() {\r\n m_botAction.sendArenaMessage(\"MVP: \" + m_mvp.m_name, 7);\r\n //refreshScoreboard();\r\n cleanUp();\r\n resetArena();\r\n m_state.setState(State.STOPPED);\r\n }\r\n }, 4000);\r\n }", "private void whichPlayerHasTurn() throws PlayerOutOfTurn {\n if (test.equals(lastPicked)) {\n throw (new PlayerOutOfTurn());\n }\n }", "Match getTeam1LooserOfMatch();", "Match getTeam2LooserOfMatch();", "public static Team whoLostGameTeam() {\r\n\t\tint lowest = Main.loseScoreNumb;\r\n\t\tTeam loser = null;\r\n\t\t\r\n\t\t//Team one is the looser.\r\n\t\tif (Utils.stringToInt(Main.team1Score) >= lowest) {\r\n\t\t\tlowest = Utils.stringToInt(Main.team1Score);\r\n\t\t\tloser = Main.teamOne;\r\n\t\t}\r\n\t\t//Team two is the loser.\r\n\t\tif (Utils.stringToInt(Main.team2Score) >= lowest) {\r\n\t\t\tlowest = Utils.stringToInt(Main.team2Score);\r\n\t\t\tloser = Main.teamTwo;\r\n\t\t}\r\n\t\t\r\n\t\treturn loser;\r\n\t}", "protected abstract void gatherTeam();", "private synchronized void teamVictory() {\n \t\tif (state == MatchState.ONVICTORY || state == MatchState.ONCOMPLETE || state == MatchState.ONCANCEL) \n \t\t\treturn;\n \t\tstate = MatchState.ONVICTORY;\n \t\t/// Call the rest after a 2 tick wait to ensure the calling transitionMethods complete before the\n \t\t/// victory conditions start rolling in\n \t\tBukkit.getScheduler().scheduleSyncDelayedTask(plugin, new MatchVictory(this),2L);\n \t}", "public void testDetermineLeagueWinner() {\n\t\tassertTrue(\"Error determining correct winner\", false);\r\n\t\t//Check that player records have been updated correctly\r\n\t\tassertTrue(\"Error updating player records\", false);\r\n\t}", "public void run() {\r\n for(int i = group; i < 64; i += 4) {\r\n if(!m_teams[i].isOut()) {\r\n setSurvivingTeam(m_teams[i]);\r\n return;\r\n }\r\n }\r\n\r\n m_botAction.sendArenaMessage(\"No one won for Base \" + (group + 1));\r\n }", "private void close() {\r\n this.dispose();\r\n MainClass.gamesPlayed++;\r\n Examples2018.menu();\r\n }", "@Test\r\n\tpublic void testStartMatchToMatchLeaguePlayMatch2() {\n\t\tassertTrue(\"Portfolio value does not equal initial balance\", false);\r\n\t\t//Check that players cannot change their portfolios\t\t\r\n\t\tassertTrue(\"Stock holdings may not be modified\", false);\r\n\t}", "public void endTurn() {\r\n\t\tPlayer endingPlayer = getCurrentPlayer();\r\n\t\t\r\n\t\t// Show plays and buys during turn change screen\r\n\t\tArrayList<Card> plays = new ArrayList<>();\r\n\t\tArrayList<Card> gains = new ArrayList<>();\r\n\t\tplays.addAll(endingPlayer.deck.duration);\r\n\t\tplays.addAll(endingPlayer.deck.play);\r\n\t\tgains.addAll(endingPlayer.deck.gained);\r\n\t\tif(showGraphics) getGUI().showPlayerBuys(plays, gains);\r\n\t\t\r\n\t\t//Check the card ownership in decks is correct\r\n\t\tfor(Player p : players) {\r\n\t\t\tfor(Card c : p.deck.getDeck()) {\r\n\t\t\t\tif(c.getPlayer() == null) {\r\n\t\t\t\t\tthrow new RuntimeException(c.getName() + \" has no owner, in deck of \"\r\n\t\t\t\t\t\t\t+ p.getPlayerName());\r\n\t\t\t\t}\r\n\t\t\t\tif(!c.getPlayer().equals(p)) {\r\n\t\t\t\t\tthrow new RuntimeException(c.getName() + \" owned by \"\r\n\t\t\t\t\t\t\t+ c.getPlayer().getPlayerName() + \", in deck of \" + p.getPlayerName());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check for duplicated cards\r\n\t\tfor(Player p : players) {\r\n\t\t\tList<Card> deck = p.deck.getDeck();\r\n\t\t\tfor(int i = 0; i < deck.size(); i++) {\r\n\t\t\t\tfor(int j = i + 1; j < deck.size(); j++) {\r\n\t\t\t\t\tif(deck.get(i) == deck.get(j)) {\r\n\t\t\t\t\t\tthrow new RuntimeException(deck.get(i) + \r\n\t\t\t\t\t\t\t\t\" in 2 places in deck of \" + p.getPlayerName());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Run player-specific turn ending things\r\n\t\tgetCurrentPlayer().endTurn();\r\n\r\n\t\t//Change whose turn it is\r\n\t\tif(!extraTurn) {\r\n\t\t\tnextTurn();\r\n\t\t}\r\n\t\textraTurn = false;\r\n\r\n\t\t//Check if the game is over\r\n\t\tif(board.isGameOver()) {\r\n\t\t\tgetClient().stopThreads();\r\n\t\t\tmodels.close();\r\n\t\t\tif(showGraphics) getGUI().showScores();\r\n\t\t\tfor(Player p : players) {\r\n\t\t\t\tif(p.isComputerPlayer()) {\r\n\t\t\t\t\tp.getComputerPlayer().close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//Change Turn \r\n\t\tif(showGraphics && !getCurrentPlayer().isComputerPlayer()) {\r\n\t\t\tgetGUI().turnNotify();\r\n\t\t}\r\n\r\n\t\t//Resets game phase\r\n\t\tgamePhase = 0;\t\r\n\r\n\t\t//Starts the next person's turn\r\n\t\tgetCurrentPlayer().startTurn();\r\n\t\t\r\n\t\t\r\n\t\t//Save changes to server\r\n\t\tif(showGraphics && getGUI().getMyPlayer().equals(endingPlayer)) {\r\n\t\t\tgetClient().backupGame(this);\r\n\t\t}\r\n\r\n\t\t//Check the decks are correct between computers\r\n\t\tif(showGraphics && getGUI().getMyPlayer().equals(endingPlayer)) {\r\n\t\t\tfor(Player p : players) {\r\n\t\t\t\tgetClient().sendString(\"CHECK \" + p.getPlayerNum() + \" \" + p.deck.toString());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void finaliseGame() {\r\n gameOn = false;\r\n if(bestAnswer==null) {\r\n target.reply(\"Nobody got an answer. The best answer was: \" + CountdownSolver.Solve( sourceNumbers, targetNumber ));\r\n return;\r\n }\r\n if( bestAnswer.getAnswer() == bestPossibleAnswer ) {\r\n String reply = Constants.BOLD + bestAnswer.getUsername() + Constants.BOLD\r\n + \" has won with \" + bestAnswer.getAnswer() + \"!\";\r\n if( bestPossibleAnswer!=targetNumber)\r\n reply+=\" This was the best possible answer.\";\r\n target.reply(reply);\r\n } else {\r\n target.reply( \"The best answer was \" + bestAnswer.getAnswer() + \" by \" + bestAnswer.getUsername() + \".\"\r\n + \" But the best possible answer was: \" + CountdownSolver.Solve( sourceNumbers, targetNumber ));\r\n }\r\n bestAnswer=null;\r\n runner.stop();\r\n }", "@Override\n public void RageQuit() {\n //They won't have a score\n timer.stopTimer();\n\n if (view.confirmRageQuit()){\n // Punish them!\n DesktopAudio.getInstance().playPunish();\n grid = game.getSolved();\n for (int i = 0; i < 9; i++){\n for (int j = 0; j < 9; j++){\n view.setGiven(i, j, grid.getNumber(i, j));\n }\n }\n if (view.confirmNewGame()){\n setNextGame();\n }\n }else{\n timer.startTimer();\n }\n }", "@Override\n\tpublic int countTeam() {\n\t\treturn 0;\n\t}", "public void fix_gamesFailed() {\n this._gamesFailed -= 1;\n }", "private void exitCombatPlayerDefeat(){\n\t\tCheckpoint.load();\r\n\t\t//GlobalGameState.setActiveGameState(GameStates.DEFEAT);\r\n\t\tGSTransition.getInstace().prepareTransition( GameStates.DEFEAT );\r\n\t\tGlobalGameState.setActiveGameState(GameStates.TRANSITION);\r\n\t}", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "@Test\n void invalidLOST() {\n die();\n getGame().move(getPlayer(), Direction.EAST);\n getGame().stop();\n getGame().start();\n assertThat(getGame().isInProgress()).isFalse();\n verifyNoMoreInteractions(observer);\n }", "@Test\n public void playMonopolyCard() throws Exception {\n ResourceType type = ResourceType.ORE;\n when(devCardFacade.canUseMonopolyCard(noDevCardsPlayer, type)).thenReturn(false);\n dcc.playMonopolyCard(type);\n verify(devCardFacade, never()).useMonopolyCard(noDevCardsPlayer, type);\n //Player 1; has devCards\n when(devCardFacade.canUseMonopolyCard(currentPlayer, type)).thenReturn(true);\n dcc.playMonopolyCard(type);\n }", "public FightTeam team();", "public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}", "public void stopMatch() {\n GovernThread game = GovernThread.getInstance();\n if (game != null) {\n game.emergencyStopMatch();\n }\n beginMatchButton.setEnabled(false);\n resetButton.setEnabled(true);\n switcherButton.setEnabled(true);\n stopMatchButton.setEnabled(false);\n }", "void checkWinner() {\n\t}", "public static void lose()\n\t{\n\t\tGame.setMoney(Game.getMoney()-bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tlblUpdate.setText(\"The dealer wins\");\n\t\tif(Game.getMoney()<=0)\n\t\t{\n\t\t\tGame.setComplete(true);\n\t\t\tendGameSequence();\n\n\t\t}\n\t}", "private void closeGroup(){\n if(winningHoleGroup ==0){\n max = 19;\n min = 0;\n }\n if(winningHoleGroup ==1){\n max = 29;\n min = 0;\n }\n if(winningHoleGroup ==2){\n max = 39;\n min = 10;\n }\n if(winningHoleGroup ==3){\n max = 49;\n min = 20;\n }\n if(winningHoleGroup ==4){\n max = 49;\n min = 30;\n }\n }", "@Test\r\n\tpublic void testEndMatchToMatchLeaguePlayMatch2() {\n\t\tassertTrue(\"Error storing end stock data\", false);\r\n\t\t//Check that portfolio values have been calculated correctly\r\n\t\tassertTrue(\"Error calcuating final portfolio values\", false);\r\n\t}", "@Test\r\n\tpublic void testStartMatchToMatchLeaguePlayMatch1() {\n\t\tassertTrue(\"Portfolio value does not equal initial balance\", false);\r\n\t\t//Check that players cannot change their portfolios\t\t\r\n\t\tassertTrue(\"Stock holdings may not be modified\", false);\r\n\t}", "static void playerLost() {\n\n\t\tSystem.exit(0); // This code ends the program\n\t}", "public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\n }", "private void invalidTry(){\n setButtons(false);\n setMsgText(\"There are 2 players in game, you cannot join in now.\");\n }", "@Override\n\tpublic int getTeam() {\n\t\treturn 0;\n\t}", "public int losses(String team) {\n\n return 0;\n }", "public void endsGameAndSetsWinner(Player player) {\n this.winner = player.getId(); \n this.gameStarted = false; \n \n }", "public static void random() {\n boolean nameCheck = false;\n if ((PremierLeagueManager.premierLeague.size()-1)*(PremierLeagueManager.premierLeague.size())>(PremierLeagueManager.matches.size())) {\n do {\n Random rand = new Random();\n SportsClub randTest1 = PremierLeagueManager.premierLeague.get(rand.nextInt(PremierLeagueManager.premierLeague.size())); //getting random club name from array list\n SportsClub randTest2 = PremierLeagueManager.premierLeague.get(rand.nextInt(PremierLeagueManager.premierLeague.size()));\n clubName1 = randTest1.getClubName1(); //random club name initialize to the variable\n clubName2 = randTest2.getClubName1();\n if (!clubName1.equalsIgnoreCase(clubName2)) { //checking to random names are equal or not\n for (SportsClub footBallClub : PremierLeagueManager.matches) {\n if ((clubName1.equalsIgnoreCase((footBallClub).getClubName1())) && (clubName2.equalsIgnoreCase((footBallClub).getClubName2()))) {\n nameCheck = false;\n break;\n } else {\n nameCheck = true;\n }\n }\n } else {\n nameCheck = false;\n }\n }while (!nameCheck);\n\n LocalDate startDate = LocalDate.of(2020, 8, 1); //start date https://stackoverflow.com/questions/40253332/generating-random-date-in-a-specific-range-in-java/40253420\n long start = startDate.toEpochDay();\n\n LocalDate endDate = LocalDate.of(2021,5,30); //end date\n long end = endDate.toEpochDay();\n\n long randomEpochDay = ThreadLocalRandom.current().longs(start, end).findAny().getAsLong();\n String date = String.valueOf(LocalDate.ofEpochDay(randomEpochDay)); //getting random date between 2020-08-1 to 2021-05-31\n //System.out.println(date);\n\n\n Random randScore = new Random();\n team1Scored = randScore.nextInt(15); //getting random score between 0 to 15\n team2Scored = randScore.nextInt(15);\n\n for (SportsClub footBallClub : PremierLeagueManager.premierLeague) { //calculation part\n if ((footBallClub.getClubName1().equalsIgnoreCase(clubName1))) {\n if (team1Scored > team2Scored) {\n wins1 = ((FootBallClub) footBallClub).getWins()+1;\n defeats1 = ((FootBallClub) footBallClub).getDefeats();\n noOfPoints1 = ((FootBallClub) footBallClub).getNoOfPoints()+3;\n draws1 = ((FootBallClub) footBallClub).getDraws();\n }\n else if (team2Scored > team1Scored) {\n wins1 = ((FootBallClub) footBallClub).getWins();\n defeats1 = ((FootBallClub) footBallClub).getDefeats()+1;\n noOfPoints1 = ((FootBallClub) footBallClub).getNoOfPoints();\n draws1 = ((FootBallClub) footBallClub).getDraws();\n }\n else if (team1Scored == team2Scored) {\n wins1 = ((FootBallClub) footBallClub).getWins();\n defeats1 = ((FootBallClub) footBallClub).getDefeats();\n draws1 = ((FootBallClub) footBallClub).getDraws()+1;\n noOfPoints1 = ((FootBallClub) footBallClub).getNoOfPoints()+1;\n }\n noOfGoals1 = ((FootBallClub) footBallClub).getNoOfGoals()+team2Scored;\n scored1 = ((FootBallClub) footBallClub).getScored()+team1Scored;\n playedMatches1=((FootBallClub) footBallClub).getNoOfMatches()+1;\n goalDifference1 =scored1-noOfGoals1;\n SportsClub footballClub1 = new FootBallClub(clubName1,\"\",location,foundedYear,0,wins1,draws1,defeats1,noOfGoals1,scored1,noOfPoints1,playedMatches1, goalDifference1,date); //pass the object to the constructor\n PremierLeagueManager.premierLeague.set(PremierLeagueManager.premierLeague.indexOf(footBallClub),footballClub1); //set the first team object to the relevant index number\n\n\n }else if ((footBallClub.getClubName1().equalsIgnoreCase(clubName2))){\n if (team2Scored > team1Scored) {\n wins2 = ((FootBallClub) footBallClub).getWins()+1;\n defeats2 = ((FootBallClub) footBallClub).getDefeats();\n draws2 = ((FootBallClub) footBallClub).getDraws();\n noOfPoints2 = ((FootBallClub) footBallClub).getNoOfPoints()+3;\n }\n else if (team1Scored > team2Scored) {\n wins2 = ((FootBallClub) footBallClub).getWins();\n defeats2 = ((FootBallClub) footBallClub).getDefeats()+1;\n draws2 = ((FootBallClub) footBallClub).getDraws();\n noOfPoints2 = ((FootBallClub) footBallClub).getNoOfPoints();\n }\n else if (team1Scored == team2Scored) {\n wins2 = ((FootBallClub) footBallClub).getWins();\n defeats2 = ((FootBallClub) footBallClub).getDefeats();\n draws2 = ((FootBallClub) footBallClub).getDraws()+1;\n noOfPoints2 = ((FootBallClub) footBallClub).getNoOfPoints()+1;\n }\n noOfGoals2 = ((FootBallClub) footBallClub).getNoOfGoals()+team1Scored;\n scored2 = ((FootBallClub) footBallClub).getScored()+team2Scored;\n playedMatches2=((FootBallClub) footBallClub).getNoOfMatches()+1;\n goalDifference2 =scored2-noOfGoals2;\n SportsClub footballClub2 = new FootBallClub(clubName2,\"\",location,foundedYear,0,wins2,draws2,defeats2,noOfGoals2,scored2,noOfPoints2,playedMatches2, goalDifference2,date);\n PremierLeagueManager.premierLeague.set(PremierLeagueManager.premierLeague.indexOf(footBallClub),footballClub2); //set the second team object to the relevant index number\n }\n }\n SportsClub playedMatch1 = new FootBallClub(clubName1,clubName2,\"\",\"\",0,0,0,0,team1Scored,team2Scored,0,0,0,date); //pass the matches details to the constructor\n premierLeagueManager.addPlayedMatch(playedMatch1);\n position();\n }\n }", "@Test\r\n\tpublic void testEndMatchToMatchLeaguePlayMatch1() {\n\t\tassertTrue(\"Error storing end stock data\", false);\r\n\t\t//Check that portfolio values have been calculated correctly\r\n\t\tassertTrue(\"Error calcuating final portfolio values\", false);\r\n\t}", "private void SecondStateFiringChecks()\n {\n List<Player> AffectedPlayers = game.GetAffectedPlayers(geoTarget, game.GetConfig().GetBlastRadius(missileType));\n\n if(AffectedPlayers.size() == 1)\n {\n final Player affectedPlayer = AffectedPlayers.get(0);\n\n if(lLastWarnedID != affectedPlayer.GetID() && affectedPlayer.GetRespawnProtected())\n {\n final LaunchDialog launchDialog = new LaunchDialog();\n launchDialog.SetHeaderLaunch();\n launchDialog.SetMessage(context.getString(R.string.attacking_respawn_protected, affectedPlayer.GetName(), TextUtilities.GetTimeAmount(affectedPlayer.GetStateTimeRemaining())));\n launchDialog.SetOnClickYes(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n lLastWarnedID = affectedPlayer.GetID();\n Launch();\n }\n });\n launchDialog.SetOnClickNo(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n }\n });\n launchDialog.show(activity.getFragmentManager(), \"\");\n }\n else if(lLastWarnedID != affectedPlayer.GetID() && game.GetNetWorthMultiplier(game.GetOurPlayer(), affectedPlayer) < Defs.NOOB_WARNING)\n {\n final LaunchDialog launchDialog = new LaunchDialog();\n launchDialog.SetHeaderLaunch();\n launchDialog.SetMessage(context.getString(R.string.attacking_noob, affectedPlayer.GetName()));\n launchDialog.SetOnClickYes(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n lLastWarnedID = affectedPlayer.GetID();\n Launch();\n }\n });\n launchDialog.SetOnClickNo(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n }\n });\n launchDialog.show(activity.getFragmentManager(), \"\");\n }\n else if(lLastWarnedID != affectedPlayer.GetID() && game.GetNetWorthMultiplier(game.GetOurPlayer(), affectedPlayer) > Defs.ELITE_WARNING)\n {\n final LaunchDialog launchDialog = new LaunchDialog();\n launchDialog.SetHeaderLaunch();\n launchDialog.SetMessage(context.getString(R.string.attacking_elite, affectedPlayer.GetName()));\n launchDialog.SetOnClickYes(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n lLastWarnedID = affectedPlayer.GetID();\n Launch();\n }\n });\n launchDialog.SetOnClickNo(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n }\n });\n launchDialog.show(activity.getFragmentManager(), \"\");\n }\n else\n {\n Launch();\n }\n }\n else\n {\n Launch();\n }\n }", "public Team selectTeam() {\r\n \r\n String[] list = new String[controller.getTeams().size()];\r\n for (int i = 0; i < controller.getTeams().size(); i++) {\r\n list[i] = controller.getTeams().get(i).getName();\r\n }\r\n\r\n JComboBox cmbOption = new JComboBox(list);\r\n int input = JOptionPane.showOptionDialog(null, cmbOption, \"Select Team that your like Delete\",JOptionPane.DEFAULT_OPTION,JOptionPane.QUESTION_MESSAGE, null, null, null);\r\n if(input==-1){\r\n return null;\r\n }\r\n Team teamAux = controller.searchTeam((String) cmbOption.getSelectedItem());\r\n return teamAux;\r\n }", "public static void matchFinished(Match m) {\n for (int i = 0; i < roundOne.size(); i++) {\n if (roundOne.get(i).equals(m)) {\n if (i%2 == 0) {\n quarterFinals.get((int)Math.floor((double)(i/2))).setTeam1(m.getWinningTeam());\n }else {\n quarterFinals.get((int)Math.floor((double)(i/2))).setTeam2(m.getWinningTeam());\n }\n }\n }\n for (int i = 0; i < quarterFinals.size(); i++) {\n if (quarterFinals.get(i).equals(m)) {\n if (i%2 == 0) {\n semiFinals.get((int)Math.floor((double)(i/2))).setTeam1(m.getWinningTeam());\n }else {\n semiFinals.get((int)Math.floor((double)(i/2))).setTeam2(m.getWinningTeam());\n }\n }\n }\n for (int i = 0; i < semiFinals.size(); i++) {\n if (semiFinals.get(i).equals(m)) {\n if (i%2 == 0) {\n finalLabel1.setText(m.getWinningTeam().getName());\n if (!finalLabel2.getText().equals(\"TBD\")) {\n activateFinals();\n }\n }else {\n finalLabel2.setText(m.getWinningTeam().getName());\n if (!finalLabel1.getText().equals(\"TBD\")) {\n activateFinals();\n }\n }\n }\n }\n }", "public void tryRehearse() {\n if (currentPlayer.isEmployed() == true) {\n if(!currentPlayer.getHasPlayed()){\n currentPlayer.rehearse();\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end your turn.\");\n }\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"You're not employed, so you need to take a role before you can rehearse.\");\n }\n view.updateSidePanel(playerArray);\n }", "private void onCancelButtonPressed() {\r\n disposeDialogAndCreateNewGame(); // Reset board,\r\n game.setCanPlaceMarks(false); // But don't start a new game.\r\n }", "public String winningTeam(String team1, String team2)\n {\n int r = new Random().nextInt(3 + 1);\n\n int team1Standing = -10;\n int team2Standing = -10;\n for (int i = 0 ; i < playoffs.length; i++)\n {\n if (playoffs[i].equals(team1))\n {\n team1Standing = i;\n break;\n }\n }\n\n for (int i = 0 ; i < playoffs.length; i++)\n {\n if (playoffs[i].equals(team2))\n {\n team2Standing = i;\n break;\n }\n }\n\n if(team1Standing < team2Standing && r == 1)\n return team1;\n else if (team1Standing > team2Standing && r == 1)\n return team2;\n\n else\n {\n r = new Random().nextInt(1 + 1);\n if(r == 0)\n return team1;\n else\n return team2;\n }\n\n }", "private void declareWinner(){\r\n System.out.println(\"All proposals received\");\r\n AID best = proposals.get(0).getSender();\r\n for(ACLMessage proposal: proposals){\r\n String time = proposal.getContent().replaceFirst(\"bid\\\\(\", \"\");\r\n time = time.replaceFirst(\" sec\\\\)\", \"\");\r\n String bestTimeString = \r\n proposal.getContent().\r\n replaceFirst(\"bid\\\\(\", \"\").\r\n replaceFirst(\" sec\\\\)\", \"\");\r\n int bestTime = Integer.parseInt(bestTimeString);\r\n int propTime = Integer.parseInt(time);\r\n if (bestTime > propTime) {\r\n best = proposal.getSender();\r\n }\r\n }\r\n sendMessage(best, \"\", ACLMessage.ACCEPT_PROPOSAL);\r\n Object[] ob = new Object[2];\r\n ob[0] = best;\r\n ob[1] = currentPartial;\r\n expectedReturn.add(ob);\r\n System.out.println(\"Accepting proposal from \" + best.getLocalName());\r\n for(ACLMessage proposal: proposals){\r\n if(!proposal.getSender().equals(best)){\r\n sendMessage(proposal.getSender(), \"\", ACLMessage.REJECT_PROPOSAL);\r\n }\r\n }\r\n proposals.clear();\r\n solvables.remove(0);\r\n if(!solvables.isEmpty()){\r\n \r\n auctionJob(solvables.get(0));\r\n }\r\n }", "void setWinningTeam(TeamId winner) {\n winningTeam.set(winner);\n }", "private void endTurn(){\r\n String currentPlayer = cantStop.getGameBoard().getCurrentPlayer().getName();\r\n\t\tgameOver = cantStop.getGameBoard().endTurn(didBust);\r\n\t\t\r\n\t\tif(gameOver){\r\n\t\t\tstatusLabel.setText(currentPlayer + \r\n\t\t\t\t\t\" wins! Go again?\");\r\n\t\t\tupdate();\r\n\t\t} else {\r\n\t\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\t\tallowNewRoll();\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testChooseResultWithUnChangeCarPositionSecond() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setTheDoorWithCar(1);\r\n\t\tmonty.setChanged(false);\r\n\t\tmonty.setUserChoosedDoor(0);\r\n\t\tassertEquals(2, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(1);\r\n\t\tassertNotEquals(1, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(true, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(2);\r\n\t\tassertEquals(0, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\t}", "@Test\n\tpublic void testCalculateEndPlayPlayerMinus5() {\n\t\ttestBoard = new Board();\n\t\ttestBoard.initBoard();\n\t\texception.expect(RuntimeException.class);\n\t\ttestBoard.calculateEndPlay(null, null, 0, -5);\t\t\n\t}", "public void fundClosed(int time, int yourRevenue, int partnerRevenue) {\n /* Do nothing */\n }", "private void getTeam() {\n Set<Integer> set = getRandomNumberSet();\n // clear new team list each time to allow for serial clicks on \"Generate New Random Team\"\n team.clear();\n for (Integer i : set) {\n getPokemon(i);\n }\n }", "@Test\n public void discardPlayer2() {\n gm.setPlayerInfo(clientPlayer2);\n gm.setThisPlayerIndex(clientPlayer2.getPlayerIndex());\n\n dc.increaseAmount(ResourceType.ORE);\n dc.increaseAmount(ResourceType.ORE);\n dc.increaseAmount(ResourceType.WOOD);\n dc.increaseAmount(ResourceType.WOOD);\n assertEquals(2, getAmounts().getOfType(ResourceType.ORE));\n assertEquals(2, getAmounts().getOfType(ResourceType.WOOD));\n Player p = model.getPlayer(clientPlayer2.getPlayerIndex());\n ResourceSet discardSet = dc.getDiscardAmount();\n when(robberFacade.canDiscard(discardSet, p)).thenReturn(true);\n dc.discard();\n // This verifies that the robberFacade.discard is only called twice\n verify(robberFacade, atMost(2)).discard(discardSet, p);\n\n }", "private void resetArena() {\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-X:\" + SPAWN_CIRCLE0_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-Y:\" + SPAWN_CIRCLE0_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-Radius:1\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-X:\" + SPAWN_CIRCLE1_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-Y:\" + SPAWN_CIRCLE1_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-Radius:1\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-X:\" + SPAWN_CIRCLE2_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-Y:\" + SPAWN_CIRCLE2_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-Radius:1\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-X:\" + SPAWN_CIRCLE3_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-Y:\" + SPAWN_CIRCLE3_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-Radius:1\");\r\n\r\n if(m_ensureLock) {\r\n m_ensureLock = false;\r\n m_botAction.toggleLocked();\r\n }\r\n }", "public void Team_A_Freethrow(View v) {\n teamAScore = teamAScore + 1;\n displayForTeamA(teamAScore);\n }", "public void resetForBothTeams(View view) {\n scoreForR_madrid = 0;\n scoreForL_pool = 0;\n\n foulCountRmadrid = 0;\n y_cardCountRmadrid = 0;\n r_cardCountRmadrid = 0;\n\n foulCountLpool = 0;\n y_cardCountLpool = 0;\n r_cardCountLpool = 0;\n\n displayForRmadrid(scoreForR_madrid);\n displayForLpool(scoreForL_pool);\n\n displayFoulForRmadrid(foulCountRmadrid);\n displayY_CardForRmadrid(y_cardCountRmadrid);\n displayR_CardForRmadrid(r_cardCountRmadrid);\n\n displayFoulForLpool(foulCountLpool);\n displayYcardForLpool(y_cardCountLpool);\n displayRcardForLpool(r_cardCountLpool);\n\n }", "public String getGameStatus(String team) {\n\n String gameStatus = \"\";\n\n String[] mlbTeam = {\"D-backs\", \"Braves\", \"Orioles\", \"Red Sox\", \"Cubs\", \"White Sox\", \"Reds\", \"Indians\", \"Rockies\",\n \"Tigers\", \"Astros\", \"Royals\", \"Angels\", \"Dodgers\", \"Marlins\", \"Brewers\", \"Twins\", \"Mets\",\n \"Yankees\", \"Athletics\", \"Phillies\", \"Pirates\", \"Cardinals\", \"Padres\", \"Giants\", \"Mariners\",\n \"Rays\", \"Rangers\", \"Blue Jays\", \"Nationals\"};\n\n search:\n for (int i = 0; i < 1; i++) {\n\n for (int j = 0; j < mlbTeam.length; j++) {\n if (mlbTeam[j].equals(team)) {\n break search;\n }\n }\n\n team = \"No team\";\n i++;\n }\n try {\n // indicate if today is an off day for the team selected\n if (getPlayerInfo(team, \"status\", \"status\").equals(\"\")) {\n gameStatus = \"No game scheduled for the \" + uppercaseFirstLetters(team);\n }\n }\n catch (NullPointerException npe) {\n gameStatus = \"No game scheduled for the \" + uppercaseFirstLetters(team);\n }\n\n // display error message if there is no match to the team name inputted\n if (team.equals(\"No team\")) {\n gameStatus = \"ERROR: Please enter current MLB team name.\";\n }\n // indicate if today is an off day for the team selected\n else if (getPlayerInfo(team, \"status\", \"status\").equals(\"\")) {\n gameStatus = \"No game scheduled for the \" + team;\n }\n else {\n gameStatus = getPlayerInfo(team, \"status\", \"status\");\n }\n\n return gameStatus;\n }", "private void badMatch() {\n\t\tArrayList<Integer> faceValues = new ArrayList<Integer>();\n\t\tInteger firstSelectableCardPos = null;\n\t\t\n\t\tfor (int card = 0; card < CARDS_SUM; card++) {\n\t\t\tPlayingCard thisCard = ((PlayingCard) getActivity().findViewById(solo.getImage(card).getId()));\n\t\t\t\n\t\t\t// cheat by finding card face without turning card over\n\t\t\tint face = thisCard.getCard();\n\t\t\tfaceValues.add(face);\n\t\t\t\n\t\t\t// can't select all cards\n\t\t\tif (thisCard.isLocked() || thisCard.getVisible()) {\n\t\t\t\tcontinue;\n\t\t\t} else if (firstSelectableCardPos == null) {\n\t\t\t\tfirstSelectableCardPos = card;\n\t\t\t}\n\t\t\t\n\t\t\t// if this is a different card, select the bad pair\n\t\t\tif (faceValues.get(firstSelectableCardPos) != face) {\n\t\t\t\tsolo.clickOnImage(firstSelectableCardPos);\n\t\t\t\tsolo.clickOnImage(card);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "private boolean try2GetYellowPlayerFromHome(Player player)\n {\n try\n {\n YellowPlayer yellowPlayer = (YellowPlayer) player;\n if (YellowPlayer.getNumber_of_buttons_allowed() > 0)\n {\n ludo.getPlayerFromHome(player);\n //YellowPlayer.setNumber_of_buttons_allowed(YellowPlayer.decrementNumberOfAllowedPlayers());\n return true;\n }\n return false;\n }\n catch (Exception e)\n {\n return false;\n }\n }", "@Test\r\n\tpublic void testChooseResultWithUnChangeCarPositionFrist() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(false);\r\n\t\tmonty.setTheDoorWithCar(0);\r\n\t\tmonty.setUserChoosedDoor(0);\r\n\t\tassertNotEquals(0, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(true, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(1);\r\n\t\tassertEquals(2, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(2);\r\n\t\tassertEquals(1, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\t}", "public void tie() {\r\n\t\tfor (int n = 0; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 7; m++) {\r\n\t\t\t\tsquares[n][m].setEnabled(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 7; a++) {\r\n\t\t\tbuttons[a].setEnabled(false);\r\n\t\t}\r\n\t\tint result = JOptionPane.showConfirmDialog(null,\r\n\t\t\t\t\" TIE GAME! No winner Found! Do you want to start a new game?\", null, JOptionPane.YES_NO_OPTION);\r\n\r\n\t\tif (result == JOptionPane.YES_OPTION) {\r\n\t\t\tgameReset();\r\n\t\t} else if (result == JOptionPane.NO_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \" Click Ok to return to Main Menu\");\r\n\r\n\t\t\tJFrame backToMenu = new JFrame(\"Main Menu\");\r\n\r\n\t\t\tbackToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\tbackToMenu.getContentPane().add(new MainMenu());\r\n\t\t\tbackToMenu.pack();\r\n\t\t\tbackToMenu.setSize(750, 650);\r\n\t\t\tbackToMenu.setVisible(true);\r\n\t\t}\r\n\r\n\t}", "@Test\n public void toggleTeamStates() {\n Team team = new Team(\"Crvena Zvezda\");\n\n // TODO: open persistence context and create transaction\n\n // TODO: move team to managed state\n\n // TODO: assert that the team is managed (check if contained in session)\n\n // TODO: commit and close persistence context\n\n // TODO: fetch from DB as managed entity\n\n // TODO: assert entity is managed\n\n // TODO: remove entity from session and assert not managed\n\n // TODO: commit and close\n }", "@Test\n\tpublic void testCalculatePlaysPlayerMinus5() {\n\t\ttestBoard = new Board();\n\t\ttestBoard.initBoard();\n\t\texception.expect(RuntimeException.class);\n\t\ttestBoard.calculatePlays(-5);\t\n\t}", "public void checkScore() {\n\n whatIsTurnScore();\n\n if (turn == 1) {\n\n if ((p1.getScore() - turnScore < 0) || (p1.getScore() - turnScore == 1)) {\n newScore.setText(null);\n\n displayScore();\n\n\n Toast.makeText(this, \"Bust\", Toast.LENGTH_SHORT).show();\n } else if (p1.getScore() - turnScore > 1) {\n if ((turnScore > 99) && (turnScore < 140)) {\n p1.setHundres(p1.getHundres() + 1);\n } else if ((turnScore > 139) && (turnScore < 180)) {\n p1.setOneforties(p1.getOneforties() + 1);\n } else if (turnScore == 180) {\n p1.setOneeighties(p1.getOneeighties() + 1);\n }\n calculateScore();\n\n\n displayScore();\n } else if (p1.getScore() - turnScore == 0) {\n p1.setScore(0);\n }\n }\n\n if (turn == 2) {\n if ((p2.getScore() - turnScore < 0) || (p2.getScore() - turnScore == 1)) {\n newScore.setText(null);\n teamBCheckout.setText(checkOut(p2.getScore()));\n displayScore();\n\n\n Toast.makeText(this, \"Bust\", Toast.LENGTH_SHORT).show();\n } else if (p2.getScore() - turnScore > 1) {\n\n if ((turnScore > 99) && (turnScore < 140)) {\n p2.setHundres(p2.getHundres() + 1);\n } else if ((turnScore > 139) && (turnScore < 180)) {\n p2.setOneforties(p2.getOneforties() + 1);\n } else if (turnScore == 180) {\n p2.setOneeighties(p2.getOneeighties() + 1);\n }\n calculateScore();\n\n displayScore();\n\n } else if (p2.getScore() - turnScore == 0) {\n p2.setScore(0);\n }\n\n }\n\n\n }", "@Test\r\n\tpublic void gameWinCheckCallsCorrectWinner() {\r\n\t\tBowl bowl = new Bowl();\r\n\t\tvar answer = bowl.gameWinCheck();\r\n\t\tassertEquals(-1,answer);\r\n\t\tbowl = setupGame(bowl);\r\n\t\tanswer = bowl.gameWinCheck();\r\n\t\tassertEquals(1,answer);\r\n\t\tbowl.getNeighbor(6).passTheft(49);\r\n\t\tanswer = bowl.getNeighbor(2).gameWinCheck();\r\n\t\tassertEquals(0,answer);\r\n\t}", "@Test\r\n public void testPlayer_getDumbStrategyCard_differentWinners() {\r\n player2 = new Player(\"\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n boolean differentLegalCardFound = false;\r\n Card firstDiscard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n for(int i = 0; i < 25; i++) {\r\n Card loopCard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n if(!loopCard.equals(firstDiscard)) {\r\n differentLegalCardFound = true;\r\n }\r\n }\r\n assertTrue(differentLegalCardFound);\r\n }", "@Test\n public void endGameDetectionFalse() {\n logic.setDirection(1);\n assertTrue(logic.gameLogic());\n }", "public void testNoBeforeYesSameElapsed() throws Exception{\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"15,8,D,12,Yes\",\n \"16,8,D,12,No\",\n \n \"24,4,B,15,Yes\",\n \"25,4,B,15,No\",\n \"26,4,B,15,No\",\n \n \"28,2,C,22,Yes\",\n \"29,2,C,22,No\",\n \"30,2,C,22,Yes\",\n \"30,2,C,22,Yes\",\n };\n \n /**\n * \n * \n * \n */\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team8,1,12\",\n \"2,team4,1,15\",\n \"3,team2,1,22\",\n \"4,team1,0,0\",\n \"4,team3,0,0\",\n \"4,team5,0,0\",\n \"4,team6,0,0\",\n \"4,team7,0,0\",\n };\n \n scoreboardTest (8, runsData, rankData);\n }", "public void invalidClubs() {\r\n\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\"A club can not play against itself\");\r\n\t}", "public void retireLead()\r\n\t{\r\n\t\tisleader = false;\r\n\t}", "public synchronized void pickTeam() {\n voteTeamState = pickTeamState.pickTeam(teamSelection);\n state = State.VOTE_TEAM;\n playerVotes = new HashMap<>();\n }", "private void finishReset() {\n DefenceField.fieldActivated = true;\n time.setPaused(false);\n nuiManager.closeScreen(DefenceUris.DEATH_SCREEN);\n }", "public static Team whoWonGameTeam() {\r\n\t\tint highest = Main.winScoreNumb;\r\n\t\tTeam winner = null;\r\n\t\t\r\n\t\t//Winner is team one.\r\n\t\tif (Utils.stringToInt(Main.team1Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team1Score);\r\n\t\t\twinner = Main.teamOne;\r\n\t\t}\r\n\t\t//Winner is team two.\r\n\t\tif (Utils.stringToInt(Main.team2Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team2Score);\r\n\t\t\twinner = Main.teamTwo;\r\n\t\t}\r\n\t\t\r\n\t\treturn winner;\r\n\t}", "private boolean isTeamAWinner(BattleFactory factory) {\r\n\t\tBattle battle = factory.generateBattle();\r\n\t\tdo {\r\n\t\t\tBattleAction action = battle.nextAction();\r\n\t\t\tif (action instanceof ActionFinish) {\r\n\t\t\t\tif (((ActionFinish) action).teamAVictor) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} while (!battle.isOver());\r\n\t\treturn false;\r\n\t}", "@Test\n public void isGameOverThree() {\n this.reset();\n this.bps.startGame(this.fullDeck, false, 7, 1);\n assertFalse(this.bps.isGameOver());\n }", "public void victory() {\n fieldInerface.setPleasedSmile();\n fieldInerface.timestop();\n int result = fieldInerface.timeGet();\n /*try {\n if (result < Integer.parseInt(best.getProperty(type))) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }*/\n\n gamestart = true; // new game isn't started yet!\n for (int j = 0; j < heightOfField; j++)\n for (int i = 0; i < widthOfField; i++)\n if (fieldManager.isCellMined(i, j))\n if (!fieldManager.isCellMarked(i, j)) {\n fieldInerface.putMarkToButton(i, j);\n fieldInerface.decrement();\n }\n gameover = true; // game is over!!\n }", "public boolean expectToBeat(RugbyTeam aTeam) {\r\n\r\n\t\tif (this.hasRitual == true && aTeam.hasRitual == false) {\r\n\t\t\treturn true;\r\n\t\t} else if ((this.wins - this.losses) > (aTeam.wins - aTeam.losses)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void failedChallenge() {\n addGameRound(false);\n playedRounds++;\n updateActivePlayer();\n updateActiveChallenge();\n }", "public static double evaluateVictory(Board b, int team) {\n if (b.getWinner() == team) {\n return 999999.;\n } else if (b.getWinner() == team * -1) {\n return -999999.;\n } else {\n return 0;\n }\n }", "void askEndTurn();", "public void initScore(@Nonnull Team team){\n\t\t\tif(this.scores.containsKey(team)){\r\n\t\t\t\tscores.put(team, Integer.valueOf(0));\r\n\t\t\t}\r\n\t\t}", "int getTeam();", "public int losses(String team) {\n validate(team);\n int t = st.get(team);\n return matTeam[t][2];\n }", "public void winnerFound() {\r\n\t\tfor (int n = 0; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 7; m++) {\r\n\t\t\t\tsquares[n][m].setEnabled(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 7; a++) {\r\n\t\t\tbuttons[a].setEnabled(false);\r\n\t\t}\r\n\t\tif (winnerChip != 67) {\r\n\t\t\tint result = JOptionPane.showConfirmDialog(null,\r\n\t\t\t\t\t\" Player \" + (winnerChip - 48) + \" won! Do you want to start a new game?\", null,\r\n\t\t\t\t\tJOptionPane.YES_NO_OPTION);\r\n\r\n\t\t\tif (result == JOptionPane.YES_OPTION) {\r\n\t\t\t\tgameReset();\r\n\t\t\t} else if (result == JOptionPane.NO_OPTION) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Click Ok to return to Main Menu\");\r\n\r\n\t\t\t\tJFrame backToMenu = new JFrame(\"Main Menu\");\r\n\r\n\t\t\t\tbackToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tbackToMenu.getContentPane().add(new MainMenu());\r\n\t\t\t\tbackToMenu.pack();\r\n\t\t\t\tbackToMenu.setSize(750, 650);\r\n\t\t\t\tbackToMenu.setVisible(true);\r\n\t\t\t}\r\n\t\t}if (winnerChip == 67) {\r\n\t\t\tint result = JOptionPane.showConfirmDialog(null, \" You lost! Do you want to start a new game?\", null, JOptionPane.YES_NO_OPTION);\r\n\t\t\tif (result == JOptionPane.YES_OPTION) {\r\n\t\t\t\tgameReset();\r\n\t\t\t} else if (result == JOptionPane.NO_OPTION) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Click Ok to return to Main Menu\");\r\n\r\n\t\t\t\tJFrame backToMenu = new JFrame(\"Main Menu\");\r\n\r\n\t\t\t\tbackToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tbackToMenu.getContentPane().add(new MainMenu());\r\n\t\t\t\tbackToMenu.pack();\r\n\t\t\t\tbackToMenu.setSize(750, 650);\r\n\t\t\t\tbackToMenu.setVisible(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void dropOutManager(Match match, String leaverEmail) {\n Player leaver = match.getGame().getPlayerByEmail(leaverEmail);\n clearLeaverDebts(leaver, match);\n if (match.getGame().isThisThePlayingPlayer(leaver)) {\n Player nextPlayingPlayer = match.getGame().grabNextPlayingPlayer(leaver);\n decideIfOnlyOneOrManyPlayersLeftInGame(match, leaverEmail, nextPlayingPlayer);\n } else {\n decideIfOnlyOneOrManyPlayersLeftInGame(match, leaverEmail);\n }\n }", "void stopGame() {\n leader.disconnect();\n opponent.disconnect();\n }", "@Test\n public void randomWinValueNotInRangeOfSet() throws NoBetsMadeException {\n Set<Bet> bets=new HashSet<Bet>();\n bets.add(mock(Bet.class,\"Bet1\"));\n bets.add(mock(Bet.class,\"Bet2\"));\n bets.add(mock(Bet.class,\"Bet3\"));\n bets.add(mock(Bet.class,\"Bet4\"));\n //test bets size\n assertEquals(4,bets.size());\n //test the return BetResult: null is expected bcs range is 1-4\n assertEquals(null,gameRule.determineWinner(5,bets));\n assertEquals(null,gameRule.determineWinner(0,bets));\n }", "void askLeaderCardThrowing();", "public void testDeletedProblem() throws Exception {\n \n InternalContest contest = new InternalContest();\n\n int numTeams = 2;\n initData(contest, numTeams , 5);\n String [] runsData = {\n\n \"1,1,A,1,No\", //20\n \"2,1,A,3,Yes\", //3 (first yes counts Minutes only)\n \"3,1,A,5,No\", //20\n \"4,1,A,7,Yes\", //20 \n \"5,1,A,9,No\", //20\n \n \"6,1,B,11,No\", //20 (all runs count)\n \"7,1,B,13,No\", //20 (all runs count)\n \n \"8,2,A,30,Yes\", //30\n \n \"9,2,B,35,No\", //20 (all runs count)\n \"10,2,B,40,No\", //20 (all runs count)\n \"11,2,B,45,No\", //20 (all runs count)\n \"12,2,B,50,No\", //20 (all runs count)\n \"13,2,B,55,No\", //20 (all runs count)\n\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,0,0\",\n \"1,team2,0,0\"\n };\n\n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Problem probA = contest.getProblems()[0];\n probA.setActive(false);\n contest.updateProblem(probA);\n Problem probA1 = contest.getProblem(probA.getElementId());\n assertEquals(\"probA1 setup\", false, probA1.isActive());\n Problem probA2 = contest.getProblems()[0];\n assertEquals(\"probA2 setup\", false, probA2.isActive());\n confirmRanks(contest, rankData);\n Document document = null;\n\n try {\n DefaultScoringAlgorithm defaultScoringAlgorithm = new DefaultScoringAlgorithm();\n String xmlString = defaultScoringAlgorithm.getStandings(contest, null, log);\n if (debugMode) {\n System.out.println(xmlString);\n }\n // getStandings should always return a well-formed xml\n assertFalse(\"getStandings returned null \", xmlString == null);\n assertFalse(\"getStandings returned empty string \", xmlString.trim().length() == 0);\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n document = documentBuilder.parse(new InputSource(new StringReader(xmlString)));\n\n } catch (Exception e) {\n assertTrue(\"Error in XML output \" + e.getMessage(), true);\n e.printStackTrace();\n }\n \n // skip past nodes to find teamStanding node\n NodeList list = document.getDocumentElement().getChildNodes();\n \n int rankIndex = 0;\n \n for(int i=0; i<list.getLength(); i++) {\n Node node = (Node)list.item(i);\n String name = node.getNodeName();\n if (name.equals(\"teamStanding\")){\n String [] standingsRow = fetchStanding (node);\n// Object[] cols = { \"Rank\", \"Name\", \"Solved\", \"Points\" };\n String [] cols = rankData[rankIndex].split(\",\");\n\n if (debugMode) {\n System.out.println(\"SA rank=\"+standingsRow[0]+\" solved=\"+standingsRow[2]+\" points=\"+standingsRow[3]+\" name=\"+standingsRow[1]);\n System.out.println(\" rank=\"+cols[0]+\" solved=\"+cols[2]+\" points=\"+cols[3]+\" name=\"+cols[1]);\n System.out.println();\n System.out.flush();\n }\n \n compareRanking (rankIndex+1, standingsRow, cols);\n rankIndex++;\n } else if(name.equals(\"standingsHeader\")) {\n String problemCount = node.getAttributes().getNamedItem(\"problemCount\").getNodeValue();\n int problemCountInt = Integer.valueOf(problemCount);\n NodeList list2 = node.getChildNodes();\n int foundProblemCount = -1;\n for(int j=0; j<list2.getLength(); j++) {\n Node node2 = (Node)list2.item(j);\n String name2 = node2.getNodeName();\n if (name2.equals(\"problem\")){\n int id = Integer.valueOf(node2.getAttributes().getNamedItem(\"id\").getNodeValue());\n if (id > foundProblemCount) {\n foundProblemCount = id;\n }\n }\n }\n assertEquals(\"problem list max id\",problemCountInt, foundProblemCount);\n assertEquals(\"problemCount\",\"4\", problemCount);\n }\n }\n\n }", "public static Player whoLostGame() {\r\n\t\tint lowest = Main.loseScoreNumb;\r\n\t\tPlayer loser = null;\r\n\t\t\r\n\t\t\r\n\t\t//Three handed play.\r\n\t\tif (Main.isThreeHanded){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\tloser = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\tloser = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\tloser = Main.playerThree;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Four handed play with no teams.\r\n\t\tif (Main.isFourHandedSingle){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\tloser = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\tloser = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\tloser = Main.playerThree;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player4Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player4Score);\r\n\t\t\t\tloser = Main.playerFour;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn loser;\r\n\t}", "public void createFailure() {\n\t\tgetController().changeFree(true);\t\t\n\t\tdisplayAdvertisement(\"opponent failure\");\n\t\tvalidate();\n\t}", "public void updateAirForceTeam(Collection<Unit> airunits) {\n\t\t\n\t\t// remove airunit of invalid team \n\t\tList<Integer> invalidUnitIds = new ArrayList<>();\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (!UnitUtils.isCompleteValidUnit(airunit)) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t} else if (airForceTeamMap.get(airunitId).leaderUnit == null) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t}\n\t\t}\n\t\tfor (Integer invalidUnitId : invalidUnitIds) {\n\t\t\tairForceTeamMap.remove(invalidUnitId);\n\t\t}\n\t\t\n\t\t// new team\n\t\tfor (Unit airunit : airunits) {\n\t\t\tAirForceTeam teamOfAirunit = airForceTeamMap.get(airunit.getID());\n\t\t\tif (teamOfAirunit == null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), new AirForceTeam(airunit));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 리더의 위치를 비교하여 합칠 그룹인지 체크한다.\n\t\t// - 클로킹모드 상태가 다른 그룹은 합치지 않는다.\n\t\t// - 수리 상태의 그룹은 합치지 않는다.\n\t\tList<AirForceTeam> airForceTeamList = new ArrayList<>(new HashSet<>(airForceTeamMap.values()));\n\t\tMap<Integer, Integer> airForceTeamMergeMap = new HashMap<>(); // key:merge될 그룹 leaderID, value:merge할 그룹 leaderID\n\t\t\n\t\tint mergeDistance = AIR_FORCE_TEAM_MERGE_DISTANCE;\n\t\tif (InfoUtils.enemyRace() == Race.Terran) {\n\t\t\tmergeDistance += 120;\n\t\t}\n\t\tfor (int i = 0; i < airForceTeamList.size(); i++) {\n\t\t\tAirForceTeam airForceTeam = airForceTeamList.get(i);\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tboolean cloakingMode = airForceTeam.cloakingMode;\n\t\t\tfor (int j = i + 1; j < airForceTeamList.size(); j++) {\n\t\t\t\tAirForceTeam compareForceUnit = airForceTeamList.get(j);\n\t\t\t\tif (compareForceUnit.repairCenter != null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (cloakingMode != compareForceUnit.cloakingMode) { // 클로킹상태가 다른 레이쓰부대는 합쳐질 수 없다.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tUnit airForceLeader = airForceTeam.leaderUnit;\n\t\t\t\tUnit compareForceLeader = compareForceUnit.leaderUnit;\n\t\t\t\tif (airForceLeader.getID() == compareForceLeader.getID()) {\n//\t\t\t\t\tSystem.out.println(\"no sense. the same id = \" + airForceLeader.getID());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (airForceLeader.getDistance(compareForceLeader) <= mergeDistance) {\n\t\t\t\t\tairForceTeamMergeMap.put(compareForceLeader.getID(), airForceLeader.getID());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// 합쳐지는 에어포스팀의 airForceTeamMap을 재설정한다.\n\t\tfor (Unit airunit : airunits) {\n\t\t\tInteger fromForceUnitLeaderId = airForceTeamMap.get(airunit.getID()).leaderUnit.getID();\n\t\t\tInteger toForceUnitLeaderId = airForceTeamMergeMap.get(fromForceUnitLeaderId);\n\t\t\tif (toForceUnitLeaderId != null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), airForceTeamMap.get(toForceUnitLeaderId));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// team 멤버 세팅\n\t\tSet<AirForceTeam> airForceTeamSet = new HashSet<>(airForceTeamMap.values());\n\t\tfor (AirForceTeam airForceTeam : airForceTeamSet) {\n\t\t\tairForceTeam.memberList.clear();\n\t\t}\n\t\t\n\t\tList<Integer> needRepairAirunitList = new ArrayList<>(); // 치료가 필요한 유닛\n\t\tMap<Integer, Unit> airunitRepairCenterMap = new HashMap<>(); // 치료받을 커맨드센터\n\t\tList<Integer> uncloakedAirunitList = new ArrayList<>(); // 언클락 유닛\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (airunit.getHitPoints() <= 50) { // repair hit points\n\t\t\t\tAirForceTeam repairTeam = airForceTeamMap.get(airunitId);\n\t\t\t\tif (repairTeam == null || repairTeam.repairCenter == null) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airunit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tneedRepairAirunitList.add(airunitId);\n\t\t\t\t\t\tairunitRepairCenterMap.put(airunitId, repairCenter);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tAirForceTeam airForceTeam = airForceTeamMap.get(airunit.getID());\n\t\t\tif (airForceTeam.cloakingMode && (airunit.getType() != UnitType.Terran_Wraith || airunit.getEnergy() < 15)) {\n\t\t\t\tuncloakedAirunitList.add(airunitId);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tairForceTeam.memberList.add(airunit);\n\t\t}\n\t\t\n\t\t// create separated team for no energy airunit\n\t\tfor (Integer airunitId : uncloakedAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam uncloackedForceTeam = new AirForceTeam(airunit);\n\t\t\tuncloackedForceTeam.memberList.add(airunit);\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, uncloackedForceTeam);\n\t\t}\n\t\t\n\t\t// create repair airforce team\n\t\tfor (Integer airunitId : needRepairAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam needRepairTeam = new AirForceTeam(airunit);\n\t\t\tneedRepairTeam.memberList.add(airunit);\n\t\t\tneedRepairTeam.repairCenter = airunitRepairCenterMap.get(airunit.getID());\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, needRepairTeam);\n\t\t}\n\t\t\n\t\t// etc (changing leader, finishing repair, achievement) \n\t\tSet<AirForceTeam> reorganizedSet = new HashSet<>(airForceTeamMap.values());\n\t\tachievementEffectiveFrame = 0;\n\t\tfor (AirForceTeam airForceTeam : reorganizedSet) {\n\t\t\t// leader 교체\n\t\t\tUnit newLeader = UnitUtils.getClosestUnitToPosition(airForceTeam.memberList, airForceTeam.getTargetPosition());\n\t\t\tairForceTeam.leaderUnit = newLeader;\n\t\t\t\n\t\t\t// repair 완료처리\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tif (!UnitUtils.isValidUnit(airForceTeam.repairCenter) || WorkerManager.Instance().getWorkerData().getNumAssignedWorkers(airForceTeam.repairCenter) < 3) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airForceTeam.leaderUnit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tairForceTeam.repairCenter = repairCenter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tboolean repairComplete = true;\n\t\t\t\tfor (Unit airunit : airForceTeam.memberList) {\n\t\t\t\t\tif (airunit.getHitPoints() < airunit.getType().maxHitPoints() * 0.95) { // repair complete hit points\n\t\t\t\t\t\trepairComplete = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (repairComplete) {\n\t\t\t\t\tairForceTeam.repairCenter = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// achievement\n\t\t\tint achievement = airForceTeam.achievement();\n\t\t\taccumulatedAchievement += achievement;\n\t\t\tachievementEffectiveFrame = achievementEffectiveFrame + airForceTeam.killedEffectiveFrame * 100 - airForceTeam.damagedEffectiveFrame;\n\t\t}\n\t}", "@Test\n public final void testPlayer2Win() {\n checkPlayerWin(player2);\n }", "@Test(expected = IllegalStateException.class)\n public void isGameOverOne() {\n this.reset();\n this.bps.isGameOver();\n }", "@Test\n\tpublic void Teams_26076_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\tsugar().documents.navToListView();\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\n\t\t// search the record to update team \n\t\t// TODO: VOOD-975\n\t\tsearchBtnCtrl = new VoodooControl(\"input\", \"id\", \"search_form_submit\");\n\t\tVoodooControl nameBasic = new VoodooControl(\"input\", \"id\", \"document_name_basic\");\n\t\tnameBasic.set(documentData.get(0).get(\"documentName\"));\n\t\tsearchBtnCtrl.click();\n\t\tVoodooUtils.focusDefault();\n\n\t\t// update the team for the searched record\n\t\tsugar().documents.listView.checkRecord(1);\n\t\tsugar().documents.listView.openActionDropdown();\n\t\tsugar().documents.listView.massUpdate();\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\t// TODO: VOOD-768, VOOD-1160\n\t\tnew VoodooControl(\"button\", \"css\", \"#MassUpdate_team_name_table button.button.firstChild\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusWindow(1);\n\t\tnew VoodooControl(\"input\", \"id\", \"massall\").click();\n\t\tnew VoodooControl(\"input\", \"id\", \"search_form_select\").click();\n\t\tVoodooUtils.focusWindow(0);\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\tnew VoodooControl(\"input\", \"id\", \"update_button\").click();\n\t\tVoodooUtils.acceptDialog();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusDefault();\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\n\t\t// clear the search\n\t\tnameBasic.set(\"\");\n\t\tsearchBtnCtrl.click();\n\n\t\t// TODO: VOOD-975\n\t\t// Go to advance search \n\t\tnew VoodooControl(\"a\", \"id\", \"advanced_search_link\").click();\n\t\tVoodooUtils.waitForReady();\n\n\t\t// TODO: VOOD-1162\n\t\tVoodooControl teamCtrl= new VoodooControl(\"input\", \"css\", \"#search_form_team_name_advanced_table .yui-ac-input\");\n\t\tVoodooControl selectCtrl= new VoodooControl(\"li\", \"css\", \"#search_form_team_name_advanced_table ul li:nth-child(1)\");\n\t\tVoodooControl searchTypeCtrl = new VoodooControl(\"input\", \"css\", \"#team_name_advanced_type[value='all']\");\n\t\tsearchCtrl = new VoodooControl(\"input\", \"id\", \"search_form_submit_advanced\");\n\t\tVoodooControl docListCtrl = new VoodooControl(\"td\", \"css\", \"#MassUpdate > table\");\n\n\t\t// input team i.e East\n\t\tFieldSet teamData = testData.get(testName).get(0);\n\t\tteamCtrl.set(teamData.get(\"teamName\"));\n\t\t// search and select team \n\t\tselectCtrl.click();\n\t\tVoodooUtils.waitForReady();\n\n\t\t// Select a radio button below the team id (i.e. At least)\n\t\tsearchTypeCtrl.click();\n\n\t\t// click search\n\t\tsearchCtrl.click();\n\n\t\t// Assert record with searched team id (team1) in the list \n\t\tdocListCtrl.assertContains(documentData.get(0).get(\"documentName\"), true);\n\n\t\t// search record for default team i.e Global\n\t\tteamCtrl.set(teamData.get(\"defaultTeam\"));\n\t\t// select team\n\t\tselectCtrl.click();\n\t\tVoodooUtils.waitForReady();\n\n\t\t// click the search button\n\t\tsearchCtrl.click();\n\n\t\t// Assert list record for searched team id \n\t\tfor (int i = 0 ; i < documentData.size() ; i++) {\n\t\t\tdocListCtrl.assertContains(documentData.get(i).get(\"documentName\"), true);\n\t\t}\n\n\t\t// Add Team\n\t\tnew VoodooControl(\"button\", \"css\", \"#search_form_team_name_advanced_table button[name='teamAdd']\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tnew VoodooControl(\"input\", \"css\", \"#search_form_team_name_advanced_table tr:nth-child(3) td .yui-ac-input\").set(teamData.get(\"teamName\"));\n\t\tVoodooUtils.waitForReady();\n\t\tnew VoodooControl(\"li\", \"css\", \"#search_form_team_name_advanced_table tbody tr:nth-child(3) ul li:nth-child(1)\").click();\n\n\t\t// click the search button\n\t\tsearchCtrl.click();\n\n\t\t// Assert record with searched teams i.e. Global, East in the list \n\t\tdocListCtrl.assertContains(documentData.get(0).get(\"documentName\"), true);\n\t\tVoodooUtils.focusDefault();\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "public void initScore(@Nonnull Team team){\r\n\r\n\t\t\tif(this.scores.containsKey(team)){\r\n\t\t\t\tscores.put(team, Integer.valueOf(0));\r\n\t\t\t}\r\n\t\t}", "public void endGame()\r\n {\r\n for (Cell c : gameBoard.bombList)\r\n {\r\n if (c.isBomb())\r\n {\r\n if (c.getText() == \"X\")\r\n {\r\n c.setId(\"correctFlag\");\r\n }\r\n else\r\n {\r\n c.setId(\"bombClicked\");\r\n }\r\n }\r\n else if (c.getText() == \"X\")\r\n {\r\n c.setId(\"incorrectFlag\");\r\n }\r\n c.setDisable(true);\r\n }\r\n if (gameBoard.emptyRemaining == 0)\r\n {\r\n win();\r\n }\r\n else\r\n {\r\n lose();\r\n }\r\n System.out.println(\"Game Over...\");\r\n scoreBoard.resetBtn.setDisable(false);\r\n }", "private void checkForPlayerChance()\n\t\t\t{\n\t\t\t\tf = false;\n\t\t\t\tfor (j = 0; j < 8; ++j)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (win[j] == 2 && lose[j] == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tf = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\tif (f == false)\n\t\t\t\t\tj = 10;\n\n\t\t\t}" ]
[ "0.6532244", "0.6358909", "0.6145154", "0.59754825", "0.5923484", "0.58505017", "0.5751722", "0.5746413", "0.57348734", "0.57186466", "0.5715064", "0.56932193", "0.5690648", "0.56886214", "0.56601197", "0.5621189", "0.56156904", "0.560917", "0.55891687", "0.5586289", "0.5560524", "0.55476105", "0.55452037", "0.55451035", "0.5542766", "0.55203694", "0.5516621", "0.55036896", "0.5485367", "0.544067", "0.5435649", "0.5430827", "0.54188544", "0.5417679", "0.5406637", "0.5386285", "0.53809726", "0.53786427", "0.53782237", "0.5376889", "0.53727305", "0.53661954", "0.536474", "0.53599286", "0.5356801", "0.53556323", "0.5339695", "0.53355974", "0.53332776", "0.5329329", "0.5324327", "0.53118503", "0.5305875", "0.5304382", "0.53027105", "0.5297438", "0.52902824", "0.5286361", "0.5285153", "0.52840817", "0.5283882", "0.52783036", "0.5275067", "0.52730596", "0.52688676", "0.5262053", "0.5260981", "0.52602476", "0.5257532", "0.5254108", "0.5249068", "0.52475053", "0.524629", "0.5244677", "0.5243232", "0.5237398", "0.52341604", "0.5231191", "0.5230989", "0.52289474", "0.5218505", "0.5214335", "0.5212608", "0.52103007", "0.52070504", "0.520421", "0.5201266", "0.5201086", "0.51987785", "0.51984113", "0.51983327", "0.51982284", "0.51951486", "0.51947844", "0.5193674", "0.5193546", "0.51932484", "0.5192618", "0.51915", "0.5189456" ]
0.5737327
8
/ init / try to reopen team who open already result negative
@Test public void reopenClosedTeamUnavalableOption() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void resetMyTeam();", "void resetMyTeam(Team team);", "@Test\n public void toggleTeamStates() {\n Team team = new Team(\"Crvena Zvezda\");\n\n // TODO: open persistence context and create transaction\n\n // TODO: move team to managed state\n\n // TODO: assert that the team is managed (check if contained in session)\n\n // TODO: commit and close persistence context\n\n // TODO: fetch from DB as managed entity\n\n // TODO: assert entity is managed\n\n // TODO: remove entity from session and assert not managed\n\n // TODO: commit and close\n }", "private synchronized void teamVictory() {\n \t\tif (state == MatchState.ONVICTORY || state == MatchState.ONCOMPLETE || state == MatchState.ONCANCEL) \n \t\t\treturn;\n \t\tstate = MatchState.ONVICTORY;\n \t\t/// Call the rest after a 2 tick wait to ensure the calling transitionMethods complete before the\n \t\t/// victory conditions start rolling in\n \t\tBukkit.getScheduler().scheduleSyncDelayedTask(plugin, new MatchVictory(this),2L);\n \t}", "@Override\n\tpublic void setHomeTeam() {\n\t\t\n\t}", "public void newTeam(Team team);", "public void reopenDefect(){\r\n\t\ttry{\r\n\t\t\tString ref = \"/\" + RallyConstants.DEFECT + \"/\" + getDefectOID();\r\n\t\t\tRequestInfo reqInfo= new RequestInfo();\r\n\t\t\treqInfo.setRefField(ref);\r\n\t\t\treqInfo.addEntry(RallyConstants.UPDATE, RallyConstants.STATE, RallyConstants.STATUS_OPEN);\r\n\t\t\ttry {\r\n\t\t\t\tupdate(reqInfo);\r\n\t\t\t} catch (DefectException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tlog.error(e.getMessage());\r\n\t\t\t}\r\n\t\t} finally{\r\n\t\t\tsetDefectOID(null);\r\n\t\t\tsetDefectStatus(null);\r\n\t\t}\r\n\t}", "Team createTeam();", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "protected abstract void gatherTeam();", "public synchronized void startGame() {\n PreGameState preGameState = new PreGameState();\n pickTeamState = preGameState.startGame(players);\n state = State.PICK_TEAM;\n teamSelection = new HashSet<>();\n }", "Match getTeam1LooserOfMatch();", "@Test\r\n\tpublic void testStartMatchToMatchLeaguePlayMatch2() {\n\t\tassertTrue(\"Portfolio value does not equal initial balance\", false);\r\n\t\t//Check that players cannot change their portfolios\t\t\r\n\t\tassertTrue(\"Stock holdings may not be modified\", false);\r\n\t}", "private static void switchTeam(BrowserWindow bw, String team) {\n\t\tRepeat rpt = Repeat.findRepeatByIdEndsWith(bw, \"repeat\");\n\t\trpt.clickRow(team);\n\t}", "@Test\n public void test_access_to_modify_team_success() {\n try {\n Assert.assertTrue(authBO.hasAccessToModifyTeam(1, 1));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "Match getTeam2LooserOfMatch();", "@Test\r\n\tpublic void testStartMatchToMatchLeaguePlayMatch1() {\n\t\tassertTrue(\"Portfolio value does not equal initial balance\", false);\r\n\t\t//Check that players cannot change their portfolios\t\t\r\n\t\tassertTrue(\"Stock holdings may not be modified\", false);\r\n\t}", "public void retireLead()\r\n\t{\r\n\t\tisleader = false;\r\n\t}", "private void SecondStateFiringChecks()\n {\n List<Player> AffectedPlayers = game.GetAffectedPlayers(geoTarget, game.GetConfig().GetBlastRadius(missileType));\n\n if(AffectedPlayers.size() == 1)\n {\n final Player affectedPlayer = AffectedPlayers.get(0);\n\n if(lLastWarnedID != affectedPlayer.GetID() && affectedPlayer.GetRespawnProtected())\n {\n final LaunchDialog launchDialog = new LaunchDialog();\n launchDialog.SetHeaderLaunch();\n launchDialog.SetMessage(context.getString(R.string.attacking_respawn_protected, affectedPlayer.GetName(), TextUtilities.GetTimeAmount(affectedPlayer.GetStateTimeRemaining())));\n launchDialog.SetOnClickYes(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n lLastWarnedID = affectedPlayer.GetID();\n Launch();\n }\n });\n launchDialog.SetOnClickNo(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n }\n });\n launchDialog.show(activity.getFragmentManager(), \"\");\n }\n else if(lLastWarnedID != affectedPlayer.GetID() && game.GetNetWorthMultiplier(game.GetOurPlayer(), affectedPlayer) < Defs.NOOB_WARNING)\n {\n final LaunchDialog launchDialog = new LaunchDialog();\n launchDialog.SetHeaderLaunch();\n launchDialog.SetMessage(context.getString(R.string.attacking_noob, affectedPlayer.GetName()));\n launchDialog.SetOnClickYes(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n lLastWarnedID = affectedPlayer.GetID();\n Launch();\n }\n });\n launchDialog.SetOnClickNo(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n }\n });\n launchDialog.show(activity.getFragmentManager(), \"\");\n }\n else if(lLastWarnedID != affectedPlayer.GetID() && game.GetNetWorthMultiplier(game.GetOurPlayer(), affectedPlayer) > Defs.ELITE_WARNING)\n {\n final LaunchDialog launchDialog = new LaunchDialog();\n launchDialog.SetHeaderLaunch();\n launchDialog.SetMessage(context.getString(R.string.attacking_elite, affectedPlayer.GetName()));\n launchDialog.SetOnClickYes(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n lLastWarnedID = affectedPlayer.GetID();\n Launch();\n }\n });\n launchDialog.SetOnClickNo(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n launchDialog.dismiss();\n }\n });\n launchDialog.show(activity.getFragmentManager(), \"\");\n }\n else\n {\n Launch();\n }\n }\n else\n {\n Launch();\n }\n }", "@Test\n\tpublic void Teams_26076_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\tsugar().documents.navToListView();\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\n\t\t// search the record to update team \n\t\t// TODO: VOOD-975\n\t\tsearchBtnCtrl = new VoodooControl(\"input\", \"id\", \"search_form_submit\");\n\t\tVoodooControl nameBasic = new VoodooControl(\"input\", \"id\", \"document_name_basic\");\n\t\tnameBasic.set(documentData.get(0).get(\"documentName\"));\n\t\tsearchBtnCtrl.click();\n\t\tVoodooUtils.focusDefault();\n\n\t\t// update the team for the searched record\n\t\tsugar().documents.listView.checkRecord(1);\n\t\tsugar().documents.listView.openActionDropdown();\n\t\tsugar().documents.listView.massUpdate();\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\t// TODO: VOOD-768, VOOD-1160\n\t\tnew VoodooControl(\"button\", \"css\", \"#MassUpdate_team_name_table button.button.firstChild\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusWindow(1);\n\t\tnew VoodooControl(\"input\", \"id\", \"massall\").click();\n\t\tnew VoodooControl(\"input\", \"id\", \"search_form_select\").click();\n\t\tVoodooUtils.focusWindow(0);\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\tnew VoodooControl(\"input\", \"id\", \"update_button\").click();\n\t\tVoodooUtils.acceptDialog();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusDefault();\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\n\t\t// clear the search\n\t\tnameBasic.set(\"\");\n\t\tsearchBtnCtrl.click();\n\n\t\t// TODO: VOOD-975\n\t\t// Go to advance search \n\t\tnew VoodooControl(\"a\", \"id\", \"advanced_search_link\").click();\n\t\tVoodooUtils.waitForReady();\n\n\t\t// TODO: VOOD-1162\n\t\tVoodooControl teamCtrl= new VoodooControl(\"input\", \"css\", \"#search_form_team_name_advanced_table .yui-ac-input\");\n\t\tVoodooControl selectCtrl= new VoodooControl(\"li\", \"css\", \"#search_form_team_name_advanced_table ul li:nth-child(1)\");\n\t\tVoodooControl searchTypeCtrl = new VoodooControl(\"input\", \"css\", \"#team_name_advanced_type[value='all']\");\n\t\tsearchCtrl = new VoodooControl(\"input\", \"id\", \"search_form_submit_advanced\");\n\t\tVoodooControl docListCtrl = new VoodooControl(\"td\", \"css\", \"#MassUpdate > table\");\n\n\t\t// input team i.e East\n\t\tFieldSet teamData = testData.get(testName).get(0);\n\t\tteamCtrl.set(teamData.get(\"teamName\"));\n\t\t// search and select team \n\t\tselectCtrl.click();\n\t\tVoodooUtils.waitForReady();\n\n\t\t// Select a radio button below the team id (i.e. At least)\n\t\tsearchTypeCtrl.click();\n\n\t\t// click search\n\t\tsearchCtrl.click();\n\n\t\t// Assert record with searched team id (team1) in the list \n\t\tdocListCtrl.assertContains(documentData.get(0).get(\"documentName\"), true);\n\n\t\t// search record for default team i.e Global\n\t\tteamCtrl.set(teamData.get(\"defaultTeam\"));\n\t\t// select team\n\t\tselectCtrl.click();\n\t\tVoodooUtils.waitForReady();\n\n\t\t// click the search button\n\t\tsearchCtrl.click();\n\n\t\t// Assert list record for searched team id \n\t\tfor (int i = 0 ; i < documentData.size() ; i++) {\n\t\t\tdocListCtrl.assertContains(documentData.get(i).get(\"documentName\"), true);\n\t\t}\n\n\t\t// Add Team\n\t\tnew VoodooControl(\"button\", \"css\", \"#search_form_team_name_advanced_table button[name='teamAdd']\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tnew VoodooControl(\"input\", \"css\", \"#search_form_team_name_advanced_table tr:nth-child(3) td .yui-ac-input\").set(teamData.get(\"teamName\"));\n\t\tVoodooUtils.waitForReady();\n\t\tnew VoodooControl(\"li\", \"css\", \"#search_form_team_name_advanced_table tbody tr:nth-child(3) ul li:nth-child(1)\").click();\n\n\t\t// click the search button\n\t\tsearchCtrl.click();\n\n\t\t// Assert record with searched teams i.e. Global, East in the list \n\t\tdocListCtrl.assertContains(documentData.get(0).get(\"documentName\"), true);\n\t\tVoodooUtils.focusDefault();\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "@Test\n\tpublic void testIsConsistentProjectNoOpen() throws Exception {\n\t\trodinProject.close();\n\t\tassertTrue(\"closed project should be consistent\", \n\t\t\t\trodinProject.isConsistent());\n\t\tassertFalse(\"project should not be open\", rodinProject.isOpen());\n\t}", "@Override\n\tpublic void setTeam(int i) {\n\t\t\n\t}", "@Test\n public void playMonopolyCard() throws Exception {\n ResourceType type = ResourceType.ORE;\n when(devCardFacade.canUseMonopolyCard(noDevCardsPlayer, type)).thenReturn(false);\n dcc.playMonopolyCard(type);\n verify(devCardFacade, never()).useMonopolyCard(noDevCardsPlayer, type);\n //Player 1; has devCards\n when(devCardFacade.canUseMonopolyCard(currentPlayer, type)).thenReturn(true);\n dcc.playMonopolyCard(type);\n }", "Team getMyTeam();", "@Override\n\tpublic int getTeam() {\n\t\treturn 0;\n\t}", "public void tryRehearse() {\n if (currentPlayer.isEmployed() == true) {\n if(!currentPlayer.getHasPlayed()){\n currentPlayer.rehearse();\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end your turn.\");\n }\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"You're not employed, so you need to take a role before you can rehearse.\");\n }\n view.updateSidePanel(playerArray);\n }", "@Test\n public void temporaryTeamClosingUnavalableOption() {\n\n }", "public void tryUpgrade() {\n int maxLevel = 6;\n if(currentPlayer.getLocation().getName().equals(\"office\")){\n if(currentPlayer.getRank() < maxLevel){ // player not at max level, allow upgrade\n upgrade();\n \n refreshPlayerPanel();\n view.changeCurrentPlayer(currentPlayer.getName(), currentPlayer.getPlayerDiePath(), numDays);\n }\n else{\n view.showPopUp(currentPlayer.isComputer(), \"You are already max level: \" + maxLevel);\n }\n \n }\n else{\n view.showPopUp(currentPlayer.isComputer(), \"You are not located in the office, move to the office\");\n }\n view.updateSidePanel(playerArray);\n }", "public void updateAirForceTeam(Collection<Unit> airunits) {\n\t\t\n\t\t// remove airunit of invalid team \n\t\tList<Integer> invalidUnitIds = new ArrayList<>();\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (!UnitUtils.isCompleteValidUnit(airunit)) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t} else if (airForceTeamMap.get(airunitId).leaderUnit == null) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t}\n\t\t}\n\t\tfor (Integer invalidUnitId : invalidUnitIds) {\n\t\t\tairForceTeamMap.remove(invalidUnitId);\n\t\t}\n\t\t\n\t\t// new team\n\t\tfor (Unit airunit : airunits) {\n\t\t\tAirForceTeam teamOfAirunit = airForceTeamMap.get(airunit.getID());\n\t\t\tif (teamOfAirunit == null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), new AirForceTeam(airunit));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 리더의 위치를 비교하여 합칠 그룹인지 체크한다.\n\t\t// - 클로킹모드 상태가 다른 그룹은 합치지 않는다.\n\t\t// - 수리 상태의 그룹은 합치지 않는다.\n\t\tList<AirForceTeam> airForceTeamList = new ArrayList<>(new HashSet<>(airForceTeamMap.values()));\n\t\tMap<Integer, Integer> airForceTeamMergeMap = new HashMap<>(); // key:merge될 그룹 leaderID, value:merge할 그룹 leaderID\n\t\t\n\t\tint mergeDistance = AIR_FORCE_TEAM_MERGE_DISTANCE;\n\t\tif (InfoUtils.enemyRace() == Race.Terran) {\n\t\t\tmergeDistance += 120;\n\t\t}\n\t\tfor (int i = 0; i < airForceTeamList.size(); i++) {\n\t\t\tAirForceTeam airForceTeam = airForceTeamList.get(i);\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tboolean cloakingMode = airForceTeam.cloakingMode;\n\t\t\tfor (int j = i + 1; j < airForceTeamList.size(); j++) {\n\t\t\t\tAirForceTeam compareForceUnit = airForceTeamList.get(j);\n\t\t\t\tif (compareForceUnit.repairCenter != null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (cloakingMode != compareForceUnit.cloakingMode) { // 클로킹상태가 다른 레이쓰부대는 합쳐질 수 없다.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tUnit airForceLeader = airForceTeam.leaderUnit;\n\t\t\t\tUnit compareForceLeader = compareForceUnit.leaderUnit;\n\t\t\t\tif (airForceLeader.getID() == compareForceLeader.getID()) {\n//\t\t\t\t\tSystem.out.println(\"no sense. the same id = \" + airForceLeader.getID());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (airForceLeader.getDistance(compareForceLeader) <= mergeDistance) {\n\t\t\t\t\tairForceTeamMergeMap.put(compareForceLeader.getID(), airForceLeader.getID());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// 합쳐지는 에어포스팀의 airForceTeamMap을 재설정한다.\n\t\tfor (Unit airunit : airunits) {\n\t\t\tInteger fromForceUnitLeaderId = airForceTeamMap.get(airunit.getID()).leaderUnit.getID();\n\t\t\tInteger toForceUnitLeaderId = airForceTeamMergeMap.get(fromForceUnitLeaderId);\n\t\t\tif (toForceUnitLeaderId != null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), airForceTeamMap.get(toForceUnitLeaderId));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// team 멤버 세팅\n\t\tSet<AirForceTeam> airForceTeamSet = new HashSet<>(airForceTeamMap.values());\n\t\tfor (AirForceTeam airForceTeam : airForceTeamSet) {\n\t\t\tairForceTeam.memberList.clear();\n\t\t}\n\t\t\n\t\tList<Integer> needRepairAirunitList = new ArrayList<>(); // 치료가 필요한 유닛\n\t\tMap<Integer, Unit> airunitRepairCenterMap = new HashMap<>(); // 치료받을 커맨드센터\n\t\tList<Integer> uncloakedAirunitList = new ArrayList<>(); // 언클락 유닛\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (airunit.getHitPoints() <= 50) { // repair hit points\n\t\t\t\tAirForceTeam repairTeam = airForceTeamMap.get(airunitId);\n\t\t\t\tif (repairTeam == null || repairTeam.repairCenter == null) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airunit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tneedRepairAirunitList.add(airunitId);\n\t\t\t\t\t\tairunitRepairCenterMap.put(airunitId, repairCenter);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tAirForceTeam airForceTeam = airForceTeamMap.get(airunit.getID());\n\t\t\tif (airForceTeam.cloakingMode && (airunit.getType() != UnitType.Terran_Wraith || airunit.getEnergy() < 15)) {\n\t\t\t\tuncloakedAirunitList.add(airunitId);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tairForceTeam.memberList.add(airunit);\n\t\t}\n\t\t\n\t\t// create separated team for no energy airunit\n\t\tfor (Integer airunitId : uncloakedAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam uncloackedForceTeam = new AirForceTeam(airunit);\n\t\t\tuncloackedForceTeam.memberList.add(airunit);\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, uncloackedForceTeam);\n\t\t}\n\t\t\n\t\t// create repair airforce team\n\t\tfor (Integer airunitId : needRepairAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam needRepairTeam = new AirForceTeam(airunit);\n\t\t\tneedRepairTeam.memberList.add(airunit);\n\t\t\tneedRepairTeam.repairCenter = airunitRepairCenterMap.get(airunit.getID());\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, needRepairTeam);\n\t\t}\n\t\t\n\t\t// etc (changing leader, finishing repair, achievement) \n\t\tSet<AirForceTeam> reorganizedSet = new HashSet<>(airForceTeamMap.values());\n\t\tachievementEffectiveFrame = 0;\n\t\tfor (AirForceTeam airForceTeam : reorganizedSet) {\n\t\t\t// leader 교체\n\t\t\tUnit newLeader = UnitUtils.getClosestUnitToPosition(airForceTeam.memberList, airForceTeam.getTargetPosition());\n\t\t\tairForceTeam.leaderUnit = newLeader;\n\t\t\t\n\t\t\t// repair 완료처리\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tif (!UnitUtils.isValidUnit(airForceTeam.repairCenter) || WorkerManager.Instance().getWorkerData().getNumAssignedWorkers(airForceTeam.repairCenter) < 3) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airForceTeam.leaderUnit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tairForceTeam.repairCenter = repairCenter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tboolean repairComplete = true;\n\t\t\t\tfor (Unit airunit : airForceTeam.memberList) {\n\t\t\t\t\tif (airunit.getHitPoints() < airunit.getType().maxHitPoints() * 0.95) { // repair complete hit points\n\t\t\t\t\t\trepairComplete = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (repairComplete) {\n\t\t\t\t\tairForceTeam.repairCenter = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// achievement\n\t\t\tint achievement = airForceTeam.achievement();\n\t\t\taccumulatedAchievement += achievement;\n\t\t\tachievementEffectiveFrame = achievementEffectiveFrame + airForceTeam.killedEffectiveFrame * 100 - airForceTeam.damagedEffectiveFrame;\n\t\t}\n\t}", "@Test\n public void restartSystemTest() {\n //Setup\n launcher.launch();\n Game game = launcher.getGame();\n game.start();\n game.stop();\n assertThat(game.isInProgress()).isFalse();\n\n //Execute\n game.start();\n\n //Assert\n assertThat(game.isInProgress()).isTrue();\n }", "public void setUpTheGame() throws UserCancelsException{\n played = true;\n ui.printToUser(\"Close the game at any time by inputting letters instead of numbers.\");\n currentOcean = new OceanImpl();\n currentOcean.placeAllShipsRandomly();\n \n currentScore = 0;\n playTheGame();\n if(currentScore<highestScore\n ||highestScore == 0){\n highestScore = currentScore;\n ui.printToUser(\"New High Score! : \" + highestScore);\n }\n }", "protected abstract void assignTeam(boolean playerR, boolean playerB);", "public void assignAndStartInitialProjects() {\n\t\tfor(Player p:players) {\n\t\t\tSubproject sp=drawProject();\n\t\t\tSubprojectField result=sp.setChip(p.removeChip());\n\t\t\tp.raiseScore(result.getAmountSZT());\n\t\t}\n\t}", "public void open(){\n \ttriggerTimer.reset();\n \tisClosed = false;\n \tClawAct.set(false);\n\t\tRobot.oi.armRumble(RUMBLE_DURATION);\n }", "@Override\n\tpublic int countTeam() {\n\t\treturn 0;\n\t}", "@Override\n public void resetQuestion() {\n super.resetQuestion();\n hadSecondChance = false;\n currentTeam = null;\n originalTeam = null;\n teamHasAnswered.clear();\n //reset teamHasAnswered map so all teams get a chance to anaswer again\n for (int i = 0; i < numTeams; i++) teamHasAnswered.put(i, false);\n }", "public void tryAct() {\n\n List<Player> onCardPlayers = new ArrayList<Player>();\n List<Player> offCardPlayers = new ArrayList<Player>();\n if (currentPlayer.isEmployed() == true) {\n if(!currentPlayer.getHasPlayed()){\n onCardPlayers = findPlayers(currentPlayer.getLocation().getOnCardRoles());\n offCardPlayers = findPlayers(currentPlayer.getLocation().getOffCardRoles());\n currentPlayer.act(onCardPlayers, offCardPlayers);\n refreshPlayerPanel();\n }\n else{\n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end your turn.\");\n }\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"You're not employed, so you need to take a role before you can act.\");\n }\n view.updateSidePanel(playerArray);\n }", "int getTeam();", "public static void openChallengeMenu() {\r\n\t\tif(!STATUS.equals(Gamestatus.STOPPED)) return;\r\n\t\tgui.setMenu(new ChallengeMenu(), true);\r\n\t}", "boolean hasTeam();", "private void resetArena() {\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-X:\" + SPAWN_CIRCLE0_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-Y:\" + SPAWN_CIRCLE0_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-Radius:1\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-X:\" + SPAWN_CIRCLE1_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-Y:\" + SPAWN_CIRCLE1_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-Radius:1\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-X:\" + SPAWN_CIRCLE2_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-Y:\" + SPAWN_CIRCLE2_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-Radius:1\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-X:\" + SPAWN_CIRCLE3_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-Y:\" + SPAWN_CIRCLE3_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-Radius:1\");\r\n\r\n if(m_ensureLock) {\r\n m_ensureLock = false;\r\n m_botAction.toggleLocked();\r\n }\r\n }", "@Override\n\tpublic int countProjectTeam() {\n\t\treturn 0;\n\t}", "public void startGame(){\n\n AgentAddress coordinatorAddressPre = getAgentWithRole(\"investment_game\", \"tout_le_monde\", \"coordinator\");\n\n if (coordinatorAddressPre==null){\n Coordinator coordinator = new Coordinator();\n\n launchAgent(coordinator);\n\n pause(1000);\n }\n\n Set<Player> players = new HashSet<Player>();\n Player primaryPlayer = null;\n\n //now launch all human player avatar agents, each of them will be initialized as agent having a GUI frame\n Iterator<GameSpecification.PlayerSpecification> playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n int launchedHumanPlayers = 0;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.HumanPlayerSpecification){\n\n HumanPlayerAvatar humanPlayerAvatar = new HumanPlayerAvatar(spec.getName());\n\n launchAgent(humanPlayerAvatar,true);\n\n players.add(humanPlayerAvatar);\n\n launchedHumanPlayers++;\n\n if (null == primaryPlayer){\n primaryPlayer=humanPlayerAvatar;\n }\n\n }\n }\n\n //launch computer player agents. If no human players have been launched, the first computer player will display a GUI frame.\n playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n boolean first = true;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.ComputerPlayerSpecification){\n\n ChooseAmountStrategy chooseAmountStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getChooseAmountStrategy();\n\n SelectOpponentStrategy selectOpponentStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getSelectOpponentStrategy();\n \n ComputerPlayer computerPlayer = new ComputerPlayer(spec.getName(),spec.getPictureFileName(), chooseAmountStrategy, selectOpponentStrategy);\n\n chooseAmountStrategy.setPlayer(computerPlayer);\n\n selectOpponentStrategy.setPlayer(computerPlayer);\n\n launchAgent(computerPlayer, launchedHumanPlayers == 0 && first);\n\n players.add(computerPlayer);\n\n if (null == primaryPlayer){\n primaryPlayer=computerPlayer;\n }\n\n first = false;\n\n }\n }\n\n //request new game from coordinator\n AgentAddress coordinatorAddress;\n\n while((coordinatorAddress = getAgentWithRole(\"investment_game\",\"tout_le_monde\",\"coordinator\"))==null){\n pause(750);\n }\n\n String requestGameSpec = \"<new_game> <for> \"+gameSpecification.getPlayerSpecifications().size()+\" <players> <having> \"+gameSpecification.getRounds()+\" <rounds> <invite> 0 <computer_players>\";\n\n ActMessage reply = (ActMessage)sendMessageWithRoleAndWaitForReply(coordinatorAddress,new ActMessage(\"request_game\",requestGameSpec),\"jeromes_assistant\");\n\n if (reply.getAction().equals(\"game_initialized\")){\n\n final String gameId = reply.getContent();\n\n //let players join the game\n Iterator<Player> playerIterator = players.iterator();\n\n while (playerIterator.hasNext()){\n\n final Player player = playerIterator.next();\n final boolean isPrimaryPlayer = player.equals(primaryPlayer);\n\n new Thread(){\n @Override\n public void run() {\n player.joinGame(gameId,isPrimaryPlayer,player.getPicturePath());\n }\n }.start();\n\n }\n }else{\n //TODO throw Exception\n }\n\n }", "public FightTeam team();", "public synchronized void pickTeam() {\n voteTeamState = pickTeamState.pickTeam(teamSelection);\n state = State.VOTE_TEAM;\n playerVotes = new HashMap<>();\n }", "public TeamObject() {\n\t\t//build the firstRaceLockButton variable\n\t\tfirstRaceLockButton.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t//get the mouse cursor out of the time input field so that it works properly\n\t\t\t\tif(firstRaceLockButton.getText() == \"Lock\") {\n\t\t\t\t\tKeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();\t\t//remove focus from the text box\n\t\t\t\t\t\n\t\t\t\t\t//first commit the new text to get the corect value from the text field\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttimeFirstRaceInputField.commitEdit();\n\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfirstRaceTime = Integer.parseInt((String)timeFirstRaceInputField.getValue());\t//set the firstRaceTime variable\n\t\t\t\t\ttimeFirstRaceInputField.setEditable(false);\n\t\t\t\t\tfirstRaceLockButton.setText(\"Unlock\");\n\t\t\t\t\t\n\t\t\t\t\t//if the time changes set the flag\n\t\t\t\t\tif(firstRaceTimeTracker != firstRaceTime) {\n\t\t\t\t\t\tflagFirstRaceTime.setText(\"*\");\t\t//set the time change flag\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfirstRaceTimeTracker = Integer.parseInt((String)timeFirstRaceInputField.getValue());\t//set the varible to keep track if the time changed\n\t\t\t\t\t\n\t\t\t\t\t//check if the button was clicked enough times to change the time change flag\n//\t\t\t\t\tif(firstLockButtonPressCount > 1) {\n//\t\t\t\t\t\tflagFirstRaceTime.setText(\"*\");\t\t//set the time change flag\n//\t\t\t\t\t}\n//\t\t\t\t\tfirstLockButtonPressCount++;\t//add one to the button click count\n\t\t\t\t\t\n\t\t\t\t\t//loop through all the teams array and check if all their first race and second race times are not -1 to open the semi final race radio button\n\t\t\t\t\tfor(int i = 0; i < FestivalObject.teamsArray.size(); i++) {\n\t\t\t\t\t\t//check the teams first race time\n\t\t\t\t\t\tif(FestivalObject.teamsArray.get(i).getFirstRaceTime() == -1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//check the teams second race time\n\t\t\t\t\t\telse if(FestivalObject.teamsArray.get(i).getSecondRaceTime() == -1) {\n\t\t\t\t\t\t\tbreak;\t//not all times are set so dont open the semi finals radio button\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//if the last index is equal to the teamsArray size +1 and the time != -1\n\t\t\t\t\t\telse if(i + 1 == FestivalObject.teamsArray.size() && FestivalObject.teamsArray.get(i).getSecondRaceTime() != -1) {\n\t\t\t\t\t\t\tSchedule.semiFinalsRadioButton.setEnabled(true);\n\t\t\t\t\t\t\tSemiFinalRaceGeneration.generateSemiFinalRaces(Schedule.panel2);\t//auto generate the semi finals when all is locked\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(firstRaceLockButton.getText() == \"Unlock\") {\n\t\t\t\t\ttimeFirstRaceInputField.setEditable(true);\n\t\t\t\t\tfirstRaceLockButton.setText(\"Lock\");\n\t\t\t\t\t\n//\t\t\t\t\tfirstLockButtonPressCount++;\t//add one to the button click count\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//loop through the teams that raced in the race and set the place\n\t\t\t\t//TODO - this changing the label stuff - or just add a text box that is set instead?\n//\t\t\t\tfor(int i = 0; i < FestivalObject.racesArray.size(); i++) {\n//\t\t\t\t\tfor(int j = 0; j < FestivalObject.racesArray.get(i).getTeamsRacing().size(); j++) {\n//\t\t\t\t\t\tFestivalObject.racesArray.get(i).getTeamsRacing().get(j).setPlaceLabel(1, 9);\n//\t\t\t\t\t}\n//\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tfirstRaceLockButton.setFont(FestivalObject.getFont());\n\t\tfirstRaceLockButton.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tfirstRaceLockButton.setBounds(0, 0, 100, 20);\n\t\tfirstRaceLockButton.setFocusable(false);\n\t\t\n\t\t//build the secondRaceLockButton variable\n\t\tsecondRaceLockButton.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t//for the second race lock button click\n\t\t\t\tif(secondRaceLockButton.getText() == \"Lock\") {\n\t\t\t\t\tKeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();\t\t//remove focus from the text box\n\t\t\t\t\t\n\t\t\t\t\t//first commit the new text to get the corect value from the text field\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttimeSecondRaceInputField.commitEdit();\n\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsecondRaceTime = Integer.parseInt((String)timeSecondRaceInputField.getValue());\t//set the secondRaceTime variable\n\t\t\t\t\ttimeSecondRaceInputField.setEditable(false);\n\t\t\t\t\tsecondRaceLockButton.setText(\"Unlock\");\n\t\t\t\t\t\n\t\t\t\t\t//check if the button was clicked enough times to change the time change flag\n//\t\t\t\t\tif(secondLockButtonPressCount > 1) {\n//\t\t\t\t\t\tflagSecondRaceTime.setText(\"*\");\t\t//set the time change flag\n//\t\t\t\t\t}\n//\t\t\t\t\tsecondLockButtonPressCount++;\t//add one to the button click count\n\t\t\t\t\t\n\t\t\t\t\t//loop through all the teams array and check if all their first race and second race times are not -1 to open the semi final race radio button\n\t\t\t\t\tfor(int i = 0; i < FestivalObject.teamsArray.size(); i++) {\n\t\t\t\t\t\t//check the teams first race time\n\t\t\t\t\t\tif(FestivalObject.teamsArray.get(i).getFirstRaceTime() == -1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//check the teams second race time\n\t\t\t\t\t\telse if(FestivalObject.teamsArray.get(i).getSecondRaceTime() == -1) {\n\t\t\t\t\t\t\tbreak;\t//not all times are set so dont open the semi finals radio button\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//if the last index is equal to the teamsArray size +1 and the time != -1\n\t\t\t\t\t\telse if(i + 1 == FestivalObject.teamsArray.size() && FestivalObject.teamsArray.get(i).getSecondRaceTime() != -1) {\n\t\t\t\t\t\t\tSchedule.semiFinalsRadioButton.setEnabled(true);\n\t\t\t\t\t\t\tSemiFinalRaceGeneration.generateSemiFinalRaces(Schedule.panel2);\t//auto generate the semi finals when all is locked\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(secondRaceLockButton.getText() == \"Unlock\") {\n\t\t\t\t\ttimeSecondRaceInputField.setEditable(true);\n\t\t\t\t\tsecondRaceLockButton.setText(\"Lock\");\n\t\t\t\t\t\n//\t\t\t\t\tsecondLockButtonPressCount++;\t//add one to the button click count\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsecondRaceLockButton.setFont(FestivalObject.getFont());\n\t\tsecondRaceLockButton.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tsecondRaceLockButton.setBounds(0, 0, 100, 20);\n\t\tsecondRaceLockButton.setFocusable(false);\n\t\t\n\t\t//build the semiFinalRaceLockButton variable\n\t\tsemiFinalRaceLockButton.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t//for the semi final race button click\n\t\t\t\tif(semiFinalRaceLockButton.getText() == \"Lock\") {\n\t\t\t\t\tKeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();\t\t//remove focus from the text box\n\t\t\t\t\t\n\t\t\t\t\t//first commit the new text to get the corect value from the text field\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttimeSemiFinalRaceInputField.commitEdit();\n\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tsemiFinalRaceTime = Integer.parseInt((String)timeSemiFinalRaceInputField.getValue());\t//set the semiFinalRaceTime variable\n\t\t\t\t\ttimeSemiFinalRaceInputField.setEditable(false);\n\t\t\t\t\tsemiFinalRaceLockButton.setText(\"Unlock\");\n\t\t\t\t\t\n\t\t\t\t\t//check if the button was clicked enough times to change the time change flag\n//\t\t\t\t\tif(semiFinalLockButtonPressCount > 1) {\n//\t\t\t\t\t\tflagSemiFinalRaceTime.setText(\"*\");\t\t//set the time change flag\n//\t\t\t\t\t}\n//\t\t\t\t\tsemiFinalLockButtonPressCount++;\t//add one to the button click count\n\t\t\t\t\t\n\t\t\t\t\t//loop through all the teams array and check if all their semi final race times are not -1 to open the finals race radio button\n\t\t\t\t\tfor(int i = 0; i < FestivalObject.teamsArray.size(); i++) {\n\t\t\t\t\t\tif(FestivalObject.teamsArray.get(i).getSemiFinalRaceTime() == -1) {\n\t\t\t\t\t\t\tbreak;\t//not all times are set so dont open the finals radio button\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//if the last index is equal to the teamsArray size +1 and the time != -1\n\t\t\t\t\t\telse if(i + 1 == FestivalObject.teamsArray.size() && FestivalObject.teamsArray.get(i).getSemiFinalRaceTime() != -1) {\n\t\t\t\t\t\t\tSchedule.finalsRadioButton.setEnabled(true);\n\t\t\t\t\t\t\tFinalRaceGeneration.generateFinalRaces(Schedule.panel3);\t//generate the final races when all the semi finals are locked\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(semiFinalRaceLockButton.getText() == \"Unlock\") {\n\t\t\t\t\ttimeSemiFinalRaceInputField.setEditable(true);\n\t\t\t\t\tsemiFinalRaceLockButton.setText(\"Lock\");\n\t\t\t\t\tflagSemiFinalRaceTime.setText(\"*\");\n\t\t\t\t\t\n//\t\t\t\t\tsemiFinalLockButtonPressCount++;\t//add one to the button click count\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsemiFinalRaceLockButton.setFont(FestivalObject.getFont());\n\t\tsemiFinalRaceLockButton.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tsemiFinalRaceLockButton.setBounds(0, 0, 100, 20);\n\t\tsemiFinalRaceLockButton.setFocusable(false);\n\t\t\n\t\t//build the finalRaceLockButton variable\n\t\tfinalRaceLockButton.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t//for the final race button click\n\t\t\t\tif(finalRaceLockButton.getText() == \"Lock\") {\n\t\t\t\t\tKeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();\t\t//remove focus from the text box\n\t\t\t\t\t\n\t\t\t\t\t//first commit the new text to get the corect value from the text field\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttimeFinalRaceInputField.commitEdit();\n\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinalRaceTime = Integer.parseInt((String)timeFinalRaceInputField.getValue());\t//set the finalRaceTime variable\n\t\t\t\t\ttimeFinalRaceInputField.setEditable(false);\n\t\t\t\t\tfinalRaceLockButton.setText(\"Unlock\");\n\t\t\t\t\t\n\t\t\t\t\t//check if the button was clicked enough times to change the time change flag\n//\t\t\t\t\tif(finalLockButtonPressCount > 1) {\n//\t\t\t\t\t\tflagFinalRaceTime.setText(\"*\");\t\t//set the time change flag\n//\t\t\t\t\t}\n//\t\t\t\t\tfinalLockButtonPressCount++;\t//add one to the button click count\n\t\t\t\t\t\n\t\t\t\t\t//loop through all the teams array and check if all their semi final race times are not -1 to open the finals race radio button\n\t\t\t\t\tfor(int i = 0; i < FestivalObject.teamsArray.size(); i++) {\n\t\t\t\t\t\tif(FestivalObject.teamsArray.get(i).getFinalRaceTime() == -1) {\n\t\t\t\t\t\t\tbreak;\t//not all times are set so dont open the finals radio button\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//if the last index is equal to the teamsArray size +1 and the time != -1\n\t\t\t\t\t\telse if(i + 1 == FestivalObject.teamsArray.size() && FestivalObject.teamsArray.get(i).getFinalRaceTime() != -1) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArrayList<TeamObject> tm = new ArrayList<TeamObject>(FestivalObject.teamsArray);\t\t//duplicate teamsArray\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//calculate the place each team is in\n\t\t\t\t\t\t\t//sort the duplicated tm ArrayList based on the averagedRaceTime in ascending order before separating by category\n\t\t\t\t\t\t\t//this makes them stay sorted before separation\n\t\t\t\t\t\t\tCollections.sort(tm, new Comparator<TeamObject>() {\n\t\t\t\t\t\t\t\tpublic int compare(TeamObject o1, TeamObject o2) {\n\t\t\t\t\t\t\t\t\treturn String.format(\"%06d\", o1.getAveragedRaceTime()).compareTo(String.format(\"%06d\", o2.getAveragedRaceTime()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//loop to set the place that the team is in\n\t\t\t\t\t\t\t//teams are sorted in order by best time right above this already\n\t\t\t\t\t\t\tfor(int j = 0; i< FestivalObject.teamsArray.size(); j++) {\n\t\t\t\t\t\t\t\tFestivalObject.teamsArray.get(j).setPlace(j + 1);\t\t//set the teams place\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(finalRaceLockButton.getText() == \"Unlock\") {\n\t\t\t\t\ttimeFinalRaceInputField.setEditable(true);\n\t\t\t\t\tfinalRaceLockButton.setText(\"Lock\");\n\t\t\t\t\t\n//\t\t\t\t\tfinalLockButtonPressCount++;\t//add one to the button click count\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tfinalRaceLockButton.setFont(FestivalObject.getFont());\n\t\tfinalRaceLockButton.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tfinalRaceLockButton.setBounds(0, 0, 100, 20);\n\t\tfinalRaceLockButton.setFocusable(false);\n\t\t\n\t\t//build the time change flag labels\n\t\tflagFirstRaceTime.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tflagFirstRaceTime.setFont(FestivalObject.getFont());\n\t\t\n\t\tflagSecondRaceTime.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tflagSecondRaceTime.setFont(FestivalObject.getFont());\n\t\t\n\t\tflagSemiFinalRaceTime.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tflagSemiFinalRaceTime.setFont(FestivalObject.getFont());\n\t\t\n\t\tflagFinalRaceTime.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tflagFinalRaceTime.setFont(FestivalObject.getFont());\n\t\t\n\t\t//set up the place labels\n\t\tfirstRacePlaceLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tfirstRacePlaceLabel.setFont(FestivalObject.getFont());\n\t\t\n\t\tsecondRacePlaceLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tsecondRacePlaceLabel.setFont(FestivalObject.getFont());\n\t\t\n\t\tsemiFinalRacePlaceLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tsemiFinalRacePlaceLabel.setFont(FestivalObject.getFont());\n\t\t\n\t\tfinalRacePlaceLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tfinalRacePlaceLabel.setFont(FestivalObject.getFont());\n\t}", "@Override\r\n\tpublic ResultMessage updateTeam(TeamPO oneTeam) {\n\t\treturn teams.updateTeam(oneTeam);\r\n\t}", "private void swapTeamMembers() {\n // GUI call\n String[] argsArray = new String[0];\n SwapTeamGUI.main(argsArray);\n }", "public void testDetermineLeagueWinner() {\n\t\tassertTrue(\"Error determining correct winner\", false);\r\n\t\t//Check that player records have been updated correctly\r\n\t\tassertTrue(\"Error updating player records\", false);\r\n\t}", "private void jumpToCreateorUpdate(String action, Team update) {\r\n CreateorUpdateTeam windowAux = new CreateorUpdateTeam();\r\n menuTeams.setVisible(false);\r\n windowAux.setUpdateTeam(update);\r\n windowAux.setFunctiontoRealize(action);\r\n windowAux.openWindow(menuTeams);\r\n }", "void setWinningTeam(TeamId winner) {\n winningTeam.set(winner);\n }", "public void Players()\n\t{\n\t\tSystem.out.println(\"What team are you looking for?: \");\n\t\tSystem.out.println(\"1: Soccer\\n2: Basketball\\n3: Football\\n4: RETURN\");\n\t\tint choice1 = input.nextInt();\n\t\tswitch (choice1) {\n\t\t\n\t\tcase 1:\n\t\t\t\n\t\t\tString name = \"GB Soccer\";\n\t\t\tSelectTeam(name);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nTo view player's full Bio, type Last Name\");\n\t\t\t\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\tString Spname = input.nextLine();\n\t\t\tSelectPlayer(Spname);\n\t\t\tSystem.out.println(\"To return to teams list press 1, to exit press 2\");\n\t\t\tint choice2 = input.nextInt();\n\t\t\tswitch(choice2)\n\t\t\t{\n\t\t\tcase 1: Players(); break; case 2: System.exit(2); break;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Yet to be implemented\");\n\t\t\t\tbreak; \n\t\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tString name1 = \"GB Basketball\";\n\t\t\tSelectTeam(name1);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nTo view player's full Bio, type Last Name\");\n\t\t\t\n\t\t\tScanner input1 = new Scanner(System.in);\n\t\t\tString Bpname = input1.nextLine();\n\t\t\tSelectPlayer(Bpname);\n\t\t\tSystem.out.println(\"To return to teams list press 1, to exit press 2\");\n\t\t\tint choice3 = input1.nextInt();\n\t\t\tswitch(choice3)\n\t\t\t{\n\t\t\tcase 1: Players(); break; case 2: System.exit(0); break;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Yet to be implemented\");\n\t\t\t\tbreak; \n\t\t\t\t}\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tString name2 = \"GB Football\";\n\t\t\tSelectTeam(name2);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nTo view player's full Bio, type Last Name\");\n\t\t\t\n\t\t\tScanner input2 = new Scanner(System.in);\n\t\t\tString Fpname = input2.nextLine();\n\t\t\tSelectPlayer(Fpname);\n\t\t\tSystem.out.println(\"To return to teams list press 1, to exit press 2\");\n\t\t\tint choice4 = input2.nextInt();\n\t\t\tswitch(choice4)\n\t\t\t{\n\t\t\tcase 1: Players(); break; case 2: System.exit(0); break;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Yet to be implemented\");\n\t\t\t\tbreak; \n\t\t\t\t}\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tquestion();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Yet to be implemented\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public static void proposeTrade(League theLeague, Team theTeam, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Propose Trade---\");\r\n\t\tfor (int x = 0; x < theLeague.getNumTeams(); x++) {\r\n\t\t\tif (!theLeague.getTeam(x).equals(theTeam)) {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(\"Team number: \" + (x + 1));\r\n\t\t\t\ttheLeague.getTeam(x).teamManNameToString();\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Select a team to view:\");\r\n\t\t\r\n\t\tint otherTeamChoice;\r\n\t\tdo {\r\n\t\t\totherTeamChoice = Input.validInt(1, theLeague.getNumTeams(), keyboard) - 1;\r\n\t\t} while (otherTeamChoice == theLeague.getTeamList().indexOf(theTeam));\r\n\t\tTeam otherTeam = theLeague.getTeam(otherTeamChoice);\r\n\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Propose Trade---\");\r\n\t\tSystem.out.println(\"\");\r\n\t\totherTeam.teamToString();\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Would you like to propose a trade to this team?\");\r\n\t\tSystem.out.println(\"1 - Yes\");\r\n\t\tSystem.out.println(\"2 - No, Return to Team Menu\");\r\n\t\t\r\n\t\tif (Input.validInt(1, 2, keyboard) == 1) {\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\tSystem.out.println(\"Enter your trade offer (max 64 characters):\");\r\n\t\t\tSystem.out.println(\"0 - Return to Team Menu\");\r\n\t\t\tString proposal = Input.validString(32, keyboard);\r\n\t\t\tif (proposal.equals(\"0\")) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\totherTeam.setProposedTrade(theTeam.getManagerName() + \": \" + proposal);\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\tSystem.out.println(\"***You have proposed a trade:***\");\r\n\t\t\tSystem.out.println(\"To \" + otherTeam.getManagerName() + \": \" + proposal);\r\n\t\t}\r\n\t}", "private void startMultiPlayerGame() {\n Intent intent = Games.RealTimeMultiplayer.getSelectOpponentsIntent(getApiClient(), 1, 1);\n startActivityForResult(intent, RC_SELECT_PLAYERS);\n }", "@Override\n\tpublic void updateTeam(String name, SuperHuman superHuman) {\n\n\t}", "public ActionLocation enterEditTeam(ModuleMapping mapping, HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\tString returnLabel = \"newTeamPage\";\n\t\tString type = (String) request.getParameter(\"type\");\n\t\tStaffVO currentStaff = (StaffVO) request.getSession().getAttribute(CommonName.CURRENT_STAFF_INFOR);\n\t\t// 获取其所有下级公司(包括本公司)\n\t\tString lowerOrgIds = currentStaff.getLowerCompanys(); // CompanyHelper.getInstance().getLowerCompany(currentStaff.getOrgId());\n\n\t\tif (type == null) {\n\t\t\ttype = \"new\";\n\t\t}\n\t\tIDBManager dbManager = null;\n\t\ttry {\n\t\t\tdbManager = DBManagerFactory.getDBManager();\n\t\t\tStaffDAO sdao = new StaffDAO(dbManager);\n\t\t\tTeamDAO dao = new TeamDAO(dbManager);\n\t\t\tif (!\"new\".equals(type)) {\n\t\t\t\t// 编辑type=\"edit\"\n\t\t\t\t// fetch\n\t\t\t\tString teamcode = request.getParameter(\"teamcode\");\n\t\t\t\tTeamVO eflowteamvo = dao.getTeamByTeamCode(teamcode);\n\t\t\t\trequest.setAttribute(\"eflowteam\", eflowteamvo);\n\n\t\t\t\t// for sub-team tree\n\t\t\t\trequest.setAttribute(eflowteamvo.getTeamName().trim() + eflowteamvo.getTeamCode().toString(), dao\n\t\t\t\t\t\t.getSubteamArr(teamcode));\n\t\t\t\tthis.treeNodes = \",\"+teamcode+\",\";//Init\n\t\t\t\tsetSubTeam(request, teamcode, dao);\n\t\t\t}\n\n\t\t\t// 获取所有Team列表\n\t\t\tCollection teamList = null;\n\t\t\t// if (\"new\".equals(type)){\n\t\t\t// TeamList = dao.getEflowTeamList();\n\t\t\t// TeamList = dao.getViewTeamList();\n\t\t\tif (CompanyHelper.getInstance().getEFlowCompany().equals(CompanyHelper.EFlow_AIA_CHINA)) {\n\t\t\t\tteamList = dao.getTeamList(null);\n\t\t\t} else {\n\t\t\t\tteamList = dao.getTeamList(lowerOrgIds);\n\t\t\t}\n\t\t\t// }\n\t\t\t/**\n\t\t\t * else{ //获取除当前被编辑Team以外的Team List String teamcode =\n\t\t\t * request.getParameter(\"teamcode\"); teamList =\n\t\t\t * dao.getEflowTeamListWithoutTeamCode(teamcode); }\n\t\t\t **/\n\t\t\trequest.setAttribute(\"teamList\", teamList);\n\n\t\t\t// 获取所有的EflowStaff列表\n\t\t\tCollection staffList = null;\n\t\t\t// staffList = sdao.getEflowAllStaff();\n\t\t\tstaffList = sdao.getStaffListByCompanyAndSubCompany(currentStaff.getLowerCompanys());\n\t\t\trequest.setAttribute(\"efusrlist\", staffList);\n\n\t\t\t// 获取所有PMA系统的teamleader\n\t\t\t// ApproverGroupMemberDAO approverdao = new\n\t\t\t// ApproverGroupMemberDAO(dbManager);\n\t\t\t// Collection teamLeaderList = approverdao.getMemberList(\"02\") ;\n\t\t\t// request.setAttribute(\"teamLeaderList\", teamLeaderList);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturnLabel = \"fail\";\n\t\t} finally {\n\t\t\tif (dbManager != null)\n\t\t\t\tdbManager.freeConnection();\n\t\t}\n\t\treturn mapping.findActionLocation(returnLabel);\n\t}", "private void initDefaultTeams() {\n // Loop through the list of user groups and register\n // them as teams.\n for (UserGroup userGroup : UserGroup.values()) {\n // Register the new Team.\n Team team = scoreboard.registerNewTeam(userGroup.getTeamName());\n team.setCanSeeFriendlyInvisibles(true);\n\n // If the prefix does not exist, skip the part below.\n if (userGroup.getUserGroupPrefix().isEmpty()) continue;\n\n // Add the prefix.\n team.setPrefix(userGroup.getUserGroupPrefix());\n }\n }", "public void reset() {\n/* 138 */ if (TimeUtil.getWeek() == 1) {\n/* 139 */ LogUtil.errorLog(new Object[] { \"MentalRankService::reset begin\", Long.valueOf(TimeUtil.currentTimeMillis()) });\n/* 140 */ sendRankReward();\n/* */ } \n/* */ }", "@Test\n void win() {\n getGame().start();\n assertThat(getGame().isInProgress()).isTrue();\n getGame().move(getPlayer(), Direction.EAST);\n getGame().move(getPlayer(), Direction.EAST);\n verify(observer).levelWon();\n assertThat(getGame().isInProgress()).isFalse();\n }", "public void requestOpenPose()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToOpen = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE WITH A CANCEL\r\n continueToOpen = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO OPEN A POSE\r\n if (continueToOpen)\r\n {\r\n // GO AHEAD AND PROCEED MAKING A NEW POSE\r\n promptToOpen();\r\n }\r\n }", "public TeamObject(String name) {\n\t\tthis();\t\t//call the first constructor to build the lock buttons\n\t\tteamName = name;\n\t}", "public void run() {\r\n for(int i = group; i < 64; i += 4) {\r\n if(!m_teams[i].isOut()) {\r\n setSurvivingTeam(m_teams[i]);\r\n return;\r\n }\r\n }\r\n\r\n m_botAction.sendArenaMessage(\"No one won for Base \" + (group + 1));\r\n }", "private boolean try2GetYellowPlayerFromHome(Player player)\n {\n try\n {\n YellowPlayer yellowPlayer = (YellowPlayer) player;\n if (YellowPlayer.getNumber_of_buttons_allowed() > 0)\n {\n ludo.getPlayerFromHome(player);\n //YellowPlayer.setNumber_of_buttons_allowed(YellowPlayer.decrementNumberOfAllowedPlayers());\n return true;\n }\n return false;\n }\n catch (Exception e)\n {\n return false;\n }\n }", "void addMyTeam(Team team) throws HasTeamAlreadyException;", "public static void addPlayer(League theLeague, Team theTeam, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Add Player---\");\r\n\t\ttheTeam.teamToString();\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"--Top 20 Free Agents--\");\r\n\t\ttheLeague.getFreeAgents(20);\r\n\r\n\t\tint playerChoice;\r\n\t\tdo {\r\n\t\t\tdo {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(\" 0 - Filter Free Agents by Position\");\r\n\t\t\t\tSystem.out.println(\" -1 - View All Free Agents\");\r\n\t\t\t\tSystem.out.println(\"1-\" + theLeague.playerList().size() + \" - Select a Player\");\r\n\t\t\t\tplayerChoice = Input.validInt(-1, theLeague.playerList().size(), keyboard);\r\n\t\t\t\t\r\n\t\t\t\tif (playerChoice == -1) {\r\n\t\t\t\t\ttheLeague.getFreeAgents();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (playerChoice == 0) {\r\n\t\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\t\tSystem.out.println(\"Which position would you like to view?\");\r\n\t\t\t\t\tSystem.out.println(\"1 - QB\");\r\n\t\t\t\t\tSystem.out.println(\"2 - WR\");\r\n\t\t\t\t\tSystem.out.println(\"3 - RB\");\r\n\t\t\t\t\tSystem.out.println(\"4 - TE\");\r\n\t\t\t\t\tswitch (Input.validInt(1, 4, keyboard)) {\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent QBs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"QB\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent WRs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"WR\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent RBs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"RB\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent TEs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"TE\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} while (playerChoice < 1);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (theLeague.playerList().get(playerChoice - 1).getIsOwned()) {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(theLeague.playerList().get(playerChoice - 1).playerToString() + \" is not available\");\r\n\t\t\t}\r\n\t\t} while (theLeague.playerList().get(playerChoice - 1).getIsOwned());\r\n\r\n\t\tPlayer thePlayer = theLeague.playerList().get(playerChoice - 1);\r\n\t\tthePlayer.setIsOwned();\r\n\t\ttheTeam.getRoster().add(thePlayer);\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"***\" + theTeam.getManagerName() + \" has added \" + thePlayer.playerToString() + \"***\");\r\n\t}", "private void createLeague(){ \r\n FantasyUser maxUser = new FantasyUser();\r\n maxUser.setEmail(\"[email protected]\");\r\n maxUser.setPassword(\"password\");\r\n fUserBean.create(maxUser);\r\n \r\n FantasyUser adrianUser = new FantasyUser();\r\n adrianUser.setEmail(\"[email protected]\");\r\n adrianUser.setPassword(\"password\");\r\n fUserBean.create(adrianUser);\r\n \r\n FantasyUser ashayUser = new FantasyUser();\r\n ashayUser.setEmail(\"[email protected]\");\r\n ashayUser.setPassword(\"password\");\r\n fUserBean.create(ashayUser);\r\n \r\n FantasyUser jessUser = new FantasyUser();\r\n jessUser.setEmail(\"[email protected]\");\r\n jessUser.setPassword(\"password\");\r\n fUserBean.create(jessUser);\r\n \r\n //create league\r\n FantasyLeague league = new FantasyLeague();\r\n league.setDraftStarted(false);\r\n league.setFinishedDraft(false);\r\n league.setLeagueName(\"Mongeese Only\");\r\n league.setLeagueOwner(maxUser);\r\n flBean.create(league);\r\n \r\n //create teams\r\n FantasyTeam maxTeam = new FantasyTeam();\r\n maxTeam.setTeamName(\"Max's Team\");\r\n maxTeam.setTeamOwner(maxUser);\r\n maxTeam.setLeague(league);\r\n ftBean.create(maxTeam);\r\n \r\n FantasyTeam ashayTeam = new FantasyTeam();\r\n ashayTeam.setTeamName(\"Ashay's Team\");\r\n ashayTeam.setTeamOwner(ashayUser);\r\n ashayTeam.setLeague(league);\r\n ftBean.create(ashayTeam);\r\n \r\n FantasyTeam jessTeam = new FantasyTeam();\r\n jessTeam.setTeamName(\"Jess's team\");\r\n jessTeam.setTeamOwner(jessUser);\r\n jessTeam.setLeague(league);\r\n ftBean.create(jessTeam);\r\n \r\n FantasyTeam adrianTeam = new FantasyTeam();\r\n adrianTeam.setTeamName(\"Team Greasy Pizza\");\r\n adrianTeam.setTeamOwner(adrianUser);\r\n adrianTeam.setLeague(league); \r\n ftBean.create(adrianTeam);\r\n }", "@Test\r\n\tpublic void testCreateMatchToMatchLeaguePlayGame() {\n\t\tassertTrue(\"New match to match league play game not created\", false);\r\n\t\tassertTrue(false);\r\n\t}", "private void initBeginOfTurn()\n\t{\n\t\tfor(Action action : this.getCurrentPlayer().getPersonalityCard().getActions())\n\t\t{\n\t\t\taction.execute(this);\n\t\t}\n\t\t\n\t\tcanPlayPlayerCard = true;\n\t\tthis.getCurrentPlayer().getDataInput().printMessage(this.getEntireGameStatus());\n\t\tthis.getCurrentPlayer().getDataInput().printMessage(this.getCurrentPlayerGameStatus());\n\t\tthis.showSaveGame = true;\n\t\t\n\t\tfor(Card card : this.getCurrentPlayer().getCityAreaCardDeck())\n\t\t{\n\t\t\tcard.setActiveState(true);\n\t\t}\n\t}", "public static void createNewLeague()\n\t{\n\t\t//put code to get input from end-user here.\n\t\t//generateFixtures(leagueName, teamAmount, homeAndAway, winPoints, drawPoints, lossPoints, teamNames);\n\t}", "private void enterMultiPlayerMode(Game game) {\n initSubSystems(game);\n }", "public void restart() {\n\t\tmadeMove = false;\n\t\tcurrentPit = -1;\n\t\tnewGame(player1.getName(), player2.getName(), originalCount); \n\t}", "public void doComputerTurn() {\n Random rand = new Random();\n int randInt;\n\n if (!currentPlayer.isEmployed()) { // player not employed\n // moves (but suppresses popups) at random and update of player panel\n tryMove();\n\n if (!(currentPlayer.getLocation().getName() == \"trailer\")) {\n if (currentPlayer.getLocation().getName() == \"office\") { // in office\n // upgrade (but suppresses popups) at random and update of player panel\n tryUpgrade();\n \n } else { // in regular set\n // take role (but suppresses popups) at random and update of player panel\n tryTakeRole();\n }\n }\n endTurn();\n } else { // player is employed\n randInt = rand.nextInt(2); // get either 0 or 1\n if (randInt == 0) {\n // rehearse\n tryRehearse(); \n } else {\n // act\n tryAct();\n }\n\n endTurn();\n }\n }", "@Test\n\tpublic void testExistsProjectOpen() throws Exception {\n\t\tassertExists(\"The Rodin project should exist\", rodinProject);\n\n\t\t// Try after unloading the project from the database \n\t\trodinProject.close();\n\t\tassertExists(\"The Rodin project should exist\", rodinProject);\n\t\tassertFalse(\"The existence test should not have opened the project\",\n\t\t\t\trodinProject.isOpen());\n\t}", "public String getGameStatus(String team) {\n\n String gameStatus = \"\";\n\n String[] mlbTeam = {\"D-backs\", \"Braves\", \"Orioles\", \"Red Sox\", \"Cubs\", \"White Sox\", \"Reds\", \"Indians\", \"Rockies\",\n \"Tigers\", \"Astros\", \"Royals\", \"Angels\", \"Dodgers\", \"Marlins\", \"Brewers\", \"Twins\", \"Mets\",\n \"Yankees\", \"Athletics\", \"Phillies\", \"Pirates\", \"Cardinals\", \"Padres\", \"Giants\", \"Mariners\",\n \"Rays\", \"Rangers\", \"Blue Jays\", \"Nationals\"};\n\n search:\n for (int i = 0; i < 1; i++) {\n\n for (int j = 0; j < mlbTeam.length; j++) {\n if (mlbTeam[j].equals(team)) {\n break search;\n }\n }\n\n team = \"No team\";\n i++;\n }\n try {\n // indicate if today is an off day for the team selected\n if (getPlayerInfo(team, \"status\", \"status\").equals(\"\")) {\n gameStatus = \"No game scheduled for the \" + uppercaseFirstLetters(team);\n }\n }\n catch (NullPointerException npe) {\n gameStatus = \"No game scheduled for the \" + uppercaseFirstLetters(team);\n }\n\n // display error message if there is no match to the team name inputted\n if (team.equals(\"No team\")) {\n gameStatus = \"ERROR: Please enter current MLB team name.\";\n }\n // indicate if today is an off day for the team selected\n else if (getPlayerInfo(team, \"status\", \"status\").equals(\"\")) {\n gameStatus = \"No game scheduled for the \" + team;\n }\n else {\n gameStatus = getPlayerInfo(team, \"status\", \"status\");\n }\n\n return gameStatus;\n }", "public void conflictReset(){\n\t\tcache = new QueryCache();\n//\t\tfsmTeacher = new FsmTeacher();\n\t\tfsmTeacher.start();\n\t\tproperties = Property.getInstance();\n\t\thardResetList = properties.getList(\"hardResetWords\");\n\t\tsemiSoftResetList = properties.getList(\"semiSoftResetWords\");\n\t\tsoftResetList = properties.getList(\"softResetWords\");\n\t\tlastKeepAlive = new java.util.Date().getTime();\n\n\t\t// normally, one would add an own implementation of SULReset here:\n\t\tsulReset = null;\n\n\n\t\tcountt = 0;\n\t\tnoncachecount =0;\n\t\tcachecount =0;\n\t}", "public void initScore(@Nonnull Team team){\n\t\t\tif(this.scores.containsKey(team)){\r\n\t\t\t\tscores.put(team, Integer.valueOf(0));\r\n\t\t\t}\r\n\t\t}", "private void startMatch() {\n game = new Match(players.get(0), players.get(1), \"Nueva Partida\");\n showMatch();\n state = 1;\n }", "public void checkSetPlayerTurn() // Check and if needed set the players turns so it is their turn.\n\t{\n\t\tswitch (totalPlayers) // Determine how many players there are...\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tswitch (gameState)\n\t\t\t{\n\t\t\tcase twoPlayersNowPlayerOnesTurn: // Make sure it's player one's turn.\n\t\t\t\tplayers.get(0).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase twoPlayersNowPlayerTwosTurn: // Make sure it's player two's turn.\n\t\t\t\tplayers.get(1).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "public void setTeamNo(int teamNo) {\r\n\t\tthis.teamNo = teamNo;\r\n\t}", "public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }", "public Team selectTeam() {\r\n \r\n String[] list = new String[controller.getTeams().size()];\r\n for (int i = 0; i < controller.getTeams().size(); i++) {\r\n list[i] = controller.getTeams().get(i).getName();\r\n }\r\n\r\n JComboBox cmbOption = new JComboBox(list);\r\n int input = JOptionPane.showOptionDialog(null, cmbOption, \"Select Team that your like Delete\",JOptionPane.DEFAULT_OPTION,JOptionPane.QUESTION_MESSAGE, null, null, null);\r\n if(input==-1){\r\n return null;\r\n }\r\n Team teamAux = controller.searchTeam((String) cmbOption.getSelectedItem());\r\n return teamAux;\r\n }", "@Override\n\tpublic boolean doReOpen() { return false; }", "public void initScore(@Nonnull Team team){\r\n\r\n\t\t\tif(this.scores.containsKey(team)){\r\n\t\t\t\tscores.put(team, Integer.valueOf(0));\r\n\t\t\t}\r\n\t\t}", "@Test\n public void allow_joining_when_open() {\n\n Deck deck = new Deck();\n\n Game game = new Game(deck);\n\n game.join(\"john\");\n\n\n\n assertThat(game.getPlayerNames(), is(new HashSet<>(Arrays.asList(\"john\"))));\n }", "public void setTeam(Team team) {\r\n\t\tthis.team = team;\r\n\t}", "public void setTeamId(int value) {\n this.teamId = value;\n }", "public void singleGameOverReset(int numberOfOpeningLives) {\n\t\t\n\t\t// Increment the game number.\n\t\t// Reset the round number back to 1.\n\t\tcurrentGameNumber = currentGameNumber + 1;\n\t\tcurrentRoundnumber = 1;\n\t\t\n\t\t// Set the each total player score equal to their total score + their current score.\n\t\tplayer01.setTotalPlayerScore(player01.getTotalPlayerScore() + player01.getPlayerScore());\n\t\tplayer02.setTotalPlayerScore(player02.getTotalPlayerScore() + player02.getPlayerScore());\n\n\t\t// Reset the player score for next game.\n\t\tplayer01.setPlayerScore(0);\n\t\tplayer02.setPlayerScore(0);\n\t\t\n\t\t// reset the amount of lives each player has\n\t\tplayer01.setPlayerLives(numberOfOpeningLives);\n\t\tplayer02.setPlayerLives(numberOfOpeningLives);\n\n\t\t// -1 from the amount of games left to play\n\t\ttotalGamesLeftToPlay = totalGamesLeftToPlay -1;\n\t}", "public Team() {\n\t\tthis(null);\n\t}", "public void win() {\n displayErrorMessage(\"You Win!\");\n if(controller.aiGame && !controller.loggedIn()){\n controller.switchToLogin();\n }\n else\n controller.switchToLobby();\n }", "@Test\n public void isGameOverThree() {\n this.reset();\n this.bps.startGame(this.fullDeck, false, 7, 1);\n assertFalse(this.bps.isGameOver());\n }", "@Test\n public void isGameOverTwo() {\n this.reset();\n this.bps.startGame(this.fullDeck, false, 1, 0);\n assertTrue(this.bps.isGameOver());\n }", "public void kickStart() {\n startLobby();\n }", "private void checkForJudgeAndTeam(IInternalContest contest) {\n Account account = contest.getAccounts(ClientType.Type.TEAM).firstElement();\n assertFalse(\"Team account not generated\", account == null);\n assertFalse(\"Team account not generated\", account.getClientId().equals(Type.TEAM));\n \n account = contest.getAccounts(ClientType.Type.JUDGE).firstElement();\n assertFalse(\"Judge account not generated\", account == null);\n assertFalse(\"Team account not generated\", account.getClientId().equals(Type.TEAM));\n\n }", "private void dialogChanged() {\n\t\tString teamNumber = getTeamNumber();\n\t\tif (listener != null) listener.stateChanged(null); \n\t\tif (!teamNumber.matches(\"^([1-9][0-9]*)$\")) {\n\t\t\tupdateStatus(\"Team number must be a valid integer without leading zeroes.\");\n\t\t\treturn;\n\t\t}\n\t\tupdateStatus(null);\n\t}", "public ReasonableOperativeAI(Game game, PlayerType team)\n {\n super(game, team);\n }", "public void startNewGame() {\n numOfTurnsLeft = NUMBER_OF_TURNS_ALLOWED;\n decodingBoard.clearBoard();\n }", "public void openUpProject(Subproject project) {\n\t\tSubprojectField field=project.setChip(current.removeChip());\n\t\tcurrent.raiseScore(field.getAmountSZT());\n\t}", "@Override\r\n\tpublic ResultMessage addTeam(TeamPO oneTeam) {\n\t\treturn teams.addTeam(oneTeam) ;\r\n\t}", "@Test\n public void return_early_from_start_in_issues_mode() {\n Mockito.when(settings.getBoolean(SCM_DISABLED_KEY)).thenReturn(Optional.of(true));\n Mockito.when(analysisMode.isIssues()).thenReturn(true);\n underTest.start();\n assertThat(logTester.logs()).isEmpty();\n }", "public Builder setTeam(int value) {\n bitField0_ |= 0x00000004;\n team_ = value;\n onChanged();\n return this;\n }" ]
[ "0.6695181", "0.64225006", "0.58520347", "0.563063", "0.5616506", "0.5556241", "0.5543675", "0.5538023", "0.5519238", "0.5496036", "0.54912174", "0.5488317", "0.5477181", "0.54430497", "0.5416156", "0.5403002", "0.53841406", "0.53775483", "0.531727", "0.53125113", "0.53067124", "0.53033376", "0.5282071", "0.5281674", "0.5271394", "0.52611", "0.5252915", "0.5201799", "0.519664", "0.519067", "0.5189193", "0.51845735", "0.5180735", "0.517622", "0.51735944", "0.5164802", "0.5164327", "0.5161475", "0.5150086", "0.51499444", "0.5143012", "0.51236284", "0.51065636", "0.50987244", "0.50908005", "0.5083891", "0.5083751", "0.5082028", "0.50745547", "0.5067793", "0.5067689", "0.5065463", "0.5063965", "0.50635105", "0.5058666", "0.5049211", "0.50471205", "0.50458044", "0.50379884", "0.50255144", "0.5025126", "0.5023341", "0.5011702", "0.50058514", "0.4991246", "0.4990075", "0.49835482", "0.49768248", "0.49729624", "0.49692917", "0.4969088", "0.49611503", "0.49553847", "0.49542192", "0.49408373", "0.49360955", "0.4932824", "0.49320284", "0.49302718", "0.4929392", "0.49125004", "0.49111763", "0.49085015", "0.49059963", "0.49046147", "0.49018022", "0.48956656", "0.48935568", "0.48912656", "0.4889817", "0.48715052", "0.48700634", "0.48681828", "0.48554796", "0.4842973", "0.48421934", "0.48391244", "0.48389244", "0.48380253", "0.4829314" ]
0.61486906
2
Return the current state of the permissions needed.
private boolean checkPermissions() { int permissionState = ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION); return permissionState == PackageManager.PERMISSION_GRANTED; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean [] getPermissions()\n\t{\n\t\treturn this.permissions;\n\t}", "public Enumeration permissions();", "public ResourceInformation.Permissions getEffectivePermissions() {\n\t\tif (effectivePermissions == null)\n\t\t\tfetchInfo();\n\t\treturn effectivePermissions;\n\t}", "int getPermissionRead();", "public ArrayList<Permission> getPermissions()\r\n {\r\n return this.securityInfo.getPermissions();\r\n }", "public Boolean isPermissions() {\n return (Boolean) get(\"permissions\");\n }", "public List<String> getPermissions() {\n AppMethodBeat.m2504i(92672);\n List permissions = this.properties.getPermissions();\n AppMethodBeat.m2505o(92672);\n return permissions;\n }", "public List<String> getPermissions() {\n return this.permissions;\n }", "@Override\n\tpublic int getIsActive() {\n\t\treturn _permissionType.getIsActive();\n\t}", "abstract public void getPermission();", "public java.util.List<org.eclipse.stardust.engine.api.runtime.Permission>\n getPermissions()\n throws org.eclipse.stardust.common.error.WorkflowException;", "public int getPermissions()\n {\n return encryptionDictionary.getInt( \"P\", 0 );\n }", "public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Permissions getPermissions() {\r\n return permissions;\r\n }", "public List<Permission> getPermissionList() {\n return permissionList;\n }", "String getPermission();", "public Permissions permissions() {\n return this.innerProperties() == null ? null : this.innerProperties().permissions();\n }", "public Map<Permission,Set<String>> getGrantedPermissions() {\n return Collections.unmodifiableMap(grantedPermissions);\n }", "public List<Permission> getUserPermission() {\n\t\treturn securityContext.getAuthorizationContext().getPermissions();\n\t}", "List<Permission> getPermissions();", "public Permission getPermission() {\n return permission;\n }", "protected String[] getRequiredPermissions() {\n return REQUIRED_PERMISSIONS;\n }", "@NonNull\n public List<String> getGrantedPermissions() {\n return mGrantedPermissions;\n }", "public String getPermission()\r\n {\r\n return permission;\r\n }", "public Integer getPermission() {\n\t\treturn permission;\n\t}", "public int getAccess()\n {\n ensureLoaded();\n return m_flags.getAccess();\n }", "public List<Permission> getPermissions()\r\n/* */ {\r\n/* 228 */ return this.permissions;\r\n/* */ }", "public int getUserModificationPermission() {\n return permission;\n }", "public int getPermissionsCount() {\n return permissions_.size();\n }", "public Permission[] getPermissionsField() {\n\treturn super.getPermissions(null);\n }", "private void getPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n MY_PERMISSIONS_REQUEST_READ_CONTACTS);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n }", "protected final List<String> getSessionPermissions() {\n Session currentSession = sessionTracker.getSession();\n return (currentSession != null) ? currentSession.getPermissions() : null;\n }", "boolean isHasPermissions();", "@Override\n public Collection<WegasPermission> getRequieredUpdatePermission(RequestContext context) {\n return this.getState().getRequieredUpdatePermission(context);\n }", "public int getPermissionsCount() {\n return permissions_.size();\n }", "public Set<Permission> getPermissions() {\n return permissions;\n }", "int getPermissionWrite();", "@ApiModelProperty(required = true, value = \"The remote system permission of the invoking user on the file/folder.\")\n public String getPermissions() {\n return permissions;\n }", "public @NonNull List<String> getNewPermissions() {\n return mSplitPermissionInfoParcelable.getNewPermissions();\n }", "public com.google.protobuf.ProtocolStringList\n getPermissionsList() {\n permissions_.makeImmutable();\n return permissions_;\n }", "public int getPermission() {\r\n\t\treturn nPermission;\r\n\t}", "public com.google.protobuf.ProtocolStringList\n getPermissionsList() {\n return permissions_;\n }", "@Override\n\tpublic int getAccessible() {\n\t\treturn _userSync.getAccessible();\n\t}", "public String getPermission() {\n return this.permission;\n }", "public int getAccessFlags() {\n return access_flags;\n }", "List<String> getAvailablePermissions() throws GWTJahiaServiceException;", "@Schema(description = \"Operations the current user is able to perform on this object\")\n public Map<String, Boolean> getCan() {\n return can;\n }", "@Override\r\n\tpublic List<Permission> getAllPermissions() {\n\t\treturn null;\r\n\t}", "public PermissionSet getPermissionSet() {\n return permissionSet;\n }", "public interface Permissions\r\n{\r\n\t/**\r\n\t * Tests whether a permission has been granted\r\n\t * \r\n\t * @param capability The permission (capability) to test for\r\n\t * @return Whether the given capability is allowed\r\n\t */\r\n\tboolean has(String capability);\r\n\r\n\t/**\r\n\t * @param capability The permission to get\r\n\t * @return The permission of the given name\r\n\t */\r\n\tPermission getPermission(String capability);\r\n\r\n\t/** @return All permissions associated with this Permissions object */\r\n\tPermission [] getAllPermissions();\r\n}", "public boolean getIncludePermissions() {\n\t\treturn this.includePermissions;\n\n\t}", "public FacebookPermissionsE permission(){\n\t\treturn this.permission;\n\t}", "public void getPermission() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(permissions,\n MULTIPLE_PERMISSIONS);\n }\n }", "public TPermissionMode getUserPermissionArray() {\n\n\t\treturn otherPermission;\n\t}", "public String getPermissionDescription() {\n return permissionDescription;\n }", "public static LearningObjectInstancePermissions getPermissions(HttpServletRequest request)\n {\n return (LearningObjectInstancePermissions) request.getSession().getAttribute(getSessionKey(request, Constants.SessionKeys.Permissions));\n }", "private boolean checkPermission() {\n int result = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.READ_PHONE_STATE);\n\n if (result == PackageManager.PERMISSION_GRANTED) {\n return true;\n } else {\n return false;\n }\n }", "public List<Permission> queryAllPermission() {\n\t\treturn permissionMapper.queryAllPermission();\n\t}", "int getPermissionsCount();", "public void requestPhoneStatePermission() {\n if (ContextCompat.checkSelfPermission(mContext,\n Manifest.permission.READ_PHONE_STATE)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.READ_PHONE_STATE)) {\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n // No explanation needed, we can request the permission.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.READ_PHONE_STATE},\n Constants.COOPER_PERMISSIONS_REQUEST_READ_PHONE_STATE);\n\n // MY_PERMISSIONS_REQUEST_READ_PHONE_STATE is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n }", "java.util.List<java.lang.String>\n getPermissionsList();", "List<BillingPermissionsProperties> permissions();", "public Set<PosixFilePermission> permissions() {\n List<PosixFilePermission> listPermissions = new ArrayList<PosixFilePermission>();\n listPermissions.add(PosixFilePermission.OWNER_READ);\n listPermissions.add(PosixFilePermission.OWNER_WRITE);\n listPermissions.add(PosixFilePermission.OWNER_EXECUTE);\n listPermissions.add(PosixFilePermission.GROUP_READ);\n listPermissions.add(PosixFilePermission.GROUP_WRITE);\n listPermissions.add(PosixFilePermission.GROUP_EXECUTE);\n listPermissions.add(PosixFilePermission.OTHERS_READ);\n listPermissions.add(PosixFilePermission.OTHERS_WRITE);\n listPermissions.add(PosixFilePermission.OTHERS_EXECUTE);\n\n // We get the permission string and we create it by looking up\n String permissionString = this.attrs.getPermissionsString();\n Set<PosixFilePermission> permissions = new HashSet<PosixFilePermission>();\n char nothing = \"-\".charAt(0);\n // We skip the first character as it's the file type\n for (int i=1; i< permissionString.length();i++) {\n if (permissionString.charAt(i) != nothing) {\n permissions.add(listPermissions.get(i-1));\n }\n }\n\n return permissions;\n\n }", "protected void doGetPermissions() throws TmplException {\r\n try {\r\n GlbPerm perm = (GlbPerm)TmplEJBLocater.getInstance().getEJBRemote(\"pt.inescporto.permissions.ejb.session.GlbPerm\");\r\n\r\n perms = perm.getFormPerms(MenuSingleton.getRole(), permFormId);\r\n }\r\n catch (java.rmi.RemoteException rex) {\r\n //can't get form perms\r\n TmplException tmplex = new TmplException(TmplMessages.NOT_DEFINED);\r\n tmplex.setDetail(rex);\r\n throw tmplex;\r\n }\r\n catch (javax.naming.NamingException nex) {\r\n //can't find GlbPerm\r\n TmplException tmplex = new TmplException(TmplMessages.NOT_DEFINED);\r\n tmplex.setDetail(nex);\r\n throw tmplex;\r\n }\r\n }", "public List<Permission> getPermissionsPending(User user) throws UserManagementException;", "public String getAccess();", "public org.dcache.srm.v2_2.TPermissionReturn[] getPermissionArray() {\n return permissionArray;\n }", "void askForPermissions();", "@NonNull\n public Set<Permission> getConfiguredPermissions() {\n synchronized (permissionDelegateMap) {\n return permissionDelegateMap.keySet();\n }\n }", "public boolean hasPerms()\n {\n return ContextCompat.checkSelfPermission(itsActivity, itsPerm) ==\n PackageManager.PERMISSION_GRANTED;\n }", "public IGrantSet getPermissions()\n throws OculusException;", "public boolean isAccessGranted() {\n try {\n PackageManager packageManager = getPackageManager();\n ApplicationInfo applicationInfo = packageManager.getApplicationInfo(getPackageName(), 0);\n AppOpsManager appOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE);\n int mode;\n assert appOpsManager != null;\n mode = appOpsManager.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n applicationInfo.uid, applicationInfo.packageName);\n return (mode == AppOpsManager.MODE_ALLOWED);\n\n } catch (PackageManager.NameNotFoundException e) {\n return false;\n }\n }", "public Permissions[] getPermissionsNeeded(ContainerRequestContext context) throws Exception {\n Secured auth = resourceInfo.getResourceMethod().getAnnotation(Secured.class);\n\n // If there's no authentication required on method level, check class level.\n if (auth == null) {\n auth = resourceInfo.getResourceClass().getAnnotation(Secured.class);\n }\n\n // Else, there's no permission required, thus we chan continue;\n if (auth == null) {\n log.log(Level.INFO, \"AUTHENTICATION: Method: \" + context.getMethod() + \", no permission required\");\n return new Permissions[0];\n }\n\n return auth.value();\n }", "private void getPermissions(){\n // Check READ storage permission\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n Log.i(\"STORAGE PERMISSION\", \"request READ_EXTERNAL_STORAGE\");\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},\n REQUEST_READ_EXTERNAL_STORAGE);\n } else {\n Log.i(\"STORAGE PERMISSION\", \"READ_EXTERNAL_STORAGE already granted\");\n read_external_storage_granted = true;\n }\n\n // Check WRITE storage permission\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n Log.i(\"STORAGE PERMISSION\", \"request WRITE_EXTERNAL_STORAGE\");\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_WRITE_EXTERNAL_STORAGE);\n } else {\n Log.i(\"STORAGE PERMISSION\", \"WRITE_EXTERNAL_STORAGE already granted\");\n write_external_storage_granted = true;\n }\n\n // Check camera permission\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED){\n Log.i(\"CAMERA PERMISSION\", \"request CAMERA permission\");\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA},\n REQUEST_CAMERA);\n } else {\n Log.i(\"CAMERA PERMISSION\", \"CAMERA permission already granted\");\n camera_permission_granted = true;\n }\n\n }", "public boolean checkPerms()\n {\n boolean perms = hasPerms();\n if (!perms) {\n ActivityCompat.requestPermissions(\n itsActivity, new String[] { itsPerm }, itsPermsRequestCode);\n }\n return perms;\n }", "public List<String> getUsedPermissions() {\n final List<String> result = new LinkedList<String>();\n for (final Element child : manifestElement.getChildren(ELEMENT_USES_PERMISSION)) {\n final String permission = child.getAttributeValue(ATTRIBUTE_NAME);\n if (permission != null) {\n result.add(permission);\n }\n }\n\n return result;\n }", "private boolean permisos() {\n for(String permission : PERMISSION_REQUIRED) {\n if(ContextCompat.checkSelfPermission(getContext(), permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "void writeLegacyPermissionStateTEMP();", "public Enumeration elements()\n {\n return m_permissions.elements();\n }", "@Column(name = \"PERMISSION_ACCESS\")\n\tpublic String getPermissionAccess()\n\t{\n\t\treturn permissionAccess;\n\t}", "public AccountPermissions accountPermissions() {\n return this.accountPermissions;\n }", "@SuppressWarnings(\"unused\")\n\tpublic static String[] getStoragePermissions()\n\t{\n\t\treturn PERMISSIONS_STORAGE;\n\t}", "private void chkPermission() {\n permissionStatus = getSharedPreferences(\"permissionStatus\", MODE_PRIVATE);\n\n if (ActivityCompat.checkSelfPermission(LoginActivity.this, permissionsRequired[0]) != PackageManager.PERMISSION_GRANTED\n || ActivityCompat.checkSelfPermission(LoginActivity.this, permissionsRequired[1]) != PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(LoginActivity.this, permissionsRequired[0])\n || ActivityCompat.shouldShowRequestPermissionRationale(LoginActivity.this, permissionsRequired[1])) {\n //Show Information about why you need the permission\n ActivityCompat.requestPermissions(LoginActivity.this, permissionsRequired, PERMISSION_CALLBACK_CONSTANT);\n\n } else if (permissionStatus.getBoolean(permissionsRequired[0], false)) {\n //Previously Permission Request was cancelled with 'Dont Ask Again',\n // Redirect to Settings after showing Information about why you need the permission\n sentToSettings = true;\n Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\", getPackageName(), null);\n intent.setData(uri);\n startActivityForResult(intent, REQUEST_PERMISSION_SETTING);\n Toast.makeText(getBaseContext(), \"Go to Permissions to Grant Camera, Phone and Storage\", Toast.LENGTH_LONG).show();\n\n } else {\n //just request the permission\n ActivityCompat.requestPermissions(LoginActivity.this, permissionsRequired, PERMISSION_CALLBACK_CONSTANT);\n }\n\n //txtPermissions.setText(\"Permissions Required\");\n\n SharedPreferences.Editor editor = permissionStatus.edit();\n editor.putBoolean(permissionsRequired[0], true);\n editor.commit();\n } else {\n //You already have the permission, just go ahead.\n //proceedAfterPermission();\n }\n\n }", "private boolean checkPermission() {\r\n int result = ContextCompat.checkSelfPermission(getApplicationContext(), READ_CONTACTS);\r\n int result1 = ContextCompat.checkSelfPermission(getApplicationContext(), CAMERA);\r\n int result2 = ContextCompat.checkSelfPermission(getApplicationContext(), ACCESS_FINE_LOCATION);\r\n int result3 = ContextCompat.checkSelfPermission(getApplicationContext(), READ_EXTERNAL_STORAGE);\r\n int result4 = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\r\n int result5 = ContextCompat.checkSelfPermission(getApplicationContext(), READ_PHONE_STATE);\r\n int result6 = ContextCompat.checkSelfPermission(getApplicationContext(), RECORD_AUDIO);\r\n int result7 = ContextCompat.checkSelfPermission(getApplicationContext(), SEND_SMS);\r\n //int result8 = ContextCompat.checkSelfPermission(getApplicationContext(), BLUETOOTH);\r\n\r\n return result == PackageManager.PERMISSION_GRANTED && result1 == PackageManager.PERMISSION_GRANTED && result2 == PackageManager.PERMISSION_GRANTED &&\r\n result3 == PackageManager.PERMISSION_GRANTED && result4 == PackageManager.PERMISSION_GRANTED && result5 == PackageManager.PERMISSION_GRANTED &&\r\n result6 == PackageManager.PERMISSION_GRANTED && result7 == PackageManager.PERMISSION_GRANTED/*&& result8== PackageManager.PERMISSION_GRANTED*/;\r\n }", "private PermissionHelper() {}", "public int getAccess() {\n\t\treturn access;\n\t}", "public boolean isAllGranted(){\n //PackageManager.PERMISSION_GRANTED\n return false;\n }", "public int getAccessLevel() {\n return 0;\r\n }", "@NonNull\n public List<String> getAllowlistedRestrictedPermissions() {\n return mAllowlistedRestrictedPermissions;\n }", "@Override\r\n\tpublic String permission() {\n\t\treturn Permissions.DEFAULT;\r\n\t}", "public boolean accesspermission()\n {\n AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);\n int mode = 0;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n Process.myUid(),context.getPackageName());\n }\n if (mode == AppOpsManager.MODE_ALLOWED) {\n\n return true;\n }\n return false;\n\n }", "public interface PermissionsManager {\n /**\n * @param permission for which to enquire\n *\n * @return whether the permission is granted.\n */\n boolean isPermissionGranted(Permission permission);\n\n /**\n * Checks whether the permission was already granted, and if it was not, then it requests.\n *\n * @param activity to provide mContext\n * @param permission for which to enquire\n *\n * @return whether the permission was already granted.\n */\n boolean requestIfNeeded(Activity activity, Permission permission);\n}", "private void checkPermissions() {\n List<String> permissions = new ArrayList<>();\n String message = \"osmdroid permissions:\";\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.ACCESS_FINE_LOCATION);\n message += \"\\nLocation to show user location.\";\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);\n message += \"\\nStorage access to store map tiles.\";\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.READ_PHONE_STATE);\n message += \"\\n access to read phone state.\";\n //requestReadPhoneStatePermission();\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECEIVE_SMS) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.RECEIVE_SMS);\n message += \"\\n access to receive sms.\";\n //requestReadPhoneStatePermission();\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.GET_ACCOUNTS) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.GET_ACCOUNTS);\n message += \"\\n access to read sms.\";\n //requestReadPhoneStatePermission();\n }\n if (!permissions.isEmpty()) {\n // Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n String[] params = permissions.toArray(new String[permissions.size()]);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(params, REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS);\n }\n } // else: We already have permissions, so handle as normal\n }", "public Set < PermissionAttachmentInfo > getEffectivePermissions ( ) {\n\t\treturn extract ( handle -> handle.getEffectivePermissions ( ) );\n\t}", "public LiveData<List<UriPermissionUse>> getAllUriPermissions() {\n return uriPermissionUseDao.loadAll();\n }", "private boolean checkPermissions() {\n int permissionState1 = ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION);\n\n int permissionState2 = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION);\n return permissionState1 == PackageManager.PERMISSION_GRANTED && permissionState2 == PackageManager.PERMISSION_GRANTED;\n }", "public interface PermissionResult {\n\n void permissionGranted();\n\n void permissionDenied();\n\n void permissionForeverDenied();\n\n}", "@ApiModelProperty(value = \"Operations the current user is able to perform on this object\")\n public Map<String, Boolean> getCan() {\n return can;\n }", "public com.google.protobuf.ProtocolStringList getIncludedPermissionsList() {\n includedPermissions_.makeImmutable();\n return includedPermissions_;\n }", "public static TypePermission[] getDefaultPermissions() {\n return PERMISSIONS.clone();\n }", "public PolicyPermission getPolicyPermission()\n {\n return this.perm;\n }", "public int getMetaPrivileges();" ]
[ "0.7004933", "0.68340963", "0.68264353", "0.6819104", "0.6787857", "0.67850554", "0.6783329", "0.6732336", "0.6705396", "0.6689202", "0.6651053", "0.6596676", "0.65888196", "0.6560666", "0.6551867", "0.655094", "0.6538527", "0.64937675", "0.64818394", "0.6430919", "0.6430471", "0.64111763", "0.6403041", "0.63927233", "0.63877416", "0.6386405", "0.6379308", "0.63570744", "0.6355155", "0.63514155", "0.63334984", "0.6317867", "0.631692", "0.62951964", "0.62945056", "0.6285351", "0.6270349", "0.62643456", "0.62559146", "0.6250755", "0.62378526", "0.6228872", "0.62263995", "0.6225257", "0.6195825", "0.61868054", "0.6160103", "0.6131383", "0.6127752", "0.6116874", "0.61129236", "0.608989", "0.6086329", "0.6067383", "0.6056154", "0.60485995", "0.6009098", "0.5995952", "0.5992012", "0.5985652", "0.5969782", "0.59630823", "0.59619623", "0.595883", "0.5947848", "0.5944129", "0.5942925", "0.5937296", "0.5901318", "0.5894743", "0.5888992", "0.5887133", "0.5886441", "0.5886002", "0.58850336", "0.5876937", "0.5874136", "0.5870642", "0.5870506", "0.58513445", "0.5846488", "0.584269", "0.5828886", "0.58270293", "0.5823064", "0.57982486", "0.5798095", "0.5787064", "0.57836425", "0.57813334", "0.576703", "0.5754803", "0.575112", "0.57450026", "0.57449335", "0.574489", "0.57405734", "0.5738118", "0.5735098", "0.5731352", "0.5715845" ]
0.0
-1
Callback received when a permissions request has been completed.
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { Log.i("INFO", "onRequestPermissionResult"); if (requestCode == REQUEST_PERMISSIONS_REQUEST_CODE) { if (grantResults.length <= 0) { // If user interaction was interrupted, the permission request is cancelled and you // receive empty arrays. Log.i("INFO", "User interaction was cancelled."); } else if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { // Permission granted. getLastLocation(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onPermissionsGranted(int requestCode, List<String> perms) {\n }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> perms) {\n }", "@Override\n public void onAction(List<String> permissions) {\n Log.e(TAG, \"permission success\");\n callback.onSuccess(permissions);\n\n }", "public interface PermissionCallbacks {\n /**\n * request successful list\n * @param requestCode\n * @param perms\n */\n void onPermissionsGranted(int requestCode, List<String> perms);\n\n /**\n * request denied list\n * @param requestCode\n * @param perms\n */\n void onPermissionsDenied(int requestCode, List<String> perms);\n}", "void permissionGranted(int requestCode);", "void requestNeededPermissions(int requestCode);", "@Override\n public void onPermissionGranted() {\n }", "@Override\n public void onPermissionGranted(PermissionGrantedResponse permissionGrantedResponse) {\n\n }", "@Override\n public void onRequestPermissionsResult(\n int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n Log.d(TAG, \"Permission result received\");\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n permissionsManager.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n }", "@PermissionSuccess(requestCode = 100)\n public void onPermissionSuccess(){\n }", "@Override\n public void onPermissionGranted() {\n }", "public void onPermissionGranted() {\n\n }", "public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n // Checking run time permission status\n if(requestCode == AllKeys.REQUEST_PERMISSION){\n\n // When all required permission is granted\n if (hasPermissions(this, permissions)){\n // Permission is granted so we can retrieve call list\n getCallList();\n }else{\n Toast.makeText(getApplicationContext(),this.getResources().getString(R.string.permission_denied),Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n if (requestCode == PERMISSION_REQUEST) {\n // Do some action after result return of a permission request\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n String permissions[], int[] grantResults) {\n for (int i = 0; i < grantResults.length; i++) {\n Log.d(\"onReqPermissionsResult\", \"grantResults[\" + i + \"]= \" + grantResults[i] + \" , Granted = \" + PackageManager.PERMISSION_GRANTED);\n }\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String[] permissions,\n int[] grantResults) {\n mConfiguration.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n AndPermission.onRequestPermissionsResult(requestCode, permissions, grantResults, listener);\n }", "void askForPermissions();", "@Override\r\n public void onRequestPermissionResult(int requestCode, String[] permissions,\r\n int[] grantResults) throws JSONException\r\n {\r\n if (mPermissionCallbackContext == null) {\r\n Log.e(TAG, \"No context - got a permission result we didnt ask for...??? \");\r\n return;\r\n }\r\n\r\n for(int r:grantResults)\r\n {\r\n if(r == PackageManager.PERMISSION_DENIED)\r\n {\r\n Log.d(TAG, \"User refused us access to the camera - there is nothing we can do\");\r\n return;\r\n }\r\n }\r\n\r\n int whatNext = requestCode;\r\n CallbackContext ctx = mPermissionCallbackContext;\r\n mPermissionCallbackContext = null; // if there's a race-condition, let's make life hard for it...\r\n switch (whatNext) {\r\n case CALL_START_WHEN_DONE:\r\n retryStartScanning(ctx);\r\n break;\r\n default:\r\n Log.e(TAG, \"Unexpected requestCode - got a permission result we didnt ask for...???\");\r\n ctx.error(\"Application error requesting permissions - see the log for details\");\r\n PluginResult r = new PluginResult(PluginResult.Status.ERROR);\r\n ctx.sendPluginResult(r);\r\n break;\r\n }\r\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {\n switch (requestCode) {\n case 1: {\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n\n } else {\n }\n return;\n }\n }\n }", "public interface IPermissionCallback {\n /**\n * Gets called if the permission/permissions you requested are granted successfully by the user.\n * @param requestCode - same integer is returned that you have passed when you called requestPermission();\n */\n void permissionGranted(int requestCode);\n\n /**\n * Gets called if the permission/permissions you requested are denied by the user.\n * If user denies a permission once, next time that permission comes with a check box(never ask again).\n * If user check that box and denies again, no permission dialog is shown to the user next time and permission will be denied automatically.\n * @param requestCode - same integer is returned that you have passed when you called requestPermission();\n * @param willShowCheckBoxNextTime - For a request of multiple permissions at the same time, you will always receive false.\n */\n void permissionDenied(int requestCode, boolean willShowCheckBoxNextTime);\n}", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if(grantResults.length>0 && grantResults[0]== PackageManager.PERMISSION_GRANTED){\n Log.v(\"Permission: \",permissions[0]+ \"was \"+grantResults[0]);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults)\n {\n switch (requestCode)\n {\n case 0:\n {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED)\n {\n }\n else\n {\n }\n return;\n }\n }\n }", "public static void onRequestPermissionsResult(Activity activity, int requestCode, int[] grantResults) {\n PermissionsRequestCallback callback = sCallbacks.get(requestCode);\n Log.i(TAG, \"onRequestPermissionsResult callback = \" + callback + \",requestCode = \" + requestCode);\n\n if (callback == null) {\n Log.e(TAG, \"onRequestPermissionsResult callback is null.\");\n return;\n } else {\n sCallbacks.remove(requestCode);\n }\n\n if (BuildUtil.getTargetSdkVersion(activity) < 23\n && !PermissionUtil.hasPermissions(activity, callback.onGetPermissions())) {\n callback.onPermissionDenied();\n return;\n }\n\n if (PermissionUtil.verifyPermissions(grantResults)) {\n callback.onPermissionAllowed();\n } else {\n callback.onPermissionDenied();\n }\n }", "@Override\r\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\r\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\r\n EasyPermissions.onRequestPermissionsResult( requestCode, permissions, grantResults, this);\r\n }", "@Override\n public void onRequestPermissionsResult(\n int requestCode,\n @NonNull String permissions[],\n @NonNull int[] grantResults) {\n\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(this, \"Permission Granted!\", Toast.LENGTH_SHORT).show();\n permissionResponseHandler.permissionGranted(requestCode);\n } else {\n Toast.makeText(this, \"Permission Denied!\", Toast.LENGTH_SHORT).show();\n permissionResponseHandler.permissionDenied(requestCode);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n switch (requestCode) {\n case RequestPermissionCode:\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n //Permission was granted\n Log.d(TAG, \"onRequestPermissionsResult: Permission Granted\");\n Toast.makeText(MainActivity.this, \"Permission Granted\", Toast.LENGTH_SHORT).show();\n } else {\n //Permission Denied\n Log.d(TAG, \"onRequestPermissionsResult: Permission Denied\");\n Toast.makeText(MainActivity.this, \"Permission Denied\", Toast.LENGTH_SHORT).show();\n }\n return;\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n\n Log.d(TAG, \"requestCode:\" + requestCode);\n int inx = 0;\n for(String i : permissions) {\n Log.d(TAG, \"permission: \" + i + \", \" + grantResults[inx]);\n if(i.equals(Manifest.permission.ACCESS_COARSE_LOCATION)){\n if(grantResults[inx] == 0){\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n }\n else{\n finish();\n }\n }\n }\n /*\n if (requestCode == PERMISSION_REQUEST_COARSE_LOCATION) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n }\n */\n }", "@CallSuper\n @Override\n public void onRequestPermissionsResult(\n int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {\n boolean flag = true;\n switch (requestCode) {\n case RESULT_PERMISSION: {\n if (grantResults.length == 0)\n flag = false;\n else {\n for (int grantResult : grantResults) {\n if (grantResult == PackageManager.PERMISSION_DENIED) {\n flag = false;\n break;\n }\n }\n }\n close(flag);\n }\n }\n }", "private void fetchPermissionsFromUser() {\n Log.d(TAG, \"in fetch permisssion s\");\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION\");\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.READ_CONTACTS)) {\n\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION show request\");\n\n } else {\n\n // No explanation needed, we can request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION with return request\");\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION\");\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION erequest\");\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION with return requet\");\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n\n\n }", "public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n RequestPermissionsResultCallback callback = this.j.remove(Integer.valueOf(requestCode));\n if (callback != null) {\n callback.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n String permissions[], int[] grantResults) {\n Log.v(TAG, \"onPermissionsResult counts: \" + permissions.length + \" : \" + grantResults.length);\n mSettingsManager.set(\n SettingsManager.SCOPE_GLOBAL,\n Keys.KEY_HAS_SEEN_PERMISSIONS_DIALOGS,\n true);\n\n if (mShouldRequestCameraPermission) {\n if (grantResults.length > 0 && grantResults[mIndexPermissionRequestCamera] ==\n PackageManager.PERMISSION_GRANTED) {\n mFlagHasCameraPermission = true;\n } else {\n handlePermissionsFailure();\n }\n }\n if (mShouldRequestMicrophonePermission) {\n if (grantResults.length > 0 && grantResults[mIndexPermissionRequestMicrophone] ==\n PackageManager.PERMISSION_GRANTED) {\n mFlagHasMicrophonePermission = true;\n } else {\n handlePermissionsFailure();\n }\n }\n if (mShouldRequestStoragePermission) {\n if (grantResults.length > 0 && grantResults[mIndexPermissionRequestStorage] ==\n PackageManager.PERMISSION_GRANTED) {\n mFlagHasStoragePermission = true;\n } else {\n handlePermissionsFailure();\n }\n }\n\n if (mShouldRequestLocationPermission) {\n if (grantResults.length > 0 && grantResults[mIndexPermissionRequestLocation] ==\n PackageManager.PERMISSION_GRANTED) {\n // Do nothing\n } else {\n // Do nothing\n }\n }\n\n if (mFlagHasCameraPermission && mFlagHasMicrophonePermission && mFlagHasStoragePermission) {\n handlePermissionsSuccess();\n }\n }", "@Override\n public void onRequestRefuse(String permissionName) {\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String[] permissions,\n int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n // Forward results to EasyPermissions\n EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);\n }", "private void getPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n MY_PERMISSIONS_REQUEST_READ_CONTACTS);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n }", "private void proceedAfterPermission() {\n Toast.makeText(getBaseContext(), \"We got the contacts Permission\", Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n int length = grantResults.length;\n if(length > 0)\n {\n int grantResult = grantResults[0];\n\n if(grantResult == PackageManager.PERMISSION_GRANTED) {\n\n Toast.makeText(getApplicationContext(), \"You allowed permission.\", Toast.LENGTH_LONG).show();\n }else\n {\n Toast.makeText(getApplicationContext(), \"You denied permission.\", Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\n public void onRequestAllow(String permissionName) {\n }", "void onRequestPermissionsResult(int reqCode, String[] permissions, int[] grants) {\n if (reqCode == REQ_PERMISSIONS) {\n Log.d(TAG, \"onRequestPermissionsResult\");\n for (int i = 0; i < permissions.length; i++) {\n if (grants[i] != PackageManager.PERMISSION_GRANTED) {\n String text = activity.getString(R.string.toast_scanning_requires_permission, permissions[i]);\n Toast.makeText(activity, text, Toast.LENGTH_SHORT).show();\n return;\n }\n }\n startScan1();\n }\n }", "@Override\n public void onRequestPermissionsResult (int requestCode, String[] permissions,\n int[] grantResults) {\n int index = 0;\n Map<String, Integer> PermissionsMap = new HashMap<String, Integer>();\n for (String permission : permissions){\n PermissionsMap.put(permission, grantResults[index]);\n index++;\n }\n\n if((PermissionsMap.get(Manifest.permission.ACCESS_FINE_LOCATION) != 0)\n || PermissionsMap.get(Manifest.permission.ACCESS_COARSE_LOCATION) != 0){\n Toast.makeText((AppCompatActivity)getActivity(), \"Location permission is a must\", Toast.LENGTH_SHORT).show();\n// finish();\n }\n else\n {\n// this.ble.initializeBle((AppCompatActivity)getActivity());\n }\n }", "@Override\n\t\tfinal public FREObject call(FREContext context, FREObject[] args) {\n\t\t\ttry {\n\t\t\t\tif (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1) {\n\t\t\t\t\tActivity act = context.getActivity();\n\t\t\t\t\tact.overridePendingTransition(0,0);\n\t\t\t\t\t\n\t\t\t\t\tfinal FREArray array = (FREArray) args[0];\n\t\t\t\t\tfinal int lng = (int) array.getLength();\n\t\t\t\t final String[] permissions = new String[(int) array.getLength()];\n\t\t\t\t \n\t\t\t\t for (int i = 0; i < lng; i += 1) {\n\t\t\t\t \tString permission = array.getObjectAt(i).getAsString();\n\t\t\t\t \tif(permission != null) permissions[i] = permission;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t if(PermissionsExtension.VERBOSE > 0) Log.d(PermissionsExtension.TAG, \"Checking permissions: \"+ permissions);\n\t\t\t\t \n\t\t\t\t\tfinal Intent intent = new Intent(act, PermissionsRequestActivity.class);\n\t\t\t\t\tintent.putExtra(\"permissions\", permissions);\n\t\t\t\t\tact.startActivity(intent);\n\t\t\t\t\t\n\t\t\t\t\tact.overridePendingTransition(0,0);\n\t\t\t\t\t\n\t\t\t\t\treturn FREObject.newObject(true); //true means that we should wait for callback on AS3 side\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn FREObject.newObject(false); //false means that we can continue without waiting for callback\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n /** Se validan los permisos devueltos de la socilicitud y en caso de ser haber sido aceptados por el usuario\n * el metodo validateRequestPermissionCode envia a la actividad solicitada, de acuerdo con el identificador\n * tambie se alamcena el valor devuelto ya que se utilizara para determinar si hay permisos de almacenamiento,\n * los permisos de Camara y Galeria no hacen uso de esta variable unicamente*/\n permissionStorgare= metodosImagenes.validateRequestPermissionCode(requestCode,permissions,grantResults,CreacionPerfiles.this);\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }", "@Override\r\n public void onPermissionsGranted(int requestCode, List<String> list) {\r\n // Do nothing.\r\n }", "private void requestPermissions() {\n mWaiting4Permission = Boolean.TRUE;\n\n ActivityCompat.requestPermissions(this, permissionsToAsk(), PERMISSIONS_REQUEST_CODE);\n }", "protected void handlePermissionResult() {\n for (String permission : Constants.PERMISSIONS_NEEDED) {\n if (mUtils.hasPermission(permission)) {\n // User granted this permission, check for next one\n continue;\n }\n // User not granted permission\n if (SpyState.Listeners.permissionsListener != null) // Let app handle this\n {\n SpyState.Listeners.permissionsListener.onPermissionDenied(!mActivity.shouldShowRequestPermissionRationale(permission));\n return;\n }\n\n AlertDialog.Builder permissionRequestDialog = new AlertDialog.Builder(mActivity)\n .setTitle(R.string.dialog_permission_title)\n .setMessage(R.string.dialog_permission_message)\n .setCancelable(false)\n .setNegativeButton(R.string.exit,\n (dialog, whichButton) -> {\n mUtils.showToast(R.string.closing_app);\n mActivity.finish();\n });\n if (!mActivity.shouldShowRequestPermissionRationale(permission)) {\n // User clicked on \"Don't ask again\", show dialog to navigate him to\n // settings\n permissionRequestDialog\n .setPositiveButton(R.string.go_to_settings,\n (dialog, whichButton) -> {\n Intent intent =\n new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri =\n Uri.fromParts(\"package\", mActivity.getPackageName(), null);\n intent.setData(uri);\n mActivity.startActivityForResult(intent,\n OPEN_SETTINGS_REQUEST_CODE);\n })\n .show();\n } else {\n // User clicked on 'deny', prompt again for permissions\n permissionRequestDialog\n .setPositiveButton(R.string.try_again,\n (dialog, whichButton) -> grantPermissions())\n .show();\n }\n return;\n }\n Log.i(TAG, \"All required permissions have been granted!\");\n }", "@TargetApi(23)\r\n public void requestPermission() {\r\n ArrayList<String> arrayList;\r\n String[] strArr = this.mPermissions;\r\n for (String str : strArr) {\r\n if (this.mActivity.checkCallingOrSelfPermission(str) != 0) {\r\n if (shouldShowRequestPermissionRationale(str) || !PermissionUtils.isNeverShowEnabled(PermissionUtils.getRequestCode(str))) {\r\n if (this.normalPermissions == null) {\r\n this.normalPermissions = new ArrayList<>(this.mPermissions.length);\r\n }\r\n arrayList = this.normalPermissions;\r\n } else {\r\n if (this.settingsPermissions == null) {\r\n this.settingsPermissions = new ArrayList<>(this.mPermissions.length);\r\n }\r\n arrayList = this.settingsPermissions;\r\n }\r\n arrayList.add(str);\r\n }\r\n }\r\n Log.d(TAG, \"requestPermission() settingsPermissions:\" + this.settingsPermissions);\r\n Log.d(TAG, \"requestPermission() normalPermissions:\" + this.normalPermissions);\r\n ArrayList<String> arrayList2 = this.normalPermissions;\r\n if (arrayList2 == null || arrayList2.size() <= 0) {\r\n ArrayList<String> arrayList3 = this.settingsPermissions;\r\n if (arrayList3 == null || arrayList3.size() <= 0) {\r\n IGrantedTask iGrantedTask = this.mTask;\r\n if (iGrantedTask != null) {\r\n iGrantedTask.doTask();\r\n }\r\n } else {\r\n Activity activity = this.mActivity;\r\n PermissionUtils.showPermissionSettingsDialog(activity, activity.getResources().getString(R.string.app_name), this.settingsPermissions, true);\r\n this.settingsPermissions = null;\r\n }\r\n finishFragment();\r\n return;\r\n }\r\n requestPermissions((String[]) this.normalPermissions.toArray(new String[this.normalPermissions.size()]), 5003);\r\n this.normalPermissions = null;\r\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n presenter.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {\n //Passing request code to request for the permissions\n switch (requestCode) {\n case WRITE_REQUEST_CODE:\n if(grantResults[0] == PackageManager.PERMISSION_GRANTED){\n Toast.makeText(getApplicationContext(), \"Permission Granted \", //Toast Message\n Toast.LENGTH_SHORT).show();\n }\n else{\n Toast.makeText(getApplicationContext(), \"Permission Denied \", //Toast Message\n Toast.LENGTH_SHORT).show();\n\n }\n break;\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n Log.i(TAG, \"onRequestPermissionResult\");\n if (requestCode == REQUEST_PERMISSIONS_REQUEST_CODE) {\n if (grantResults.length <= 0) {\n // If user interaction was interrupted, the permission request is cancelled and you\n // receive empty arrays.\n Log.i(TAG, \"User interaction was cancelled.\");\n } else if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // Permission granted.\n // getAddress();\n } }\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (requestCode == PERMISSION_REQUEST_CODE) {\n if (grantResults.length > 0) {\n\n // after requesting permissions we are showing\n // users a toast message of permission granted.\n boolean writeStorage = grantResults[0] == PackageManager.PERMISSION_GRANTED;\n boolean readStorage = grantResults[1] == PackageManager.PERMISSION_GRANTED;\n\n if (writeStorage && readStorage) {\n Toast.makeText(this, \"Permission Granted..\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Permission Denied.\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> list) {\n // Do nothing.\n }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> list) {\n // Do nothing.\n }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> list) {\n // Do nothing.\n }", "@Override\r\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if (requestCode == tag) {\r\n\r\n //If permission is granted\r\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\r\n\r\n //Displaying a toast\r\n Toast.makeText(this, \"Permission granted \", Toast.LENGTH_LONG).show();\r\n } else {\r\n //Displaying another toast if permission is not granted\r\n Toast.makeText(this, \"Oops you just denied the permission\", Toast.LENGTH_LONG).show();\r\n }\r\n }\r\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) {\n switch (requestCode) {\n case REQUEST_PERMISSION_WRITE:\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n permissionGranted = true;\n Toast.makeText(this, \"External storage permission granted.\",\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"You must grant permission!\", Toast.LENGTH_SHORT).show();\n }\n break;\n }\n }", "@Override\n public void onRequestPermissionsResult(\n int requestCode, String[] permissions, int[] grantResults) {\n switch (requestCode) {\n case PERMISSION_REQ:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n fineLocationPermissionGranted();\n }\n }\n }", "protected void setPermissions(){\n //Set permissions\n //READ_PHONE_STATE\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO)\n != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED\n ) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.RECORD_AUDIO)) {\n //Show an explanation to the user *asynchronously* -- don't block\n //this thread waiting for the user's response! After the user\n //sees the explanation, request the permission again.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.RECORD_AUDIO,Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.CAMERA,Manifest.permission.READ_PHONE_STATE},\n GET_PERMISSION);\n } else {\n //No explanation needed, we can request the permission.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.RECORD_AUDIO,Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.CAMERA,Manifest.permission.READ_PHONE_STATE},\n GET_PERMISSION);\n\n //MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n //app-defined int constant. The callback method gets the\n //result of the request.\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_PERMISSION_SETTING) {\n checkPermission();\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n Log.d(TAG, \"onRequestPermissionsResult()\");\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (requestCode == REQ_PERMISSION) {\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // Permission granted\n getLastKnownLocation();\n\n } else {\n // Permission denied\n permissionsDenied();\n }\n }\n }", "public void requestPermissions(String[] permissions, int requestCode, RequestPermissionsResultCallback callback) {\n this.j.put(Integer.valueOf(requestCode), callback);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n try {\n switch (requestCode) {\n case REQUEST_CODE_ASK_PERMISSIONS_RECORD_AUDIO:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // Permission Granted\n checkRuntimePermisson(false);\n } else {\n // Permission Denied\n utils.showAlert(ctx, (InterfaceAlertDissmiss) MicManualFragment.this, ctx.getResources().getString(R.string.txtPermissionMessageMic), ctx.getResources().getString(R.string.txtPermissionRequired),\n ctx.getResources().getString(R.string.txtRetry), ctx.getResources().getString(R.string.Cancel), 121);\n }\n break;\n\n case REQUEST_CODE_ASK_PERMISSIONS_STORAGE:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // Permission Granted\n checkRuntimePermisson(false);\n } else {\n // Permission Denied\n utils.showAlert(ctx, (InterfaceAlertDissmiss) MicManualFragment.this, ctx.getResources().getString(R.string.txtPermissionMessageMic), ctx.getResources().getString(R.string.txtPermissionRequired),\n ctx.getResources().getString(R.string.txtRetry), ctx.getResources().getString(R.string.Cancel), 1234);\n }\n break;\n\n default:\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }\n } catch (Exception e) {\n logException(e, \"MicManualFragment_onRequestPermissionsResult()\");\n }\n\n }", "@Override\n @TargetApi(23)\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n mCameraPermissionManager.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n EasyPermissions.onRequestPermissionsResult(\n requestCode, permissions, grantResults, this);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n EasyPermissions.onRequestPermissionsResult(\n requestCode, permissions, grantResults, this);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n EasyPermissions.onRequestPermissionsResult(\n requestCode, permissions, grantResults, this);\n }", "public void onRequestPermissionsResult(@NonNull Activity activity, int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n List<String> declinedPermissions = handler.parseRequestResult(requestCode, permissions, grantResults);\n\n if (declinedPermissions.isEmpty()) {\n Log.v(TAG, \"All permissions were granted!\");\n requestAuth(activity, authenticationRequestCode);\n } else if (callback != null) {\n Log.e(TAG, \"Permission Request failed. Some permissions were not granted!\");\n String message = String.format(activity.getString(R.string.com_auth0_webauth_permission_missing_description), declinedPermissions);\n Dialog permissionDialog = new AlertDialog.Builder(activity)\n .setTitle(R.string.com_auth0_webauth_permission_missing_title)\n .setMessage(message)\n .setPositiveButton(android.R.string.ok, null)\n .create();\n callback.onFailure(permissionDialog);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n Log.i(TAG, \"onRequestPermissionResult\");\n if (requestCode == REQUEST_PERMISSIONS_REQUEST_CODE) {\n if (grantResults.length <= 0) {\n // If user interaction was interrupted, the permission request is cancelled and you\n // receive empty arrays.\n Log.i(TAG, \"User interaction was cancelled.\");\n } else if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // Permission granted.\n getLastLocation();\n } else {\n // Permission denied.\n\n // Notify the user via a SnackBar that they have rejected a core permission for the\n // app, which makes the Activity useless. In a real app, core permissions would\n // typically be best requested during a welcome-screen flow.\n\n // Additionally, it is important to remember that a permission might have been\n // rejected without asking the user for permission (device policy or \"Never ask\n // again\" prompts). Therefore, a user interface affordance is typically implemented\n // when permissions are denied. Otherwise, your app could appear unresponsive to\n // touches or interactions which have required permissions.\n showSnackbar(R.string.permission_denied_explanation, R.string.settings,\n new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Build intent that displays the App settings screen.\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n });\n }\n }\n }", "public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)\n {\n permissionUtils.onRequestPermissionsResult(requestCode,permissions,grantResults);\n }", "private void requestPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted\n // Should we show an explanation?\n if (!ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.CAMERA)) {\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n } else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.CAMERA},\n 1);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n String permissions[], int[] grantResults) {\n if (grantResults.length > 0\n && !(grantResults[0] == PackageManager.PERMISSION_GRANTED)) {\n Toast.makeText(this, \"Without granting all permissions the app may not work properly. Please consider granting this permission in settings\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)\n {\n super .onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (requestCode == 101) {\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(this, \"Storage Permission Granted\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(this, \"Storage Permission Denied\", Toast.LENGTH_SHORT).show();\n }\n }\n else if (requestCode == 100) {\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(this, \"Storage Permission Granted\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(this, \"Storage Permission Denied\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "@TargetApi(23)\n @Override\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n // Check for granted permission and remove from missing list\n if (requestCode == REQUEST_PERMISSION_CODE) {\n for (int i = grantResults.length - 1; i >= 0; i--) {\n if (grantResults[i] == PackageManager.PERMISSION_GRANTED) {\n missingPermission.remove(permissions[i]);\n }\n }\n }\n // If there is enough permission, we will start the registration\n if (missingPermission.isEmpty()) {\n DroneModel.getInstance(this).setDjiProductStateCallBack(this);\n DroneModel.getInstance(this).startSDKRegistration();\n } else {\n Toast.makeText(getApplicationContext(), \"Missing permissions!!!\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onRequestPermissionsResult(final int iRequestCode, @NotNull final String xstrPermissions[], @NotNull final int[] xiGrantResults) {\n boolean bAllPermissionsGranted = true;\n if (iRequestCode == PERMISSION_GALLERY) {\n for (int iPermission : xiGrantResults) {\n if (iPermission != PackageManager.PERMISSION_GRANTED) {\n bAllPermissionsGranted = false;\n break;\n }\n }\n } else {\n for (int iPermission : xiGrantResults) {\n if (iPermission != PackageManager.PERMISSION_GRANTED) {\n bAllPermissionsGranted = false;\n break;\n }\n }\n }\n\n // If we have all the needed permissions, trigger directly the capture button handler\n if (bAllPermissionsGranted) {\n if (iRequestCode == PERMISSION_GALLERY) {\n onLaunchGallerySelection();\n } else {\n gotToListing();\n }\n }\n // Otherwise, display an alert dialog indicating that the sample needs those permissions\n else {\n final AlertDialog.Builder objAlertBuilder = new AlertDialog.Builder(HomeActivity.this, R.style.PopupTheme);\n objAlertBuilder.setTitle(R.string.about_permission)\n .setMessage(R.string.dokmee_permission)\n .setPositiveButton(R.string.ok, null)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }\n }", "@CallSuper\n @Override\n public void onRequestPermissionsResult(\n int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n if (requestCode != REQUEST_CODE_REQUIRED_PERMISSIONS) {\n return;\n }\n\n for (int grantResult : grantResults) {\n if (grantResult == PackageManager.PERMISSION_DENIED) {\n Toast.makeText(this, \"No Permission\", Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n }\n recreate();\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n if (requestCode == REQUEST_PERMISSION) {\n HashMap<String, Integer> permissionResult = new HashMap<>();\n int deniedCount = 0;\n //count denied permission\n for (int i = 0; i < grantResults.length; i++) {\n if (grantResults[i] == PackageManager.PERMISSION_DENIED) {\n permissionResult.put(permission[i], grantResults[i]);\n deniedCount++;\n }\n }\n if (deniedCount == 0)\n deviceSettings = true;\n else {\n for (Map.Entry<String, Integer> entry : permissionResult.entrySet()) {\n String permName = entry.getKey();\n int permResult = entry.getValue();\n // alert the user that the application needs the permissions\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, permName)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Camera, Read Contacts and Write External\" +\n \" Storage permissions are required to do the task.\");\n builder.setTitle(\"Please grant those permissions\");\n //create alert dialog\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n deviceSettings = checkDeviceSettings();\n }\n });\n builder.setNeutralButton(\"Cancel\", null);\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n }\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n switch (requestCode) {\n case PERMISSION_REQUEST:\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if ((ContextCompat.checkSelfPermission(MainActivity.this,\n Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED)) {\n openSongsList();\n permissionGranted = true;\n }\n } else {\n closeNow();\n }\n break;\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {\n\n Log.d(TAG, \"onRequestPermissionsResult: \"+requestCode);\n\n switch (requestCode) {\n case PERMISSION_REQUEST_COARSE_LOCATION:\n Log.d(TAG, \"grantResults.length: \"+grantResults.length);\n if(grantResults.length>0){\n Log.d(TAG, \"grantResults[0]: \"+grantResults[0]);\n }\n\n if (grantResults.length>0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // TODO request success\n\n startScan();\n }else {\n Toast.makeText(context, \"Bluetooth need some permisssions ,please grante permissions and try again !\", Toast.LENGTH_SHORT).show();\n }\n break;\n\n }\n }", "public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {\n if (requestCode == PETICION_DE_PERMISOS) {\n if (grantResults.length > 0) {\n boolean todosLosPemisosOk = true;\n for (int i = 0; i < permissions.length; i++) {\n if (!(grantResults[i] == PackageManager.PERMISSION_GRANTED)) {\n todosLosPemisosOk = false;\n }\n }\n if (todosLosPemisosOk) {\n //-- RECORDAR HACER AQUI LO QUE SE DESEE CUANDO HAY PERMISOS ---------------\n //-- LO NORMAL ES LLAMAR A UN METODO QUE COMPLETE EL ONCREATE ---------------\n //onCreate_conAccionesSoloConPermiso();\n\n } else {\n //-- RECORDAR HACER AQUI LO QUE SE DESEE SI NO HAY PERMISOS ---------------\n //finish(); // algun permiso no se otorgó, terminamos la actividad, no se deja seguir\n }\n } else {\n //-- RECORDAR HACER AQUI LO QUE SE DESEE SI NO HAY PERMISOS ---------------\n //finish(); // se canceló al solicitar permisos, terminamos la actividad, no se deja seguir\n }\n }\n }", "public interface PermissionFailDefaultCallBack {\r\n void onRequestRefuse(int requestCode, String refuseTip);\r\n void onRequestForbid(int requestCode, String forbidTip);\r\n}", "@CallSuper\n @Override\n public void onRequestPermissionsResult(\n int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if (requestCode == REQUEST_CODE_REQUIRED_PERMISSIONS) {\n for (int grantResult : grantResults) {\n if (grantResult == PackageManager.PERMISSION_DENIED) {\n Toast.makeText(this, \"error: missing permissions\", Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n }\n recreate();\n }\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {\n switch (requestCode) {\n case FILEPICKER_PERMISSIONS: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(\n ct5.this,\n \"Permission granted! Please click on pick a file once again.\",\n Toast.LENGTH_SHORT\n ).show();\n } else {\n Toast.makeText(\n ct5.this,\n \"Permission denied to read your External storage :(\",\n Toast.LENGTH_SHORT\n ).show();\n }\n\n return;\n }\n }\n }", "@Override\r\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n switch (requestCode) {\r\n case REQUEST_AUDIO_PERMISSION_CODE:\r\n if (grantResults.length > 0) {\r\n boolean permissionToRecord = grantResults[0] == PackageManager.PERMISSION_GRANTED;\r\n boolean permissionToStore = grantResults[1] == PackageManager.PERMISSION_GRANTED;\r\n if (permissionToRecord && permissionToStore) {\r\n Toast.makeText(getApplicationContext(), \"Permission Granted\", Toast.LENGTH_LONG).show();\r\n } else {\r\n Toast.makeText(getApplicationContext(), \"Permission Denied\", Toast.LENGTH_LONG).show();\r\n }\r\n }\r\n break;\r\n }\r\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if (requestCode == REQUEST_DANGEROUS_PERMISSION) {\n boolean isGranted = true;\n for (int grantResult : grantResults) {\n isGranted = isGranted && grantResult == PackageManager.PERMISSION_GRANTED;\n }\n if (isGranted) {\n locationPermission = true;\n readPhoneStatePermission = true;\n Intent result = new Intent();\n setResult(RESULT_OK, result);\n finish();\n // doBindBleMessagingService();\n // permission was granted, yay! Do the\n // contacts-related task you need to do.\n\n } else {\n requestDangerousPermission();\n // permission denied, boo! Disable the\n // functionality that depends on this permission.\n }\n\n // other 'case' lines to check for other\n // permissions this app might request\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n //Depending on whether the request is audio or picture, attempt to grant request\n switch (requestCode) {\n case REQUEST_RECORD_AUDIO_PERMISSION:\n permissionToRecordAccepted = grantResults[0] == PackageManager.PERMISSION_GRANTED;\n break;\n case CAMERA_REQUEST:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(this, \"camera permission granted\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(this, \"camera permission denied\", Toast.LENGTH_LONG).show();\n }\n break;\n }\n\n //If permission to record is denied, close request.\n if (!permissionToRecordAccepted) {\n\n finish();\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {\n switch (requestCode) {\n case REQUEST_READ_PHONE_STATE:\n if ((grantResults.length > 0) && (grantResults[0] == PackageManager.PERMISSION_GRANTED)) {\n //TODO\n }\n break;\n\n default:\n break;\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n Log.i(TAG, \"onRequestPermissionResult\");\n if (requestCode == REQUEST_PERMISSIONS_REQUEST_CODE) {\n if (grantResults.length <= 0) {\n // If user interaction was interrupted, the permission request is cancelled and you\n // receive empty arrays.\n Log.i(TAG, \"User interaction was cancelled.\");\n } else if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // Permission was granted.\n mService.requestLocationUpdates();\n } else {\n // Permission denied.\n setButtonsState(false);\n Snackbar.make(\n findViewById(R.id.drawer_layout),\n R.string.permission_denied_explanation,\n Snackbar.LENGTH_INDEFINITE)\n .setAction(R.string.settings, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Build intent that displays the App settings screen.\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n })\n .show();\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n\n //Checking the request code of our request\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (requestCode == STORAGE_PERMISSION_CODE) {\n\n //If permission is granted\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n //Displaying a toast\n Toast.makeText(this, \"Permission granted now you can read the storage\", Toast.LENGTH_LONG).show();\n } else {\n //Displaying another toast if permission is not granted\n Toast.makeText(this, \"Oops you just denied the permission\", Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults){\n switch (requestCode){\n case MY_PERMISSIONS_LOCATIONS: {\n if(grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED){\n mFusedClient.requestLocationUpdates(mLocationRequest,mLocationCallback, Looper.myLooper());\n }\n } else {\n Toast.makeText(this, \"permission denied\", Toast.LENGTH_LONG).show();\n }\n return;\n }\n }\n }", "@Override\n public void onDenied(Context context, ArrayList<String> deniedPermissions) {\n getPermissions();\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n String permissions[],\n int[] grantResults) {\n //In our example we only have one permission, but we could have more\n //we use the requestCode to distinguish them\n switch (requestCode) {\n case LOCATION_PERMISSION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n permissionGranted = true;\n checkAndStartLocationUpdate();\n } else {\n // permission denied, boo! Disable the\n // functionality that depends on this permission.\n AlertDialog.Builder builder = new AlertDialog.Builder(AggStato.this);\n builder.setMessage(\"Questa app necessita dei permessi di locazione\").setTitle(\"Login Error\");\n\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n return;\n }\n\n // other 'case' lines to check for other\n // permissions this app might request\n }\n }", "public void onRequestPermissionResult(int requestCode, String[] permissions, int[] grantResults) throws JSONException\n {\n PluginResult result;\n for (int r : grantResults) {\n if (r == PackageManager.PERMISSION_DENIED) {\n Log.d(LOG_TAG, \"Permission Denied!\");\n result = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION);\n this.callbackContext.sendPluginResult(result);\n return;\n }\n }\n startCamera(requestCode, this.callbackContext, this.reqArgs);\n }", "@Override\n public void onSucceed(int requestCode, List<String> grantedPermissions) {\n if (requestCode == PERMISSION_CODE_WRITE_EXTERNAL_STORAGE) {\n getFile(rootPath);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n\n //Checking the request code of our request\n if (requestCode == STORAGE_PERMISSION_CODE) {\n\n //If permission is granted\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n //Displaying a toast\n Toast.makeText(this, \"Permission granted now you can read the storage\", Toast.LENGTH_LONG).show();\n } else {\n //Displaying another toast if permission is not granted\n Toast.makeText(this, \"Oops you just denied the permission\", Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n\n //Checking the request code of our request\n if(requestCode == STORAGE_PERMISSION_CODE){\n\n //If permission is granted\n if(grantResults.length >0 && grantResults[0] == PackageManager.PERMISSION_GRANTED){\n\n //Displaying a toast\n Toast.makeText(this,\"Permission granted now you can read the storage\",Toast.LENGTH_LONG).show();\n }else{\n //Displaying another toast if permission is not granted\n Toast.makeText(this,\"Oops you just denied the permission\",Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n String permissions[], int[] grantResults) {\n switch (requestCode) {\n case ACCESS_LOCATION_CODE: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n\n // permission was granted, yay! Do the\n // contacts-related task you need to do.\n mLocationPermissionsGranted = true;\n\n } else {\n\n // permission denied, boo! Disable the\n // functionality that depends on this permission.\n mLocationPermissionsGranted = false;\n }\n return;\n }\n\n // other 'case' lines to check for other\n // permissions this app might request.\n }\n }" ]
[ "0.7307336", "0.7307336", "0.7267918", "0.6999627", "0.68490314", "0.6796219", "0.67612785", "0.67542094", "0.6754114", "0.6750372", "0.67407227", "0.67374456", "0.67353004", "0.66154015", "0.65923184", "0.65722334", "0.6563058", "0.6555676", "0.6520609", "0.6518065", "0.6514363", "0.65003914", "0.64532596", "0.64490074", "0.6419994", "0.6415919", "0.6412765", "0.64078665", "0.63960475", "0.6387032", "0.6380264", "0.6375363", "0.63714564", "0.63711375", "0.6356779", "0.6342518", "0.63154894", "0.63010085", "0.6294232", "0.6292487", "0.62790114", "0.6278866", "0.62684965", "0.62669843", "0.6251252", "0.62511075", "0.6249909", "0.62476647", "0.6226963", "0.6215906", "0.62065464", "0.62063426", "0.6199922", "0.61980104", "0.61980104", "0.61980104", "0.61793786", "0.6172059", "0.61707777", "0.6168858", "0.61678255", "0.6166377", "0.614573", "0.61455876", "0.61454237", "0.61280084", "0.61280084", "0.61280084", "0.6127993", "0.6127584", "0.61230725", "0.6122088", "0.60944545", "0.6086093", "0.6084302", "0.6082639", "0.60704845", "0.6068853", "0.6063979", "0.6044093", "0.6041167", "0.6021947", "0.6002743", "0.5999676", "0.5995695", "0.59951586", "0.5986245", "0.5985485", "0.5983614", "0.59822786", "0.59763265", "0.5959928", "0.59585977", "0.59585816", "0.5957552", "0.5955915", "0.59446955", "0.59402823", "0.593743", "0.5931661" ]
0.6362848
34
This interface defines a school DAO.
public interface SchoolDAO extends GenericDAO<School, Integer> { /** * Create a school. * * @param school * the school to save */ void createSchool(School school); /** * Return classes that depends on this school. * * @param id * the school id * @return the classes found * @throws TechnicalException * if the school does not exist */ List<StudentClass> findClassesBySchoolId(int id) throws TechnicalException; /** * Return classes that depends on this school. * * @param schoolName * the school name * @return the classes found * @throws TechnicalException * if the school does not exist */ List<StudentClass> findClassesBySchoolName(String schoolName) throws TechnicalException; /** * Return the school found for this id. * * @param id * the school id * @return the school found * @throws TechnicalException * if the school does not exist */ School findSchoolById(int id) throws TechnicalException; /** * Return the school found for this name. * * @param schoolName * the school name * @return the school found * @throws TechnicalException * if the school does not exist */ School findSchoolByName(String schoolName) throws TechnicalException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface SchoolSubjectDao {\n /**\n * Finds all schoolSubjects in Database\n * @return List of all schoolSubjects\n * @throws DaoException if connection is down, broken or unable to retrieve information for certain reasons\n */\n List<SchoolSubject> findSchoolSubjects() throws DaoException;\n\n /**\n * Finds schoolSubject by schoolSubject id\n * @param id - SchoolSubject`s id\n * @return SchoolSubject\n * @throws DaoException if connection is down, broken or unable to retrieve information for certain reasons\n */\n SchoolSubject findSchoolSubjectById(Integer id) throws DaoException;\n\n /**\n * Adds new schoolSubject to Database\n * @param schoolSubject - SchoolSubject to add in Database\n * @return true if operation success and false if fails\n */\n boolean insertUser(SchoolSubject schoolSubject);\n\n /**\n * Updates schoolSubject in Database\n * @param schoolSubject - SchoolSubject to update in Database\n * @return true if operation success and false if fails\n */\n boolean updateUser(SchoolSubject schoolSubject);\n\n /**\n * Deletes schoolSubject from Database\n * @param schoolSubject - SchoolSubject to delete from Database\n * @return true if operation success and false if fails\n */\n boolean deleteUser(SchoolSubject schoolSubject);\n}", "public interface StudentDAO {\n\n\tpublic List<Student> listStudent();\n\t\n}", "public interface StudentDAO {\n Collection getAllStudents();\n\n Student getStudentById(int id);\n\n void deleteStudentById(int id);\n\n void createStudent(Student student);\n}", "public interface StudentDao {\n /**\n * Method to find a student by its id\n * @param id\n * @return\n */\n Student findById(String id);\n\n /**\n * Creates a new entry in the table Book in the DB\n * @param entity\n * @return\n */\n void create(Student entity);\n\n /**\n * Updates an entry in the table Book in the DB\n * @param entity\n */\n void update(Student entity);\n\n /**\n * Remove an entry in the table Book in the DB\n * @param entity\n */\n void remove(Student entity);\n}", "public SchoolCourseStudentDAOImpl() {\r\n\t\tsuper();\r\n\t}", "public interface CourseDAO {\r\n\r\n \r\n public void create(Integer id, String name, String teacher, Integer studyyear);\r\n\r\n public void setDataSource(DataSource ds);\r\n\r\n\r\n public Course getCourse(Integer id);\r\n\r\n public List<Course> listCourses();\r\n\r\n public void delete(Integer id);\r\n\r\n public void updateTeacher(Integer id, String teacher);\r\n\r\n public void updateCourseName (Integer id, String name);\r\n}", "public interface DVDCategorieDAO {\n /**\n * This is the method to be used to initialize\n * database resources ie. connection.\n */\n public void setDataSource(DataSource ds);\n\n /**\n * This is the method to be used to create\n * a record in the Graduate table.\n */\n public void create(int id, DVD dvd, Categorie categorie);\n\n /**\n * This is the method to be used to list down\n * a record from the Graduate table corresponding\n * to a passed graduate id.\n */\n public DVDCategorie getDVDCategorie(int id);\n\n /**\n * This is the method to be used to list down\n * all the records from the Graduate table.\n */\n public List<DVDCategorie> listDVDCategorie();\n\n /**\n * This is the method to be used to delete\n * a record from the Graduate table corresponding\n * to a passed graduate id.\n */\n public void delete(Integer id);\n\n /**\n * This is the method to be used to update\n * a record into the Graduate table.\n */\n public void update(Integer id, DVD dvd, Categorie categorie);\n}", "public interface StudentDao {\n public Student getStudentById(int id);\n public void addStudent(Student student);\n}", "public interface SchoolService {\n public School findById(Long id);\n public boolean save(School school);\n public List<School> list();\n}", "public interface StudentDao {\n List<Student> findStudents();\n}", "public static DAO getStudentDAO() {\n return new StudentDAO(entityManager, Student.class);\n }", "public interface StudentDao {\n public List<Student> queryAllStudent();\n public void updateStudentInfo(Student stu);\n public Student findStuById(int id);\n public void delStuById(int id);\n public void addStu(Student stu);\n public List<Student> findByPage(int start, int rows);\n public int findTotalCount();\n}", "public interface StaffDAO {\n public boolean save(Staff staff);\n\n public boolean update(Staff staff);\n\n public boolean delete(Staff staff);\n\n public Staff getStaff(Long staffId);\n\n public Staff getStaff(String query);\n\n public List<Staff> findAllStaff();\n\n public List<Staff> findAllStaff(String query);\n}", "public interface SolutionsDao {\n\n\tString writeSolution(Solution sol);\n\tSolution readSoluiton(String _id);\n\t\n}", "public interface StudentDao {\n void insert(Student student);\n}", "public abstract DbDAO AccessToDAO();", "public interface SellerDAOInterface {\n\t\n\tpublic Seller selectById(int id);\n\tpublic List<Seller> selectAll ();\n\tpublic void insert (Seller seller);\n\tpublic void update (Seller seller);\n\tpublic void delete (Seller seller);\n\n}", "public interface CourseDaoInterface\n{\n /**\n * findAllCourses()\n * @return list of all courses in MySQL database\n * @throws DaoException\n */\n public List<Course> findAllCourses() throws DaoException;\n\n /**\n * findCourseByID(String id)\n * @param id course ID\n * @return a course matching the ID\n * @throws DaoException\n */\n public Course findCourseByID(String id) throws DaoException;\n}", "public interface StaffDao {\n public List<Staff> findStaff();\n\n public List<Staff> findAll();\n\n public void add(Staff staff);\n\n public void delete(String no);\n\n public void update(Staff staff);\n}", "public interface DepartmentDAO {\n\n /**\n * This method is used to retrieve a list of all departments.\n *\n * @return List of generic type {@link Department}\n */\n public List<Department> getAllDepartments();\n\n /**\n * This method is used when adding a department.\n *\n * @param department of type {@link Department}\n */\n public void addDepartment(Department department);\n\n /**\n * This method is used to update the department table.\n *\n * @param department of type {@link Department}\n * @param newDeptName of type String *\n */\n public void updateDepartment(Department department, String newDeptName);\n\n /**\n * This method is used to delete departments by department number.\n *\n * @param dept_no of type integer\n */\n public void deleteDepartmentByDeptNo(int dept_no);\n\n /**\n * This method is use to delete departments by name.\n *\n * @param dept_name of type String\n */\n public void deleteDepartmentByDeptName(String dept_name);\n\n /**\n * This method is responsible for returning a department by dept_no.\n *\n * @param dept_no of type integer\n * @return ResultSet\n */\n public ResultSet getDepartmentByID(int dept_no);\n\n /**\n * This method is responsible for returning a department by dept_name\n *\n * @param dept_name of type String\n * @return ResultSet\n */\n public ResultSet getDepartmentByName(String dept_name);\n}", "public interface SchoolService extends CrudRepository<School, Long>\r\n{\r\n // School create(School school);\r\n // School read(String id);\r\n // School update(School school);\r\n // void delete (String id);\r\n}", "public interface TechniqueDAO extends GenericDAO<Technique, Integer> {\n\n /**\n * Finds all techniques by given technique's name.\n * @param technique technique's name\n * @return list of all techniques\n */\n public abstract List<Technique> findTechniqueByName(String technique);\n\n}", "public interface CourseDao {\n\n /**\n * 通过课程ID查询课程\n * @param courseId\n * @return\n */\n Course queryCourseById(String courseId);\n\n /**\n * 插入课程\n * @param course\n * @return\n */\n int insertCourse(@Param(\"course\") Course course);\n\n /**\n * 通过ID删除课程\n * @param courseId\n * @return\n */\n int deleteCourseById(String courseId);\n\n /**\n * 查询全部课程\n * @return\n */\n List<Course> queryAllCourses();\n}", "public interface LabDao {\n\n List<Lab> findAll();\n\n Lab findById(long id);\n\n void insert(LabDto labDto);\n\n void update(LabDto labDto, long id);\n\n void delete(long id);\n\n}", "School findSchoolById(int id) throws TechnicalException;", "public interface SsoAuthDAO {\r\n\t/**\r\n\t * Insert one <tt>SsoAuthDO</tt> object to DB table <tt>sso_auth</tt>, return primary key\r\n\t *\r\n \t * <p>\r\n \t * Description for this operation is<br>\r\n \t * <tt></tt>\r\n\t * <p>\r\n\t * The sql statement for this operation is <br>\r\n\t * <tt>insert into sso_auth(auth_code,auth_name,app_id,is_enable,description,last_modifier,gmt_create,gmt_modified) values (?, ?, ?, ?, ?, ?, ?, ?)</tt>\r\n\t *\r\n\t *\t@param ssoAuth\r\n\t *\t@return Integer\r\n\t *\t@throws DataAccessException\r\n\t */\t \r\n public Integer insert(SsoAuthDO ssoAuth) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Delete records from DB table <tt>sso_auth</tt>.\r\n\t *\r\n \t * <p>\r\n \t * Description for this operation is<br>\r\n \t * <tt></tt>\r\n\t * <p>\r\n\t * The sql statement for this operation is <br>\r\n\t * <tt>delete from sso_auth where (id = ?)</tt>\r\n\t *\r\n\t *\t@param id\r\n\t *\t@return int\r\n\t *\t@throws DataAccessException\r\n\t */\t \r\n public int delete(Integer id) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Update DB table <tt>sso_auth</tt>.\r\n\t *\r\n \t * <p>\r\n \t * Description for this operation is<br>\r\n \t * <tt></tt>\r\n\t * <p>\r\n\t * The sql statement for this operation is <br>\r\n\t * <tt>update sso_auth set auth_code=?, auth_name=?, app_id=?, is_enable=?, description=?, last_modifier=?, gmt_modified=? where (id = ?)</tt>\r\n\t *\r\n\t *\t@param ssoAuth\r\n\t *\t@return int\r\n\t *\t@throws DataAccessException\r\n\t */\t \r\n public int update(SsoAuthDO ssoAuth) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Query DB table <tt>sso_auth</tt> for records.\r\n\t *\r\n \t * <p>\r\n \t * Description for this operation is<br>\r\n \t * <tt></tt>\r\n\t * <p>\r\n\t * The sql statement for this operation is <br>\r\n\t * <tt>select id, auth_code, auth_name, app_id, is_enable, description, last_modifier, gmt_create, gmt_modified from sso_auth where (id = ?)</tt>\r\n\t *\r\n\t *\t@param id\r\n\t *\t@return SsoAuthDO\r\n\t *\t@throws DataAccessException\r\n\t */\t \r\n public SsoAuthDO query(Integer id) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Query DB table <tt>sso_auth</tt> for records.\r\n\t *\r\n \t * <p>\r\n \t * Description for this operation is<br>\r\n \t * <tt></tt>\r\n\t * <p>\r\n\t * The sql statement for this operation is <br>\r\n\t * <tt>select id, auth_code, auth_name, app_id, is_enable, description, last_modifier, gmt_create, gmt_modified from sso_auth where (app_id = ?)</tt>\r\n\t *\r\n\t *\t@param appId\r\n\t *\t@return List<SsoAuthDO>\r\n\t *\t@throws DataAccessException\r\n\t */\t \r\n public List<SsoAuthDO> queryByAppId(Integer appId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Query DB table <tt>sso_auth</tt> for records.\r\n\t *\r\n \t * <p>\r\n \t * Description for this operation is<br>\r\n \t * <tt></tt>\r\n\t * <p>\r\n\t * The sql statement for this operation is <br>\r\n\t * <tt>select id, auth_code, auth_name, app_id, is_enable, description, last_modifier, gmt_create, gmt_modified from sso_auth where (auth_code = ?)</tt>\r\n\t *\r\n\t *\t@param authCode\r\n\t *\t@return SsoAuthDO\r\n\t *\t@throws DataAccessException\r\n\t */\t \r\n public SsoAuthDO queryByAuthCode(String authCode) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Query DB table <tt>sso_auth</tt> for records.\r\n\t *\r\n \t * <p>\r\n \t * Description for this operation is<br>\r\n \t * <tt></tt>\r\n\t * <p>\r\n\t * The sql statement for this operation is <br>\r\n\t * <tt>select id, auth_code, auth_name, app_id, is_enable, description, last_modifier, gmt_create, gmt_modified from sso_auth where (auth_name = ?)</tt>\r\n\t *\r\n\t *\t@param authName\r\n\t *\t@return SsoAuthDO\r\n\t *\t@throws DataAccessException\r\n\t */\t \r\n public SsoAuthDO queryByAuthName(String authName) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Query DB table <tt>sso_auth</tt> for records.\r\n\t *\r\n \t * <p>\r\n \t * Description for this operation is<br>\r\n \t * <tt></tt>\r\n\t * <p>\r\n\t * The sql statement for this operation is <br>\r\n\t * <tt>select b.id id, b.auth_code auth_code, b.auth_name auth_name, b.app_id app_id, b.is_enable is_enable, c.description description, b.last_modifier last_modifier, b.gmt_create gmt_create, b.gmt_modified gmt_modified from sso_role a, sso_auth b, sso_role_auth c where ((a.id = c.role_id) AND (b.id = c.auth_id))</tt>\r\n\t *\r\n\t *\t@param roleName\r\n\t *\t@return List<SsoAuthDO>\r\n\t *\t@throws DataAccessException\r\n\t */\t \r\n public List<SsoAuthDO> queryByRoleName(String roleName) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Query DB table <tt>sso_auth</tt> for records.\r\n\t *\r\n \t * <p>\r\n \t * Description for this operation is<br>\r\n \t * <tt></tt>\r\n\t * <p>\r\n\t * The sql statement for this operation is <br>\r\n\t * <tt>select e.id id, e.app_id app_id, e.auth_code auth_code, e.auth_name auth_name, e.description description, e.is_enable is_enable, e.last_modifier last_modifier, e.gmt_create gmt_create, e.gmt_modified gmt_modified from sso_user a, sso_user_role b, sso_role c, sso_role_auth d, sso_auth e, sso_app f where ((a.id = b.user_id) AND (b.role_id = d.role_id) AND (d.auth_id = e.id) AND (e.app_id = f.id) AND (a.is_enable = 1) AND (e.is_enable = 1))</tt>\r\n\t *\r\n\t *\t@param userId\r\n\t *\t@param appName\r\n\t *\t@return List<SsoAuthDO>\r\n\t *\t@throws DataAccessException\r\n\t */\t \r\n public List<SsoAuthDO> queryByAppIdAndUserName(String userId, String appName) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Delete records from DB table <tt>sso_auth</tt>.\r\n\t *\r\n \t * <p>\r\n \t * Description for this operation is<br>\r\n \t * <tt></tt>\r\n\t * <p>\r\n\t * The sql statement for this operation is <br>\r\n\t * <tt>delete from sso_auth where (description LIKE ?)</tt>\r\n\t *\r\n\t *\t@param description\r\n\t *\t@return int\r\n\t *\t@throws DataAccessException\r\n\t */\t \r\n public int deleteByDesc(String description) throws DataAccessException;\r\n\r\n}", "public interface DcSquadDAO {\n /**\n * Insert one <tt>DcSquadDO</tt> object to DB table <tt>dc_squad</tt>, return primary key\n *\n * <p>\n * The sql statement for this operation is <br>\n * <tt>insert into dc_squad(squad_name,squad_desc,axiser,cubers,followers,investors,status,gmt_create,gmt_modify,attention) values (?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?)</tt>\n *\n *\t@param dcSquad\n *\t@return long\n *\t@throws DataAccessException\n */\n public long insert(DcSquadDO dcSquad) throws DataAccessException;\n\n /**\n * Query DB table <tt>dc_squad</tt> for records.\n *\n * <p>\n * The sql statement for this operation is <br>\n * <tt>select * from dc_squad</tt>\n *\n *\t@return List<DcSquadDO>\n *\t@throws DataAccessException\n */\n public List<DcSquadDO> load() throws DataAccessException;\n\n /**\n * Query DB table <tt>dc_squad</tt> for records.\n *\n * <p>\n * The sql statement for this operation is <br>\n * <tt>select * from dc_squad where (id = ?)</tt>\n *\n *\t@param id\n *\t@return DcSquadDO\n *\t@throws DataAccessException\n */\n public DcSquadDO loadById(long id) throws DataAccessException;\n\n /**\n * Query DB table <tt>dc_squad</tt> for records.\n *\n * <p>\n * The sql statement for this operation is <br>\n * <tt>select * from dc_squad where (squad_name = ?)</tt>\n *\n *\t@param squadName\n *\t@return DcSquadDO\n *\t@throws DataAccessException\n */\n public DcSquadDO loadByName(String squadName) throws DataAccessException;\n\n /**\n * Update DB table <tt>dc_squad</tt>.\n *\n * <p>\n * The sql statement for this operation is <br>\n * <tt>update dc_squad set squad_name=?, squad_desc=?, axiser=?, cubers=?, followers=?, investors=?, status=?, gmt_modify=CURRENT_TIMESTAMP where (id = ?)</tt>\n *\n *\t@param dcSquad\n *\t@return int\n *\t@throws DataAccessException\n */\n public int update(DcSquadDO dcSquad) throws DataAccessException;\n\n /**\n * Delete records from DB table <tt>dc_squad</tt>.\n *\n * <p>\n * The sql statement for this operation is <br>\n * <tt>delete from dc_squad where (id = ?)</tt>\n *\n *\t@param id\n *\t@return int\n *\t@throws DataAccessException\n */\n public int deleteById(long id) throws DataAccessException;\n\n /**\n * Query DB table <tt>dc_squad</tt> for records.\n *\n * <p>\n * The sql statement for this operation is <br>\n * <tt>select * from dc_squad where ((squad_name = ?) AND (axiser = ?) AND (cubers = ?) AND (followers = ?) AND (investors = ?) AND (status = ?) AND (gmt_create = ?) AND (gmt_modify = ?))</tt>\n *\n *\t@param squadName\n *\t@param axiser\n *\t@param cubers\n *\t@param followers\n *\t@param investors\n *\t@param status\n *\t@param gmtCreate\n *\t@param gmtModify\n *\t@param pageSize\n *\t@param pageNum\n *\t@return PageList\n *\t@throws DataAccessException\n */\n public PageList query(String squadName, String axiser, String cubers, String followers,\n String investors, String status, Date gmtCreate, Date gmtModify,\n int pageSize, int pageNum) throws DataAccessException;\n\n /**\n * Update DB table <tt>dc_squad</tt>.\n *\n * <p>\n * The sql statement for this operation is <br>\n * <tt>update dc_squad set attention=? where (id = ?)</tt>\n *\n *\t@param attention\n *\t@param id\n *\t@return int\n *\t@throws DataAccessException\n */\n public int updateAttention(long attention, long id) throws DataAccessException;\n\n}", "public ISegSucursalDAO getSegSucursalDAO() {\r\n return new SegSucursalDAO();\r\n }", "public interface StudentDashboardRankAndIndexDAO {\n public abstract StudentDashboardRankandIndex getStudentRankAndIndex();\n}", "public interface IPersonDAO {\n int insertUser(Person person);\n void deletePerson(int personID);\n void selectAllPerson();\n void selectPersonByName();\n}", "public interface DAOFactory {\n public CategoryDAO getCategoryDAO();\n\n public CityDAO getCityDAO();\n\n public DivisionDAO getDivisionDAO();\n\n public InstitutionDAO getInstitutionDAO();\n\n public SchoolDAO getSchoolDAO();\n\n public StudentDAO getStudentDAO();\n\n public TeacherDAO getTeacherDAO();\n}", "public interface CourseDAO {\n\t\n Course saveCourse(Course course);\n\n Course getCourseById(int id);\n \n CourseDTO getCourseDTOById(int id);\n\n List<Course> getCourseByTeacherId(int id);\n\n void updateCourse(Course course);\n \n CourseDTO updateCourse(int id, CourseDTO course);\n \n void deleteCourse(int id);\n}", "public interface ScheduleDao {\n int crewTally();\n ArrayList<avail> getAllAvailibility();\n ArrayList<ShiftDetails> getShiftDetails();\n int updateShiftSwapStatus();\n}", "public interface LubrifiantDAO extends DAO<Lubrifiant> {\n}", "public interface StuDao {\n\n boolean addStu(TbStu stu); //增加学生\n\n boolean deleteStu(TbStu stu); //删除学生\n\n boolean updateStu(TbStu stu); //修改学生\n\n TbStu findStuById(int id); //根据id查询学生\n\n List findStuList();// 查询学生信息\n\n\n}", "public interface IEmployeeDAO {\n\t\n\tpublic boolean insertEmployee(Employee emp);\n\tpublic List<Employee> getAllEmployees(); \n\tpublic Employee getEmployee(int empId);\n\tpublic boolean updateEmp(int empId, double newSal); \n\tpublic boolean deleteEmp(int empId); \n\n}", "public interface StudentScheduleDaoI {\n /**\n * 保存学生选课记录\n *\n * @param studentSchedule 选课记录\n */\n void saveStudentSchedule(StudentSchedule studentSchedule);\n\n /**\n * 删除学生选课记录\n *\n * @param stuId 学号\n * @param tchId 教师号\n * @param dpmId 学院号\n * @param crsId 课程号\n * @return 返回删除条数\n */\n int deleteStudentSchedule(String stuId, String tchId, String dpmId, String crsId);\n\n /**\n * 通过特定条件查找学生选课记录,并返回对应实体对象\n *\n * @param conditions 条件。key-字段,value-对应值。\n * @param equalConditions 对应于每个键值对,是采用=匹配,还是采用like模糊匹配的标志,不传值默认为=\n * @return 实体对象集合\n */\n List<StudentSchedule> findStudentScheduleByConditions(Map<String, Object> conditions, boolean... equalConditions);\n\n /**\n * 分页查找学生已选课程\n * @param stuId 学号\n * @param pageNumber 页码\n * @return 学生选课实体\n */\n List<StudentSchedule> findStudentSchedules(String stuId, int pageNumber);\n\n List<Student> findStudentsByCrsAndDpm(String dpm, String crs);\n\n StudentSchedule findByStuAndCrsAndDpm(String stu, String crs, String dpm);\n\n List<StudentSchedule> findTeacherCourses(String tid);\n\n List<Object[]> findTeacherCoursess(String tid);\n}", "@Override\n\tpublic StudentDao createDao() {\n\t\treturn new SqliteStudentDaoImpl();\n\t}", "public interface SubGeneroDAO {\n /**\n * Método que permite guardar un subgénero.\n * @param subGenero {@link SubGenero} objeto a guardar.\n */\n void guardar(SubGenero subGenero);\n\n /**\n * Método que permite actualizar un subgénero.\n * @param subGenero {@link SubGenero} objeto a actualizar.\n */\n void actualizar(SubGenero subGenero);\n\n /**\n * Método que permite eliminar un subgénero por su identificador.\n * @param id {@link Long} identificador del subgénero a eliminar.\n */\n void eliminiar(Long id);\n\n /**\n * Método que permite consultar la lista de subgéneros.\n * @return {@link List} lista de subgéneros consultados.\n */\n List<SubGenero> consultar();\n\n /**\n * Método que permite consultar un SubGenero a partir de su identificador.\n * @param id {@link Long} identificador del subgénero a consultar.\n * @return {@link SubGenero} un objeto subgénero consultado.\n */\n SubGenero consultarById(Long id);\n\n\n}", "public interface ISecProgramDao {\n\n public List<SecProgram> getExcludeProgramsByUserGroupNo(String userGroupNo);\n\n public List<SecProgram> getProgramsByUserId(Long userId);\n\n public List<SecProgram> getPrograms();\n\n public List<SecProgram> getPrograms(int firstRecord, int lastRecord);\n\n public List<SecProgram> getProgramsByFilter(int firstRecord, int lastRecord, String filter);\n\n public SecProgram getProgramByUrl(String urlAddress);\n\n public SecProgram getProgramByNo(String programNo);\n\n public int countProgram();\n\n public int countProgramByFilter(String filter);\n\n public int saveProgram(SecProgram program);\n\n public int deleteProgram(String programNo);\n\n public SecProgram findByFirstRecord(String keyName);\n\n public SecProgram findByPrevRecord(String keyName, String keyValue);\n\n public SecProgram findByNextRecord(String keyName, String keyValue);\n\n public SecProgram findByLastRecord(String keyName);\n\n}", "public abstract UserDAO getUserDAO();", "@Override\n public final IGeneralDAO<ObjectAndSecurity, Integer> getDAO() {\n return objectAndSecurityDAOImplementation;\n }", "public interface WorkerDAO {\r\n \r\n\tpublic List<Worker> findById(Integer id);\r\n\tpublic List<Worker> findAll();\r\n\tpublic void save(Worker worker);\r\n\tpublic void edit(Worker worker);\r\n\tpublic void delete(Worker worker);\r\n public int getNextPrimaryKey(); \r\n}", "public interface DAOCompanies {\n\n void create(Company company);\n boolean update (int companyId, Company company);\n Company read(int companyId);\n boolean delete(int companyId);\n void addCompanyToDeveloper(int compId, int devId);\n\n}", "public interface DAOAdministrador {\r\n public boolean insertarAdministrador(Administrador admon);\r\n public boolean modificarAdministrador(Administrador admon);\r\n public boolean eliminarAdministrador(Administrador admon);\r\n public String verAdministrador();\r\n}", "public interface IStudentDao {\r\n //查询student表中的数据\r\n //使用@Param进行多个参数查询操作\r\n List<Student> selectStudentsParam(@Param(\"studentName\") String name,\r\n @Param(\"studentAge\") int age);\r\n //使用对象进行多个参数查询操作\r\n List<Student> selectStudentsObject(Student student);\r\n\r\n //在student表中插入数据\r\n int insertStudents(Student student);\r\n //更新student表中的某项数据\r\n int updateStudents(Student student);\r\n //删除student表中的某项数据\r\n int deleteStudents(int id);\r\n}", "public interface BaseSectionDAO {\n void addSectionInfo(Section section) throws DAOException;\n void updateSectionInfo(Section section) throws DAOException;\n void deleteSection(long sectionId) throws DAOException;\n ArrayList<Section> showSections() throws DAOException;\n ArrayList<Section> showSectionsByConferenceId(long conferenceId) throws DAOException;\n Section findSectionById(long sectionId) throws DAOException;\n Section findSectionByName (String sectionName) throws DAOException;\n}", "public interface DistrictSanteDao extends ImogBeanDao<DistrictSante> {\n\n\t/* relation dependencies */\n\n}", "public interface Useful_LinksDAO {\n public void addUseful_Links(Useful_Links useful_links) throws SQLException;\n public void updateUseful_Links(Useful_Links useful_links) throws SQLException;\n public void deleteUseful_Links(Useful_Links useful_links) throws SQLException;\n}", "public interface TermDao {\n /**\n * 根据学校编号查询\n * @param universityId 学校编号\n * @return\n */\n public List<Term> queryByUniversity(@Param(\"universityId\")int universityId);\n}", "public interface PersonDAO {\n public void add(Person p);\n public void delete(Person p);\n public List<Person> getList();\n public void update(Person p);\n public Person getPerson(int ID);\n\n}", "public interface SectionDao extends Dao{\n}", "public JdbcObjectStudentDAO() {\n\t\tsuper();\n\t}", "@Local\npublic interface StudentDAO {\n public Student addToGroup(@NotNull DepartmentGroup group, @NotNull @Valid Student student) throws DAOBusinessException;\n\n public Student moveToGroup(@NotNull DepartmentGroup group, @NotNull @Valid Student student) throws DAOBusinessException;\n\n public Student getById(long id) throws DAOBusinessException;\n\n public List<Student> getAll(@NotNull DepartmentGroup group);\n\n public List<Student> getAllByLastNameOrder(@NotNull DepartmentGroup group);\n\n public Student update(@NotNull @Valid Student student) throws DAOBusinessException;\n\n public void delete(@NotNull Student student) throws DAOBusinessException;\n}", "public interface DAOStudent { \n \n public Form getFormByUserName(String userName);\n public Form getFormByFormId(int idForm);\n public void addForm(Form form);\n public void updateForm(Form form);\n public int getFormsByInterviewId(int idInterview);\n public String getEmailByUserName(String userName);\n public List<Form> getFormsToReservInterview();\n void romoveForm(Form form);\n}", "public interface SecRoleDAO {\r\n\r\n /**\r\n * EN: Get a new Security Role object.<br>\r\n * DE: Gibt ein neues Security Role Objekt zurueck.<br>\r\n *\r\n * @return SecRole\r\n */\r\n public SecRole getNewSecRole();\r\n\r\n /**\r\n * EN: Get a list af all Security Roles.<br>\r\n * DE: Gibt eine Liste aller Security Rollen zurueck.<br>\r\n *\r\n * @return List of SecRole\r\n */\r\n public List<SecRole> getAllRoles();\r\n\r\n /**\r\n * EN: Get the count of all Security Roles.<br>\r\n * DE: Gibt die Anzahl aller Security Rollen zurueck.<br>\r\n *\r\n * @return int\r\n */\r\n public int getCountAllSecRoles();\r\n\r\n /**\r\n * EN: Get a Security Role by its ID.<br>\r\n * DE: Gibt eine Security Role anhand ihrer ID zurueck.<br>\r\n *\r\n * @param role_Id / the persistence identifier / der PrimaerKey\r\n * @return SecRole\r\n */\r\n public SecRole getRoleById(Long role_Id);\r\n\r\n /**\r\n * EN: Get a list af all Security Roles by a User.<br>\r\n * DE: Gibt eine Liste aller Security Rollen fuer einen User zurueck.<br>\r\n *\r\n * @param aUser\r\n * @return List of SecRole\r\n */\r\n public List<SecRole> getRolesByUser(SecUser aUser);\r\n\r\n /**\r\n * EN: Get a list af all Security Roles (SQL) like a %RoleName%.<br>\r\n * DE: Gibt eine Liste aller Security Rollen mittels (SQL) 'like\r\n * '%RollenName%' zurueck.<br>\r\n *\r\n * @param aRoleName a role name / ein Rollen Name\r\n * @return List of SecRole\r\n */\r\n public List<SecRole> getRolesLikeRoleName(String aRoleName);\r\n\r\n /**\r\n * EN: Saves new or updates a Security Role.<br>\r\n * DE: Speichert neu oder aktualisiert eine Security Role.<br>\r\n */\r\n public void saveOrUpdate(SecRole entity);\r\n\r\n /**\r\n * EN: Deletes a Security Role.<br>\r\n * DE: Loescht eine Security Role.<br>\r\n */\r\n public void delete(SecRole entity);\r\n\r\n}", "public interface EmployeeDAO {\r\n\r\n\t\t\tpublic List<Employee> findAll();\r\n\r\n\t\t\tpublic Employee findById(int theId);\r\n\t\t\t\r\n\t\t\tpublic void save(Employee theEmployee);\r\n\r\n\t\t\tpublic void deleteById(int theId);\r\n}", "public interface LocacaoDAO {\n\n public void salvar(Locacao locacao);\n}", "public interface TitanOpenOrgDao {\r\n\r\n\tint insert(TitanOpenOrg entity) throws DaoException;\r\n\t\r\n\tint delete(TitanOpenOrg entity) throws DaoException;\r\n\t\r\n\tList<TitanOpenOrgDTO> selectList(TitanOpenOrg entity) throws DaoException;\r\n\t\r\n\tList<String> selectMaxPrefix() throws DaoException;\r\n}", "public interface ContributorDAO extends CountableDAO, \r\nCrudDAO<Contributor>\r\n{\r\n /**\r\n * Find a contributor by the name id and the type id.\r\n * \r\n * @param personNameId\r\n * @param contributorTypeId\r\n * \r\n * @return the found contributor.\r\n */\r\n public Contributor findByNameType(Long personNameId, Long contributorTypeId);\t\r\n \r\n\t/**\r\n\t * Get all contribution types for the given person name.\r\n\t * \r\n\t * @param personNameId - id of the person name\r\n\t * @return set of contributions for the person name\r\n\t */\r\n\tpublic List<Contributor> getAllForName(Long personNameId);\r\n}", "public interface ScheduleDao {\r\n\tpublic Schedule createSchedule(Calendar scheduleDate) throws DAOException;\r\n\tpublic Schedule findScheduleById(long scheduleId) throws DAOException;\r\n\tpublic List<Schedule> findSchedulesByDate(Calendar scheduleDate) throws DAOException;\r\n\tpublic List<Schedule> findAllSchedules() throws DAOException;\r\n\tpublic void updateSchedule(long scheduleId, Calendar newScheduleDate) throws DAOException;\r\n\tpublic void deleteScheduleById(long scheduleId) throws DAOException;\r\n\tpublic void deleteAllSchedules() throws DAOException;\r\n}", "public Long getSchoolId() {\n return schoolId;\n }", "public interface UserDAO {\r\n \r\n\t/**\r\n\t * Retrieves an user based on its username\r\n\t * @param username\r\n\t * @return\r\n\t */\r\n public SecurityUser findByName(String username);\r\n}", "public interface EmployerDao {\n\n void addEmployer(Employer employer);\n\n Employer findEmployer(int id);\n\n Employer findEmployer(String name);\n\n List<Employer> findAll();\n\n}", "public interface HospitalCardDAO {\n int createHospitalCard(HospitalCard hospitalCard);\n\n HospitalCard getHospitalCardById(int hospitalCardId);\n\n HospitalCard getHospitalCardByPatientId(int patientId);\n\n List<HospitalCard> getAllHospitalCards();\n\n boolean updateHospitalCard(HospitalCard hospitalCard);\n\n boolean deleteHospitalCardById(int hospitalCardId);\n}", "public AdministratorDAO() {\n super();\n DAOClassType = Administrator.class;\n }", "public interface LugarDAO {\n\n /**\n * Obtiene un lugar dado el id\n * @param lugarId\n * @return Lugar {@link Lugar}\n */\n public Lugar findLugarByID(int lugarId);\n}", "public interface AuthorityDAO {\n List<Authority> loadAll();\n void save(Authority authority);\n}", "BookDao getBookDao();", "public interface IFakturyDao {\n public Firma getFirma(long id);\n public void saveFirma(Firma firma);\n public Stawka_vat getStawka_vat(long id);\n public void saveStawka_vat(Stawka_vat stawka_vat);\n public Faktura getFaktura(long id);\n public void saveFaktura(Faktura faktura);\n public Pozycja getPozycja(long id);\n public void savePozycja(Pozycja pozycja);\n public Wplata getWplata(long id);\n public void saveWplata(Wplata wplata);\n}", "public interface IPublicationHouseDao {\n\n public void addPublicationHouse(PublicationHouse book);\n\n public void updatePublicationHouse(PublicationHouse book);\n\n public void removePublicationHouse(int id);\n\n public PublicationHouse getPublicationHouseId(int id);\n\n public List<PublicationHouse> listPublicationHouse();\n}", "public static DAO getProfessorLessonDAO() {\n return new ProfessorLessonDAO(entityManager, ProfessorLesson.class);\n }", "AuthorDao getAuthorDao();", "public interface ProjectDao {\n}", "public interface RightInfoDAO extends BaseDAO {\n /** The name of the DAO */\n public static final String NAME = \"RightInfoDAO\";\n\n\t/**\n\t * Insert one <tt>RightInfoDTO</tt> object to DB table <tt>azdai_right_info</tt>, return primary key\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>insert into azdai_right_info(code,title,memo,gmt_create,gmt_modify) values (?, ?, ?, ?, ?)</tt>\n\t *\n\t *\t@param rightInfo\n\t *\t@return String\n\t *\t@throws DataAccessException\n\t */\t \n public String insert(RightInfoDTO rightInfo) throws DataAccessException;\n\n\t/**\n\t * Update DB table <tt>azdai_right_info</tt>.\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>update azdai_right_info set title=?, memo=?, gmt_modify='NOW' where (code = ?)</tt>\n\t *\n\t *\t@param rightInfo\n\t *\t@return int\n\t *\t@throws DataAccessException\n\t */\t \n public int update(RightInfoDTO rightInfo) throws DataAccessException;\n\n\t/**\n\t * Query DB table <tt>azdai_right_info</tt> for records.\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>select * from azdai_right_info where (code = ?)</tt>\n\t *\n\t *\t@param code\n\t *\t@return RightInfoDTO\n\t *\t@throws DataAccessException\n\t */\t \n public RightInfoDTO find(String code) throws DataAccessException;\n\n\t/**\n\t * Query DB table <tt>azdai_right_info</tt> for records.\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>select * from azdai_right_info order by code ASC</tt>\n\t *\n\t *\t@return List<RightInfoDTO>\n\t *\t@throws DataAccessException\n\t */\t \n public List<RightInfoDTO> findAll() throws DataAccessException;\n\n\t/**\n\t * Query DB table <tt>azdai_right_info</tt> for records.\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>select * from azdai_right_info order by code ASC</tt>\n\t *\n\t *\t@param userNo\n\t *\t@return List<RightInfoDTO>\n\t *\t@throws DataAccessException\n\t */\t \n public List<RightInfoDTO> findUserRights(String userNo) throws DataAccessException;\n\n\t/**\n\t * Delete records from DB table <tt>azdai_right_info</tt>.\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>delete from azdai_right_info where (code = ?)</tt>\n\t *\n\t *\t@param code\n\t *\t@return int\n\t *\t@throws DataAccessException\n\t */\t \n public int delete(String code) throws DataAccessException;\n\n}", "public interface EmployeeDetailDAO {\r\n\t/**\r\n\t * Saves a employee detail.\r\n\t * \r\n\t * @param detail\r\n\t * The employee detail.\r\n\t * @return The identifier saved.\r\n\t * @throws DBException\r\n\t * If a problem occurs.\r\n\t */\r\n\tEmployeeDetail save(EmployeeDetail detail) throws DBException;\r\n\r\n\t/**\r\n\t * Updates a employee detail.\r\n\t * \r\n\t * @param detail\r\n\t * The employee detail.\r\n\t * @throws DBException\r\n\t * If a problem occurs.\r\n\t */\r\n\tvoid update(EmployeeDetail detail) throws DBException;\r\n\r\n\t/**\r\n\t * Deletes a module.\r\n\t * \r\n\t * @param detail\r\n\t * The employee detail.\r\n\t * @throws DBException\r\n\t * If a problem occurs.\r\n\t */\r\n\tvoid delete(EmployeeDetail detail) throws DBException;\r\n\r\n\t/**\r\n\t * Gets detail by identifier.\r\n\t * \r\n\t * @return The employee detail.\r\n\t * @throws DBException\r\n\t * If a problem occurs.\r\n\t */\r\n\tEmployeeDetail getById(long identifier) throws DBException;\r\n}", "public interface AuthorityDAO {\n Authority findById(long id);\n List<Authority> getAllActions();\n}", "public interface StaffDao extends BaseDao<Staff> {\n\n Staff findById(Staff staff);\n\n List<Staff> queryStaff(Staff staff);\n\n Staff staffById(String staffId);\n\n List<Staff> findStaffsByStaffName(String staffName);\n\n List<Staff> findStaffsByPostId(String postId);\n\n List<Staff> findStaffsByDepId(String depId);\n\n\n //分页用到的接口\n\n /**\n * 获得总的数据数目 -- 带条件的\n *\n * @return\n */\n int getTotalRecord();\n\n /**\n * 获取到的数据 -- 带分页的参数\n *\n * @param startIndex 开始索引\n * @param pageSize 每页显示的记录\n * @return\n */\n List<Staff> findAllStaffs(int startIndex, int pageSize);\n\n\n List<Staff> findStaffByLoginNameAndLoginPwd(Staff staff);\n}", "public interface IAdminDao {\n\n public Admin getAdminByName(String name);\n\n}", "public interface MenuDao {\n}", "public interface RegistryDAOInterface {\n\n void createRegistry(Registry reg);\n void updateRegistry(Registry reg);\n void deleteRegistry(Registry reg);\n void deleteAllRegistries();\n Registry retrieveRegistryById(Registry reg);\n List<Registry> retrieveAllRegistries();\n}", "public interface StudentDao extends GenericDao<StudentEntity, Integer> {\n}", "public interface CityDao {\n\n void insert(City city);\n City find(long id);\n}", "School findSchoolByName(String schoolName) throws TechnicalException;", "public interface IUserDatagroupDAO extends IBaseDAO<UserDatagroup>{\n\n\n}", "public interface IStudentDao extends CrudRepository<Student, String> {\n\t\n\tpublic Student findByRut(String rut);\n\t\n\tpublic void deleteByRut(String rut);\n\n}", "public interface UsersDAO { //perform in database;\nvoid addUsers(Users user);\nvoid updateUsers(Users user); //pass employee object\nvoid deleteUsers(int id);//pass employee id\nvoid withdraw(Users users, double balance, double amount);\nvoid deposit(Users users, double balance, double amount);\n\n\n//get all employees\nList<Users> getUsers(); //method to return list of employees;\n//Users usersById(int id); // method to return a single employee;\n\n}", "public interface TeacherService {\n\n public boolean isValid(Integer id,\n String lastName,\n String firstName,\n String password);\n public boolean validateRegister(String lastName, String firstName,\n String fatherInitial, String username,\n String password);\n public Teacher getTeacher(Integer id);\n public void addStudent(String lastName, String firstName,\n String fatherInitial, String username,\n String password,\n Integer courseId, Integer teacherId);\n public Integer getStudentId(String username);\n public void addGrade(String studentName, String courseName, Integer teacherId, Integer nota);\n public Integer getCourseID(Integer id, String courseName);\n public List<Course> getCourses(Integer id);\n public List<Student> getStudents(int courseId, int teacherId);\n public int CountStudents(int courseId, int teacherId);\n public List<StudentperCourse> getPopulation (int teacherId);\n public List<StudentwithGrades> getStudentAtCourse(int teacherId, int courseId);\n}", "public interface ClerkShiftRecordDAO {\n\n int insert(ClerkShiftDO clerkShiftDO);\n\n Page<ClerkShiftVO> query(ClerkShiftBO clerkShiftBO,RowBounds build);\n}", "public interface CashRegisterDAO {\n public void addCashRegister(CashRegister cashRegister ) throws SQLException;\n public void updateCashRegister(CashRegister cashRegister ) throws SQLException;\n public CashRegister getCashRegisterById(Long cashregister_id) throws SQLException;\n public Collection getAllCashRegister() throws SQLException;\n public void deleteCashRegister(CashRegister cashRegister) throws SQLException;\n}", "public interface FeedbackOptionDAO extends DAO{\r\n \r\n}", "public interface DeptDao {\n\n public Dept selectDept(int id);\n\n public List<Dept> queryAll(@Param(\"tableName\") String tableName);\n\n public void login(@Param(\"name\") String name,@Param(\"password\") String password);\n}", "public interface IUsersDAO {\n\n /**\n * Retrieve the Users from the Database specified at startup\n * @return a List of IUser\n */\n public List<IUser> getUsers();\n\n /**\n * Save all the Users to the Database specified at startup\n */\n public void saveUser(IUser user);\n\n}", "public interface IInterviewDAO {\n void insertInterview(Interview interview) throws SQLException;\n List<Interview> getAllInterviews() throws SQLException;\n Interview getInterviewById(int id) throws SQLException;\n void updateInterview(Interview interview) throws SQLException;\n void deleteInterview(int interviewId) throws SQLException;\n List<Interview> getPastInterviews() throws SQLException;\n List<Interview> getFutureInterviews() throws SQLException;\n List<Interview> getFutureInterviewsByDirectionId(int directionId) throws SQLException;\n}", "public interface IProvinciaDAO {\r\n\r\n\tpublic abstract Provincia findById(Integer id);\r\n\r\n\tpublic abstract Provincia save(Provincia p);\r\n\r\n\tpublic abstract List<Provincia> findByName(String name);\r\n\r\n}", "public interface TravelGroupDAO {\r\n\r\n /**\r\n * 从数据库取得指定id的Travel Group\r\n * \r\n * @param id\r\n * Travel Group的id\r\n * @return 返回指定的Travel Group\r\n */\r\n public TravelGroup getTravelGroup(Integer id);\r\n\r\n /**\r\n * get Travel Group List Count according to conditions\r\n * \r\n * @param conditions\r\n * search condition\r\n * @return list count\r\n */\r\n public int getTravelGroupListCount(Map conditions);\r\n\r\n /**\r\n * get Travel Group List according to conditions\r\n * \r\n * @param conditions\r\n * search condition\r\n * @param pageNo\r\n * start page no(0 based), ignored if -1\r\n * @param pageSize\r\n * page size, ignored if -1\r\n * @param order\r\n * search order\r\n * @param descend\r\n * asc or desc\r\n * @return Travel Group list\r\n */\r\n public List getTravelGroupList(Map conditions, int pageNo, int pageSize, TravelGroupQueryOrder order, boolean descend);\r\n\r\n /**\r\n * insert Travel Group to database\r\n * \r\n * @param travel\r\n * Group the Travel Group inserted\r\n * @return the Travel Group inserted\r\n */\r\n public TravelGroup insertTravelGroup(TravelGroup travelGroup);\r\n\r\n /**\r\n * update Travel Group to datebase\r\n * \r\n * @param travelGroup\r\n * the Travel Group updated\r\n * @return the Travel Group updated\r\n */\r\n public TravelGroup updateTravelGroup(TravelGroup travelGroup);\r\n\r\n}", "public interface SimpleCityDao {\n\n void insertWithIdGenerate(SimpleCity simpleCity);\n\n void insert(SimpleCity simpleCity);\n\n void update(SimpleCity simpleCity);\n\n void deleteById(Long id);\n\n SimpleCity findById(Long id);\n}", "public interface UserDAO {\n\n boolean create(User user) throws SQLException;\n List<User> getAll();\n User getUser(Integer id);\n boolean update(User user);\n boolean delete(User user);\n}", "public interface ICampaniaDAO {\n\t/**\n\t * Crear la campania en el repositorio\n\t * @param campania\n\t */\n\tvoid crearCampania(GestionPrecioDTO campania);\n\t\n\t\n\t/**\n\t * Actualizar la campania en el repositorio\n\t * @param campania\n\t */\n\tvoid actualizarCampania(GestionPrecioDTO campania, UserDto user);\n\t\n\t/** Metodo actualizarCampania, utilizado para actualizar una campania\n\t * @author srodriguez\n\t * 27/2/2015\n\t * @param campania\n\t * @param user\n\t * @return void\n\t */\n\tvoid actualizarCampania(GestionPrecioDTO campania, String user);\n\t\n\t/**\n\t * Buscar la campania por el c&oacute;digo de referencia\n\t * de Loyalty\n\t * @param codigoCampaniaReferencia C&oacute;digo de Loyalty\n\t * @return\n\t */\n\tGestionPrecioDTO findCampania(String codigoCampaniaReferencia);\n /**\n * Verifica si una campania existe dado su clave primaria como\n * par&aacute;metro de b&uacute;squeda\n * @param id\n * @returnS\n */\n Boolean findExistsCampania(GestionPrecioID id) ;\n /**\n * Obtener todas las campanias existentes en el repositorio\n * @return\n */\n Collection<GestionPrecioDTO> findCampaniasPendientes() ;\n /**\n * Buscar un listado de campanias dado una plantilla de b&uacute;squeda y el\n * estado de cobro\n * @param gestionPrecio Plantilla de b&uacute;squeda\n * @param estadoCobro Estado de cobro. Ej: PENDIENTE, CONFIGURADA, COBRADA, EN CURSO, etc.\n * @return\n */\n Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);\n \n /**\n * @author cbarahona\n * @param campania\n */\n void actualizarCampaniaLoyalty (GestionPrecioDTO campania);\n \n SearchResultDTO<GestionPrecioDTO> findCampaniasPendientesLazy (Integer firstResult, Integer pageSize, Boolean countAgain);\n \n SearchResultDTO<GestionPrecioDTO> findCampaniasFiltrosLazy (GestionPrecioDTO gestionPrecio, String estadoCobro,Integer firstResult, Integer pageSize, Boolean countAgain);\n \n GestionPrecioDTO findCampania(final String codigoReferencia, final Integer codigoCompania) throws SICException;\n \n void actualizarCampania(GestionPrecioDTO campania) throws SICException;\n \n /**\n * Metodo que valida si una campaña tiene participantes\n * @param codigoReferencia\n * @return\n * @throws SICException\n */\n Boolean tieneParticipantesCampania(String codigoReferencia) throws SICException;\n}", "public interface DAOjdbc\n{\n Boolean admin_log(String u,String p) throws SQLException, ClassNotFoundException;\n Boolean add_topic(String l,String n,String r) throws SQLException, ClassNotFoundException;\n List<Topic> topic(String t) throws SQLException, ClassNotFoundException;\n List<Topic> Select_topic(String i) throws SQLException, ClassNotFoundException;\n Boolean add_tou(String p) throws SQLException, ClassNotFoundException;\n Boolean add_Info(String n,String c,String t,String m) throws SQLException, ClassNotFoundException;\n Boolean add_user(String n,String p,String pw,String t,String m) throws SQLException, ClassNotFoundException;\n User select_user(String u,String p) throws SQLException, ClassNotFoundException;\n}" ]
[ "0.76369643", "0.71699095", "0.7084676", "0.6992176", "0.69144595", "0.687675", "0.6846372", "0.683035", "0.6816346", "0.67759645", "0.6765683", "0.66887116", "0.66746366", "0.6643759", "0.65865046", "0.65784615", "0.6540385", "0.6538394", "0.6534778", "0.65138465", "0.6513505", "0.6485515", "0.6471716", "0.6462209", "0.6451298", "0.6447202", "0.641912", "0.6409952", "0.6408295", "0.6403755", "0.63936126", "0.63487935", "0.6346349", "0.63266575", "0.6314529", "0.6300754", "0.62907505", "0.629074", "0.6288014", "0.6278649", "0.6275744", "0.627303", "0.62551785", "0.62549067", "0.6249052", "0.6243154", "0.6238881", "0.6227991", "0.6227258", "0.6201841", "0.61989653", "0.6196074", "0.6188464", "0.61866975", "0.61861247", "0.61854935", "0.61814445", "0.6180751", "0.6179962", "0.6171451", "0.6167427", "0.6157467", "0.6151264", "0.61320347", "0.6119969", "0.61194557", "0.6112565", "0.61072206", "0.6106803", "0.608436", "0.6082041", "0.60776615", "0.6073095", "0.60726964", "0.60725564", "0.6071315", "0.60706764", "0.6069063", "0.60682034", "0.60676885", "0.6063936", "0.60601807", "0.6054379", "0.60487187", "0.604776", "0.60419357", "0.6037235", "0.6034898", "0.6030334", "0.60268927", "0.6025331", "0.60208464", "0.6010302", "0.6007955", "0.600752", "0.6004283", "0.6003747", "0.60028946", "0.5998764", "0.5990666" ]
0.8101683
0
Return classes that depends on this school.
List<StudentClass> findClassesBySchoolId(int id) throws TechnicalException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Class<?>[] getCoClasses();", "Collection<String> getRequiredClasses( String id );", "@Override\n public Set<Class<?>> getClasses() {\n\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(CountryResource.class);\n resources.add(DepartmentResource.class);\n resources.add(JobResource.class);\n return resources;\n }", "@Override\n\tpublic List<Class> bestClass() {\n\t\treturn mainDao.bestClass();\n\t}", "@Override\n\tpublic String getClassName() {\n\t\treturn\tSchool.class.getName();\n\t}", "public List<IclassItem> getClasses() {\n if(projectData!=null){\n return projectData.getClasses();\n }\n return new ArrayList<IclassItem>();\n }", "@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepo.findAll();\n\t}", "@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepository.findAll();\n\t}", "public Collection getDescendantClasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "@NotNull\n List<? extends ClassInfo> getClasses();", "private Set<String> classSet(String whichClass) {\n return subclasses.get(whichClass);\n }", "public List<ClassId> getThirdClasses() {\n\t\tList<ClassId> classes = new ArrayList<>();\r\n\r\n\t\t/*\r\n\t\t * classes.add(ClassId.EVAS_SAINT); classes.add(ClassId.SHILLIEN_TEMPLAR);\r\n\t\t * classes.add(ClassId.SPECTRAL_DANCER); classes.add(ClassId.GHOST_HUNTER);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DREADNOUGHT); classes.add(ClassId.PHOENIX_KNIGHT);\r\n\t\t * classes.add(ClassId.HELL_KNIGHT);\r\n\t\t * \r\n\t\t * classes.add(ClassId.HIEROPHANT); classes.add(ClassId.EVAS_TEMPLAR);\r\n\t\t * classes.add(ClassId.SWORD_MUSE);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DOOMCRYER); classes.add(ClassId.FORTUNE_SEEKER);\r\n\t\t * classes.add(ClassId.MAESTRO);\r\n\t\t */\r\n\r\n\t\t// classes.add(ClassId.ARCANA_LORD);\r\n\t\t// classes.add(ClassId.ELEMENTAL_MASTER);\r\n\t\t// classes.add(ClassId.SPECTRAL_MASTER);\r\n\t\t// classes.add(ClassId.SHILLIEN_SAINT);\r\n\r\n\t\tclasses.add(ClassId.SAGGITARIUS);\r\n\t\tclasses.add(ClassId.ARCHMAGE);\r\n\t\tclasses.add(ClassId.SOULTAKER);\r\n\t\tclasses.add(ClassId.MYSTIC_MUSE);\r\n\t\tclasses.add(ClassId.STORM_SCREAMER);\r\n\t\tclasses.add(ClassId.MOONLIGHT_SENTINEL);\r\n\t\tclasses.add(ClassId.GHOST_SENTINEL);\r\n\t\tclasses.add(ClassId.ADVENTURER);\r\n\t\tclasses.add(ClassId.WIND_RIDER);\r\n\t\tclasses.add(ClassId.DOMINATOR);\r\n\t\tclasses.add(ClassId.TITAN);\r\n\t\tclasses.add(ClassId.CARDINAL);\r\n\t\tclasses.add(ClassId.DUELIST);\r\n\r\n\t\tclasses.add(ClassId.GRAND_KHAVATARI);\r\n\r\n\t\treturn classes;\r\n\t}", "public ClassDoc[] specifiedClasses() {\n // System.out.println(\"RootDoc.specifiedClasses() called.\");\n // return specClasses.values().toArray(new ClassDoc[0]);\n\n // index.html lists classes returned from specifiedClasses; return the\n // set of classes in specClasses that are\n // included as per access mod filter\n return classes();\n }", "public Collection getAncestorClasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "public ClassDoc[] classes() {\n // return specClasses.values().toArray(new ClassDoc[0]);\n\n // return the set of classes in specClasses that are \"included\"\n // according to the access modifier filter\n if (includedClasses != null) {\n // System.out.println(\"RootDoc.classes() called.\");\n return includedClasses;\n }\n int size = 0;\n Collection<X10ClassDoc> classes = specClasses.values();\n for (ClassDoc cd : classes) {\n if (cd.isIncluded()) {\n size++;\n }\n }\n includedClasses = new X10ClassDoc[size];\n int i = 0;\n for (X10ClassDoc cd : classes) {\n if (cd.isIncluded()) {\n includedClasses[i++] = cd;\n }\n }\n Comparator<X10ClassDoc> cmp = new Comparator<X10ClassDoc>() {\n public int compare(X10ClassDoc first, X10ClassDoc second) {\n return first.name().compareTo(second.name());\n }\n\n public boolean equals(Object other) {\n return false;\n }\n };\n Arrays.sort(includedClasses, cmp);\n // System.out.println(\"RootDoc.classes() called. result = \" +\n // Arrays.toString(includedClasses));\n return includedClasses;\n }", "public Collection getSubclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "Set<DependencyItem> getDependsOnMe(Class<?> type);", "public AssignmentClasses[] getClasses()\n\t{\n\t\treturn classes;\n\t}", "List<StudentClass> findClassesBySchoolName(String schoolName)\r\n\t\t\tthrows TechnicalException;", "public SortedSet<ClassificationPair> getClassifications() {\n\t\treturn this.classifications;\n\t}", "public List<? extends BaseClassInfo> getClasses(HasMetricsFilter filter) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n List<BaseClassInfo> result = newArrayList();\n for (BaseClassInfo classInfo : classLookup.values()) {\n if (filter.accept(classInfo)) {\n result.add(classInfo);\n }\n }\n return result;\n }", "@Override\n public Set<Class<?>> getClasses() {\n HashSet h = new HashSet<Class<?>>();\n h.add(AffirmationService.class );\n return h;\n }", "private String[] getReferencedJavaClasses() {\n\t\tclass ClassNameVisitor extends JVisitor {\n\t\t\tList<String> classNames = new ArrayList<String>();\n\n\t\t\t@Override\n\t\t\tpublic boolean visit(JClassType x, Context ctx) {\n\t\t\t\tclassNames.add(x.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tClassNameVisitor v = new ClassNameVisitor();\n\t\tv.accept(jprogram);\n\t\treturn v.classNames.toArray(new String[v.classNames.size()]);\n\t}", "public static ArrayList<Class> getClassesFromStudent(Student s)\n\t{\n\t\tint studentId = s.getUserId();\n\t\tString sql = \"SELECT c.classcode, c.classname, i.* FROM UserInfo i, ClassMember cm, Class c \"\n\t\t\t\t+ \"WHERE cm.studentID = ? \"\n\t\t\t\t+ \"AND cm.classcode = c.classcode AND c.instructorID = i.userID\";\n\t\tArrayList<Class> classes = new ArrayList<Class>();\n\t\ttry(Connection conn = DriverManager.getConnection(db, user, pwd);\n\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);)\n\t\t{\n\t\t\tps.setInt(1, studentId);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tString className = rs.getString(\"classname\");\n\t\t\t\tString classCode = rs.getString(\"classcode\");\n\t\t\t\tString name = rs.getString(\"firstname\") + \" \" + rs.getString(\"lastname\");\n\t\t\t\tString email = rs.getString(\"email\");\n\t\t\t\tint userId = rs.getInt(\"userID\");\n\t\t\t\tInstructor i = new Instructor(name, email, userId);\n\t\t\t\tClass c = new Class(i, className, classCode);\n\t\t\t\tclasses.add(c);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn classes;\n\t}", "Set<DependencyItem> getIDependOn(Class<?> type);", "final Class<?>[] classes() {\n if (classes instanceof Class[]) {\n return (Class[]) classes;\n } else {\n return new Class[] { (Class) classes };\n }\n }", "private ArrayList<Class<Critter>> getCritterClasses(Package pkg) {\n\t\tArrayList<Class<Critter>> classes = new ArrayList<Class<Critter>>();\n\t\tString packagename = pkg.getName();\n\t\tURL resource = ClassLoader.getSystemClassLoader().getResource(packagename);\n\t\tString path = resource.getFile(); //path to package\n\t\tFile directory;\n\t\ttry {\n\t\t\tdirectory = new File(resource.toURI());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t\tif (directory.exists()) {\n\t\t\tString[] files = directory.list();\n\t\t\tfor (String file : files) {\n\t\t\t\tif (file.endsWith(\".class\")) {\n\t\t\t\t\t// removes the .class extension\n\t\t\t\t\tString className = packagename + '.' + file.substring(0, file.length() - 6);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass classObj = Class.forName(className);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tObject obj = classObj.newInstance();\n\t\t\t\t\t\t\tif (obj instanceof Critter) {\n\t\t\t\t\t\t\t\tclasses.add(classObj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcontinue; //Skip if class cannot be made into object\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "public abstract List<Dependency> selectDependencies( Class<?> clazz );", "@Override\r\n\tpublic List<Classified> getAllClassified() {\n\t\treturn null;\r\n\t}", "public String getClasses() {\n String classesString = \"\";\n\n for (String className : classes) {\n classesString += (className + \"\\n\");\n }\n\n return classesString;\n }", "public List<Models.Class> showClasses() {\n // Get from all levels\n List<Models.Class> results = em.createNativeQuery(\"select c.* from class c, classparticipant cpa, participant p where c.classid = cpa.classid and cpa.participantid = p.participantid and p.userid = ?\", Models.Class.class).setParameter(1, user.getUserid()).getResultList();\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" classes were found.\");\n\n for (Models.Class classroom : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Class?id=\" + classroom.getClassid() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>CLASS</a>\\n\"\n + \" <a class='name'>\" + classroom.getClasstitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + classroom.getClassid() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n return results;\n }", "@OneToMany(mappedBy=\"classRoom\")\n @OrderBy(\"className ASC\")\n public Collection<Class> getClasses() {\n return classes;\n }", "public Collection getSuperclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "public List<String> getHierarchicalClass() {\r\n \t\treturn hierarchicalClass;\r\n \t}", "public List<Class<?>> getKnownClasses();", "Integer[] getClasses() {\n\t\tArrayList<Integer> uniqueClasses = new ArrayList<Integer>();\n\t\tfor(ClassInfo c : preferences) {\n\t\t\tif (uniqueClasses.contains(c.getCourseID()) == false){\n\t\t\t\tuniqueClasses.add(c.getCourseID());\n\t\t\t}\n\t\t}\n\t\treturn uniqueClasses.toArray(new Integer[0]);\n\t}", "private static Collection<EClass> getAllClasses(String model)\n {\n Collection<EClass> result;\n if (Constants.SYSML_EXTENSION.equals(model.toLowerCase()))\n {\n result = new LinkedList<EClass>(SysMLPackage.Literals.REQUIREMENT.getEAllSuperTypes());\n result.add(SysMLPackage.Literals.REQUIREMENT);\n }\n else\n {\n result = new LinkedList<EClass>(UMLPackage.Literals.CLASS.getEAllSuperTypes());\n result.add(UMLPackage.Literals.CLASS);\n }\n\n return result;\n }", "public ClassInfo[] getClasses() {\r\n return classes.toArray(new ClassInfo[classes.size()]);\r\n }", "java.util.List<org.landxml.schema.landXML11.ClassificationDocument.Classification> getClassificationList();", "public List<String> getClassesList() {\n\t\tCursor c = theDb.rawQuery(\"SELECT * \" +\n\t\t\t\t\t\t\t\t \"FROM \" + DbContract.Classes.TABLE_NAME, null);\n\t\t\n\t\t//Read cursor into an ArrayList\n\t\tList<String> classesList = new ArrayList<String>();\n\t\tclassesList.add( context.getString(R.string.all_classes) );\t\t\t//Add \"All classes\"\n\t\t\n\t\twhile (c.moveToNext()) {\n\t\t\tclassesList.add( c.getString( c.getColumnIndex(DbContract.Classes.ATTRIBUTE_NAME)));\n\t\t}\n\t\t\n\t\treturn classesList;\n\t}", "Set<Class<?>> getClassSetBySuperClass(String packageName, Class<?> superClass);", "public Collection getEquivalentClasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "private void buildReferencedClassSet() throws CheckedAnalysisException, InterruptedException {\n\n if (PROGRESS) {\n System.out.println(\"Adding referenced classes\");\n }\n Set<String> referencedPackageSet = new HashSet<String>();\n\n LinkedList<ClassDescriptor> workList = new LinkedList<ClassDescriptor>();\n workList.addAll(appClassList);\n\n Set<ClassDescriptor> seen = new HashSet<ClassDescriptor>();\n Set<ClassDescriptor> appClassSet = new HashSet<ClassDescriptor>(appClassList);\n\n Set<ClassDescriptor> badAppClassSet = new HashSet<ClassDescriptor>();\n HashSet<ClassDescriptor> knownDescriptors = new HashSet<ClassDescriptor>(DescriptorFactory.instance()\n .getAllClassDescriptors());\n int count = 0;\n Set<ClassDescriptor> addedToWorkList = new HashSet<ClassDescriptor>(appClassList);\n\n // add fields\n //noinspection ConstantIfStatement\n if (false)\n for (ClassDescriptor classDesc : appClassList) {\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n for (XField f : classNameAndInfo.getXFields()) {\n String sig = f.getSignature();\n ClassDescriptor d = DescriptorFactory.createClassDescriptorFromFieldSignature(sig);\n if (d != null && addedToWorkList.add(d))\n workList.addLast(d);\n }\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n\n while (!workList.isEmpty()) {\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n ClassDescriptor classDesc = workList.removeFirst();\n\n if (seen.contains(classDesc)) {\n continue;\n }\n seen.add(classDesc);\n\n if (!knownDescriptors.contains(classDesc)) {\n count++;\n if (PROGRESS && count % 5000 == 0) {\n System.out.println(\"Adding referenced class \" + classDesc);\n }\n }\n\n referencedPackageSet.add(classDesc.getPackageName());\n\n // Get list of referenced classes and add them to set.\n // Add superclasses and superinterfaces to worklist.\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n\n ClassDescriptor superclassDescriptor = classNameAndInfo.getSuperclassDescriptor();\n if (superclassDescriptor != null && addedToWorkList.add(superclassDescriptor)) {\n workList.addLast(superclassDescriptor);\n }\n\n for (ClassDescriptor ifaceDesc : classNameAndInfo.getInterfaceDescriptorList()) {\n if (addedToWorkList.add(ifaceDesc))\n workList.addLast(ifaceDesc);\n }\n\n ClassDescriptor enclosingClass = classNameAndInfo.getImmediateEnclosingClass();\n if (enclosingClass != null && addedToWorkList.add(enclosingClass))\n workList.addLast(enclosingClass);\n\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (CheckedAnalysisException e) {\n // Failed to scan a referenced class --- just log the error and\n // continue\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n // Delete any application classes that could not be read\n appClassList.removeAll(badAppClassSet);\n DescriptorFactory.instance().purge(badAppClassSet);\n\n for (ClassDescriptor d : DescriptorFactory.instance().getAllClassDescriptors()) {\n referencedPackageSet.add(d.getPackageName());\n }\n referencedClassSet = new ArrayList<ClassDescriptor>(DescriptorFactory.instance().getAllClassDescriptors());\n\n // Based on referenced packages, add any resolvable package-info classes\n // to the set of referenced classes.\n if (PROGRESS) {\n referencedPackageSet.remove(\"\");\n System.out.println(\"Added \" + count + \" referenced classes\");\n System.out.println(\"Total of \" + referencedPackageSet.size() + \" packages\");\n for (ClassDescriptor d : referencedClassSet)\n System.out.println(\" \" + d);\n\n }\n\n }", "List<Class<?>> getManagedClasses();", "public int getClasses(){\r\n\t\treturn this.classes;\r\n\t}", "public HashMap<Integer,Category_components> get_classes(){\n return game_classes;\n }", "public List<BaseClass> baseClasses() {\r\n\t\treturn this.baseClasses;\r\n\t}", "public List<String> getClassList() {\n return classlist;\n }", "public ArrayList<OWLClass> getClasses(OWLOntology ontology){\n\t\t\n\t\tArrayList<OWLClass> classes = new ArrayList<OWLClass>();\n\t\tfor (OWLClass cls : ontology.getClassesInSignature())\n\t\t\tclasses.add(cls);\n\t\treturn classes;\n\t}", "Set<Concept> getSubclasses(Concept concept);", "@NotNull\n List<PriorityClass> getAllPriorityClasses();", "@NotNull\n List<? extends ClassInfo> getAllClasses();", "@ApiModelProperty(example = \"null\", value = \"Set of possible classes identified by the classifier\")\n public java.util.List<VbClass> getClasses() {\n return classes;\n }", "public List<BotClassification> getClassifications() {\n return classifications;\n }", "public Set< UseCase > useCaseDependencies() {\r\n\t\tSet< UseCase > useCases = new LinkedHashSet< UseCase >();\r\n\t\tList< Step > steps = getSteps();\r\n\t\tfor ( Step s : steps ) {\r\n\t\t\tif ( ! s.kind().equals( StepKind.USE_CASE_CALL ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tUseCaseCallStep uccs = (UseCaseCallStep) s;\r\n\t\t\tuseCases.add( uccs.getUseCase() ); // Add the use case (if not already exists)\r\n\t\t}\r\n\t\treturn useCases;\r\n\t}", "@Transient\r\n\tpublic Class<?> getClassType() {\r\n\t\treturn TeamStudent.class;\r\n\t}", "public List getParents()\n {\n \tList result = new ArrayList();\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n\n \tif (instance != null)\n \t{\n \t if (instance.isRepresentative(this.refMofId())&&\n \t instance.hasRefObject(this.refMofId()))\n \t {\n \t if (getGeneralization().isEmpty() && !(this instanceof Interface) && !(this instanceof Enumeration))\n \t {\n \t \tresult.add(OclLibraryHelper.getInstance(this).\n \t\t\t\t\t\t\t\t\t\t\tgetAny());\n \t return result;\n \t \t }\n \t } \t \n \t \n\t \tif (equals(OclLibraryHelper.getInstance(this).getVoid()))\n\t \t{\n\t \t\tModel topPackage = ModelHelper.\n\t \t\t\t\t\t\t \t\tgetInstance(\n\t \t\t\t\t\t\t \t\t\t\t(Uml15Package) this.refOutermostPackage()).\n\t \t\t\t\t\t\t \t\t\t\t\t\tgetTopPackage();\n\t \t\tresult.addAll(((NamespaceImpl)topPackage).getAllClassesWithoutSpez());\n\t \t\treturn result;\n\t \t}\n \t} \n \tIterator it = getGeneralization().iterator();\n\n \twhile(it.hasNext())\n \t{\n \t Generalization g = (Generalization)it.next(); \n \t result.add(g.getParent());\n \t}\n \treturn result;\n }", "private void computeCoreCrown() {\n\t\tSet<Class> core = new HashSet<Class>();\n\t\tSet<Class> crown = new HashSet<Class>();\n\n\t\tfor (Class c : this.model.getClasses()) {\n\t\t\tif (c.getSuperClasses().size() > 1) {\n\t\t\t\tcore.add(c);\n\t\t\t\tbuildCoreRecursively(c, core);\n\t\t\t}\n\t\t\tif (c.getSuperClasses().size() <= 1) {\n\t\t\t\tboolean allSubClassesSimpleInheritance = true;\n\t\t\t\tfor (Class s : c.getSubClasses()) {\n\t\t\t\t\tif (s.getSuperClasses().size() > 1) {\n\t\t\t\t\t\tallSubClassesSimpleInheritance = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (allSubClassesSimpleInheritance) {\n\t\t\t\t\tcrown.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.core = new ArrayList<Class>(core);\n\t\tCollections.sort(this.core);\n\n\t\tthis.crown = new ArrayList<Class>(crown);\n\t\tCollections.sort(this.crown);\n\t}", "private void restrictClasses() {\n\t\tSet<String> classes = classMap.keySet();\n\t\tSet<String> intersect;\n\t\tfor (String s : disjointsInfo.keySet()) {\n\t\t\tintersect = disjointsInfo.get(s);\n\t\t\tintersect.retainAll(classes);\n\t\t\tdisjointsInfo.put(s, intersect);\n\t\t}\n\t\tfor (String s : supersInfo.keySet()) {\n\t\t\tintersect = supersInfo.get(s);\n\t\t\tintersect.retainAll(classes);\n\t\t\tsupersInfo.put(s, intersect);\n\t\t}\n\t}", "Set<Class<?>> getClassSet(String packageName);", "HashMap<String, Set<URI>> getExternalSuperClasses();", "List<CabinClassModel> findCabinClasses();", "public static ArrayList<Class> getClassesFromInstructor(Instructor i)\n\t{\n\t\tint instructorId = i.getUserId();\n\t\tString sql = \"SELECT c.* FROM UserInfo i, Class c WHERE c.instructorID = ? AND i.userID = ?\";\n\t\tArrayList<Class> classes = new ArrayList<Class>();\n\t\ttry(Connection conn = DriverManager.getConnection(db, user, pwd);\n\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);)\n\t\t{\n\t\t\tps.setInt(1, instructorId);\n\t\t\tps.setInt(2, instructorId);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tString name = rs.getString(\"classname\");\n\t\t\t\tString classcode = rs.getString(\"classcode\");\n\t\t\t\tClass c = new Class(i, name, classcode);\n\t\t\t\tclasses.add(c);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn classes;\n\t}", "public static ArrayList<Classification> getAllClassifications() {\n\t\tString path = ALL_CLASSIF;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\treturn getClassifications(response);\n\t}", "public List<Classs> getClasss(String lessonId) {\n\t\treturn cla.getClasss(lessonId);\n\t}", "public static Set<Classification> getClassifications() throws Exception {\r\n String xmlRequest = \"<request><request-header><protocol-version>2</protocol-version></request-header></request>\";\r\n try {\r\n String responseXML = FSHelperLibrary.sendRequest(null, RequestType.RT_GET_CLASSIFICATIONS, xmlRequest);\r\n LoggerUtil.logDebug(\"Get Classificatios Response XML: \" + responseXML);\r\n\r\n Node rootNode = XMLUtil.getRootNode(responseXML);\r\n Node requestStatusNode = XMLUtil.parseNode(\"request-status\", rootNode);\r\n String returnValue = XMLUtil.parseString(\"return-value\", requestStatusNode);\r\n\r\n if (!\"1\".equals(returnValue)) {\r\n LoggerUtil.logError(\"Get Classificatios Response XML: \" + responseXML);\r\n String errorMsg = XMLUtil.parseString(\"error-message\", requestStatusNode);\r\n String dispMsg = XMLUtil.parseString(\"display-message\", requestStatusNode);\r\n if (dispMsg == null || dispMsg.trim().isEmpty()) {\r\n dispMsg = errorMsg;\r\n }\r\n throw new Exception(dispMsg);\r\n }\r\n\r\n NodeList lNodeList = XMLUtil.parseNodeList(\"classifications/classification\", rootNode);\r\n if (lNodeList != null && lNodeList.getLength() > 0) {\r\n Set<Classification> lClassifications = new LinkedHashSet<Classification>();\r\n for (int i = 0; i < lNodeList.getLength(); i++) {\r\n Node lNode = lNodeList.item(i);\r\n String lstrClassId = XMLUtil.parseString(\"id\", lNode);\r\n String lstrClassName = XMLUtil.parseString(\"name\", lNode);\r\n String lstrClassDesc = XMLUtil.parseString(\"description\", lNode);\r\n String lstrStatus = XMLUtil.parseString(\"status\", lNode);\r\n // Take only active classification\r\n if (\"1\".equals(lstrStatus)) {\r\n Classification lClassification = new Classification();\r\n lClassification.setId(lstrClassId);\r\n lClassification.setName(lstrClassName);\r\n lClassification.setDescription(lstrClassDesc);\r\n lClassifications.add(lClassification);\r\n }\r\n }\r\n XMLDBService.updateClassifications(lClassifications);\r\n return lClassifications;\r\n }\r\n } catch (FSHelperException e) {\r\n throw e;\r\n }\r\n return null;\r\n }", "public List<WjrClassItem> getClassItems() {\r\n return new ArrayList<WjrClassItem>(classItems.values());\r\n }", "west.twouse.language.sparqlas.Class getClass_();", "Class<?>[] getHandledClasses();", "public static ArrayList<Classification> getLastClassifications() {\n\t\tString path = LAST_CLASSIF;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\treturn getClassifications(response);\n\t}", "Object getClass_();", "Object getClass_();", "private Set<Class<?>> describeClassTree(Class<?> inputClass) {\r\n if (inputClass == null) {\r\n return Collections.emptySet();\r\n }\r\n\r\n // create result collector\r\n Set<Class<?>> classes = Sets.newLinkedHashSet();\r\n\r\n // describe tree\r\n describeClassTree(inputClass, classes);\r\n\r\n return classes;\r\n }", "@Override\n\tpublic List<Classes> findAllClasses() {\n\t\tString sql = \"select * from classes\";\n\t\tJdbcQuery querys = JdbcUtils.createNativeQuery(sql, Classes.class);\n\t\tList<Classes> classesList = (List<Classes>) querys.getResultList();\n\t\treturn classesList;\n\t}", "public Stream<Class<?>> getClasses(@NotNull String packageName) {\n return CheckedFunction2.of(ClassLoader::getResources).unchecked()\n .reversed()\n .apply(packageName.replace('.', '/'))\n .andThen(Enumeration::asIterator)\n .andThen(urlIterator -> spliteratorUnknownSize(urlIterator, ORDERED))\n .andThen(urlSpliterator -> stream(urlSpliterator, false))\n .compose(Thread::getContextClassLoader)\n .apply(Thread.currentThread())\n .map(URL::getFile)\n .map(File::new)\n .flatMap(directory -> findClasses(directory, packageName));\n }", "public String getClassification() {\n return classification;\n }", "public String getClassification() {\n return classification;\n }", "@Override\n public Set<Class<?>> getClasses() {\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(api.Auth.class);\n resources.add(api.UserApi.class);\n resources.add(api.TicketApi.class);\n resources.add(api.DepartmentApi.class);\n resources.add(api.MessageApi.class);\n resources.add(api.MilestoneApi.class);\n resources.add(api.InvitationApi.class);\n return resources;\n }", "@Override\n public List<Classroom> getClassesByKinderg(int id) {\n\t\t\t\t\tKinderGarten k = kindergartenRepo.findById(id).get();\n\t\t\t\t\tList<Classroom> c=k.getClassrooms();\n\t\t\t\t\treturn c;\n\t\t\n\t\t\t\t }", "@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName, Class<?> superClass) throws ClassNotFoundException, IOException\n {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements())\n {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n List<Class> classes = new ArrayList<Class>();\n for (File directory : dirs)\n {\n List<Class> foundClasses = findClasses(directory, packageName);\n for (Class foundClass : foundClasses)\n {\n if (superClass.isAssignableFrom(foundClass))\n {\n classes.add(foundClass);\n }\n }\n }\n\n return classes;\n }", "public Map<ClassName, List<ClassName>> dependenciesMap() { return m_dependenceisMap; }", "public Iterator<String> listDeclaredBelongingClasses(String instance)\r\n\t{\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tOntResource ontI = obtainOntResource(instance);\r\n\t\tStmtIterator si = ONT_MODEL.getRawModel().listStatements(ontI, RDF.type, (RDFNode)null);\r\n\t\twhile(si.hasNext())\r\n\t\t{\r\n\t\t\tStatement st = si.nextStatement();\r\n\t\t\tlist.add(st.getObject().toString());\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t\t\r\n\t}", "public Collection getAllAuxClasss();", "@Override\r\n\tpublic Class getClase() {\n\t\treturn null;\r\n\t}", "private static <T> Collection<Class<?>> getClassHierarchy(T instance) {\n Collection<Class<?>> hierarchy = new LinkedList<>();\n Class<?> clazz = (Class<?>) instance;\n while (clazz != null) {\n hierarchy.add(clazz);\n clazz = clazz.getSuperclass();\n }\n return hierarchy;\n }", "public DependencySatisfaction satisfied() {\n\t\treturn satisfied(new HashSet<String>(), new HashSet<String>());\n\t}", "public static synchronized Set getDescriptorClasses() {\n\tHashSet set = new HashSet();\n\n for (Enumeration e = registryModes.elements(); e.hasMoreElements();) {\n RegistryMode mode = (RegistryMode)e.nextElement();\n\n\t set.add(mode.descriptorClass);\n\t}\n\n\treturn set;\n }", "private List<Class<?>> getClasses(String packageName) throws Exception {\n File directory = null;\n try {\n ClassLoader cld = getClassLoader();\n URL resource = getResource(packageName, cld);\n directory = new File(resource.getFile());\n } catch (NullPointerException ex) {\n throw new ClassNotFoundException(packageName + \" (\" + directory\n + \") does not appear to be a valid package\");\n }\n return collectClasses(packageName, directory);\n }", "public String getClassification() {\n return classification;\n }", "public ArrayList<String> getClassesToClassify(Instance instanceSelected, InfModel infModel) {\n\t\tArrayList<String> listClassesMembersTmpWithoutRepeat = new ArrayList<String>();\r\n\t\tfor (DtoCompleteClass dto : instanceSelected.ListCompleteClasses) {\r\n\t\t\tfor (String clsComplete : dto.Members) {\r\n\t\t\t\tif(! listClassesMembersTmpWithoutRepeat.contains(clsComplete))\r\n\t\t\t\t{\r\n\t\t\t\t\tlistClassesMembersTmpWithoutRepeat.add(clsComplete);\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Remove disjoint subclasses from some super class\r\n\t\tArrayList<String> listClassesMembersTmp = new ArrayList<String>();\r\n\t\tfor (DtoCompleteClass dto : instanceSelected.ListCompleteClasses) \r\n\t\t{\r\n\t\t\tArrayList<String> listDisjoint = search.GetDisjointClassesOf(dto.CompleteClass, infModel);\r\n\t\t\tfor (String clc : listClassesMembersTmpWithoutRepeat) \r\n\t\t\t{\r\n\t\t\t\tif(! listDisjoint.contains(clc))\r\n\t\t\t\t{\r\n\t\t\t\t\tlistClassesMembersTmp.add(clc);\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\treturn listClassesMembersTmp;\r\n\t}", "List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }", "public List<String> classifiers()\n\t{\n\t\t//If the classifier list has not yet been constructed then go ahead and do it\n\t\tif (c.isEmpty())\n\t\t{\n\t\t\tfor(DataSetMember<t> member : _data)\n\t\t\t{\n\t\t\t\tif (!c.contains(member.getCategory()))\n\t\t\t\t\t\tc.add(member.getCategory().toString());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn c;\n\t}", "private List<Class> getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }", "public PsiClassBean getClassWithEagerTest() {\n return classWithSmell;\n }", "public Iterator<String> listAllClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\r\n\t}", "public List<com.platform.chorus.db.tables.pojos.ClassModel> fetchByScope(String... values) {\n return fetch(ClassModel.CLASS_MODEL.SCOPE, values);\n }", "public Map getStandardClasses() {\n return standardClasses;\n }", "public Set<String> getClassKeys();", "default ImmutableSet<Class<? extends ManagedService>> getDependencies()\n\t{\n\t\treturn Sets.immutable.empty();\n\t}", "public Iterator<String> listBelongingClasses(String instance)\r\n\t{\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tOntResource ontI = obtainOntResource(instance);\r\n\t\tStmtIterator si = ONT_MODEL.listStatements(ontI, RDF.type, (RDFNode)null);\r\n\t\twhile(si.hasNext())\r\n\t\t{\r\n\t\t\tStatement st = si.nextStatement();\r\n\t\t\tlist.add(st.getObject().toString());\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t\t\r\n\t}" ]
[ "0.6060191", "0.598552", "0.59010726", "0.5890378", "0.5885667", "0.58402807", "0.583086", "0.58273816", "0.57727635", "0.57258505", "0.57117236", "0.5621204", "0.5618497", "0.56175363", "0.55906534", "0.55726427", "0.55581355", "0.55184007", "0.5501738", "0.5471335", "0.5451957", "0.54406726", "0.5431705", "0.53899145", "0.5386824", "0.53755355", "0.53717846", "0.5370928", "0.5368373", "0.5366976", "0.53604764", "0.5357346", "0.5354955", "0.5351934", "0.53259814", "0.5325242", "0.5322434", "0.5305232", "0.52937424", "0.52910167", "0.52801985", "0.5266484", "0.52623886", "0.52594554", "0.52591115", "0.52445585", "0.5202804", "0.5191492", "0.51845163", "0.51797956", "0.5174094", "0.51721656", "0.5165779", "0.5165312", "0.5165311", "0.51640904", "0.5137208", "0.5131103", "0.5130735", "0.5124753", "0.5074673", "0.5073389", "0.50554657", "0.5052127", "0.5024119", "0.5024028", "0.50148743", "0.5014737", "0.50136757", "0.5011151", "0.50065386", "0.50065386", "0.50062895", "0.5004629", "0.4997581", "0.49932545", "0.49932545", "0.4992086", "0.498306", "0.49748102", "0.4974172", "0.4973612", "0.4969245", "0.4966107", "0.496535", "0.49626505", "0.49626222", "0.49625", "0.49589494", "0.4945596", "0.49365923", "0.49321026", "0.49190357", "0.491231", "0.49069804", "0.4899928", "0.48892307", "0.48828965", "0.48699397", "0.48632506" ]
0.54189825
23
Return classes that depends on this school.
List<StudentClass> findClassesBySchoolName(String schoolName) throws TechnicalException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Class<?>[] getCoClasses();", "Collection<String> getRequiredClasses( String id );", "@Override\n public Set<Class<?>> getClasses() {\n\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(CountryResource.class);\n resources.add(DepartmentResource.class);\n resources.add(JobResource.class);\n return resources;\n }", "@Override\n\tpublic List<Class> bestClass() {\n\t\treturn mainDao.bestClass();\n\t}", "@Override\n\tpublic String getClassName() {\n\t\treturn\tSchool.class.getName();\n\t}", "public List<IclassItem> getClasses() {\n if(projectData!=null){\n return projectData.getClasses();\n }\n return new ArrayList<IclassItem>();\n }", "@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepo.findAll();\n\t}", "@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepository.findAll();\n\t}", "public Collection getDescendantClasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "@NotNull\n List<? extends ClassInfo> getClasses();", "private Set<String> classSet(String whichClass) {\n return subclasses.get(whichClass);\n }", "public List<ClassId> getThirdClasses() {\n\t\tList<ClassId> classes = new ArrayList<>();\r\n\r\n\t\t/*\r\n\t\t * classes.add(ClassId.EVAS_SAINT); classes.add(ClassId.SHILLIEN_TEMPLAR);\r\n\t\t * classes.add(ClassId.SPECTRAL_DANCER); classes.add(ClassId.GHOST_HUNTER);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DREADNOUGHT); classes.add(ClassId.PHOENIX_KNIGHT);\r\n\t\t * classes.add(ClassId.HELL_KNIGHT);\r\n\t\t * \r\n\t\t * classes.add(ClassId.HIEROPHANT); classes.add(ClassId.EVAS_TEMPLAR);\r\n\t\t * classes.add(ClassId.SWORD_MUSE);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DOOMCRYER); classes.add(ClassId.FORTUNE_SEEKER);\r\n\t\t * classes.add(ClassId.MAESTRO);\r\n\t\t */\r\n\r\n\t\t// classes.add(ClassId.ARCANA_LORD);\r\n\t\t// classes.add(ClassId.ELEMENTAL_MASTER);\r\n\t\t// classes.add(ClassId.SPECTRAL_MASTER);\r\n\t\t// classes.add(ClassId.SHILLIEN_SAINT);\r\n\r\n\t\tclasses.add(ClassId.SAGGITARIUS);\r\n\t\tclasses.add(ClassId.ARCHMAGE);\r\n\t\tclasses.add(ClassId.SOULTAKER);\r\n\t\tclasses.add(ClassId.MYSTIC_MUSE);\r\n\t\tclasses.add(ClassId.STORM_SCREAMER);\r\n\t\tclasses.add(ClassId.MOONLIGHT_SENTINEL);\r\n\t\tclasses.add(ClassId.GHOST_SENTINEL);\r\n\t\tclasses.add(ClassId.ADVENTURER);\r\n\t\tclasses.add(ClassId.WIND_RIDER);\r\n\t\tclasses.add(ClassId.DOMINATOR);\r\n\t\tclasses.add(ClassId.TITAN);\r\n\t\tclasses.add(ClassId.CARDINAL);\r\n\t\tclasses.add(ClassId.DUELIST);\r\n\r\n\t\tclasses.add(ClassId.GRAND_KHAVATARI);\r\n\r\n\t\treturn classes;\r\n\t}", "public ClassDoc[] specifiedClasses() {\n // System.out.println(\"RootDoc.specifiedClasses() called.\");\n // return specClasses.values().toArray(new ClassDoc[0]);\n\n // index.html lists classes returned from specifiedClasses; return the\n // set of classes in specClasses that are\n // included as per access mod filter\n return classes();\n }", "public Collection getAncestorClasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "public ClassDoc[] classes() {\n // return specClasses.values().toArray(new ClassDoc[0]);\n\n // return the set of classes in specClasses that are \"included\"\n // according to the access modifier filter\n if (includedClasses != null) {\n // System.out.println(\"RootDoc.classes() called.\");\n return includedClasses;\n }\n int size = 0;\n Collection<X10ClassDoc> classes = specClasses.values();\n for (ClassDoc cd : classes) {\n if (cd.isIncluded()) {\n size++;\n }\n }\n includedClasses = new X10ClassDoc[size];\n int i = 0;\n for (X10ClassDoc cd : classes) {\n if (cd.isIncluded()) {\n includedClasses[i++] = cd;\n }\n }\n Comparator<X10ClassDoc> cmp = new Comparator<X10ClassDoc>() {\n public int compare(X10ClassDoc first, X10ClassDoc second) {\n return first.name().compareTo(second.name());\n }\n\n public boolean equals(Object other) {\n return false;\n }\n };\n Arrays.sort(includedClasses, cmp);\n // System.out.println(\"RootDoc.classes() called. result = \" +\n // Arrays.toString(includedClasses));\n return includedClasses;\n }", "public Collection getSubclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "Set<DependencyItem> getDependsOnMe(Class<?> type);", "public AssignmentClasses[] getClasses()\n\t{\n\t\treturn classes;\n\t}", "public SortedSet<ClassificationPair> getClassifications() {\n\t\treturn this.classifications;\n\t}", "public List<? extends BaseClassInfo> getClasses(HasMetricsFilter filter) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n List<BaseClassInfo> result = newArrayList();\n for (BaseClassInfo classInfo : classLookup.values()) {\n if (filter.accept(classInfo)) {\n result.add(classInfo);\n }\n }\n return result;\n }", "@Override\n public Set<Class<?>> getClasses() {\n HashSet h = new HashSet<Class<?>>();\n h.add(AffirmationService.class );\n return h;\n }", "private String[] getReferencedJavaClasses() {\n\t\tclass ClassNameVisitor extends JVisitor {\n\t\t\tList<String> classNames = new ArrayList<String>();\n\n\t\t\t@Override\n\t\t\tpublic boolean visit(JClassType x, Context ctx) {\n\t\t\t\tclassNames.add(x.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tClassNameVisitor v = new ClassNameVisitor();\n\t\tv.accept(jprogram);\n\t\treturn v.classNames.toArray(new String[v.classNames.size()]);\n\t}", "List<StudentClass> findClassesBySchoolId(int id) throws TechnicalException;", "public static ArrayList<Class> getClassesFromStudent(Student s)\n\t{\n\t\tint studentId = s.getUserId();\n\t\tString sql = \"SELECT c.classcode, c.classname, i.* FROM UserInfo i, ClassMember cm, Class c \"\n\t\t\t\t+ \"WHERE cm.studentID = ? \"\n\t\t\t\t+ \"AND cm.classcode = c.classcode AND c.instructorID = i.userID\";\n\t\tArrayList<Class> classes = new ArrayList<Class>();\n\t\ttry(Connection conn = DriverManager.getConnection(db, user, pwd);\n\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);)\n\t\t{\n\t\t\tps.setInt(1, studentId);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tString className = rs.getString(\"classname\");\n\t\t\t\tString classCode = rs.getString(\"classcode\");\n\t\t\t\tString name = rs.getString(\"firstname\") + \" \" + rs.getString(\"lastname\");\n\t\t\t\tString email = rs.getString(\"email\");\n\t\t\t\tint userId = rs.getInt(\"userID\");\n\t\t\t\tInstructor i = new Instructor(name, email, userId);\n\t\t\t\tClass c = new Class(i, className, classCode);\n\t\t\t\tclasses.add(c);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn classes;\n\t}", "Set<DependencyItem> getIDependOn(Class<?> type);", "final Class<?>[] classes() {\n if (classes instanceof Class[]) {\n return (Class[]) classes;\n } else {\n return new Class[] { (Class) classes };\n }\n }", "private ArrayList<Class<Critter>> getCritterClasses(Package pkg) {\n\t\tArrayList<Class<Critter>> classes = new ArrayList<Class<Critter>>();\n\t\tString packagename = pkg.getName();\n\t\tURL resource = ClassLoader.getSystemClassLoader().getResource(packagename);\n\t\tString path = resource.getFile(); //path to package\n\t\tFile directory;\n\t\ttry {\n\t\t\tdirectory = new File(resource.toURI());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t\tif (directory.exists()) {\n\t\t\tString[] files = directory.list();\n\t\t\tfor (String file : files) {\n\t\t\t\tif (file.endsWith(\".class\")) {\n\t\t\t\t\t// removes the .class extension\n\t\t\t\t\tString className = packagename + '.' + file.substring(0, file.length() - 6);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass classObj = Class.forName(className);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tObject obj = classObj.newInstance();\n\t\t\t\t\t\t\tif (obj instanceof Critter) {\n\t\t\t\t\t\t\t\tclasses.add(classObj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcontinue; //Skip if class cannot be made into object\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "public abstract List<Dependency> selectDependencies( Class<?> clazz );", "@Override\r\n\tpublic List<Classified> getAllClassified() {\n\t\treturn null;\r\n\t}", "public String getClasses() {\n String classesString = \"\";\n\n for (String className : classes) {\n classesString += (className + \"\\n\");\n }\n\n return classesString;\n }", "public List<Models.Class> showClasses() {\n // Get from all levels\n List<Models.Class> results = em.createNativeQuery(\"select c.* from class c, classparticipant cpa, participant p where c.classid = cpa.classid and cpa.participantid = p.participantid and p.userid = ?\", Models.Class.class).setParameter(1, user.getUserid()).getResultList();\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" classes were found.\");\n\n for (Models.Class classroom : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Class?id=\" + classroom.getClassid() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>CLASS</a>\\n\"\n + \" <a class='name'>\" + classroom.getClasstitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + classroom.getClassid() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n return results;\n }", "@OneToMany(mappedBy=\"classRoom\")\n @OrderBy(\"className ASC\")\n public Collection<Class> getClasses() {\n return classes;\n }", "public Collection getSuperclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "public List<String> getHierarchicalClass() {\r\n \t\treturn hierarchicalClass;\r\n \t}", "public List<Class<?>> getKnownClasses();", "Integer[] getClasses() {\n\t\tArrayList<Integer> uniqueClasses = new ArrayList<Integer>();\n\t\tfor(ClassInfo c : preferences) {\n\t\t\tif (uniqueClasses.contains(c.getCourseID()) == false){\n\t\t\t\tuniqueClasses.add(c.getCourseID());\n\t\t\t}\n\t\t}\n\t\treturn uniqueClasses.toArray(new Integer[0]);\n\t}", "private static Collection<EClass> getAllClasses(String model)\n {\n Collection<EClass> result;\n if (Constants.SYSML_EXTENSION.equals(model.toLowerCase()))\n {\n result = new LinkedList<EClass>(SysMLPackage.Literals.REQUIREMENT.getEAllSuperTypes());\n result.add(SysMLPackage.Literals.REQUIREMENT);\n }\n else\n {\n result = new LinkedList<EClass>(UMLPackage.Literals.CLASS.getEAllSuperTypes());\n result.add(UMLPackage.Literals.CLASS);\n }\n\n return result;\n }", "public ClassInfo[] getClasses() {\r\n return classes.toArray(new ClassInfo[classes.size()]);\r\n }", "java.util.List<org.landxml.schema.landXML11.ClassificationDocument.Classification> getClassificationList();", "public List<String> getClassesList() {\n\t\tCursor c = theDb.rawQuery(\"SELECT * \" +\n\t\t\t\t\t\t\t\t \"FROM \" + DbContract.Classes.TABLE_NAME, null);\n\t\t\n\t\t//Read cursor into an ArrayList\n\t\tList<String> classesList = new ArrayList<String>();\n\t\tclassesList.add( context.getString(R.string.all_classes) );\t\t\t//Add \"All classes\"\n\t\t\n\t\twhile (c.moveToNext()) {\n\t\t\tclassesList.add( c.getString( c.getColumnIndex(DbContract.Classes.ATTRIBUTE_NAME)));\n\t\t}\n\t\t\n\t\treturn classesList;\n\t}", "Set<Class<?>> getClassSetBySuperClass(String packageName, Class<?> superClass);", "public Collection getEquivalentClasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "private void buildReferencedClassSet() throws CheckedAnalysisException, InterruptedException {\n\n if (PROGRESS) {\n System.out.println(\"Adding referenced classes\");\n }\n Set<String> referencedPackageSet = new HashSet<String>();\n\n LinkedList<ClassDescriptor> workList = new LinkedList<ClassDescriptor>();\n workList.addAll(appClassList);\n\n Set<ClassDescriptor> seen = new HashSet<ClassDescriptor>();\n Set<ClassDescriptor> appClassSet = new HashSet<ClassDescriptor>(appClassList);\n\n Set<ClassDescriptor> badAppClassSet = new HashSet<ClassDescriptor>();\n HashSet<ClassDescriptor> knownDescriptors = new HashSet<ClassDescriptor>(DescriptorFactory.instance()\n .getAllClassDescriptors());\n int count = 0;\n Set<ClassDescriptor> addedToWorkList = new HashSet<ClassDescriptor>(appClassList);\n\n // add fields\n //noinspection ConstantIfStatement\n if (false)\n for (ClassDescriptor classDesc : appClassList) {\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n for (XField f : classNameAndInfo.getXFields()) {\n String sig = f.getSignature();\n ClassDescriptor d = DescriptorFactory.createClassDescriptorFromFieldSignature(sig);\n if (d != null && addedToWorkList.add(d))\n workList.addLast(d);\n }\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n\n while (!workList.isEmpty()) {\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n ClassDescriptor classDesc = workList.removeFirst();\n\n if (seen.contains(classDesc)) {\n continue;\n }\n seen.add(classDesc);\n\n if (!knownDescriptors.contains(classDesc)) {\n count++;\n if (PROGRESS && count % 5000 == 0) {\n System.out.println(\"Adding referenced class \" + classDesc);\n }\n }\n\n referencedPackageSet.add(classDesc.getPackageName());\n\n // Get list of referenced classes and add them to set.\n // Add superclasses and superinterfaces to worklist.\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n\n ClassDescriptor superclassDescriptor = classNameAndInfo.getSuperclassDescriptor();\n if (superclassDescriptor != null && addedToWorkList.add(superclassDescriptor)) {\n workList.addLast(superclassDescriptor);\n }\n\n for (ClassDescriptor ifaceDesc : classNameAndInfo.getInterfaceDescriptorList()) {\n if (addedToWorkList.add(ifaceDesc))\n workList.addLast(ifaceDesc);\n }\n\n ClassDescriptor enclosingClass = classNameAndInfo.getImmediateEnclosingClass();\n if (enclosingClass != null && addedToWorkList.add(enclosingClass))\n workList.addLast(enclosingClass);\n\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (CheckedAnalysisException e) {\n // Failed to scan a referenced class --- just log the error and\n // continue\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n // Delete any application classes that could not be read\n appClassList.removeAll(badAppClassSet);\n DescriptorFactory.instance().purge(badAppClassSet);\n\n for (ClassDescriptor d : DescriptorFactory.instance().getAllClassDescriptors()) {\n referencedPackageSet.add(d.getPackageName());\n }\n referencedClassSet = new ArrayList<ClassDescriptor>(DescriptorFactory.instance().getAllClassDescriptors());\n\n // Based on referenced packages, add any resolvable package-info classes\n // to the set of referenced classes.\n if (PROGRESS) {\n referencedPackageSet.remove(\"\");\n System.out.println(\"Added \" + count + \" referenced classes\");\n System.out.println(\"Total of \" + referencedPackageSet.size() + \" packages\");\n for (ClassDescriptor d : referencedClassSet)\n System.out.println(\" \" + d);\n\n }\n\n }", "List<Class<?>> getManagedClasses();", "public int getClasses(){\r\n\t\treturn this.classes;\r\n\t}", "public HashMap<Integer,Category_components> get_classes(){\n return game_classes;\n }", "public List<BaseClass> baseClasses() {\r\n\t\treturn this.baseClasses;\r\n\t}", "public List<String> getClassList() {\n return classlist;\n }", "public ArrayList<OWLClass> getClasses(OWLOntology ontology){\n\t\t\n\t\tArrayList<OWLClass> classes = new ArrayList<OWLClass>();\n\t\tfor (OWLClass cls : ontology.getClassesInSignature())\n\t\t\tclasses.add(cls);\n\t\treturn classes;\n\t}", "Set<Concept> getSubclasses(Concept concept);", "@NotNull\n List<PriorityClass> getAllPriorityClasses();", "@NotNull\n List<? extends ClassInfo> getAllClasses();", "@ApiModelProperty(example = \"null\", value = \"Set of possible classes identified by the classifier\")\n public java.util.List<VbClass> getClasses() {\n return classes;\n }", "public List<BotClassification> getClassifications() {\n return classifications;\n }", "public Set< UseCase > useCaseDependencies() {\r\n\t\tSet< UseCase > useCases = new LinkedHashSet< UseCase >();\r\n\t\tList< Step > steps = getSteps();\r\n\t\tfor ( Step s : steps ) {\r\n\t\t\tif ( ! s.kind().equals( StepKind.USE_CASE_CALL ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tUseCaseCallStep uccs = (UseCaseCallStep) s;\r\n\t\t\tuseCases.add( uccs.getUseCase() ); // Add the use case (if not already exists)\r\n\t\t}\r\n\t\treturn useCases;\r\n\t}", "@Transient\r\n\tpublic Class<?> getClassType() {\r\n\t\treturn TeamStudent.class;\r\n\t}", "public List getParents()\n {\n \tList result = new ArrayList();\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n\n \tif (instance != null)\n \t{\n \t if (instance.isRepresentative(this.refMofId())&&\n \t instance.hasRefObject(this.refMofId()))\n \t {\n \t if (getGeneralization().isEmpty() && !(this instanceof Interface) && !(this instanceof Enumeration))\n \t {\n \t \tresult.add(OclLibraryHelper.getInstance(this).\n \t\t\t\t\t\t\t\t\t\t\tgetAny());\n \t return result;\n \t \t }\n \t } \t \n \t \n\t \tif (equals(OclLibraryHelper.getInstance(this).getVoid()))\n\t \t{\n\t \t\tModel topPackage = ModelHelper.\n\t \t\t\t\t\t\t \t\tgetInstance(\n\t \t\t\t\t\t\t \t\t\t\t(Uml15Package) this.refOutermostPackage()).\n\t \t\t\t\t\t\t \t\t\t\t\t\tgetTopPackage();\n\t \t\tresult.addAll(((NamespaceImpl)topPackage).getAllClassesWithoutSpez());\n\t \t\treturn result;\n\t \t}\n \t} \n \tIterator it = getGeneralization().iterator();\n\n \twhile(it.hasNext())\n \t{\n \t Generalization g = (Generalization)it.next(); \n \t result.add(g.getParent());\n \t}\n \treturn result;\n }", "private void computeCoreCrown() {\n\t\tSet<Class> core = new HashSet<Class>();\n\t\tSet<Class> crown = new HashSet<Class>();\n\n\t\tfor (Class c : this.model.getClasses()) {\n\t\t\tif (c.getSuperClasses().size() > 1) {\n\t\t\t\tcore.add(c);\n\t\t\t\tbuildCoreRecursively(c, core);\n\t\t\t}\n\t\t\tif (c.getSuperClasses().size() <= 1) {\n\t\t\t\tboolean allSubClassesSimpleInheritance = true;\n\t\t\t\tfor (Class s : c.getSubClasses()) {\n\t\t\t\t\tif (s.getSuperClasses().size() > 1) {\n\t\t\t\t\t\tallSubClassesSimpleInheritance = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (allSubClassesSimpleInheritance) {\n\t\t\t\t\tcrown.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.core = new ArrayList<Class>(core);\n\t\tCollections.sort(this.core);\n\n\t\tthis.crown = new ArrayList<Class>(crown);\n\t\tCollections.sort(this.crown);\n\t}", "private void restrictClasses() {\n\t\tSet<String> classes = classMap.keySet();\n\t\tSet<String> intersect;\n\t\tfor (String s : disjointsInfo.keySet()) {\n\t\t\tintersect = disjointsInfo.get(s);\n\t\t\tintersect.retainAll(classes);\n\t\t\tdisjointsInfo.put(s, intersect);\n\t\t}\n\t\tfor (String s : supersInfo.keySet()) {\n\t\t\tintersect = supersInfo.get(s);\n\t\t\tintersect.retainAll(classes);\n\t\t\tsupersInfo.put(s, intersect);\n\t\t}\n\t}", "Set<Class<?>> getClassSet(String packageName);", "HashMap<String, Set<URI>> getExternalSuperClasses();", "List<CabinClassModel> findCabinClasses();", "public static ArrayList<Class> getClassesFromInstructor(Instructor i)\n\t{\n\t\tint instructorId = i.getUserId();\n\t\tString sql = \"SELECT c.* FROM UserInfo i, Class c WHERE c.instructorID = ? AND i.userID = ?\";\n\t\tArrayList<Class> classes = new ArrayList<Class>();\n\t\ttry(Connection conn = DriverManager.getConnection(db, user, pwd);\n\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);)\n\t\t{\n\t\t\tps.setInt(1, instructorId);\n\t\t\tps.setInt(2, instructorId);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tString name = rs.getString(\"classname\");\n\t\t\t\tString classcode = rs.getString(\"classcode\");\n\t\t\t\tClass c = new Class(i, name, classcode);\n\t\t\t\tclasses.add(c);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn classes;\n\t}", "public static ArrayList<Classification> getAllClassifications() {\n\t\tString path = ALL_CLASSIF;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\treturn getClassifications(response);\n\t}", "public List<Classs> getClasss(String lessonId) {\n\t\treturn cla.getClasss(lessonId);\n\t}", "public static Set<Classification> getClassifications() throws Exception {\r\n String xmlRequest = \"<request><request-header><protocol-version>2</protocol-version></request-header></request>\";\r\n try {\r\n String responseXML = FSHelperLibrary.sendRequest(null, RequestType.RT_GET_CLASSIFICATIONS, xmlRequest);\r\n LoggerUtil.logDebug(\"Get Classificatios Response XML: \" + responseXML);\r\n\r\n Node rootNode = XMLUtil.getRootNode(responseXML);\r\n Node requestStatusNode = XMLUtil.parseNode(\"request-status\", rootNode);\r\n String returnValue = XMLUtil.parseString(\"return-value\", requestStatusNode);\r\n\r\n if (!\"1\".equals(returnValue)) {\r\n LoggerUtil.logError(\"Get Classificatios Response XML: \" + responseXML);\r\n String errorMsg = XMLUtil.parseString(\"error-message\", requestStatusNode);\r\n String dispMsg = XMLUtil.parseString(\"display-message\", requestStatusNode);\r\n if (dispMsg == null || dispMsg.trim().isEmpty()) {\r\n dispMsg = errorMsg;\r\n }\r\n throw new Exception(dispMsg);\r\n }\r\n\r\n NodeList lNodeList = XMLUtil.parseNodeList(\"classifications/classification\", rootNode);\r\n if (lNodeList != null && lNodeList.getLength() > 0) {\r\n Set<Classification> lClassifications = new LinkedHashSet<Classification>();\r\n for (int i = 0; i < lNodeList.getLength(); i++) {\r\n Node lNode = lNodeList.item(i);\r\n String lstrClassId = XMLUtil.parseString(\"id\", lNode);\r\n String lstrClassName = XMLUtil.parseString(\"name\", lNode);\r\n String lstrClassDesc = XMLUtil.parseString(\"description\", lNode);\r\n String lstrStatus = XMLUtil.parseString(\"status\", lNode);\r\n // Take only active classification\r\n if (\"1\".equals(lstrStatus)) {\r\n Classification lClassification = new Classification();\r\n lClassification.setId(lstrClassId);\r\n lClassification.setName(lstrClassName);\r\n lClassification.setDescription(lstrClassDesc);\r\n lClassifications.add(lClassification);\r\n }\r\n }\r\n XMLDBService.updateClassifications(lClassifications);\r\n return lClassifications;\r\n }\r\n } catch (FSHelperException e) {\r\n throw e;\r\n }\r\n return null;\r\n }", "public List<WjrClassItem> getClassItems() {\r\n return new ArrayList<WjrClassItem>(classItems.values());\r\n }", "west.twouse.language.sparqlas.Class getClass_();", "Class<?>[] getHandledClasses();", "public static ArrayList<Classification> getLastClassifications() {\n\t\tString path = LAST_CLASSIF;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\treturn getClassifications(response);\n\t}", "Object getClass_();", "Object getClass_();", "private Set<Class<?>> describeClassTree(Class<?> inputClass) {\r\n if (inputClass == null) {\r\n return Collections.emptySet();\r\n }\r\n\r\n // create result collector\r\n Set<Class<?>> classes = Sets.newLinkedHashSet();\r\n\r\n // describe tree\r\n describeClassTree(inputClass, classes);\r\n\r\n return classes;\r\n }", "@Override\n\tpublic List<Classes> findAllClasses() {\n\t\tString sql = \"select * from classes\";\n\t\tJdbcQuery querys = JdbcUtils.createNativeQuery(sql, Classes.class);\n\t\tList<Classes> classesList = (List<Classes>) querys.getResultList();\n\t\treturn classesList;\n\t}", "public Stream<Class<?>> getClasses(@NotNull String packageName) {\n return CheckedFunction2.of(ClassLoader::getResources).unchecked()\n .reversed()\n .apply(packageName.replace('.', '/'))\n .andThen(Enumeration::asIterator)\n .andThen(urlIterator -> spliteratorUnknownSize(urlIterator, ORDERED))\n .andThen(urlSpliterator -> stream(urlSpliterator, false))\n .compose(Thread::getContextClassLoader)\n .apply(Thread.currentThread())\n .map(URL::getFile)\n .map(File::new)\n .flatMap(directory -> findClasses(directory, packageName));\n }", "public String getClassification() {\n return classification;\n }", "public String getClassification() {\n return classification;\n }", "@Override\n public Set<Class<?>> getClasses() {\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(api.Auth.class);\n resources.add(api.UserApi.class);\n resources.add(api.TicketApi.class);\n resources.add(api.DepartmentApi.class);\n resources.add(api.MessageApi.class);\n resources.add(api.MilestoneApi.class);\n resources.add(api.InvitationApi.class);\n return resources;\n }", "@Override\n public List<Classroom> getClassesByKinderg(int id) {\n\t\t\t\t\tKinderGarten k = kindergartenRepo.findById(id).get();\n\t\t\t\t\tList<Classroom> c=k.getClassrooms();\n\t\t\t\t\treturn c;\n\t\t\n\t\t\t\t }", "@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName, Class<?> superClass) throws ClassNotFoundException, IOException\n {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements())\n {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n List<Class> classes = new ArrayList<Class>();\n for (File directory : dirs)\n {\n List<Class> foundClasses = findClasses(directory, packageName);\n for (Class foundClass : foundClasses)\n {\n if (superClass.isAssignableFrom(foundClass))\n {\n classes.add(foundClass);\n }\n }\n }\n\n return classes;\n }", "public Map<ClassName, List<ClassName>> dependenciesMap() { return m_dependenceisMap; }", "public Iterator<String> listDeclaredBelongingClasses(String instance)\r\n\t{\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tOntResource ontI = obtainOntResource(instance);\r\n\t\tStmtIterator si = ONT_MODEL.getRawModel().listStatements(ontI, RDF.type, (RDFNode)null);\r\n\t\twhile(si.hasNext())\r\n\t\t{\r\n\t\t\tStatement st = si.nextStatement();\r\n\t\t\tlist.add(st.getObject().toString());\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t\t\r\n\t}", "public Collection getAllAuxClasss();", "@Override\r\n\tpublic Class getClase() {\n\t\treturn null;\r\n\t}", "private static <T> Collection<Class<?>> getClassHierarchy(T instance) {\n Collection<Class<?>> hierarchy = new LinkedList<>();\n Class<?> clazz = (Class<?>) instance;\n while (clazz != null) {\n hierarchy.add(clazz);\n clazz = clazz.getSuperclass();\n }\n return hierarchy;\n }", "public DependencySatisfaction satisfied() {\n\t\treturn satisfied(new HashSet<String>(), new HashSet<String>());\n\t}", "public static synchronized Set getDescriptorClasses() {\n\tHashSet set = new HashSet();\n\n for (Enumeration e = registryModes.elements(); e.hasMoreElements();) {\n RegistryMode mode = (RegistryMode)e.nextElement();\n\n\t set.add(mode.descriptorClass);\n\t}\n\n\treturn set;\n }", "private List<Class<?>> getClasses(String packageName) throws Exception {\n File directory = null;\n try {\n ClassLoader cld = getClassLoader();\n URL resource = getResource(packageName, cld);\n directory = new File(resource.getFile());\n } catch (NullPointerException ex) {\n throw new ClassNotFoundException(packageName + \" (\" + directory\n + \") does not appear to be a valid package\");\n }\n return collectClasses(packageName, directory);\n }", "public String getClassification() {\n return classification;\n }", "public ArrayList<String> getClassesToClassify(Instance instanceSelected, InfModel infModel) {\n\t\tArrayList<String> listClassesMembersTmpWithoutRepeat = new ArrayList<String>();\r\n\t\tfor (DtoCompleteClass dto : instanceSelected.ListCompleteClasses) {\r\n\t\t\tfor (String clsComplete : dto.Members) {\r\n\t\t\t\tif(! listClassesMembersTmpWithoutRepeat.contains(clsComplete))\r\n\t\t\t\t{\r\n\t\t\t\t\tlistClassesMembersTmpWithoutRepeat.add(clsComplete);\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Remove disjoint subclasses from some super class\r\n\t\tArrayList<String> listClassesMembersTmp = new ArrayList<String>();\r\n\t\tfor (DtoCompleteClass dto : instanceSelected.ListCompleteClasses) \r\n\t\t{\r\n\t\t\tArrayList<String> listDisjoint = search.GetDisjointClassesOf(dto.CompleteClass, infModel);\r\n\t\t\tfor (String clc : listClassesMembersTmpWithoutRepeat) \r\n\t\t\t{\r\n\t\t\t\tif(! listDisjoint.contains(clc))\r\n\t\t\t\t{\r\n\t\t\t\t\tlistClassesMembersTmp.add(clc);\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\treturn listClassesMembersTmp;\r\n\t}", "List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }", "public List<String> classifiers()\n\t{\n\t\t//If the classifier list has not yet been constructed then go ahead and do it\n\t\tif (c.isEmpty())\n\t\t{\n\t\t\tfor(DataSetMember<t> member : _data)\n\t\t\t{\n\t\t\t\tif (!c.contains(member.getCategory()))\n\t\t\t\t\t\tc.add(member.getCategory().toString());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn c;\n\t}", "private List<Class> getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }", "public PsiClassBean getClassWithEagerTest() {\n return classWithSmell;\n }", "public Iterator<String> listAllClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\r\n\t}", "public List<com.platform.chorus.db.tables.pojos.ClassModel> fetchByScope(String... values) {\n return fetch(ClassModel.CLASS_MODEL.SCOPE, values);\n }", "public Map getStandardClasses() {\n return standardClasses;\n }", "public Set<String> getClassKeys();", "default ImmutableSet<Class<? extends ManagedService>> getDependencies()\n\t{\n\t\treturn Sets.immutable.empty();\n\t}", "public Iterator<String> listBelongingClasses(String instance)\r\n\t{\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tOntResource ontI = obtainOntResource(instance);\r\n\t\tStmtIterator si = ONT_MODEL.listStatements(ontI, RDF.type, (RDFNode)null);\r\n\t\twhile(si.hasNext())\r\n\t\t{\r\n\t\t\tStatement st = si.nextStatement();\r\n\t\t\tlist.add(st.getObject().toString());\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t\t\r\n\t}" ]
[ "0.6060191", "0.598552", "0.59010726", "0.5890378", "0.5885667", "0.58402807", "0.583086", "0.58273816", "0.57727635", "0.57258505", "0.57117236", "0.5621204", "0.5618497", "0.56175363", "0.55906534", "0.55726427", "0.55581355", "0.55184007", "0.5471335", "0.5451957", "0.54406726", "0.5431705", "0.54189825", "0.53899145", "0.5386824", "0.53755355", "0.53717846", "0.5370928", "0.5368373", "0.5366976", "0.53604764", "0.5357346", "0.5354955", "0.5351934", "0.53259814", "0.5325242", "0.5322434", "0.5305232", "0.52937424", "0.52910167", "0.52801985", "0.5266484", "0.52623886", "0.52594554", "0.52591115", "0.52445585", "0.5202804", "0.5191492", "0.51845163", "0.51797956", "0.5174094", "0.51721656", "0.5165779", "0.5165312", "0.5165311", "0.51640904", "0.5137208", "0.5131103", "0.5130735", "0.5124753", "0.5074673", "0.5073389", "0.50554657", "0.5052127", "0.5024119", "0.5024028", "0.50148743", "0.5014737", "0.50136757", "0.5011151", "0.50065386", "0.50065386", "0.50062895", "0.5004629", "0.4997581", "0.49932545", "0.49932545", "0.4992086", "0.498306", "0.49748102", "0.4974172", "0.4973612", "0.4969245", "0.4966107", "0.496535", "0.49626505", "0.49626222", "0.49625", "0.49589494", "0.4945596", "0.49365923", "0.49321026", "0.49190357", "0.491231", "0.49069804", "0.4899928", "0.48892307", "0.48828965", "0.48699397", "0.48632506" ]
0.5501738
18
Return the school found for this id.
School findSchoolById(int id) throws TechnicalException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public School getSchool() {\r\n\t\treturn this.school;\r\n\t}", "public String getCourseIdSchool() {\n return courseIdSchool;\n }", "public Long getSchoolId() {\n return schoolId;\n }", "@Override\n\tpublic Map<String, Object> getSchool() {\n\t\treturn getSession().selectOne(getNamespace() + \"getSchool\");\n\t}", "public ArrayList<String> getSchool() {\r\n\t\treturn school;\r\n\t}", "@RequestMapping(value = \"/schools/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<School> getSchool(@PathVariable Long id) {\n log.debug(\"REST request to get School : {}\", id);\n School school = schoolService.findOne(id);\n return Optional.ofNullable(school)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "public Long getSchoolid() {\n return schoolid;\n }", "School findSchoolByName(String schoolName) throws TechnicalException;", "java.lang.String getSchoolName();", "public String getSchoolName() {\n\t\treturn schoolName;\n\t}", "public java.lang.String getStudent_schoolName() {\n\t\treturn _primarySchoolStudent.getStudent_schoolName();\n\t}", "public void setSchool(String s) {\n this.school = s;\n }", "WordSchool selectByPrimaryKey(Long id);", "public String getSchool(){\n return info;\n }", "public java.lang.String getSchoolName() {\n java.lang.Object ref = schoolName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n schoolName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public University viewSchool(String school)\n {\n\t this.addBrowseHistory(school);\n\n\t return this.userCtrl.viewSchool(school);\n }", "@Test\n\tpublic void testGetSchoolByID(){\n\t\t\n\t List<School> list=schoolService.getSchoolbyId(2);\n\t\t\tfor(int i=0;i<list.size();i++){\n\t\t\t\tSchool s=(School) list.get(i);\n\t\t\t\tSystem.out.println(\"id: \"+s.getSchId());\n\t\t\t\tSystem.out.println(\"name: \"+s.getSchName());\n\t\t\t\tSystem.out.println(\"zip: \"+s.getSchZip());\n\t\t\t\tSystem.out.println(\"state: \"+s.getSchState());\n\t\t\t}\n\t}", "public java.lang.String getSchoolName() {\n java.lang.Object ref = schoolName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n schoolName_ = s;\n return s;\n }\n }", "public void setSchoolId(Long schoolId) {\n this.schoolId = schoolId;\n }", "@Override\n\tpublic List<Campus> findByschoolId(long schoolId) {\n\t\treturn findByschoolId(schoolId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,\n\t\t\tnull);\n\t}", "@Override\n\tpublic Campus fetchByschoolId_First(long schoolId,\n\t\tOrderByComparator<Campus> orderByComparator) {\n\t\tList<Campus> list = findByschoolId(schoolId, 0, 1, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "public void setSchoolid(Long schoolid) {\n this.schoolid = schoolid;\n }", "@RequestMapping(value = \"/schools/district/{schoolDistrictId}\", method = RequestMethod.GET)\n public List<School> listBySchoolDistrictId(@PathVariable int schoolDistrictId) {\n SchoolDistrict schoolDistrict = schoolDistrictRepository.getOne(schoolDistrictId);\n List<School> schoolList = schoolRepository.findSchoolsBySchoolDistrict(schoolDistrict);\n return schoolList;\n }", "public Campus fetchByschoolId_First(long schoolId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Campus> orderByComparator);", "SchoolSubject findSchoolSubjectById(Integer id) throws DaoException;", "public Student searchStudent(String id) {\n\t\tfor (String key : list.keySet()) {\n\t\t\tif(id.equals(key))\n\t\t\t\treturn list.get(key);\n\t\t}\n\t\treturn null;\n\t}", "public void setCourseIdSchool(String courseIdSchool) {\n this.courseIdSchool = courseIdSchool;\n }", "public Student getStudent(int id) {\n\t\tlog.info(\"Get Student ID = \" + id);\n\t\tList<?> students = query_getStudent.execute(id);\n\t\tif (students.size() == 1) {\n\t\t\tStudent s = (Student) students.get(0);\n\t\t\tlog.debug(\"Returning Student \\\"\" + s.getFirstname() + \" \"\n\t\t\t\t\t+ s.getLastname() + \"\\\"\");\n\t\t\treturn s;\n\t\t} else {\n\t\t\tlog.debug(\"No Student data\");\n\t\t\treturn null;\n\t\t}\n\t}", "public com.google.protobuf.ByteString\n getSchoolNameBytes() {\n java.lang.Object ref = schoolName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n schoolName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void selectSchoolFromList(String schoolId) {\n\t\tcommon.waitForElement(selectSchoolTable, 60);\n\t\tshcoolIdList = selectSchoolTable.findElements(By.className(\"Cell\"));\n\t\tWebElement selectedSchoolId = null;\n\t\tfor (WebElement id : shcoolIdList) {\n\t\t\tWebElement staticText = id.findElement(By.className(\"StaticText\"));\n\t\t\tif (staticText.getText().equals(schoolId)) {\n\t\t\t\tselectedSchoolId = id;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\tselectedSchoolId.click();\n\t}", "private Course findCourseByName(String id) {\n for (Course course : mySchool.courses) {\n if (course.courseName.equals(id)) {\n return course;\n }\n }\n return null;\n }", "@Override\n\tpublic Student selectId(int id) {\n\t\tString sql=\"SELECT a.id,a.num,a.name,a.email,a.phone,a.degree,a.project,a.school,b.name,a.is_cap from tc_student as a,tc_school as b where a.school=b.id and a.id=\"+id;\n\t\tResultSet rs=mysql.query(sql);\n\t\tStudent stu=new Student();\n\t\ttry {\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tstu.setId(rs.getInt(1));\n\t\t\t\tstu.setNum(rs.getString(2));\n\t\t\t\tstu.setName(rs.getString(3));\n\t\t\t\tstu.setEmail(rs.getString(4));\n\t\t\t\tstu.setPhone(rs.getString(5));\n\t\t\t\tstu.setDegree(rs.getShort(6));\n\t\t\t\tstu.setProject(rs.getInt(7));\n\t\t\t\tstu.setSchool(rs.getInt(8));\n\t\t\t\tstu.setSchoolstring(rs.getString(9));\n\t\t\t\tstu.setIs_cap(rs.getInt(10));\n\t\t\t\tstu.setDegreestring(degreemap[stu.getDegree()]);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn stu;\n\t}", "public com.google.protobuf.ByteString\n getSchoolNameBytes() {\n java.lang.Object ref = schoolName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n schoolName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\r\n\tpublic Student getById(int id) {\n\t\treturn sdao.getStudentById(id);\r\n\t}", "SchoolMasterVo getSchoolMasterDetail(int id);", "public static void printSchoolName(){\n System.out.println(\"School name is \"+school);\n }", "public ArrayList getSchools();", "public String getSchoolName() {\r\n return tfSchoolName.getText().trim();\r\n }", "List<StudentClass> findClassesBySchoolId(int id) throws TechnicalException;", "public static ArrayList<String> retrieveStudentInfo(ArrayList<Student> al,String schoolName) {\n \tArrayList<String> str=new ArrayList<String>();\n \tfor(int i=0;i<al.size();i++){\n \tStudent s=al.get(i);\n \tif(s.getSchoolName().equalsIgnoreCase(schoolName)){\n \t str.add(s.getStudName());\n \t}\n }\n \treturn str;\n }", "public static SchoolCourse schoolCourseSelection() {\n Scanner input = new Scanner(System.in);\n printListOfSchoolCourses();\n int choice = validateInputArrayList(input.nextInt(), listOfSchoolCourses);\n return listOfSchoolCourses.get(choice - 1);\n\n }", "public Researcher getResearcherByID(int id);", "public Student getById(int id) {\r\n\r\n\t\treturn studentMapper.selectByPrimaryKey(id);\r\n\t}", "@GetMapping(\"/schools\")\n public List<School> list() {\n List<School> schoolList = schoolRepository.findAll();\n return schoolList;\n }", "public java.lang.String getStudent_schoolYear() {\n\t\treturn _primarySchoolStudent.getStudent_schoolYear();\n\t}", "public ArrayList<String> viewSavedSchoolDetails(String school) {\n\t\tthis.sfCon.viewSavedSchoolDetails(school);\n\t\treturn this.sfCon.viewSavedSchoolDetails(school);\n\t}", "public student getstudent(Integer id);", "@Override\n\tpublic String getClassName() {\n\t\treturn\tSchool.class.getName();\n\t}", "public com.fsoft.bn.model.PrimarySchoolStudent getPrimarySchoolStudent(\n\t\tjava.lang.String primaryStudent_id)\n\t\tthrows com.liferay.portal.kernel.exception.PortalException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException {\n\t\treturn _primarySchoolStudentLocalService.getPrimarySchoolStudent(primaryStudent_id);\n\t}", "public Student find(int id) {\n\n\t\tfor (int i = 0; i < studentList.size(); i++) {\n\t\t\tif (studentList.get(i).getId() == id) {\n\t\t\t\treturn studentList.get(i);\n\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\n\t}", "@Override\r\n\tpublic Student getStudentById(Long id) {\n\t\treturn studentRepository.findById(id).get();\r\n\t}", "public ArrayList<UserSavedSchool> saveSchool(String school) {\n\t\tthis.sfCon.setAccount(this.UFCon.getAccount());\n\t\tthis.sfCon.saveSchool(school);\n\t\treturn sfCon.viewSavedSchools();\n\t}", "private Student getStudentByID(String sid) {\n\t\tfor(Student student: students) {\r\n\t\t\t//no need to check for null as Array list is dynamic and \r\n\t\t\tif(student.getStudentId().equals(sid)) {\r\n\t\t\t\treturn student;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return null if sid was not found\r\n\t\treturn null;\r\n\t}", "public static School load(String schoolname, Connection con) throws ServletException{\n try {\n System.out.println(schoolname);\n PreparedStatement ps = con.prepareStatement(\"SELECT * FROM schools WHERE schoolname=?;\");\n ps.setString(1, schoolname);\n ResultSet rs = ps.executeQuery();\n rs.next();\n return new School(rs.getString(\"schoolname\"),rs.getString(\"location\"),rs.getString(\"websiteaddress\"));\n } catch (Exception ex) {\n throw new ServletException(\"Could not load School\"); \n }\n }", "Student get(long id);", "public void setSchool(ArrayList<String> school) {\r\n\t\tthis.school = school;\r\n\t}", "public Student getById(int id) {\n\t\tResultSet rs = null;\n\t\t\n\t\tString sql = String.format(\"select * from student where id = %s\", id);\n\t\ttry {\n\t\t\trs = myDB.execSQLQuery(sql);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint aPosition = 0;\n\t\tStudent aStudent = getAStudentFromRS(rs, aPosition);\n\t\treturn aStudent;\n\t}", "public Student findStudent(int id);", "public java.lang.String getPrimaryKey() {\n\t\treturn _primarySchoolStudent.getPrimaryKey();\n\t}", "@GetMapping(\"/school-years/{id}\")\n @Timed\n public ResponseEntity<SchoolYearDTO> getSchoolYear(@PathVariable Long id) {\n log.debug(\"REST request to get SchoolYear : {}\", id);\n SchoolYearDTO schoolYearDTO = schoolYearService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(schoolYearDTO));\n }", "public void setSchool(College school) {\n this.put(\"school\", school.getName());\n }", "private static String searchStudent ( int studentId){\n for (Student s : studentDB) {\n if (s.getID() == studentId) {\n return s.getName();\n }\n }\n return \"\";\n }", "@Override\n\tpublic Student getStudent(int id) {\n\t\treturn null;\n\t}", "public void setSchoolName(String schoolName) {\n\t\tthis.schoolName = schoolName;\n\t}", "public void selectInstitute(String school, String school_id) {\n\t\tcommon.waitFor(1000);\n\t\tselectSchoolTextField.click();\n\t\tselectSchoolTextField.sendKeys(school);\n\t\tselectSchoolFromList(school_id);\n\t\t// 1st from dropdown\n\t\tclickNextButton.click(); // next button\n\t\tcommon.waitForElement(hideKeyboard);\n\t\thideKeyboard.click();\n\t\tcommon.waitForElement(checkLogin.loginPageText, 60);\n\t}", "@Override\n\tpublic Student getStudent(int id) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// get and return Student\n\t\tStudent student = currentSession.get(Student.class, id);\n\t\treturn student;\n\t}", "public Student searchForStudent(int ID)\r\n {\r\n boolean found = false;\r\n Student student = null;\r\n Node currentNode = first_node;\r\n\r\n while(!found && currentNode != null)\r\n {\r\n if(currentNode.getData().getStudent_ID() == ID)\r\n {\r\n found = true;\r\n student = currentNode.getData();\r\n }\r\n else\r\n {\r\n currentNode = currentNode.getNextNode();\r\n }\r\n }\r\n return student;\r\n }", "public Student getStudent(final int matrnr) {\n return students.get(matrnr);\n }", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "public Campus findByschoolId_First(long schoolId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Campus> orderByComparator)\n\t\tthrows NoSuchCampusException;", "@SuppressWarnings(\"rawtypes\")\n\tpublic Census getById(String id) {\n\t\t\n\t\topen();\n\t\ttry\n\t\t{\n\t\t\tCensus census=new Census();\n\t\t\tcensus.setId(id);\n\t\t\tObjectSet result=DB.queryByExample(census);\n\t\t\t\n\t\t\tif(result.hasNext())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]\");\n\t\t\t\treturn (Census) result.next();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]ERROR:Census does not exist\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"[DB4O]ERROR:Census could not be retrieved\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\treturn null;\n\t\t\n\t\t\n\t\t\n\t}", "ProSchoolWare selectByPrimaryKey(String id);", "public Integer getSchId() {\n\t\treturn schId;\n\t}", "public Student getStudentById(int id){\n String whereClause=\"id=?\";\n String[] whereArgs={String.valueOf(id)};\n SQLiteDatabase st=getReadableDatabase();\n Cursor rs=st.query(\"student\",null,whereClause,\n whereArgs,null,null,null);\n if(rs.moveToNext()){\n String n=rs.getString(1);\n boolean g=rs.getInt(2)==1;\n double m=rs.getDouble(3);\n return new Student(id,n,g,m);\n }\n return null;\n }", "com.google.protobuf.ByteString\n getSchoolNameBytes();", "public ArrayList<University> findRecommended(String schoolToCompare) {\n\t\tArrayList<University> closeMatch = sfCon.rankUniversity(schoolToCompare);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(closeMatch.get(i).getName());\n\t\t}\n\n\t\treturn closeMatch;\n\t}", "public static List<SchoolModel> getSchoolData(Activity context) {\n Cursor cursor;\n cursor = context.getContentResolver().query(SchoolTable.URI, null, null, null, null);\n List<SchoolModel> schoolDataList = new ArrayList<>();\n if (cursor != null && !cursor.isClosed()) {\n while (cursor.moveToNext()) {\n schoolDataList.add(fetchSchoolDataFromCursor(cursor));\n }\n cursor.close();\n }\n\n return schoolDataList;\n }", "Student findById(String id);", "Student getStudentById(Long id);", "public ArrayList<UserSavedSchool> viewSavedSchools() {\n\t\tthis.sfCon.viewSavedSchools();\n\t\tsuper.UFCon = UFCon;\n\t\treturn this.sfCon.viewSavedSchools();\n\t}", "public void addSchool(School school) {\n\n\t}", "public Builder setSchoolName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n schoolName_ = value;\n onChanged();\n return this;\n }", "public java.lang.String getStudent_name() {\n\t\treturn _primarySchoolStudent.getStudent_name();\n\t}", "public java.lang.String getPrimaryStudent_id() {\n\t\treturn _primarySchoolStudent.getPrimaryStudent_id();\n\t}", "public String toString(){\n return \"Name: \" +name+\", School Name: \"+school;\n }", "public Individual getIndividual(int id){\n for(Individual individual : individuals){\n if(individual.getId() == id){\n return individual;\n }\n }\n return null;\n }", "private List<School> querySchools(final Connection connection) {\n List<Integer> schools = new ArrayList<>();\n try {\n Statement st = connection.createStatement();\n ResultSet rs = st.executeQuery(allSchoolsQuery);\n while (rs.next()) {\n schools.add(rs.getInt(1));\n }\n rs.close();\n st.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n List<School> result = new ArrayList<>();\n\n for (Integer schoolId : schools) {\n List<Integer> students = new ArrayList<>();\n String query = schoolsStudentsQuery.replace(SCHOOL_ID_SQL_TAG, schoolId.toString());\n\n try {\n Statement st = connection.createStatement();\n ResultSet rs = st.executeQuery(query);\n while (rs.next()) {\n students.add(rs.getInt(1));\n }\n rs.close();\n st.close();\n } catch (Exception e) {\n e.printStackTrace();\n continue;\n }\n\n result.add(new School(schoolId, students));\n }\n\n return result;\n }", "public Employee getStudentOnId(int id);", "@Override\n\tpublic StudentInfo getStudentInfo(String id) {\n\t\treturn userMapper.getStudentInfo(id);\n\t}", "public static Teachers getTeacher(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next())\n teacher = new Teachers(set.getInt(\"teacher_id\"),\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"));\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }", "public Campus fetchByschoolId_Last(long schoolId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Campus> orderByComparator);", "public ArrayList<String> viewSchoolDetails(String universityName) {\n\t\tthis.sfCon.viewSchoolDetails(universityName);\n\t\treturn this.sfCon.viewSchoolDetails(universityName);\n\t}", "public Shelter findShelterByID(String ID) {\n if (ID != null) {\n return shelters.get(ID);\n }\n return null;\n }", "List<WordSchool> selectByExample(WordSchoolExample example);", "public String getScholarship(){\n\t\t\n\t\treturn this.scholarship;\n\t}", "public sust.paperlessexm.entity.Student getStudent(java.lang.Integer id) throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n Student bean = (Student) hibernateTemplate.get(Student.class, id);\n return bean;\n } finally {\n log.debug(\"finished getStudent(java.lang.Integer id)\");\n }\n }", "public List<UserComment> getSchoolComments(int school_id) {\n\t\treturn dao.getSchoolComments(school_id);\r\n\t}", "public ArrayList<String> compareSchoolsByScore() {\n\t\treturn sfCon.compareSchoolsByScore();\n\t}", "public District findDistrictById(String id);", "@Override\n\tpublic Campus fetchByschoolId_Last(long schoolId,\n\t\tOrderByComparator<Campus> orderByComparator) {\n\t\tint count = countByschoolId(schoolId);\n\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tList<Campus> list = findByschoolId(schoolId, count - 1, count,\n\t\t\t\torderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}" ]
[ "0.74383754", "0.7372842", "0.72696835", "0.7240147", "0.7015001", "0.70017046", "0.6983456", "0.69620466", "0.68844587", "0.683565", "0.6601629", "0.6403251", "0.6386376", "0.6335556", "0.62567896", "0.6238664", "0.6195306", "0.6195137", "0.61195624", "0.6074301", "0.60485584", "0.60231924", "0.60009277", "0.5997113", "0.59945446", "0.5843602", "0.58329153", "0.58284205", "0.5815317", "0.5810936", "0.57781583", "0.57769966", "0.57519215", "0.57497936", "0.5740986", "0.5732973", "0.572945", "0.57185113", "0.57037926", "0.56843704", "0.56795865", "0.56477594", "0.5638509", "0.56213015", "0.5572785", "0.5558558", "0.55405813", "0.55356145", "0.55243284", "0.5511918", "0.55072016", "0.5499031", "0.54891264", "0.54890126", "0.54875386", "0.5468113", "0.5458464", "0.54583", "0.54477984", "0.5436783", "0.543325", "0.5418536", "0.54184306", "0.5409306", "0.5402085", "0.53848046", "0.5359644", "0.53463274", "0.53436816", "0.5327256", "0.5310122", "0.5273315", "0.52725345", "0.5267507", "0.5266646", "0.52604675", "0.52547175", "0.5248175", "0.52289855", "0.5228643", "0.52183664", "0.5214775", "0.5190352", "0.5179164", "0.5169471", "0.5162145", "0.51593685", "0.51511836", "0.51474977", "0.5142691", "0.5140156", "0.5134021", "0.5117713", "0.508571", "0.50844955", "0.50798965", "0.5077122", "0.5075863", "0.507482", "0.5056089" ]
0.7540534
0
Return the school found for this name.
School findSchoolByName(String schoolName) throws TechnicalException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSchoolName();", "public String getSchoolName() {\n\t\treturn schoolName;\n\t}", "public School getSchool() {\r\n\t\treturn this.school;\r\n\t}", "@Override\n\tpublic Map<String, Object> getSchool() {\n\t\treturn getSession().selectOne(getNamespace() + \"getSchool\");\n\t}", "public ArrayList<String> getSchool() {\r\n\t\treturn school;\r\n\t}", "public java.lang.String getStudent_schoolName() {\n\t\treturn _primarySchoolStudent.getStudent_schoolName();\n\t}", "public java.lang.String getSchoolName() {\n java.lang.Object ref = schoolName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n schoolName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSchoolName() {\n java.lang.Object ref = schoolName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n schoolName_ = s;\n return s;\n }\n }", "public String getCourseIdSchool() {\n return courseIdSchool;\n }", "public com.google.protobuf.ByteString\n getSchoolNameBytes() {\n java.lang.Object ref = schoolName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n schoolName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setSchool(String s) {\n this.school = s;\n }", "public com.google.protobuf.ByteString\n getSchoolNameBytes() {\n java.lang.Object ref = schoolName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n schoolName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSchoolName() {\r\n return tfSchoolName.getText().trim();\r\n }", "School findSchoolById(int id) throws TechnicalException;", "public String getSchool(){\n return info;\n }", "public void setSchoolName(String schoolName) {\n\t\tthis.schoolName = schoolName;\n\t}", "public static void printSchoolName(){\n System.out.println(\"School name is \"+school);\n }", "@Override\n\tpublic String getClassName() {\n\t\treturn\tSchool.class.getName();\n\t}", "public University viewSchool(String school)\n {\n\t this.addBrowseHistory(school);\n\n\t return this.userCtrl.viewSchool(school);\n }", "public Long getSchoolId() {\n return schoolId;\n }", "public static ArrayList<String> retrieveStudentInfo(ArrayList<Student> al,String schoolName) {\n \tArrayList<String> str=new ArrayList<String>();\n \tfor(int i=0;i<al.size();i++){\n \tStudent s=al.get(i);\n \tif(s.getSchoolName().equalsIgnoreCase(schoolName)){\n \t str.add(s.getStudName());\n \t}\n }\n \treturn str;\n }", "com.google.protobuf.ByteString\n getSchoolNameBytes();", "public static School load(String schoolname, Connection con) throws ServletException{\n try {\n System.out.println(schoolname);\n PreparedStatement ps = con.prepareStatement(\"SELECT * FROM schools WHERE schoolname=?;\");\n ps.setString(1, schoolname);\n ResultSet rs = ps.executeQuery();\n rs.next();\n return new School(rs.getString(\"schoolname\"),rs.getString(\"location\"),rs.getString(\"websiteaddress\"));\n } catch (Exception ex) {\n throw new ServletException(\"Could not load School\"); \n }\n }", "public java.lang.String getStudent_name() {\n\t\treturn _primarySchoolStudent.getStudent_name();\n\t}", "public Builder setSchoolName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n schoolName_ = value;\n onChanged();\n return this;\n }", "public ArrayList getSchools();", "public ArrayList<String> viewSchoolDetails(String universityName) {\n\t\tthis.sfCon.viewSchoolDetails(universityName);\n\t\treturn this.sfCon.viewSchoolDetails(universityName);\n\t}", "public Long getSchoolid() {\n return schoolid;\n }", "public String toString(){\n return \"Name: \" +name+\", School Name: \"+school;\n }", "public static SchoolCourse schoolCourseSelection() {\n Scanner input = new Scanner(System.in);\n printListOfSchoolCourses();\n int choice = validateInputArrayList(input.nextInt(), listOfSchoolCourses);\n return listOfSchoolCourses.get(choice - 1);\n\n }", "@RequestMapping(value = \"/schools/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<School> getSchool(@PathVariable Long id) {\n log.debug(\"REST request to get School : {}\", id);\n School school = schoolService.findOne(id);\n return Optional.ofNullable(school)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "public java.lang.String getStudent_schoolYear() {\n\t\treturn _primarySchoolStudent.getStudent_schoolYear();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + String.format(\"%-17s\", \"\\nSCHOOL NAME\") + \" --> \" + this.schoolName;\n\t}", "public ArrayList<University> findRecommended(String schoolToCompare) {\n\t\tArrayList<University> closeMatch = sfCon.rankUniversity(schoolToCompare);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(closeMatch.get(i).getName());\n\t\t}\n\n\t\treturn closeMatch;\n\t}", "WordSchool selectByPrimaryKey(Long id);", "@Override\n\tpublic Campus fetchByschoolId_First(long schoolId,\n\t\tOrderByComparator<Campus> orderByComparator) {\n\t\tList<Campus> list = findByschoolId(schoolId, 0, 1, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "public void setSchool(ArrayList<String> school) {\r\n\t\tthis.school = school;\r\n\t}", "public Campus fetchByschoolId_First(long schoolId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Campus> orderByComparator);", "public String getScholarship(){\n\t\t\n\t\treturn this.scholarship;\n\t}", "Intern getInternByName(String studentName);", "Map<String,String> lookupSchoolInfo(String streetNumber, String streetName)\n\t{\n\t\t//check to see if street number is valid\n\t\tif(isNumeric(streetNumber))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t//first step is to validate the address using the web site. Create the parameter map\n\t\t\t\t//to pass to the fist step method\n\t\t\t\tMap<String,String> params = new HashMap<String,String>();\n\t\t\t\tparams.put(\"ViewState\", ADDR_VAL_VIEW_STATE);\n\t\t\t\tparams.put(\"EventValidation\", ADDR_VAL_EVENT_VALIDATION);\n\t\t\t\tparams.put(\"StreetNumber\", streetNumber.toUpperCase());\n\t\t\t\tparams.put(\"StreetName\" , streetName.toUpperCase());\n\t\t\t\n\t\t\t\tMap<String,String> valAddrMap = getValidatedAddressInfo(params);\n\t\t\t\n\t\t\t\t//second step is to retrieve school info for the validated address from the web site\n\t\t\t\tif(valAddrMap.containsKey(\"Error\"))\n\t\t\t\t\treturn valAddrMap;\n\t\t\t\telse\n\t\t\t\t\treturn getSchoolInfo(valAddrMap);\n\t\t\t}\n\t\t\tcatch (ClientProtocolException e)\n\t\t\t{\n\t\t\t\tMap<String,String> errMap = new HashMap<String, String>();\n\t\t\t\terrMap.put(\"Error\", e.getMessage());\n\t\t\t\treturn errMap;\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\tMap<String, String> errMap = new HashMap<String, String>();\n\t\t\t\terrMap.put(\"Error\", e.getMessage());\n\t\t\t\treturn errMap;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tMap<String, String> errMap = new HashMap<String, String>();\n\t\t\terrMap.put(\"Error\", String.format(\"Street Number %s is not numeric\", streetNumber));\n\t\t\treturn errMap;\n\t\t}\n\t}", "public ArrayList<String> compareSchoolsByScore() {\n\t\treturn sfCon.compareSchoolsByScore();\n\t}", "@Override\n\tpublic List<Campus> findByschoolId(long schoolId) {\n\t\treturn findByschoolId(schoolId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,\n\t\t\tnull);\n\t}", "public void setSchool(College school) {\n this.put(\"school\", school.getName());\n }", "public static ST getFAMILYNAME(final EN name) {\n final ENXP result = getFamilyName(name);\n if (result.nonNull().isTrue()) {\n return STjlStringAdapter.valueOf(result.toString()\n .toUpperCase());\n } else {\n return result;\n }\n }", "public void setStudent_schoolName(java.lang.String student_schoolName) {\n\t\t_primarySchoolStudent.setStudent_schoolName(student_schoolName);\n\t}", "@GetMapping(\"/schools\")\n public List<School> list() {\n List<School> schoolList = schoolRepository.findAll();\n return schoolList;\n }", "public ArrayList<String> viewSavedSchoolDetails(String school) {\n\t\tthis.sfCon.viewSavedSchoolDetails(school);\n\t\treturn this.sfCon.viewSavedSchoolDetails(school);\n\t}", "public Student getStudent(String match);", "List<StudentClass> findClassesBySchoolName(String schoolName)\r\n\t\t\tthrows TechnicalException;", "public School (){\n name = \"Unknown\";\n address = \"Unknown\";\n level = \"Unknown\";\n info = \"Name: \"+name+\"\\tAddress: \"+address+\"\\tLevel: \"+level;\n }", "public void getStudentNameStudentDsc()\n\t{\n\t\tDatabaseHandler db = new DatabaseHandler(getApplicationContext());\n\n\t\tstudent_name_list_studname_dsc = db.getStudentNameAllEnquiryStudentDsc();\n\t\tIterator itr = student_name_list_studname_dsc.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tSystem.out.println(itr.next());\n\t\t}\n\t}", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "private Course findCourseByName(String id) {\n for (Course course : mySchool.courses) {\n if (course.courseName.equals(id)) {\n return course;\n }\n }\n return null;\n }", "public java.lang.String getStudent_theLightClub() {\n\t\treturn _primarySchoolStudent.getStudent_theLightClub();\n\t}", "private void displayScholarshipByName(String name) {\n\n int falg = 0;\n\n stdOut.println(name + \"\\n\");\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.getName() + \"\\n\");\n\n if (scholarship.getName().equals(name)) {\n\n stdOut.println(scholarship.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find scholarship\\n\");\n\n }\n }", "@Override\r\n\tpublic String getSurName() {\n\t\treturn sur_name;\r\n\t}", "public Student getStudent(final int matrnr) {\n return students.get(matrnr);\n }", "public Builder clearSchoolName() {\n \n schoolName_ = getDefaultInstance().getSchoolName();\n onChanged();\n return this;\n }", "public ArrayList<UserSavedSchool> saveSchool(String school) {\n\t\tthis.sfCon.setAccount(this.UFCon.getAccount());\n\t\tthis.sfCon.saveSchool(school);\n\t\treturn sfCon.viewSavedSchools();\n\t}", "public static String findStudent(String name) throws SQLException\n\t{\n\t\tString[] split = name.split(\"\\\\s+\");\n\t\tResultSet student_id;\n\t\tList<String> id;\n\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where First_name = '\"+split[0]+\"' and Middle_name = '\"+split[1]+\"' and Last_name = '\"+split[2]+\"'\");\n\t\tid = test.writeResultSet(student_id,\"Banner_id\");\n\t\treturn id.get(0); \n\t}", "java.lang.String getCourseName();", "public Landmark getByName(String name){\n if( name == null ){\n return null;\n }\n else{\n return this.map.get(name);\n }\n }", "public SuperDarnSite getByShortName(String name) {\n return (SuperDarnSite) super.getByShortName(name);\n }", "public org.apache.xmlbeans.XmlAnySimpleType getStationName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlAnySimpleType target = null;\r\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().find_attribute_user(STATIONNAME$12);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }", "public Course findCourseByName(String n) {\n for (int i = 0; i < numOfCourses; i++) {\n if (this.getCourse(i).getCourseNum().equals(n)) { //get the course number of the course at index i and then compare it with the specified string\n return this.getCourse(i);\n }\n }\n return null;\n }", "public String getStudentName() {\n\t\treturn studentName;\n\t}", "public Student findStudent(String firstName, String lastName)\n\t{\n\t\tStudent foundStudent = null;\t\n\t\tfor(Student b : classRoll)\n\t\t{\n\t\t\t\n\t\t\tif (b.getStrNameFirst ( ) != null && b.getStrNameFirst().contains(firstName))\n\t\t\t{\n\t\t\t\tif(b.getStrNameLast ( ) != null && b.getStrNameLast().contains(lastName))\n\t\t\t\t{\n\t\t\t\t\tfoundStudent = b;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn foundStudent;\n\t}", "public void setSchool (String name, String address, String level){\n this.name = name;\n this.address = address;\n this.level = level;\n this.info = \"Name: \"+name+\"\\tAddress: \"+address+\"\\tLevel: \"+level;\n }", "public ArrayList<University> searchSchools(String name, String state, String location, String control,\n\t\t String numStudentsLow, String numStudentsHigh, String percFemLow, String percFemHigh,\n\t\t String satVerbLow, String satVerbHigh, String satMathLow, String satMathHigh, String expensesLow, String expensesHigh,\n\t\t String percFinAidLow, String percFinAidHigh, String numAppLow, String numAppHigh, String percAdmitLow,\n\t\t String percAdmitHigh, String percEnrolledLow, String percEnrolledHigh, String acadScaleLow, String acadScaleHigh,\n\t\t String socialScaleLow, String socialScaleHigh, String qualLifeLow, String qualLifeHigh, String[] emphases)\n {\n\tArrayList<University> results = this.userCtrl.searchSchools(name, state, location, control, numStudentsLow, numStudentsHigh,\n \t\tpercFemLow, percFemHigh, satVerbLow, satVerbHigh, satMathLow, satMathHigh, expensesLow, expensesHigh, percFinAidLow, percFinAidHigh, numAppLow, \n \t\tnumAppHigh, percAdmitLow, percAdmitHigh, percEnrolledLow, percEnrolledHigh, acadScaleLow, acadScaleHigh, socialScaleLow,\n \t\tsocialScaleHigh, qualLifeLow, qualLifeHigh, emphases);\n \n return results;\n }", "@Test\n\tpublic void testGetSchoolByID(){\n\t\t\n\t List<School> list=schoolService.getSchoolbyId(2);\n\t\t\tfor(int i=0;i<list.size();i++){\n\t\t\t\tSchool s=(School) list.get(i);\n\t\t\t\tSystem.out.println(\"id: \"+s.getSchId());\n\t\t\t\tSystem.out.println(\"name: \"+s.getSchName());\n\t\t\t\tSystem.out.println(\"zip: \"+s.getSchZip());\n\t\t\t\tSystem.out.println(\"state: \"+s.getSchState());\n\t\t\t}\n\t}", "public String getStudent(){\n\t\t\n\t\treturn this.student;\n\t}", "Skill getSkill(String name);", "public String getStudentName() {\r\n\t\treturn studentName;\r\n\t}", "public String getResearchname() {\r\n\t\treturn researchname;\r\n\t}", "public java.lang.String getStudent_address() {\n\t\treturn _primarySchoolStudent.getStudent_address();\n\t}", "public void addSchool(School school) {\n\n\t}", "public void setCourseIdSchool(String courseIdSchool) {\n this.courseIdSchool = courseIdSchool;\n }", "public NameSurferEntry findEntry(String name) {\n\t\tchar ch = name.charAt(0);\n\t\tif(Character.isLowerCase(ch) == true) {\n\t\t\tch = Character.toUpperCase(ch);\n\t\t}\n\t\tString otherLetters = name.substring(1);\n\t\totherLetters = otherLetters.toLowerCase();\n\t\tname = ch + otherLetters;\n\t\tif (nameFromDatabase.containsKey(name)) {\n\t\t\treturn nameFromDatabase.get(name);\n\t\t}\t\t\t\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "public com.fsoft.bn.model.PrimarySchoolStudent getPrimarySchoolStudent(\n\t\tjava.lang.String primaryStudent_id)\n\t\tthrows com.liferay.portal.kernel.exception.PortalException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException {\n\t\treturn _primarySchoolStudentLocalService.getPrimarySchoolStudent(primaryStudent_id);\n\t}", "public String printAcceptance(int school){\n int letterPicker = (int) (Math.random()*10);\n String accLetter = acceptanceLetter[letterPicker];\n if (school == 0){\n accLetter += \"Greendale..?\";\n }\n if (school == 1){\n accLetter += \"Harvard!\";\n }\n if (school == 2){\n accLetter += \"MIT!\";\n }\n return accLetter;\n }", "public School(){\n _persons = new TreeMap<Integer, Person>();\n _students = new HashMap<Integer, Student>();\n _professors = new HashMap<Integer, Professor>();\n _administratives = new HashMap<Integer, Administrative>();\n _courses = new HashMap<String,Course>();\n _disciplines = new HashMap<String,Discipline>();\n _disciplineCourse = new TreeMap<String, HashMap<String, Discipline>>();\n }", "public ArrayList<UserSavedSchool> viewSavedSchools() {\n\t\tthis.sfCon.viewSavedSchools();\n\t\tsuper.UFCon = UFCon;\n\t\treturn this.sfCon.viewSavedSchools();\n\t}", "public HolidayRule getByName(String value) {\n\t\tfor (HolidayRule rule : this) {\n\t\t\tif (rule.getName().equals(value)) return rule;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "List<WordSchool> selectByExample(WordSchoolExample example);", "public boolean getDcModelPurposeIsSchoolPurpose( String purposeName ) {\n String purpose = getPurposeString( purposeName );\n return purpose.equalsIgnoreCase( schoolPurposeName );\n }", "public Campus fetchByname(java.lang.String name);", "public java.lang.String getStudent_anyConfuse() {\n\t\treturn _primarySchoolStudent.getStudent_anyConfuse();\n\t}", "public String searchWomenByName() {\n getNavigate(Locators.LINK_SEARCH);\n String selectedTextInDropDown = getTextFromDropDownSelectedValue(Locators.DROP_DOWN_LIST_SORT_BY, \"name\");\n return selectedTextInDropDown;\n }", "public String getStudyName() {\n return studyName;\n }", "public java.lang.String getPrimaryKey() {\n\t\treturn _primarySchoolStudent.getPrimaryKey();\n\t}", "@Override\r\n\tpublic Subject getSubjectByName(String name) {\r\n\t\tList<Subject> result = runOwnQuery(\"FROM Subject WHERE name = ?1\", name);\r\n\t\tif (result.isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn result.get(0);\r\n\t}", "public void setSchoolId(Long schoolId) {\n this.schoolId = schoolId;\n }", "public Builder setSchoolNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n schoolName_ = value;\n onChanged();\n return this;\n }", "private Shift getShift(CharSequence title) {\n\t\tList<Shift> shifts = null;\n try {\n\t\t\tshifts = getHelper().getShiftDao().queryForEq(CalshareContract.Shift.COLUMN_NAME_SHIFT_TITLE, title);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \n if (shifts != null && shifts.size() != 0) {\n \tLog.i(EditShiftActivity.class.getName(), \"found Shift object with title \\'\" + title + \"\\'\");\n \treturn shifts.get(0);\n }\n else {\n \treturn null;\n }\n\t}", "@RequestMapping(value = \"/schools/district/{schoolDistrictId}\", method = RequestMethod.GET)\n public List<School> listBySchoolDistrictId(@PathVariable int schoolDistrictId) {\n SchoolDistrict schoolDistrict = schoolDistrictRepository.getOne(schoolDistrictId);\n List<School> schoolList = schoolRepository.findSchoolsBySchoolDistrict(schoolDistrict);\n return schoolList;\n }", "public java.lang.String getStudent_academicLevel() {\n\t\treturn _primarySchoolStudent.getStudent_academicLevel();\n\t}", "public Campus findByschoolId_First(long schoolId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Campus> orderByComparator)\n\t\tthrows NoSuchCampusException;", "public java.lang.String getStudent_contactName() {\n\t\treturn _primarySchoolStudent.getStudent_contactName();\n\t}", "public Student searchStudent(String id) {\n\t\tfor (String key : list.keySet()) {\n\t\t\tif(id.equals(key))\n\t\t\t\treturn list.get(key);\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.77062184", "0.7458505", "0.73648584", "0.71138656", "0.7100302", "0.7076692", "0.69981706", "0.6946305", "0.6750186", "0.65894234", "0.65318555", "0.6530945", "0.6502653", "0.6384766", "0.6324176", "0.6199869", "0.61893964", "0.6148436", "0.6131986", "0.61285895", "0.610357", "0.5971859", "0.5925988", "0.5886114", "0.58231986", "0.5742091", "0.56923103", "0.5690487", "0.56547445", "0.5652829", "0.564209", "0.5554884", "0.5517059", "0.5508223", "0.54039353", "0.5389464", "0.53885436", "0.5357731", "0.5345425", "0.5326513", "0.5300548", "0.5282926", "0.52421314", "0.52419525", "0.52366656", "0.5219209", "0.52041966", "0.5203492", "0.519599", "0.5190026", "0.5179567", "0.5167643", "0.5166887", "0.51551783", "0.51329947", "0.51284397", "0.5105989", "0.5088498", "0.508656", "0.50688976", "0.5065725", "0.506058", "0.50436294", "0.5018526", "0.5010637", "0.50057214", "0.5004834", "0.5003888", "0.499989", "0.49991843", "0.49987203", "0.49964345", "0.4995577", "0.4992662", "0.4990987", "0.49902692", "0.49864402", "0.49469647", "0.49435776", "0.4943322", "0.49371824", "0.49346673", "0.49332887", "0.4931793", "0.49245182", "0.4918267", "0.49120545", "0.49015608", "0.49010456", "0.48995832", "0.48928872", "0.48699492", "0.48672542", "0.4865646", "0.48628807", "0.48566863", "0.48517433", "0.48466608", "0.4832747", "0.48198017" ]
0.7383494
2
/ JADX INFO: this call moved to the top of the method (can break code semantics)
public /* synthetic */ PlayerState(boolean z, int i, long j, int i2, j jVar) { this((i2 & 1) != 0 ? true : z, (i2 & 2) != 0 ? 0 : i, (i2 & 4) != 0 ? 0 : j); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "private void m50366E() {\n }", "public final void mo91715d() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "private void kk12() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private stendhal() {\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void m23075a() {\n }", "public void mo21779D() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "public void mo21785J() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public abstract void mo70713b();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo21793R() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void prot() {\n }", "protected boolean func_70041_e_() { return false; }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo115190b() {\n }", "public void method_6349() {\r\n super.method_6349();\r\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo23813b() {\n }", "private void level7() {\n }", "public void mo21792Q() {\n }", "public void m9741j() throws cf {\r\n }", "public void mo12628c() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void mo21787L() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void gored() {\n\t\t\n\t}", "public void mo21782G() {\n }", "private static void cajas() {\n\t\t\n\t}", "public void mo97908d() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void mo21825b() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public void mo21791P() {\n }", "public void mo21781F() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void mo21794S() {\n }", "public boolean method_218() {\r\n return false;\r\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "public final void mo8775b() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "private void m50367F() {\n }", "void berechneFlaeche() {\n\t}", "void m1864a() {\r\n }", "public boolean method_208() {\r\n return false;\r\n }", "public void mo3376r() {\n }", "public boolean method_216() {\r\n return false;\r\n }", "public void mo6081a() {\n }", "public boolean method_194() {\r\n return false;\r\n }", "@Override\n\tpublic void inorder() {\n\n\t}", "public void mo21878t() {\n }", "public void mo3749d() {\n }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "public final void mo1285b() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void mo1531a() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public void mo44053a() {\n }", "public void mo9848a() {\n }", "public final void mo11687c() {\n }", "public void mo21795T() {\n }", "@Override\n\tpublic void jugar() {}", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo21877s() {\n }", "public void skystonePos4() {\n }" ]
[ "0.6829791", "0.66808707", "0.6607996", "0.65238076", "0.6517636", "0.6495291", "0.64646477", "0.64449894", "0.638496", "0.63599247", "0.63236797", "0.6315212", "0.6308609", "0.6267775", "0.62537265", "0.6238882", "0.62220436", "0.6197616", "0.6187926", "0.61756355", "0.61756355", "0.61512", "0.61376554", "0.6134852", "0.6133406", "0.61165047", "0.6115891", "0.61145556", "0.60955065", "0.6093125", "0.6066225", "0.6062105", "0.6056703", "0.605654", "0.605654", "0.6052627", "0.60446", "0.6038463", "0.6035646", "0.60259867", "0.602098", "0.60180914", "0.6012368", "0.5996317", "0.5990162", "0.5984687", "0.59833026", "0.5982902", "0.59748954", "0.5972311", "0.5968806", "0.5946618", "0.5946338", "0.5946004", "0.5945363", "0.59444886", "0.59385157", "0.5937533", "0.5937137", "0.59248084", "0.5920352", "0.5913133", "0.5912846", "0.5907868", "0.59041923", "0.58974975", "0.5896978", "0.58912045", "0.58883196", "0.58832216", "0.5879583", "0.5878333", "0.58761555", "0.58760047", "0.58697176", "0.58627737", "0.5859525", "0.585022", "0.5848887", "0.5844828", "0.5842443", "0.58388656", "0.5837796", "0.58334446", "0.5832583", "0.58311", "0.5831055", "0.5827522", "0.5826248", "0.58197564", "0.58175594", "0.58095354", "0.5806309", "0.5806309", "0.5806309", "0.5806309", "0.5806309", "0.5806309", "0.5806309", "0.5799984", "0.5796003" ]
0.0
-1
Parse the command line arguments
public void run(String[] args) throws Exception { ArgParser parser = new ArgParser(args); determineEvalMethod(parser); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void parseArgs(String[] args) {\n int argc = args.length,\n i = 0;\n\n for (; i < argc; i++) {\n if (args[i].equals(\"-d\")) {\n debug = true;\n } \n else if(args[i].equals(\"-m\")) {\n try {\n maxRandInt = Integer.parseInt(args[++i]);\n } catch(NumberFormatException e) {\n System.out.println(\n \"Maximum random value must be a valid integer!\"\n );\n usage();\n }\n } else if(args[i].equals(\"-n\")) {\n try {\n iterations = Integer.parseInt(args[++i]);\n } catch(NumberFormatException e) {\n System.out.println(\n \"Iteration value must be a valid integer!\"\n );\n usage();\n }\n } else {\n filename = args[i];\n }\n }\n\n if (filename.equals(\"\")) {\n System.out.println(\"Must supply a filename!\\n\");\n usage();\n }\n \n }", "void parse(String[] args);", "private static void parseCommandLine(String[] args) {\r\n\t\tif (args.length != 3)\r\n\t\t\terror(\"usage: Tester server port url-file\");\r\n\t\t\t\r\n\t\tserverName = args[0];\r\n\t\tserverPort = Integer.parseInt(args[1]);\r\n\t\turlFileName = args[2];\r\n\t}", "private static void parseArgs (String[] args) {\n\t\tint n = args.length;\n\t\tif (n != 4) {\n\t\t\tSystem.out.println(\"Usage: BuildTranslations in dbname username password\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tinPath = args[0];\n\t\tdbname = args[1];\n\t\tusername = args[2];\n\t\tpassword = args[3];\n\t}", "protected void parseArgs(String[] args) {\n // Arguments are pretty simple, so we go with a basic switch instead of having\n // yet another dependency (e.g. commons-cli).\n for (int i = 0; i < args.length; i++) {\n int nextIdx = (i + 1);\n String arg = args[i];\n switch (arg) {\n case \"--prop-file\":\n if (++i < args.length) {\n loadPropertyFile(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--schema-name\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n\n // Force upper-case to avoid tricky-to-catch errors related to quoting names\n this.schemaName = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--grant-to\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n\n // Force upper-case because user names are case-insensitive\n this.grantTo = args[i].toUpperCase();\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--target\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n List<String> targets = Arrays.asList(args[i].split(\",\"));\n for (String target : targets) {\n String tmp = target.toUpperCase();\n nextIdx++;\n if (tmp.startsWith(\"BATCH\")) {\n this.grantJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else if (tmp.startsWith(\"OAUTH\")){\n this.grantOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else if (tmp.startsWith(\"DATA\")){\n this.grantFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n }\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--add-tenant-key\":\n if (++i < args.length) {\n this.addKeyForTenant = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--update-proc\":\n this.updateProc = true;\n break;\n case \"--check-compatibility\":\n this.checkCompatibility = true;\n break;\n case \"--drop-admin\":\n this.dropAdmin = true;\n break;\n case \"--test-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.testTenant = true;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--tenant-key\":\n if (++i < args.length) {\n this.tenantKey = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--tenant-key-file\":\n if (++i < args.length) {\n tenantKeyFileName = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--list-tenants\":\n this.listTenants = true;\n break;\n case \"--update-schema\":\n this.updateFhirSchema = true;\n this.updateOauthSchema = true;\n this.updateJavaBatchSchema = true;\n this.dropSchema = false;\n break;\n case \"--update-schema-fhir\":\n this.updateFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n } else {\n this.schemaName = DATA_SCHEMANAME;\n }\n break;\n case \"--update-schema-batch\":\n this.updateJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--update-schema-oauth\":\n this.updateOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schemas\":\n this.createFhirSchema = true;\n this.createOauthSchema = true;\n this.createJavaBatchSchema = true;\n break;\n case \"--create-schema-fhir\":\n this.createFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schema-batch\":\n this.createJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schema-oauth\":\n this.createOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--drop-schema\":\n this.updateFhirSchema = false;\n this.dropSchema = true;\n break;\n case \"--drop-schema-fhir\":\n this.dropFhirSchema = Boolean.TRUE;\n break;\n case \"--drop-schema-batch\":\n this.dropJavaBatchSchema = Boolean.TRUE;\n break;\n case \"--drop-schema-oauth\":\n this.dropOauthSchema = Boolean.TRUE;\n break;\n case \"--pool-size\":\n if (++i < args.length) {\n this.maxConnectionPoolSize = Integer.parseInt(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--prop\":\n if (++i < args.length) {\n // properties are given as name=value\n addProperty(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--confirm-drop\":\n this.confirmDrop = true;\n break;\n case \"--allocate-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.allocateTenant = true;\n this.dropTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--drop-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.dropTenant = true;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--freeze-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.freezeTenant = true;\n this.dropTenant = false;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--drop-detached\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.dropDetached = true;\n this.dropTenant = false;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--delete-tenant-meta\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.deleteTenantMeta = true;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--dry-run\":\n this.dryRun = Boolean.TRUE;\n break;\n case \"--db-type\":\n if (++i < args.length) {\n this.dbType = DbType.from(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n switch (dbType) {\n case DERBY:\n translator = new DerbyTranslator();\n // For some reason, embedded derby deadlocks if we use multiple threads\n maxConnectionPoolSize = 1;\n break;\n case POSTGRESQL:\n translator = new PostgreSqlTranslator();\n break;\n case DB2:\n default:\n break;\n }\n break;\n default:\n throw new IllegalArgumentException(\"Invalid argument: \" + arg);\n }\n }\n }", "protected abstract void parseArgs() throws IOException;", "public CommandArguments parse(String[] args) {\n ErrorSupport command = new ErrorSupport();\n command.checkLength(args);\n\n //parsing arguments\n CommandArguments arguments = new CommandArguments();\n for (int i = 0; i < args.length; i++) {\n if ((i == args.length - 1) && !args[i].equals(\"--help\")) {\n throw new IllegalArgumentException(\"Incorrect argument, --help for more information about app syntax\");\n }\n switch (args[i]) {\n case (\"--help\"):\n System.out.println(\"\\nHELP MENU \\nAvailable options and arguments: \\n \\t--latitude x \\t-enter latitude coordinate \\n \\t--longitude x\\t-enter longitude coordinate \\n \\t--sensorid x \\t-enter sensor's Id \\n \\t--apikey x \\t\\t-enter API key \\n \\t--history x \\t-enter number of hours to display from history data\\n\");\n System.exit(0);\n case (\"--latitude\"):\n i++;\n arguments.setLatitude(command.checkIsDouble(args[i]));\n break;\n case (\"--longitude\"):\n i++;\n arguments.setLongitude(command.checkIsDouble(args[i]));\n break;\n case (\"--sensorid\"):\n i++;\n arguments.setSensorId(command.checkIsInt(args[i]));\n break;\n case (\"--apikey\"):\n i++;\n arguments.setApiKey(command.checkApiKey(args[i]));\n break;\n case (\"--history\"):\n i++;\n arguments.setHistory(command.checkIsInt(args[i]));\n break;\n default:\n throw new IllegalArgumentException(\"Incorrect option, --help for more information about app syntax\");\n }\n }\n\n //checking environment API_KEY if there was no apikey in command line entered\n if (!arguments.hasApiKey() && System.getenv(\"API_KEY\") == null) {\n throw new IllegalArgumentException(\"No API Key found, check if you have entered the correct key or if there is a suitable environment variable ( API_KEY ), --help for more information about app syntax\");\n } else if (!arguments.hasApiKey()) {\n arguments.setApiKey(command.checkApiKey(System.getenv(\"API_KEY\")));\n }\n return arguments;\n }", "protected void parseCommandLineArgs(String[] args) {\r\n // parse username/password;\r\n for(int i = 0; i < args.length; i++) {\r\n if(args[i].equals(\"-u\")) {\r\n username = args[i+1];\r\n }\r\n if(args[i].equals(\"-p\")) {\r\n password = args[i+1];\r\n }\r\n }\r\n \r\n }", "private static void parseCommandLine(String[] args) throws Exception {\n int i;\n // iterate over all options (arguments starting with '-')\n for (i = 0; i < args.length && args[i].charAt(0) == '-'; i++) {\n switch (args[i].charAt(1)) {\n // -a type = write out annotations of type a.\n case 'a':\n if (annotTypesToWrite == null)\n annotTypesToWrite = new ArrayList();\n annotTypesToWrite.add(args[++i]);\n break;\n\n // -g gappFile = path to the saved application\n case 'g':\n gappFile = new File(args[++i]);\n break;\n\n // -e encoding = character encoding for documents\n case 'e':\n encoding = args[++i];\n break;\n\n default:\n System.err.println(\"Unrecognised option \" + args[i]);\n usage();\n }\n }\n\n // set index of the first non-option argument, which we take as the first\n // file to process\n firstFile = i;\n\n // sanity check other arguments\n if (gappFile == null) {\n System.err.println(\"No .gapp file specified\");\n usage();\n }\n }", "public void parseArgs(final String[] args) {\n \t\tfinal CmdLineParser parser = new CmdLineParser(this);\n \n \t\ttry {\n \t\t\tparser.parseArgument(args);\n \n \t\t\tif (imageFile == null) {\n \t\t\t\tthrow new CmdLineException(parser, \"No image file given\");\n \t\t\t}\n \t\t\tif (githubUser == null) {\n \t\t\t\tthrow new CmdLineException(parser, \"No GitHub user given\");\n \t\t\t}\n \t\t}\n \t\tcatch (final CmdLineException e) {\n \t\t\tSystem.err.println(e.getMessage());\n \t\t\tSystem.err.println();\n \n \t\t\t// print usage instructions\n \t\t\tSystem.err.println(\"java -jar \" + JAR_NAME +\n \t\t\t\t\" [options...] arguments...\");\n \n \t\t\t// print the list of available options\n \t\t\tparser.printUsage(System.err);\n \t\t\tSystem.err.println();\n \n \t\t\tSystem.exit(1);\n \t\t}\n \t}", "public static void main( String args[] ) {\n\n parseInput(args);\n }", "void parse(String[] args) throws Exception;", "private void parseArgs(String[] args) throws ParseException\n {\n CommandLineParser parser = new PosixParser();\n cmd = parser.parse(options, args);\n }", "public void parseCommandLine(String[] args) {\r\n\t\t// define command line options\r\n\t\tOptions options = new Options();\r\n\t\t// refresh:\r\n\t\toptions.addOption(new Option(\r\n\t\t \"refresh\", \r\n\t\t \"Tell Argus to start refreshing all files after Minstrel startup.\"));\r\n\t\t// port:\r\n\t\tOptionBuilder.withArgName(\"port\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription( \"Run NanoHTTPD on this port instead of default 8000.\" );\r\n\t\toptions.addOption(OptionBuilder.create(\"port\"));\r\n\t\t// argus:\r\n\t\tOptionBuilder.withArgName(\"url\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription( \"Use Argus at <url> instead of default localhost:8008.\" );\r\n\t\toptions.addOption(OptionBuilder.create(\"argus\"));\r\n\t\t// vlc:\r\n\t\tOptionBuilder.withArgName(\"url\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription(\"Use VLC at <url> instead of default localhost:8080.\");\r\n\t\toptions.addOption(OptionBuilder.create(\"vlc\"));\r\n\t\t// wwwroot:\r\n\t\tOptionBuilder.withArgName(\"path\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription(\"Have NanoHTTPD serve files from <path> instead of default ./wwwroot.\");\r\n\t\toptions.addOption(OptionBuilder.create(\"wwwroot\"));\r\n\t\t\r\n\t\t// parse command line options and adjust accordingly\r\n\t\tCommandLineParser parser = new GnuParser();\r\n\t\ttry {\r\n\t\t\tCommandLine line = parser.parse(options, args);\r\n\r\n\t\t\tif (line.hasOption(\"refresh\")) {\r\n\t\t\t\trefresh = new Date();\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"port\")) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tport = Integer.parseInt( line.getOptionValue(\"port\"));\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\tSystem.err.println(\"Badly formatted port number, defaulting to 8000. Reason: \" + e.getMessage());\r\n\t\t\t\t\tport = 8000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"argus\")) {\r\n\t\t\t\targusURL = line.getOptionValue(\"argus\");\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"vlc\")) {\r\n\t\t\t\tvlcURL = line.getOptionValue(\"vlc\");\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"wwwroot\")) {\r\n\t\t\t\twwwroot = line.getOptionValue(\"wwwroot\");\r\n\t\t\t}\r\n\t\t} catch (ParseException e) {\r\n\t\t\tSystem.err.println(\"Command line parsing failed. Reason: \" + e.getMessage());\r\n\t\t}\r\n\t}", "private static void parseArguments(String[] args, MiParaPipeLine p) throws IOException{\n options.addOption(\"i\", \"input-file\", true, \"FASTA input file for query sequences\");\n options.addOption(\"o\", \"output-folder\", true, \"output folder for prediction results\");\n options.addOption(\"t\", \"test\", true, \"run test example \");\n options.addOption(\"c\", \"config\", true, \"configuration file for miRPara\");\n options.addOption(\"a\", \"action\", true, \"action to perform\");\n options.addOption(\"h\", \"help \", false, \"print help\");\n\n logger.trace(\"parsing args\");\n CommandLineParser parser = new BasicParser();\n CommandLine cmd = null;\n\n \n try {\n cmd = parser.parse(options, args);\n if (cmd.hasOption(\"h\")){\n print_help();\n System.out.print(p.reportAvailableActions());\n }\n\n if (cmd.hasOption(\"t\")){ \n logger.info(\"test set to \" + cmd.getOptionValue(\"l\"));\n test = cmd.getOptionValue(\"t\").toLowerCase();\n }\n \n if (cmd.hasOption(\"i\")) {\n logger.info(\"input file set to \" + cmd.getOptionValue(\"i\"));\n p.setInputFilename(cmd.getOptionValue(\"i\"));\t\n } \n\n if (cmd.hasOption(\"o\")){\n logger.info(\"output folder is\" + cmd.getOptionValue(\"o\"));\n p.setOutputFolder(cmd.getOptionValue(\"o\"));\n }\n \n if (cmd.hasOption(\"a\")){\n logger.info(\"requested action is \" + cmd.getOptionValue(\"a\"));\n p.setAction(cmd.getOptionValue(\"a\"));\n }\n \n if (cmd.hasOption(\"c\")){\n configFile = cmd.getOptionValue(\"c\");\n logger.info(\"Configuration file is \" + configFile);\n p.setConfigFilename(configFile);\n }\n\n\n \n if(p.getConfigFilename()==null){\n throw new ParseException(\"no configuration file was specified\") ; \n }\n \n if(new File(p.getConfigFilename()).exists() == false){\n throw new IOException(\"configuration file <\" + p.getConfigFilename() + \"> does not exist\");\n } \n \n if(new File(p.getInputFilename()).exists()== false)\n {\n throw new IOException(\"input file <\" + p.getInputFilename() + \"> does not exist\");\n }\n \n if(new File(p.getOutputFolder()).exists() == false)\n {\n if (new File(p.getOutputFolder()).getParentFile().exists() == false)\n throw new IOException(\"parent file <\" + new File(p.getOutputFolder()).getParentFile() + \"> does not exist\");\n \n new File(p.getOutputFolder()).mkdir();\n logger.info(\"create results folder <\" + p.getOutputFolder() + \">\");\n }\n\n } catch (ParseException e) {\n\n logger.fatal(\"Failed to parse command line properties\", e);\n print_help();\n\n }\n\n \n }", "public CommandLine parse(String[] args ) throws ParseException\n {\n String[] cleanArgs = CleanArgument.cleanArgs( args );\n CommandLineParser parser = new DefaultParser();\n return parser.parse( options, cleanArgs );\n }", "HashMap<String, String> cliParser(String[] args){\n CmdLineParser parser = new CmdLineParser(this);\n try {\n // parse the arguments.\n parser.parseArgument(args);\n\n if (this.printHelp) {\n System.err.println(\"Usage:\");\n parser.printUsage(System.err);\n System.err.println();\n System.exit(0);\n }\n } catch( CmdLineException e ) {\n System.err.println(e.getMessage());\n System.err.println(\"java BGPCommunitiesParser.jar [options...] arguments...\");\n // print the list of available options\n parser.printUsage(System.err);\n System.err.println();\n\n // print option sample. This is useful some time\n System.err.println(\" Example: java BGPCommunitiesParser.jar\"+parser.printExample(ALL));\n System.exit(0);\n }\n\n HashMap<String, String> cliArgs = new HashMap<>();\n String[] period;\n long startTs = 0;\n long endTs = 0;\n // parse the period argument\n try{\n period = this.period.split(\",\");\n startTs = this.dateToEpoch(period[0]);\n endTs = this.dateToEpoch(period[1]);\n if (startTs >= endTs){\n System.err.println(\"The period argument is invalid. \" +\n \"The start datetime should be before the end datetime.\");\n System.exit(-1);\n }\n }\n catch (java.lang.ArrayIndexOutOfBoundsException e) {\n System.err.println(\"The period argument is invalid. \" +\n \"Please provide two comma-separated datetimes in the format YYYMMMDD.hhmm \" +\n \"(e.g. 20180124.0127,20180125.1010).\");\n System.exit(-1);\n }\n\n cliArgs.put(\"communities\", this.communities);\n cliArgs.put(\"start\", Long.toString(startTs));\n cliArgs.put(\"end\", Long.toString(endTs));\n cliArgs.put(\"collectors\", this.collectors);\n cliArgs.put(\"outdir\", this.outdir);\n cliArgs.put(\"facilities\", this.facilities);\n cliArgs.put(\"overlap\", Long.toString(this.overlap));\n return cliArgs;\n }", "public void processArgs(String[] args){\n\t\t//look for a config file \n\t\targs = appendConfigArgs(args,\"-c\");\n\t\t\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tFile forExtraction = null;\n\t\tFile configFile = null;\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'f': forExtraction = new File(args[++i]); break;\n\t\t\t\t\tcase 'v': vcfFileFilter = args[++i]; break;\n\t\t\t\t\tcase 'b': bedFileFilter = args[++i]; break;\n\t\t\t\t\tcase 'x': appendFilter = false; break;\n\t\t\t\t\tcase 'c': configFile = new File(args[++i]); break;\n\t\t\t\t\tcase 'd': dataDir = new File(args[++i]); break;\n\t\t\t\t\tcase 'm': maxCallFreq = Double.parseDouble(args[++i]); break;\n\t\t\t\t\tcase 'o': minBedCount = Integer.parseInt(args[++i]); break;\n\t\t\t\t\tcase 's': saveDirectory = new File(args[++i]); break;\n\t\t\t\t\tcase 'e': debug = true; break;\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\n\t\t\t\t\tdefault: Misc.printErrAndExit(\"\\nProblem, unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printErrAndExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//config file? or local\n\t\tif (configLines != null && configFile != null){\n\t\t\tif (configLines[0].startsWith(\"-\") == false ) {\n\t\t\t\tHashMap<String, String> config = IO.loadFileIntoHashMapLowerCaseKey(configFile);\n\t\t\t\tif (config.containsKey(\"queryurl\")) queryURL = config.get(\"queryurl\");\n\t\t\t\tif (config.containsKey(\"host\")) host = config.get(\"host\");\n\t\t\t\tif (config.containsKey(\"realm\")) realm = config.get(\"realm\");\n\t\t\t\tif (config.containsKey(\"username\")) userName = config.get(\"username\");\n\t\t\t\tif (config.containsKey(\"password\")) password = config.get(\"password\");\n\t\t\t\tif (config.containsKey(\"maxcallfreq\")) maxCallFreq = Double.parseDouble(config.get(\"maxcallfreq\"));\n\t\t\t\tif (config.containsKey(\"vcffilefilter\")) vcfFileFilter = config.get(\"vcffilefilter\");\n\t\t\t\tif (config.containsKey(\"bedfilefilter\")) bedFileFilter = config.get(\"bedfilefilter\");\n\t\t\t}\n\t\t}\n\t\t//local search?\n\t\tif (queryURL == null){\n\t\t\tif (dataDir == null || dataDir.isDirectory()== false) {\n\t\t\t\tMisc.printErrAndExit(\"\\nProvide either a configuration file for remotely accessing a genomic query service or \"\n\t\t\t\t\t\t+ \"set the -d option to the Data directory created by the GQueryIndexer app.\\n\");;\n\t\t\t}\n\t\t}\n\n\t\tIO.pl(\"\\n\"+IO.fetchUSeqVersion()+\" Arguments:\");\n\t\tIO.pl(\"\\t-f Vcfs \"+forExtraction);\n\t\tIO.pl(\"\\t-s SaveDir \"+saveDirectory);\n\t\tIO.pl(\"\\t-v Vcf File Filter \"+vcfFileFilter);\n\t\tIO.pl(\"\\t-b Bed File Filter \"+bedFileFilter);\n\t\tIO.pl(\"\\t-m MaxCallFreq \"+maxCallFreq);\n\t\tIO.pl(\"\\t-o MinBedCount \"+minBedCount);\n\t\tIO.pl(\"\\t-x Remove failing \"+(appendFilter==false));\n\t\tIO.pl(\"\\t-e Verbose \"+debug);\n\t\tif (queryURL != null){\n\t\t\tIO.pl(\"\\tQueryUrl \"+queryURL);\n\t\t\tIO.pl(\"\\tHost \"+host);\n\t\t\tIO.pl(\"\\tRealm \"+realm);\n\t\t\tIO.pl(\"\\tUserName \"+userName);\n\t\t\t//check config params\n\t\t\tif (queryURL == null) Misc.printErrAndExit(\"\\nError: failed to find a queryUrl in the config file, e.g. queryUrl http://hci-clingen1.hci.utah.edu:8080/GQuery/\");\n\t\t\tif (queryURL.endsWith(\"/\") == false) queryURL = queryURL+\"/\";\n\t\t\tif (host == null) Misc.printErrAndExit(\"\\nError: failed to find a host in the config file, e.g. host hci-clingen1.hci.utah.edu\");\n\t\t\tif (realm == null) Misc.printErrAndExit(\"\\nError: failed to find a realm in the config file, e.g. realm QueryAPI\");\n\t\t\tif (userName == null) Misc.printErrAndExit(\"\\nError: failed to find a userName in the config file, e.g. userName FCollins\");\n\t\t\tif (password == null) Misc.printErrAndExit(\"\\nError: failed to find a password in the config file, e.g. password g0QueryAP1\");\n\n\t\t}\n\t\telse IO.pl(\"\\t-d DataDir \"+dataDir);\n\t\tIO.pl();\n\n\t\t//pull vcf files\n\t\tif (forExtraction == null || forExtraction.exists() == false) Misc.printErrAndExit(\"\\nError: please enter a path to a vcf file or directory containing such.\\n\");\n\t\tFile[][] tot = new File[3][];\n\t\ttot[0] = IO.extractFiles(forExtraction, \".vcf\");\n\t\ttot[1] = IO.extractFiles(forExtraction,\".vcf.gz\");\n\t\ttot[2] = IO.extractFiles(forExtraction,\".vcf.zip\");\n\t\tvcfFiles = IO.collapseFileArray(tot);\n\t\tif (vcfFiles == null || vcfFiles.length ==0 || vcfFiles[0].canRead() == false) Misc.printExit(\"\\nError: cannot find your xxx.vcf(.zip/.gz OK) file(s)!\\n\");\n\n\t\t//check params\n\t\tif (vcfFileFilter == null) Misc.printErrAndExit(\"\\nError: provide a vcf file filter, e.g. Hg38/Somatic/Avatar/Vcf \");\n\t\tif (bedFileFilter == null) Misc.printErrAndExit(\"\\nError: provide a bed file filter, e.g. Hg38/Somatic/Avatar/Bed \");\n\t\tif (saveDirectory == null) Misc.printErrAndExit(\"\\nError: provide a directory to save the annotated vcf files.\");\n\t\telse saveDirectory.mkdirs();\n\t\tif (saveDirectory.exists() == false) Misc.printErrAndExit(\"\\nError: could not find your save directory? \"+saveDirectory);\n\n\t\tuserQueryVcf = new UserQuery().addRegExFileName(\".vcf.gz\").addRegExDirPath(vcfFileFilter).matchVcf();\n\t\tuserQueryBed = new UserQuery().addRegExFileName(\".bed.gz\").addRegExDirPath(bedFileFilter);\n\t}", "private static void parseCommandLine(String[] args) throws WorkbenchException {\n commandLine = new CommandLine('-');\r\n commandLine.addOptionSpec(new OptionSpec(PROPERTIES_OPTION, 1));\r\n commandLine.addOptionSpec(new OptionSpec(DEFAULT_PLUGINS, 1));\r\n commandLine.addOptionSpec(new OptionSpec(PLUG_IN_DIRECTORY_OPTION, 1));\r\n commandLine.addOptionSpec(new OptionSpec(I18N_FILE, 1));\r\n //[UT] 17.08.2005 \r\n commandLine.addOptionSpec(new OptionSpec(INITIAL_PROJECT_FILE, 1));\r\n commandLine.addOptionSpec(new OptionSpec(STATE_OPTION, 1));\r\n try {\r\n commandLine.parse(args);\r\n } catch (ParseException e) {\r\n throw new WorkbenchException(\"A problem occurred parsing the command line: \" + e.toString());\r\n }\r\n }", "protected void parseArgs(String[] args) throws BuildException {\n for (int i = 0; i != args.length; ++i) {\n String arg = args[i];\n boolean parsed = parseArg(arg, args, i);\n if (!parsed) {\n String message = \"Unknown option: \" + arg;\n usage(message, System.out);\n throw new BuildException(message);\n }\n }\n }", "private static CommandLine parseCommandLine(String[] args) {\n Option config = new Option(CONFIG, true, \"operator config\");\n Option brokerStatsZookeeper =\n new Option(BROKERSTATS_ZOOKEEPER, true, \"zookeeper for brokerstats topic\");\n Option brokerStatsTopic = new Option(BROKERSTATS_TOPIC, true, \"topic for brokerstats\");\n Option clusterZookeeper = new Option(CLUSTER_ZOOKEEPER, true, \"cluster zookeeper\");\n Option seconds = new Option(SECONDS, true, \"examined time window in seconds\");\n options.addOption(config).addOption(brokerStatsZookeeper).addOption(brokerStatsTopic)\n .addOption(clusterZookeeper).addOption(seconds);\n\n if (args.length < 6) {\n printUsageAndExit();\n }\n\n CommandLineParser parser = new DefaultParser();\n CommandLine cmd = null;\n try {\n cmd = parser.parse(options, args);\n } catch (ParseException | NumberFormatException e) {\n printUsageAndExit();\n }\n return cmd;\n }", "public void processArgs(String[] args){\r\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\r\n\t\tfor (int i = 0; i<args.length; i++){\r\n\t\t\tString lcArg = args[i].toLowerCase();\r\n\t\t\tMatcher mat = pat.matcher(lcArg);\r\n\t\t\tif (mat.matches()){\r\n\t\t\t\tchar test = args[i].charAt(1);\r\n\t\t\t\ttry{\r\n\t\t\t\t\tswitch (test){\r\n\t\t\t\t\tcase 'f': directory = new File(args[i+1]); i++; break;\r\n\t\t\t\t\tcase 'o': orderedFileNames = args[++i].split(\",\"); break;\r\n\t\t\t\t\tcase 'c': output = new File(args[++i]); break;\r\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\r\n\t\t\t\t\tdefault: Misc.printErrAndExit(\"\\nProblem, unknown option! \" + mat.group());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e){\r\n\t\t\t\t\tSystem.out.print(\"\\nSorry, something doesn't look right with this parameter request: -\"+test);\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check to see if they entered required params\r\n\t\tif (directory==null || directory.isDirectory() == false){\r\n\t\t\tSystem.out.println(\"\\nCannot find your directory!\\n\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "private static Params parseCLI(String[] args) {\n Params params = new Params();\n\n if(args.length>1) {\n int paramIndex = 0;\n for(int i=0; i<args.length; i++) {\n String arg = args[i];\n OutputType type = OutputType.getOutputType(arg);\n if(type!=null) {\n params.outputType = type;\n paramIndex = i;\n break;\n } else if(\"-help\".equals(arg)) {\n usage();\n System.exit(0);\n }\n }\n\n params.inputFile = args[paramIndex+1];\n if(args.length>paramIndex+2) {\n params.outputFile = args[paramIndex+2];\n }\n\n } else if(args.length == 1 && \"-help\".equals(args[0])) {\n usage();\n System.exit(0);\n\n } else {\n \n System.err.println(\"Error, incorrect usage\");\n usage();\n System.exit(-1);\n\n }\n\n return params;\n }", "public void processArgs(String[] args){\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tSystem.out.println(\"\\n\"+IO.fetchUSeqVersion()+\" Arguments: \"+Misc.stringArrayToString(args, \" \")+\"\\n\");\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'b': bedFile = new File (args[i+1]); i++; break;\n\t\t\t\t\tcase 'm': minNumExons = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'a': requiredAnnoType = args[i+1]; i++; break;\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\n\t\t\t\t\tdefault: System.out.println(\"\\nProblem, unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (bedFile == null || bedFile.canRead() == false) Misc.printExit(\"\\nError: cannot find your bed file!\\n\");\t\n\t}", "public static void main(String[] args)\r\n {\r\n CommandParser parser = new CommandParser(args[0]);\r\n parser.parseFile();\r\n }", "protected P parse(String options, String[] args){\n HashMap cmdFlags = new HashMap();\n String flag;\n String nextFlag=null;\n StringBuffer errors=new StringBuffer();\n /**\n First go through options to see what should be in args\n */\n for(int which=0;which<options.length();which++){\n flag = \"-\"+options.substring(which,which+1);\n if(which+1<options.length()){\n nextFlag=options.substring(which+1,which+2);\n if (nextFlag.equals(\"-\")){\n cmdFlags.put(flag,nextFlag);\n } else\n if (nextFlag.equals(\"+\")){\n cmdFlags.put(flag,nextFlag);\n /*\n mark that it is required\n if found this will be overwritten by -\n */\n this.put(flag,nextFlag);\n } else\n //JDH changed to \"_\" from \";\" because too many cmdlines mess up ;\n if (nextFlag.equals(\"_\")){\n cmdFlags.put(flag,nextFlag);\n } else\n //JDH changed to \".\" from \":\" because too many cmdlines mess up ;\n if (nextFlag.equals(\".\")){\n cmdFlags.put(flag,\" \"); //JDH changed this from \":\"\n /*\n mark that it is required\n if found this will be overwritten by value\n JDH should use \" \" so it cannot be the same as a value\n */\n this.put(flag,\" \"); // mark that it is required\n } else {\n System.out.println(\"Bad symbol \"+nextFlag+\"in option string\");\n }\n which++;\n } else {\n System.out.println(\"Missing symbol in option string at \"+which);\n }\n }\n\n int arg=0;\n for(;arg<args.length;arg++){\n if (!args[arg].startsWith(\"-\")){\n break;\n }\n flag = args[arg];\n /*\n This should tell it to quit looking for flags or options\n */\n if (flag.equals(\"--\")){\n arg++;\n break;\n }\n if (!(cmdFlags.containsKey(flag))){\n errors.append(\"\\nbad flag \"+flag);\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"-\")){\n this.put(flag,\"-\");\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"+\")){\n this.put(flag,\"-\");// turns off the + because it was found\n continue;\n }\n if (!(arg+1<args.length)){\n errors.append(\"\\nMissing value for \"+flag);\n continue;\n }\n arg++;\n this.put(flag,args[arg]);\n }\n String[] params=null;\n params = new String[args.length - arg];\n\n int n=0;\n // reverse these so they come back in the right order!\n for(;arg<args.length;arg++){\n params[n++] = args[arg];\n }\n Iterator k = null;\n Map.Entry e = null;\n if (this.containsValue(\"+\")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\"+\".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required flag \"+(String)e.getKey()+\" was not supplied.\");\n };\n }\n } \n /*\n Should change this to \" \" in accordance with remark above\n */\n //JDH changed to \" \" from \":\" in both spots below\n if (this.containsValue(\" \")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\" \".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required option \"+(String)e.getKey()+\" was not supplied.\");\n }\n }\n }\n this.put(\" \",params);\n this.put(\"*\",errors.toString());\n return this;\n }", "private void parseOptions(DataStore args) {\r\n\r\n // System.out.println(\"IN JavaWeaver.parseOptions\\n\" + args);\r\n if (args.hasValue(JavaWeaverKeys.CLEAR_OUTPUT_FOLDER)) {\r\n clearOutputFolder = args.get(JavaWeaverKeys.CLEAR_OUTPUT_FOLDER);\r\n }\r\n if (args.hasValue(JavaWeaverKeys.NO_CLASSPATH)) {\r\n noClassPath = args.get(JavaWeaverKeys.NO_CLASSPATH);\r\n }\r\n if (args.hasValue(JavaWeaverKeys.INCLUDE_DIRS)) {\r\n classPath = args.get(JavaWeaverKeys.INCLUDE_DIRS).getFiles();\r\n }\r\n if (args.hasValue(JavaWeaverKeys.OUTPUT_TYPE)) {\r\n outType = args.get(JavaWeaverKeys.OUTPUT_TYPE);\r\n }\r\n if (args.hasValue(JavaWeaverKeys.SHOW_LOG_INFO)) {\r\n loggingGear.setActive(args.get(JavaWeaverKeys.SHOW_LOG_INFO));\r\n }\r\n if (args.hasValue(JavaWeaverKeys.FORMAT)) {\r\n prettyPrint = args.get(JavaWeaverKeys.FORMAT);\r\n }\r\n\r\n if (args.hasValue(JavaWeaverKeys.REPORT)) {\r\n\r\n reportGear.setActive(args.get(JavaWeaverKeys.REPORT));\r\n }\r\n\r\n }", "private static void handleArguments(String[] args) {\n\t\t\n\t\tif ( args.length > 0 && args[0].contains(\"--help\")) {\n\t\t\tSystem.err.println (menuString);\n\t\t\tSystem.err.println(\"Example queue name are: *\");\n\t\t\tSystem.exit(0);\n\t\t} else {\n\n\t\t\tint i = 0;\n\t\t\tString arg;\n\n\t\t\twhile (i < args.length && args[i].startsWith(\"--\")) {\n\t\t\t\targ = args[i++];\n\n\t\t\t\tif (arg.contains(ECS_HOSTS_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tecsHosts = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_HOSTS_CONFIG_ARGUMENT + \" requires hosts value(s)\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.contains(ECS_MGMT_ACCESS_KEY_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tecsMgmtAccessKey = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_MGMT_ACCESS_KEY_CONFIG_ARGUMENT + \" requires an access-key value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_MGMT_SECRET_KEY_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tecsMgmtSecretKey = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_MGMT_SECRET_KEY_CONFIG_ARGUMENT + \" requires a secret-key value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_MGMT_PORT_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tecsMgmtPort = Integer.valueOf(args[i++]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_MGMT_PORT_CONFIG_ARGUMENT + \" requires a mgmt port value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_ALT_MGMT_PORT_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tecsAlternativeMgmtPort = Integer.valueOf(args[i++]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_ALT_MGMT_PORT_CONFIG_ARGUMENT + \" requires an alternative mgmt port value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_COLLECT_MODIFIED_OBJECT_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\trelativeObjectModifiedSinceOption = true;\n\t\t\t\t\t\tobjectModifiedSinceNoOfDays = Integer.valueOf(args[i++]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_COLLECT_MODIFIED_OBJECT_CONFIG_ARGUMENT + \" requires a specified number of days value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_COLLECT_DATA_CONFIG_ARGUMENT)) {\n\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tcollectData = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_COLLECT_DATA_CONFIG_ARGUMENT + \" requires a collect data value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.contains(ELASTIC_HOSTS_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\telasticHosts = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ELASTIC_HOSTS_CONFIG_ARGUMENT + \" requires hosts value(s)\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ELASTIC_PORT_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\telasticPort = Integer.valueOf(args[i++]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ELASTIC_PORT_CONFIG_ARGUMENT + \" requires a port value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ELASTIC_CLUSTER_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\telasticCluster = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( ELASTIC_CLUSTER_CONFIG_ARGUMENT + \" requires a cluster value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_COLLECTION_DAY_SHIFT_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\trelativeDayShift = Integer.valueOf(args[i++]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_COLLECTION_DAY_SHIFT_ARGUMENT + \" requires a day shift value port value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals( ECS_INIT_INDEXES_ONLY_CONFIG_ARGUMENT)) { \n\t\t\t\t\tinitIndexesOnlyOption = true;\n\t\t\t\t} else if (arg.equals( XPACK_SECURITY_USER_ARG)) { \n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\txpackUser = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( XPACK_SECURITY_USER_ARG + \" requires a value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals( XPACK_SECURITY_USER_PASSWORD_ARG)) { \n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\txpackPassword = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( XPACK_SECURITY_USER_PASSWORD_ARG + \" requires a value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals( XPACK_SSL_KEY_ARG)) { \n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\txpackSslKey = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( XPACK_SSL_KEY_ARG + \" requires a value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals( XPACK_SSL_CERTIFICATE_ARG)) { \n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\txpackSslCertificate = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( XPACK_SSL_CERTIFICATE_ARG + \" requires a value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals( XPACK_SSL_CERTIFICATE_AUTH_ARG)) { \n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\txpackSsslCertificateAuth = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( XPACK_SSL_CERTIFICATE_AUTH_ARG + \" requires a value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_COLLECT_OBJECT_DATA_NAMESPACE_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tobjectNamespace = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_COLLECT_OBJECT_DATA_NAMESPACE_ARGUMENT + \" requires namespace\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_COLLECT_OBJECT_DATA_NAME_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tbucketName = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_COLLECT_OBJECT_DATA_NAME_ARGUMENT + \" requires bucket\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.err.println(\"Unrecognized option: \" + arg); \n\t\t\t\t\tSystem.err.println(menuString);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t} \n\t\t\t}\n\t\t\tif (bucketName!=null) {\n\t\t\t\tif (objectNamespace==null || \"\".equals(objectNamespace)) {\n\t\t\t\t\tSystem.err.println(ECS_COLLECT_OBJECT_DATA_NAMESPACE_ARGUMENT + \" requires namespace, \" + ECS_COLLECT_OBJECT_DATA_NAME_ARGUMENT + \" requires bucket\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(initIndexesOnlyOption) {\n\t\t\t// Check hosts\n\t\t\tif(elasticHosts.isEmpty()) {\t\n\t\t\t\tSystem.err.println(\"Missing Elastic hostname use \" + ELASTIC_HOSTS_CONFIG_ARGUMENT + \n\t\t\t\t\t\t\t\t\"<host1, host2> to specify a value\" );\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t} else {\n\n\t\t\t// Check hosts\n\t\t\tif(ecsHosts.isEmpty()) {\t\n\t\t\t\tSystem.err.println(\"Missing ECS hostname use \" + ECS_HOSTS_CONFIG_ARGUMENT + \n\t\t\t\t\t\t\"<host1, host2> to specify a value\" );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// management access/user key\n\t\t\tif(ecsMgmtAccessKey.isEmpty()) {\n\t\t\t\tSystem.err.println(\"Missing managment access key use\" + ECS_MGMT_ACCESS_KEY_CONFIG_ARGUMENT +\n\t\t\t\t\t\t\"<admin-username> to specify a value\" );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// management access/user key\n\t\t\tif(ecsMgmtSecretKey.isEmpty()) {\n\t\t\t\tSystem.err.println(\"Missing management secret key use \" + ECS_MGMT_SECRET_KEY_CONFIG_ARGUMENT +\n\t\t\t\t\t\t\"<admin-password> to specify a value\" );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void parse(String[] args) throws ParseException {\r\n\r\n options.addOption(configFileOption);\r\n CommandLineParser parser = new GnuParser();\r\n\r\n CommandLine line = parser.parse(options, args);\r\n if (line.hasOption(\"f\")) {\r\n configFile = line.getOptionValue(\"f\");\r\n }\r\n }", "@Override\n protected String[] ParseCmdLine(final String[] args) {\n\n final CmdLineParser clp = new CmdLineParser();\n final OptionalFlag optHelp = new OptionalFlag(\n clp, \"h?\", \"help\", \"help mode\\nprint this usage information and exit\");\n optHelp.forHelpUsage();\n final OptionalFlag optForce =\n new OptionalFlag(clp, \"f\", \"force\", \"force overwrite\");\n final OptionalFlag optDelete =\n new OptionalFlag(clp, \"d\", \"delete\", \"delete the table content first\");\n final OptionalFlag optAll = new OptionalFlag(\n clp, \"a\", \"all\",\n \"import all and synchronize changes in the document back to the datasource\");\n final OptionalFlag optSync = new OptionalFlag(\n clp, \"\", \"sync\",\n \"synchronize changes in the document back to the datasource\");\n final OptionalArgumentInteger optCommitCount =\n new OptionalArgumentInteger(clp, \"n\", \"commitcount\", \"commit count\");\n\n clp.setArgumentDescription(\n \"[[sourcefile [destinationfile]]\\n[sourcefile... targetdirectory]]\", -1,\n -1, null);\n final String[] argv = clp.getOptions(args);\n\n force = optForce.getValue(false);\n doDelete = optDelete.getValue(false);\n doSync = optAll.getValue(false) || optSync.getValue(false);\n doImport = optAll.getValue(false) || !optSync.getValue(false);\n commitCount = optCommitCount.getValue(0);\n\n return argv;\n }", "public void processArgs(String[] args){\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tString useqVersion = IO.fetchUSeqVersion();\n\t\tSystem.out.println(\"\\n\"+useqVersion+\" Arguments: \"+ Misc.stringArrayToString(args, \" \") +\"\\n\");\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'r': bedFile = new File(args[++i]); break;\n\t\t\t\t\tcase 's': saveDirectory = new File(args[++i]); break;\n\t\t\t\t\tcase 'c': haploArgs = args[++i]; break;\n\t\t\t\t\tcase 't': numberConcurrentThreads = Integer.parseInt(args[++i]); break;\n\t\t\t\t\tdefault: Misc.printErrAndExit(\"\\nProblem, unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printErrAndExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//check save dir\n\t\tif (saveDirectory == null) Misc.printErrAndExit(\"\\nError: cannot find your save directory!\\n\"+saveDirectory);\n\t\tsaveDirectory.mkdirs();\n\t\tif (saveDirectory.isDirectory() == false) Misc.printErrAndExit(\"\\nError: your save directory does not appear to be a directory?\\n\");\n\n\t\t//check bed\n\t\tif (bedFile == null || bedFile.canRead() == false) Misc.printErrAndExit(\"\\nError: cannot find your bed file of regions to interrogate?\\n\"+bedFile);\n\t\t\n\t\t//check args\n\t\tif (haploArgs == null) Misc.printErrAndExit(\"\\nError: please provide a gatk haplotype caller launch cmd similar to the following where you \"\n\t\t\t\t+ \"replace the $xxx with the correct path to these resources on your system:\\n'java -Xmx4G -jar $GenomeAnalysisTK.jar -T \"\n\t\t\t\t+ \"HaplotypeCaller -stand_call_conf 5 -stand_emit_conf 5 --min_mapping_quality_score 13 -R $fasta --dbsnp $dbsnp -I $bam'\\n\");\n\t\tif (haploArgs.contains(\"~\") || haploArgs.contains(\"./\")) Misc.printErrAndExit(\"\\nError: full paths in the GATK command.\\n\"+haploArgs);\n\t\tif (haploArgs.contains(\"-o\") || haploArgs.contains(\"-L\")) Misc.printErrAndExit(\"\\nError: please don't provide a -o or -L argument to the cmd.\\n\"+haploArgs);\t\n\t\n\t\t//determine number of threads\n\t\tdouble gigaBytesAvailable = ((double)Runtime.getRuntime().maxMemory())/ 1073741824.0;\n\t\t\n\t\n\t}", "public static void main( String[] args )\n {\n CommandLineParser parser = new DefaultParser();\n\n // create the Options\n OptionGroup optgrp = new OptionGroup();\n optgrp.addOption(Option.builder(\"l\")\n .longOpt(\"list\")\n .hasArg().argName(\"keyword\").optionalArg(true)\n .type(String.class)\n .desc(\"List documents scraped for keyword\")\n .build());\n optgrp.addOption( Option.builder(\"r\")\n .longOpt(\"read\")\n .hasArg().argName(\"doc_id\")\n .type(String.class)\n .desc(\"Display a specific scraped document.\")\n .build());\n optgrp.addOption( Option.builder(\"a\")\n .longOpt(\"add\")\n .type(String.class)\n .desc(\"Add keywords to scrape\")\n .build());\n optgrp.addOption( Option.builder(\"s\")\n .longOpt(\"scraper\")\n .type(String.class)\n .desc(\"Start the scraper watcher\")\n .build());\n\n\n\n Options options = new Options();\n options.addOptionGroup(optgrp);\n\n options.addOption( Option.builder(\"n\")\n .longOpt(\"search-name\").hasArg()\n .type(String.class)\n .desc(\"Name of the search task for a set of keywords\")\n .build());\n\n options.addOption( Option.builder(\"k\")\n .longOpt(\"keywords\")\n .type(String.class).hasArgs()\n .desc(\"keywords to scrape. \")\n .build());\n\n options.addOption( Option.builder(\"t\")\n .longOpt(\"scraper-threads\")\n .type(Integer.class).valueSeparator().hasArg()\n .desc(\"Number of scraper threads to use.\")\n .build());\n\n //String[] args2 = new String[]{ \"--add --search-name=\\\"some thing\\\" --keywords=kw1, kw2\" };\n // String[] args2 = new String[]{ \"--add\", \"--search-name\", \"some thing new\", \"--keywords\", \"kw3\", \"kw4\"};\n // String[] args2 = new String[]{ \"--scraper\"};\n// String[] args2 = new String[]{ \"--list\"};\n\n int exitCode = 0;\n CommandLine line;\n try {\n // parse the command line arguments\n line = parser.parse( options, args );\n }\n catch( ParseException exp ) {\n System.out.println( \"Unexpected exception:\" + exp.getMessage() );\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp( \"searchscraper \\n\" +\n \" [--add --search-name=<SearchTask> --keywords=<keyword1> <keyword2> ...]\\n\" +\n \" [--list [<keyword>] ]\\n\" +\n \" [--read <doc_id>]\\n\", options , true);\n System.exit(2);\n return;\n }\n\n if( line.hasOption( \"add\" ) ) {\n // Add Search Task mode\n if(!line.hasOption( \"search-name\" ) || !line.hasOption(\"keywords\")) {\n System.out.println(\"must have search name and keywords when adding\");\n System.exit(2);\n }\n String name = line.getOptionValue( \"search-name\" );\n String[] keywords = line.getOptionValues(\"keywords\");\n System.out.println(\"Got keywords: \" + Arrays.toString(keywords) );\n\n exitCode = add(name, Arrays.asList(keywords));\n\n } else if( line.hasOption( \"list\" ) ) {\n // List Keyword mode\n DataStore ds = new DataStore();\n String keyword = line.getOptionValue( \"list\" );\n System.out.println(\"Listing with keyword = `\" + keyword + \"`\");\n if(keyword == null) {\n List<String > keywords = ds.listKeywords();\n for(String kw : keywords) {\n System.out.println(kw);\n }\n exitCode=0;\n } else {\n List<SearchResult > results = ds.listDocsForKeyword(keyword);\n for(SearchResult kw : results) {\n System.out.println(kw);\n }\n }\n ds.close();\n\n } else if( line.hasOption( \"read\" ) ) {\n // Show a specific document\n String docId = line.getOptionValue( \"read\" );\n if(docId == null) {\n System.err.println(\"read option missing doc_id parameter\");\n exitCode = 2;\n } else {\n\n DataStore ds = new DataStore();\n String result = ds.read(docId);\n\n if (result == null) {\n System.err.println(\"NOT FOUND\");\n exitCode = 1;\n } else {\n System.out.println(result);\n }\n ds.close();\n }\n }\n else if( line.hasOption( \"scraper\" ) ) {\n int numThreads = 1;\n if(line.hasOption( \"scraper-threads\")) {\n String threadString = line.getOptionValue(\"scraper-threads\");\n try {\n numThreads = Integer.parseInt(threadString);\n } catch (NumberFormatException e) {\n System.out.println(\n \"unable to parse number of threads from `\" +\n threadString + \"`\");\n }\n\n }\n // Start scraper mode\n Daemon daemon = new Daemon(numThreads);\n daemon.start();\n } else {\n // generate the help statement\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp( \"searchscraper \\n\" +\n \" [--add --search-name <SearchTask> --keywords <keyword1> <keyword2> ...]\\n\" +\n \" [--list [<keyword>] ]\\n\" +\n \" [--read <doc_id>]\\n\", options , true);\n exitCode = 2;\n }\n\n\n System.exit(exitCode);\n }", "public void processArgs(String[] args){\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'a': ucscGeneTableFileAll = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 'g': ucscGeneTableFileSelect = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 'b': barDirectory = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 'r': rApp = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 's': threshold = Float.parseFloat(args[i+1]); i++; break;\n\t\t\t\t\tcase 'e': extension = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'f': extensionToSegment = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'x': bpPositionOffSetBar = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'y': bpPositionOffSetRegion = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\n\t\t\t\t\tdefault: Misc.printExit(\"\\nError: unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//parse text\n\t\tselectName = Misc.removeExtension(ucscGeneTableFileSelect.getName());\n\n\t}", "static public void parseArgs(String[] args) {\r\n\r\n\t\tfor (int nA = 0; nA < args.length; nA++ ) {\r\n\t\t\tif (args[nA].length() > 7 && args[nA].substring(0,7).equals( \"--lang=\")) {\r\n\t\t\t\t//set the language to the given string\r\n\t\t\t\tTranslationBundle.setLanguage( args[nA].substring(7) );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private String parseArgs(String args[])\n {\n String fpath = null;\n \n for (String arg : args)\n {\n if (arg.startsWith(\"-\"))\n {\n // TODO: maybe add something here.\n }\n else // expect a filename.\n {\n fpath = arg;\n }\n }\n \n return fpath;\n }", "private static Options readArguments(String[] args) {\n\t\tOptions result = new Options();\n\t\ttry {\n\t\t\tresult.numberClients = Integer.parseInt(args[0]);\n\t\t\tresult.trafficTime = Integer.parseInt(args[args.length - 1]);\n\t\t} catch (java.lang.NumberFormatException e) {\n\t\t\tSystem.err.println(\"Error while converting to integer. Did you run the program correctly?\");\n\t\t\tSystem.err.println(\"$ tgpm <c> [-w] [-s <sid>] <s>\");\n\t\t\tSystem.exit(0);\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.err.println(\"Program requires at least TWO arguments, number of clients and active seconds.\");\n\t\t\tSystem.err.println(\"$ tgpm <c> [-w] [-s <sid>] <s>\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tString argsString = String.join(\" \", args);\n\n\t\tif (argsString.contains(\"-w\")) {\n\t\t\tresult.writeMode = true;\n\t\t}\n\n\t\tPattern p = Pattern.compile(\"-s ([0-9]+)\");\n\t\tMatcher m = p.matcher(argsString);\n\t\tif (m.find()) {\n\t\t\tif (args.length > 3) {\n\t\t\t\tresult.storeID = Integer.parseInt(m.group(1));\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"When single store mode is enabled, the program requires AT LEAST 4 arguments.\");\n\t\t\t\tSystem.err.println(\"$ tgpm <c> [-w] [-s <sid>] <s>\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public void processArgs(String[] args){\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tString useqVersion = IO.fetchUSeqVersion();\n\t\tSystem.out.println(\"\\n\"+useqVersion+\" Arguments: \"+ Misc.stringArrayToString(args, \" \") +\"\\n\");\n\t\tString dmelCountString = null;\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'f': drssFile = new File(args[++i]); break;\n\t\t\t\t\tcase 'd': dmelCountString = args[++i]; break;\n\t\t\t\t\tdefault: Misc.printErrAndExit(\"\\nProblem, unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printErrAndExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//check\n\t\tif (drssFile == null || drssFile.exists() == false) Misc.printErrAndExit(\"\\nFailed to find your drss file!\");\n\t\tif (dmelCountString == null) Misc.printErrAndExit(\"\\nFailed to find your treatment control count string!\");\n\t\tint[] dmel = Num.parseInts(dmelCountString, Misc.COMMA);\n\t\ttreatmentCounts = dmel[0];\n\t\tcontrolCounts = dmel[1];\n\n\n\n\t}", "public static void parseArgs(String[] args) throws ConsolePreferencesException {\n\n\t\ttry{\n\t\t\t\n\t\t\tmap = new HashMap<String, String>();\n\t\t\t\n\t\t\tfor (int i = 0; i < args.length; i++) {\n\n\t\t\t\tif (args[i].equals(\"--input\")) {\n\t\t\t\t\tmap.put(INPUT_PATH, args[i + 1]);\n\t\t\t\t}\n\t\t\t\tif (args[i].equals(\"--output\")) {\n\t\t\t\t\tmap.put(OUTPUT_PATH, args[i + 1]);\n\t\t\t\t}\n\t\t\t\tif (args[i].equals(\"--preferences\")) {\n\t\t\t\t\tmap.put(PREFERENCES_PATH, args[i + 1]);\n\t\t\t\t\tp = new Properties();\n\t\t\t\t\tp.load(new FileInputStream(args[i + 1]));\n\t\t\t\t}\n\t\t\t\tif (args[i].equals(\"--sign\")) {\n\t\t\t\t\tmap.put(ACTION, ACTION_SIGN);\n\t\t\t\t}\n\t\t\t\tif (args[i].equals(\"--validate\")) {\n\t\t\t\t\tmap.put(ACTION, ACTION_VALIDATE);\n\t\t\t\t}\n\t\t\t\tif (args[i].equals(\"--xades\")) {\n\t\t\t\t\tmap.put(TYPE, TYPE_XADES);\n\t\t\t\t}\n\t\t\t\tif (args[i].equals(\"--pdf\")) {\n\t\t\t\t\tmap.put(TYPE, TYPE_PDF);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tthrow new ConsolePreferencesException(e);\n\t\t}\n\t}", "void processCommandLineArguments(String[] args) throws ConfigurationException;", "protected void parseArgs(String args[]) throws IllegalArgumentException, NumberFormatException\n\t{\n\t\tif(args.length != 1)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(this.getClass().getName()+\n\t\t\t\t\" <temperature (degrees C)>\");\n\t\t}\n\t\ttemperature = Double.parseDouble(args[0]);\n\t}", "public void analyseArguments(String[] args) throws ArgumentsException {\n \t\t\n for (int i=0;i<args.length;i++){ \n \n \n if (args[i].matches(\"-s\")){\n affichage = true;\n }\n else if (args[i].matches(\"-seed\")) {\n aleatoireAvecGerme = true;\n i++; \n \t// traiter la valeur associee\n try { \n seed =new Integer(args[i]);\n \n }\n catch (Exception e) {\n throw new ArgumentsException(\"Valeur du parametre -seed invalide :\" + args[i]);\n } \t\t\n }\n \n else if (args[i].matches(\"-mess\")){\n i++; \n \t// traiter la valeur associee\n messageString = args[i];\n if (args[i].matches(\"[0,1]{7,}\")) {\n messageAleatoire = false;\n nbBitsMess = args[i].length();\n \n } \n else if (args[i].matches(\"[0-9]{1,6}\")) {\n messageAleatoire = true;\n nbBitsMess = new Integer(args[i]);\n if (nbBitsMess < 1) \n throw new ArgumentsException (\"Valeur du parametre -mess invalide : \" + nbBitsMess);\n }\n else \n throw new ArgumentsException(\"Valeur du parametre -mess invalide : \" + args[i]);\n }\n \n else throw new ArgumentsException(\"Option invalide :\"+ args[i]);\n \n }\n \n }", "public boolean parseArgs(String argv[]) {\n if (argv != null) {\n for (int argc = 0; argc < argv.length; argc += 2)\n if (argv[argc].equals(\"-f\"))\n mPathname = argv[argc + 1];\n else if (argv[argc].equals(\"-d\"))\n mDiagnosticsEnabled = argv[argc + 1].equals(\"true\");\n else if (argv[argc].equals(\"-s\"))\n \tmSeparator = argv[argc + 1];\n else {\n printUsage();\n return false;\n }\n return true;\n } else\n return false;\n }", "private boolean parseArguments(final String[] args) {\r\n final Args arg = new Args(args);\r\n boolean ok = true;\r\n try {\r\n while(arg.more() && ok) {\r\n if(arg.dash()) {\r\n final char ca = arg.next();\r\n if(ca == 'u') {\r\n final String[] s = new String[args.length - 1];\r\n System.arraycopy(args, 1, s, 0, s.length);\r\n updateTimes(s);\r\n return false;\r\n } else if(ca == 'x') {\r\n convertTopics();\r\n return false;\r\n }\r\n\r\n ok = false;\r\n }\r\n }\r\n session = new ClientSession(ctx);\r\n session.execute(new Set(Prop.INFO, true));\r\n } catch(final Exception ex) {\r\n ok = false;\r\n Main.errln(\"Please run BaseXServer for using server mode.\");\r\n ex.printStackTrace();\r\n }\r\n \r\n if(!ok) {\r\n Main.outln(\"Usage: \" + Main.name(this) + \" [options]\" + NL +\r\n \" -u[...] update submission times\" + NL +\r\n \" -x convert queries\");\r\n }\r\n return ok;\r\n }", "public static Arguments parseArgs(String args[]) {\n // Set defaults\n ArgumentBuilder builder = new ArgumentBuilder();\n builder.setFileName(args[0]);\n builder.setMode(RunMode.LOCAL);\n builder.setExampleSize(2);\n builder.setFileTemplate(FileTemplate.JAVA_DEFAUlT);\n\n for (int i = 1; i < args.length; i++) {\n switch (args[i]) {\n case \"-h\":\n case \"-help\":\n help();\n break;\n case \"-size\":\n case \"-s\":\n builder.setExampleSize(Integer.parseInt(args[i + 1]));\n i++;\n break;\n case \"-kattis\":\n builder.setMode(RunMode.KATTIS);\n break;\n case \"-local\":\n builder.setMode(RunMode.LOCAL);\n break;\n case \"-template\":\n case \"-t\":\n builder.setFileTemplate(FileTemplate.valueOf(args[i + 1].toUpperCase()));\n i++;\n break;\n }\n }\n if (builder.getMode() == RunMode.LOCAL && builder.isExampleSizeSetManual()) {\n System.out.println(\"No example size set, using default of 2.\");\n }\n return builder.build();\n }", "private void processArgs(String[] args) throws MalformedURLException, JAXBException, IOException, URISyntaxException, Exception {\n Options options = cli.getOptions(); \n options.addOption(\"collection\", true, \"Data Collection that this Fulfillment request applies to. Defaults to 'default'.\");\n Option idOpt = new Option(\"result_id\", true, \"The result_id being requested.\");\n idOpt.setRequired(true);\n options.addOption(idOpt);\n options.addOption(\"result_part_number\", true, \"The part number being requested. Defaults to '1'.\");\n \n cli.parse(args);\n CommandLine cmd = cli.getCmd();\n\n // Handle default values.\n String collection = cmd.hasOption(\"collection\") ? cmd.getOptionValue(\"collection\") : \"default\";\n int part = cmd.hasOption(\"result_part_number\") ? Integer.parseInt(cmd.getOptionValue(\"result_part_number\")) : 1;\n \n taxiiClient = generateClient(cmd);\n \n // Prepare the message to send.\n PollFulfillment request = factory.createPollFulfillment()\n .withMessageId(MessageHelper.generateMessageId())\n .withCollectionName(collection)\n .withResultId(cmd.getOptionValue(\"result_id\"))\n .withResultPartNumber(BigInteger.valueOf(part)); \n\n doCall(cmd, request);\n \n }", "@Test\n public void correctArgumentsReturnsArguments() {\n String projectPath = \"/pathI/\";\n String resultPath = \"/pathO/\";\n String apkPath = apkFile.getAbsolutePath();\n String filtersPath = filterFile.getAbsolutePath();\n String[] inputArgs = new String[] {\"-i\", projectPath, \"-o\", resultPath, \n \"-a\", apkPath, \"-f\", filtersPath};\n ArgumentReader sut = new ArgumentReader(inputArgs);\n\n Arguments args = sut.read();\n\n assertThat(args, notNullValue());\n assertThat(args.getProjectPath(), equalTo(projectPath));\n assertThat(args.getResultPath(), equalTo(resultPath));\n assertThat(args.getApkFilePath(), equalTo(apkPath));\n assertThat(args.getFiltersPath(), equalTo(filtersPath));\n }", "static Configuration parseArguments(String[] args) {\n \n // Global config\n GlobalConfiguration globalConfig = new GlobalConfiguration();\n \n // Module-specific options.\n List<ModuleSpecificProperty> moduleConfigs = new LinkedList<>();\n \n \n // For each argument...\n for (String arg : args) {\n arg = StringUtils.removeStart( arg, \"--\" );\n \n if( arg.equals(\"help\") ){\n Utils.writeHelp();\n return null;\n }\n if( arg.startsWith(\"as5.dir=\") || arg.startsWith(\"eap5.dir=\") || arg.startsWith(\"src.dir=\") ) {\n globalConfig.getAS5Config().setDir(StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"dest.dir=\") || arg.startsWith(\"eap6.dir=\") || arg.startsWith(\"dest.dir=\") || arg.startsWith(\"wfly.dir=\") ) {\n globalConfig.getAS7Config().setDir(StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"as5.profile=\") || arg.startsWith(\"eap5.profile=\") || arg.startsWith(\"src.profile=\") ) {\n globalConfig.getAS5Config().setProfileName(StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"dest.confPath=\") || arg.startsWith(\"eap6.confPath=\") || arg.startsWith(\"dest.conf.file=\") || arg.startsWith(\"wfly.confPath=\") ) {\n globalConfig.getAS7Config().setConfigPath(StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"dest.mgmt=\") || arg.startsWith(\"eap6.mgmt=\") || arg.startsWith(\"dest.mgmt=\") || arg.startsWith(\"wfly.mgmt=\") ) {\n parseMgmtConn( StringUtils.substringAfter(arg, \"=\"), globalConfig.getAS7Config() );\n continue;\n }\n\n if( arg.startsWith(\"app.path=\") ) {\n globalConfig.addDeploymentPath( StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"valid.skip\") ) {\n globalConfig.setSkipValidation(true);\n continue;\n }\n\n if( arg.equals(\"dry\") || arg.equals(\"dryRun\") || arg.equals(\"dry-run\") ) {\n globalConfig.setDryRun(true);\n continue;\n }\n \n if( arg.equals(\"test\") || arg.equals(\"testRun\") || arg.equals(\"test-run\") ) {\n globalConfig.setTestRun(true);\n continue;\n }\n \n if( arg.startsWith(\"report.dir=\") ) {\n globalConfig.setReportDir( StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"migrators.dir=\") || arg.startsWith(\"migr.dir=\") ) {\n globalConfig.setExternalMigratorsDir( StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n // User variables available in EL and Groovy in external migrators.\n if (arg.startsWith(\"userVar.\")) {\n \n // --userVar.<property.name>=<value>\n String rest = StringUtils.substringAfter(arg, \".\");\n String name = StringUtils.substringBefore(rest, \"=\");\n String value = StringUtils.substringAfter(rest, \"=\");\n \n globalConfig.getUserVars().put( name, value );\n }\n \n\n // Module-specific configurations.\n // TODO: Process by calling IMigrator instances' callback.\n if (arg.startsWith(\"conf.\")) {\n \n // --conf.<module>.<property.name>[=<value>]\n String conf = StringUtils.substringAfter(arg, \".\");\n String module = StringUtils.substringBefore(conf, \".\");\n String propName = StringUtils.substringAfter(conf, \".\");\n int pos = propName.indexOf('=');\n String value = null;\n if( pos == -1 ){\n value = propName.substring(pos+1);\n propName = propName.substring(0, pos);\n }\n \n moduleConfigs.add( new ModuleSpecificProperty(module, propName, value));\n }\n\n \n // Unrecognized.\n \n if( ! arg.contains(\"=\") ){\n // TODO: Could be AS5 or AS7 dir.\n }\n \n System.err.println(\"Warning: Unknown argument: \" + arg + \" !\");\n Utils.writeHelp();\n continue;\n }\n\n Configuration configuration = new Configuration();\n configuration.setModuleConfigs(moduleConfigs);\n configuration.setGlobalConfig(globalConfig);\n \n return configuration;\n \n }", "private static void processArguments(String[] args) throws UnknownHostException {\n //\n // PROD indicates we should use the production network\n // TEST indicates we should use the test network\n //\n if (args[0].equalsIgnoreCase(\"TEST\")) {\n testNetwork = true;\n } else if (!args[0].equalsIgnoreCase(\"PROD\")) {\n throw new IllegalArgumentException(\"Valid options are PROD and TEST\");\n }\n //\n // A bitcoin URI will be specified if we are processing a payment request\n //\n if (args.length > 1) {\n if (args[1].startsWith(\"bitcoin:\"))\n uriString = args[1];\n else\n throw new IllegalArgumentException(\"Unrecognized command line parameter\");\n }\n }", "public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\tSystem.out.println(parseInputFile());\r\n\t\t\r\n\t}", "public static void main(String args[]) throws ParseException {\n }", "private void parseCommandLine(final String[] args) {\n if (args.length == 0) {\r\n System.out.println(usage);\r\n System.exit(1);\r\n }\r\n // One parameter (Run Code Metrics without Code Churn)\r\n else if (args.length == 1) {\r\n newFile = new File(args[0]);\r\n\r\n if (newFile.isDirectory()) {\r\n // One directory\r\n newFiles.parseSrcDir(newFile);\r\n } else if (newFile.isFile()) {\r\n // One file\r\n newFiles.addSrcFile(newFile);\r\n } else {\r\n System.out.println(usage);\r\n System.exit(1);\r\n }\r\n }\r\n // Two parameters calculate all Code Metrics\r\n else if (args.length == 2) {\r\n oldFile = new File(args[0]);\r\n newFile = new File(args[1]);\r\n calculateCodeChurn = true;\r\n\r\n if (oldFile.isDirectory() && newFile.isDirectory()) {\r\n // Two directories\r\n newFiles.parseSrcDir(newFile);\r\n oldFiles.parseSrcDir(oldFile);\r\n newFiles.setPath(newFile.getAbsolutePath());\r\n oldFiles.setPath(oldFile.getAbsolutePath());\r\n } else if (oldFile.isFile() && newFile.isFile()) {\r\n // Two files\r\n oldFiles.addSrcFile(oldFile);\r\n newFiles.addSrcFile(newFile);\r\n } else {\r\n System.out.println(usage);\r\n System.exit(1);\r\n }\r\n }\r\n }", "private static void parseCommandLine(String[] command) {\r\n\t\tint i = 0;\r\n\t\t\r\n\t\twhile (i < command.length) {\r\n\t\t\tif (command[i].equals(\"-f\")) { // input file\r\n\t\t\t\tdataFileName = command[i+1];\r\n\t\t\t\ti += 2;\r\n\t\t\t}\r\n\t\t\telse if (command[i].equals(\"-s\")) { // data split\r\n\t\t\t\tif (command[i+1].equals(\"simple\")) {\r\n\t\t\t\t\tevaluationMode = DataSplitManager.SIMPLE_SPLIT;\r\n\t\t\t\t\ttestRatio = Double.parseDouble(command[i+2]);\r\n\t\t\t\t}\r\n\t\t\t\telse if (command[i+1].equals(\"pred\")) {\r\n\t\t\t\t\tevaluationMode = DataSplitManager.PREDEFINED_SPLIT;\r\n\t\t\t\t\tsplitFileName = command[i+2].trim();\r\n\t\t\t\t}\r\n\t\t\t\telse if (command[i+1].equals(\"kcv\")) {\r\n\t\t\t\t\tevaluationMode = DataSplitManager.K_FOLD_CROSS_VALIDATION;\r\n\t\t\t\t\tfoldCount = Integer.parseInt(command[i+2]);\r\n\t\t\t\t}\r\n\t\t\t\telse if (command[i+1].equals(\"rank\")) {\r\n\t\t\t\t\tevaluationMode = DataSplitManager.RANK_EXP_SPLIT;\r\n\t\t\t\t\tuserTrainCount = Integer.parseInt(command[i+2]);\r\n\t\t\t\t\tminTestCount = 10;\r\n\t\t\t\t}\r\n\t\t\t\ti += 3;\r\n\t\t\t}\r\n\t\t\telse if (command[i].equals(\"-a\")) { // algorithm\r\n\t\t\t\trunAllAlgorithms = false;\r\n\t\t\t\talgorithmCode = command[i+1];\r\n\t\t\t\t\r\n\t\t\t\t// parameters for the algorithm:\r\n\t\t\t\tint j = 0;\r\n\t\t\t\twhile (command.length > i+2+j && !command[i+2+j].startsWith(\"-\")) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\talgorithmParameters = new String[j];\r\n\t\t\t\tSystem.arraycopy(command, i+2, algorithmParameters, 0, j);\r\n\t\t\t\t\r\n\t\t\t\ti += (j + 2);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static List<Pair<OvsDbConverter.Entry, Object>> parseArguments(\n Deque<String> arguments) {\n\n List<Pair<OvsDbConverter.Entry, Object>> args = new ArrayList<>();\n\n for (String arg; null != (arg = arguments.peek()); ) {\n arguments.pop();\n if (arg.startsWith(\"~\")) {\n arg = arg.substring(1).replace('-', '_').toLowerCase(\n Locale.ROOT);\n // Get the converter entry for this argument type.\n OvsDbConverter.Entry entry = OvsDbConverter.get(arg);\n\n // If there is no entry, thrown an exception.\n if (null == entry) {\n throw new IllegalArgumentException(\n \"Unknown argument type: \" + arg);\n }\n\n // Add the entry to the arguments list.\n if (entry.hasConverter()) {\n args.add(new Pair<>(entry, entry.convert(arguments.pop())));\n } else {\n args.add(new Pair<>(entry, null));\n }\n\n } else throw new IllegalArgumentException(\n \"Unknown argument type: \" + arg);\n }\n\n return args;\n }", "public void processArguments(String[] _args) {\r\n\t\tboolean stateRead = false;\r\n\t\tif (_args != null && _args.length > 0) {\r\n\t\t\tfor (int i = 0; i < _args.length; i++) {\r\n\t\t\t\tif (_args[i].toLowerCase().endsWith(\".xml\")) {\r\n\t\t\t\t\tstateRead = readState(resetFile = _args[i]);\r\n\t\t\t\t} else if (_args[i].equals(\"-_initialState\")) {\r\n\t\t\t\t\tstateRead = readState(resetFile = _args[++i]);\r\n\t\t\t\t} else if (_args[i].equals(\"-_noDescription\")) {\r\n\t\t\t\t\tshowDescriptionOnStart = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private static void validateInputArguments(String args[]) {\n\n\t\tif (args == null || args.length != 2) {\n\t\t\tthrow new InvalidParameterException(\"invalid Parameters\");\n\t\t}\n\n\t\tString dfaFileName = args[DFA_FILE_ARGS_INDEX];\n\t\tif (dfaFileName == null || dfaFileName.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid file name\");\n\t\t}\n\n\t\tString delimiter = args[DELIMITER_SYMBOL_ARGS_INDEX];\n\t\tif (delimiter == null || delimiter.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid delimiter symbol\");\n\t\t}\n\t}", "public static void main(String[] args) throws ParseException\n {\n }", "@OverridingMethodsMustInvokeSuper\n protected Tool parseArguments(String[] args) throws Exception {\n for (String arg : options(args)) {\n if (arg.equals(\"--debug\")) {\n checkArgument(verbosity == Level.DEFAULT, \"Specify one of: --quiet --verbose --debug\");\n setVerbosity(Level.DEBUG);\n } else if (arg.equals(\"--verbose\")) {\n checkArgument(verbosity == Level.DEFAULT, \"Specify one of: --quiet --verbose --debug\");\n setVerbosity(Level.VERBOSE);\n } else if (arg.equals(\"--quiet\")) {\n checkArgument(verbosity == Level.DEFAULT, \"Specify one of: --quiet --verbose --debug\");\n setVerbosity(Level.QUIET);\n } else if (arg.equals(\"--pretty\")) {\n setPretty(true);\n } else {\n return unknownOption(arg);\n }\n }\n return this;\n }", "static public void main(String[] args)\n {\n try {\n ParserModel parser = new ParserModel();\n\n Map<String, String> options = getOptions(args);\n\n // process received options\n \n if (hasRequiredOptionsMissing(options)) {\n throw new IllegalArgumentException(\n \"Please provide all required options: \" + String.join(\",\", requiredOptions)\n );\n }\n\n String duration = options.get(\"duration\");\n if (!isValidDuration(duration.toUpperCase())) {\n throw new IllegalArgumentException(\"Unknown duration: \" + duration);\n }\n\n String startDateStr = options.get(\"startDate\");\n LocalDateTime startDate = null;\n try {\n startDate = parser.prepareDateArgument(startDateStr);\n } catch (DateTimeParseException e) {\n throw new IllegalArgumentException(\n \"Expected date pattern: \" + ParserModel.DATE_PATTERN\n );\n }\n\n String thresholdStr = options.get(\"threshold\");\n int threshold;\n try {\n threshold = Integer.parseInt(thresholdStr);\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\n \"Expected int value for threshold, actual: \" + thresholdStr\n );\n }\n\n // take action based on processed options\n // if \"accesslog\" option is provided, also process log file\n if (options.containsKey(\"accesslog\")) {\n List<LogEntry> list = parser.parse(options.get(\"accesslog\"));\n parser.saveLogEntries(list);\n }\n \n duration = duration.toUpperCase();\n Map<String, Integer> result = parser.findAboveThresholdIPs(startDate, Duration.valueOf(duration), threshold);\n\n if (result.isEmpty()) {\n System.out.println(\"No above-threshold IPs for given arguments\");\n } else {\n result.keySet().forEach((ip) -> {\n System.out.println(ip);\n });\n\n parser.logBlockedIPs(result, startDate, Duration.valueOf(duration), threshold);\n }\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "public static void main(String[] args) throws IOException, FormatMismatchException\n\t{\n\t\t//StandardArguments sargs = new StandardArguments();\n\t\t//sargs.bake(args);\n\t\t\n\t\tEdosTool tool = new EdosTool();\n\t\t\n\t\t/*if (!sargs.getLongSuffices(\"type=\").isEmpty())\n\t\t{\n\t\t\ttool.formatName = sargs.getLongSuffices(\"type=\").get(0);\n\t\t}\n\t\t\n\t\tif (!sargs.getLongSuffices(\"suffix=\").isEmpty())\n\t\t{\n\t\t\ttool.suffix = sargs.getLongSuffices(\"suffix=\").get(0);\n\t\t}\n\t\t\n\t\ttool.verbose = sargs.isSwitchPresent('v');\n\t\t\n\t\t\n\t\tfor (String t : sargs.getTargets())\n\t\t{\n\t\t\ttool.processExtract(new File(t));\n\t\t}*/\n\t}", "public static void main(String[] args) {\n \ttry{\n\t \tLexer l = new Lexer(System.in);\n\t \tParser p = new Parser(l.getTokens());\n\t \t// System.out.println(p.printParseTree());\n\t\t\tp.evaluate();\n\t\t} catch (IOException e){\n\t\t\tSystem.out.println(\"End of input...\");\n \t} catch (Exception e){\t\n\t\t\tSystem.out.println(\"Error!\");\n\t\t\tif ( args.length > 0 && args[0].matches(\"-d\") ){\n \t\t\tSystem.out.println(e.getMessage());\n\t \t\te.printStackTrace();\n\t\t\t}\n \t\tSystem.exit(3);\n \t}\n }", "private static ArgumentsPair parseArgs(String args[]) {\n String allArgs[] = new String[] {\n PARAMETER_NEW_FORMAT,\n PARAMETER_TRANSFORM,\n PARAMETER_BASE,\n PARAMETER_BITS,\n PARAMETER_BYTES,\n PARAMETER_DIFFERENCE,\n PARAMETER_STRENGTH,\n PARAMETER_TIME\n };\n Set<String> allArgsSet = new HashSet<>(Arrays.asList(allArgs));\n ArgumentsPair argumentsPair = new ArgumentsPair();\n\n for (int i = 0; i < args.length; i++) {\n String param = args[i].substring(1);\n if (allArgsSet.contains(param)) {\n argumentsPair.paramsAdd(param);\n } else if (param.equals(PARAMETER_ALL)) {\n argumentsPair.paramsAddAll(allArgsSet);\n argumentsPair.getParams().remove(PARAMETER_NEW_FORMAT);\n argumentsPair.getParams().remove(PARAMETER_TRANSFORM);\n } else if (param.equals(PARAMETER_GENERATE)) {\n if (args.length <= i + 1) {\n System.err.println(\"Wrong -\" + PARAMETER_GENERATE + \" parameter. Use -\" + PARAMETER_GENERATE + \" keyBitLength. (keyBitLength = 512|1024)\");\n }\n else {\n int keyBitLength = Integer.valueOf(args[++i]);\n switch (keyBitLength) {\n case 1024:\n GENERATE_KEYS = true;\n GENERATED_PRIME_BIT_LENGTH = 512;\n break;\n case 512:\n GENERATE_KEYS = true;\n GENERATED_PRIME_BIT_LENGTH = 256;\n break;\n default:\n System.err.println(\"Wrong -\" + PARAMETER_GENERATE + \" parameter. Use -\" + PARAMETER_GENERATE + \" keyBitLength. (keyBitLength = 512|1024)\");\n }\n }\n } else {\n argumentsPair.filesAdd(args[i]);\n }\n }\n return argumentsPair;\n }", "public void readArgs(String[] args)\n {\n for (int i = 0; i < args.length; i++)\n {\n open(args[i]);\n }\n setTitle();\n }", "protected int parseOptions(final String[] args) {\n\t\tOptions options = new Options();\n\t\toptions.addOption(\"a\", \"start\", true, \"Start an asynchronous task\");\n\t\toptions.addOption(\"h\", \"hostname\", true, \"Specify the hostname to connect to\");\n\t\toptions.addOption(\"l\", \"list\", false, \"List the available asynchronous tasks\");\n\t\toptions.addOption(\"o\", \"stop\", true, \"Stop an asynchronous task\");\n\t\toptions.addOption(\"p\", \"port\", true, \"Specify the port to connect to\");\n\t\toptions.addOption(\"i\", \"identifier\", true, \"Specify the identifier to synchronize\");\n\t\toptions.addOption(\"t\", \"attributes\", true, \"Specify the attributes pivot to synchronize (comma separated, identifier parameter required)\");\n\t\toptions.addOption(\"s\", \"status\", true, \"Get a task status\");\n\n\t\tCommandLineParser parser = new GnuParser();\n\n\t\ttry {\n\t\t\tCommandLine cmdLine = parser.parse(options, args);\n\t\t\tif ( cmdLine.hasOption(\"a\") ) {\n\t\t\t\toperation = OperationType.START;\n\t\t\t\ttaskName = cmdLine.getOptionValue(\"a\");\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"l\") ) {\n\t\t\t\toperation = OperationType.TASKS_LIST;\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"o\") ) {\n\t\t\t\toperation = OperationType.STOP;\n\t\t\t\ttaskName = cmdLine.getOptionValue(\"o\");\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"s\") ) {\n\t\t\t\toperation = OperationType.STATUS;\n\t\t\t\ttaskName = cmdLine.getOptionValue(\"s\");\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"i\") ) {\n\t\t\t\tidToSync = cmdLine.getOptionValue(\"i\");\n\t\t\t\tif(cmdLine.hasOption(\"t\")) {\n\t\t\t\t\tStringTokenizer attrsStr = new StringTokenizer(cmdLine.getOptionValue(\"t\"),\",\");\n\t\t\t\t\twhile(attrsStr.hasMoreTokens()) {\n\t\t\t\t\t\tString token = attrsStr.nextToken();\n\t\t\t\t\t\tif(token.contains(\"=\")) {\n\t\t\t\t\t\t\tattrsToSync.put(token.substring(0, token.indexOf(\"=\")), token.substring(token.indexOf(\"=\")+1));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tLOGGER.error(\"Unknown attribute name=value couple in \\\"{}\\\". Please check your parameters !\", token);\n\t\t\t\t\t\t\tprintHelp(options);\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (cmdLine.hasOption(\"t\") ) {\n\t\t\t\tLOGGER.error(\"Attributes specified, but missing identifier !\");\n\t\t\t\tprintHelp(options);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"h\") ) {\n\t\t\t\thostname = cmdLine.getOptionValue(\"h\");\n\t\t\t} else {\n\t\t\t\thostname = \"localhost\";\n\t\t\t\tLOGGER.info(\"Hostname parameter not specified, using {} as default value.\", hostname);\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"p\") ) {\n\t\t\t\tport = cmdLine.getOptionValue(\"p\");\n\t\t\t} else {\n\t\t\t\tport = \"1099\";\n\t\t\t\tLOGGER.info(\"TCP Port parameter not specified, using {} as default value.\", port);\n\t\t\t}\n\t\t\tif (operation == OperationType.UNKNOWN ) {\n\t\t\t\tprintHelp(options);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t} catch (ParseException e) {\n\t\t\tLOGGER.error(\"Unable to parse the options ({})\", e.toString());\n\t\t\tLOGGER.debug(e.toString(), e);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}", "public static void main(final String[] args) {\n\t\tcheckUse(VParser.parse(FileUtils.readAllText(args[0])));\n\t}", "public static void main(String[] args) throws IOException, ParseException {\n\t}", "private static void processArguments(String[] args) {\r\n if (args.length < 2) {\r\n IO.displayGUI(args.length + \" arguments provided.\\nPlease provide input and output files through the GUI.\");\r\n IO.chooseFiles(); // choose files with GUI\r\n } else {\r\n // Open file streams\r\n IO.openStream(args[0], args[1]);\r\n }\r\n }", "public ArgumentsParser(String... args) {\n this.arguments = new HashMap<>(args.length);\n this.args = Arrays.copyOf(args, args.length);\n }", "private void parseArgs(String[] object) throws IllegalArgumentException {\n Object object2;\n int n;\n int n2;\n int n3 = 0;\n boolean bl = false;\n boolean bl2 = true;\n block6 : do {\n int n4 = ((Object)object).length;\n n2 = 0;\n n = ++n3;\n if (n3 >= n4) break;\n object2 = object[n3];\n if (((String)object2).equals(\"--\")) {\n n = n3 + 1;\n break;\n }\n if (((String)object2).startsWith(\"--setuid=\")) {\n if (this.mUidSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mUidSpecified = true;\n this.mUid = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).startsWith(\"--setgid=\")) {\n if (this.mGidSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mGidSpecified = true;\n this.mGid = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).startsWith(\"--target-sdk-version=\")) {\n if (this.mTargetSdkVersionSpecified) throw new IllegalArgumentException(\"Duplicate target-sdk-version specified\");\n this.mTargetSdkVersionSpecified = true;\n this.mTargetSdkVersion = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).equals(\"--runtime-args\")) {\n bl = true;\n continue;\n }\n if (((String)object2).startsWith(\"--runtime-flags=\")) {\n this.mRuntimeFlags = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).startsWith(\"--seinfo=\")) {\n if (this.mSeInfoSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mSeInfoSpecified = true;\n this.mSeInfo = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).startsWith(\"--capabilities=\")) {\n if (this.mCapabilitiesSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mCapabilitiesSpecified = true;\n if (((String[])(object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1).split(\",\", 2))).length == 1) {\n this.mPermittedCapabilities = this.mEffectiveCapabilities = Long.decode((String)object2[0]).longValue();\n continue;\n }\n this.mPermittedCapabilities = Long.decode((String)object2[0]);\n this.mEffectiveCapabilities = Long.decode((String)object2[1]);\n continue;\n }\n if (((String)object2).startsWith(\"--rlimit=\")) {\n String[] arrstring = ((String)object2).substring(((String)object2).indexOf(61) + 1).split(\",\");\n if (arrstring.length != 3) throw new IllegalArgumentException(\"--rlimit= should have 3 comma-delimited ints\");\n object2 = new int[arrstring.length];\n for (n = 0; n < arrstring.length; ++n) {\n object2[n] = Integer.parseInt(arrstring[n]);\n }\n if (this.mRLimits == null) {\n this.mRLimits = new ArrayList();\n }\n this.mRLimits.add((int[])object2);\n continue;\n }\n if (((String)object2).startsWith(\"--setgroups=\")) {\n if (this.mGids != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1).split(\",\");\n this.mGids = new int[((String[])object2).length];\n n = ((Object[])object2).length - 1;\n do {\n if (n < 0) continue block6;\n this.mGids[n] = Integer.parseInt((String)object2[n]);\n --n;\n } while (true);\n }\n if (((String)object2).equals(\"--invoke-with\")) {\n if (this.mInvokeWith != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n ++n3;\n try {\n this.mInvokeWith = object[n3];\n }\n catch (IndexOutOfBoundsException indexOutOfBoundsException) {\n throw new IllegalArgumentException(\"--invoke-with requires argument\");\n }\n }\n if (((String)object2).startsWith(\"--nice-name=\")) {\n if (this.mNiceName != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mNiceName = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).equals(\"--mount-external-default\")) {\n this.mMountExternal = 1;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-read\")) {\n this.mMountExternal = 2;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-write\")) {\n this.mMountExternal = 3;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-full\")) {\n this.mMountExternal = 6;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-installer\")) {\n this.mMountExternal = 5;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-legacy\")) {\n this.mMountExternal = 4;\n continue;\n }\n if (((String)object2).equals(\"--query-abi-list\")) {\n this.mAbiListQuery = true;\n continue;\n }\n if (((String)object2).equals(\"--get-pid\")) {\n this.mPidQuery = true;\n continue;\n }\n if (((String)object2).startsWith(\"--instruction-set=\")) {\n this.mInstructionSet = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).startsWith(\"--app-data-dir=\")) {\n this.mAppDataDir = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).equals(\"--preload-app\")) {\n this.mPreloadApp = object[++n3];\n continue;\n }\n if (((String)object2).equals(\"--preload-package\")) {\n this.mPreloadPackage = object[++n3];\n this.mPreloadPackageLibs = object[++n3];\n this.mPreloadPackageLibFileName = object[++n3];\n this.mPreloadPackageCacheKey = object[++n3];\n continue;\n }\n if (((String)object2).equals(\"--preload-default\")) {\n this.mPreloadDefault = true;\n bl2 = false;\n continue;\n }\n if (((String)object2).equals(\"--start-child-zygote\")) {\n this.mStartChildZygote = true;\n continue;\n }\n if (((String)object2).equals(\"--set-api-blacklist-exemptions\")) {\n this.mApiBlacklistExemptions = (String[])Arrays.copyOfRange(object, n3 + 1, ((Object)object).length);\n n3 = ((Object)object).length;\n bl2 = false;\n continue;\n }\n if (((String)object2).startsWith(\"--hidden-api-log-sampling-rate=\")) {\n object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n try {\n this.mHiddenApiAccessLogSampleRate = Integer.parseInt((String)object2);\n bl2 = false;\n }\n catch (NumberFormatException numberFormatException) {\n object = new StringBuilder();\n ((StringBuilder)object).append(\"Invalid log sampling rate: \");\n ((StringBuilder)object).append((String)object2);\n throw new IllegalArgumentException(((StringBuilder)object).toString(), numberFormatException);\n }\n }\n if (((String)object2).startsWith(\"--hidden-api-statslog-sampling-rate=\")) {\n object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n try {\n this.mHiddenApiAccessStatslogSampleRate = Integer.parseInt((String)object2);\n bl2 = false;\n }\n catch (NumberFormatException numberFormatException) {\n object = new StringBuilder();\n ((StringBuilder)object).append(\"Invalid statslog sampling rate: \");\n ((StringBuilder)object).append((String)object2);\n throw new IllegalArgumentException(((StringBuilder)object).toString(), numberFormatException);\n }\n }\n if (((String)object2).startsWith(\"--package-name=\")) {\n if (this.mPackageName != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mPackageName = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n n = n3;\n if (!((String)object2).startsWith(\"--usap-pool-enabled=\")) break;\n this.mUsapPoolStatusSpecified = true;\n this.mUsapPoolEnabled = Boolean.parseBoolean(((String)object2).substring(((String)object2).indexOf(61) + 1));\n bl2 = false;\n } while (true);\n if (!this.mAbiListQuery && !this.mPidQuery) {\n if (this.mPreloadPackage != null) {\n if (((Object)object).length - n > 0) throw new IllegalArgumentException(\"Unexpected arguments after --preload-package.\");\n } else if (this.mPreloadApp != null) {\n if (((Object)object).length - n > 0) throw new IllegalArgumentException(\"Unexpected arguments after --preload-app.\");\n } else if (bl2) {\n if (!bl) {\n object2 = new StringBuilder();\n ((StringBuilder)object2).append(\"Unexpected argument : \");\n ((StringBuilder)object2).append((String)object[n]);\n throw new IllegalArgumentException(((StringBuilder)object2).toString());\n }\n this.mRemainingArgs = new String[((Object)object).length - n];\n object2 = this.mRemainingArgs;\n System.arraycopy(object, n, object2, 0, ((String[])object2).length);\n }\n } else if (((Object)object).length - n > 0) throw new IllegalArgumentException(\"Unexpected arguments after --query-abi-list.\");\n if (!this.mStartChildZygote) return;\n bl = false;\n object = this.mRemainingArgs;\n n = ((Object)object).length;\n n3 = n2;\n do {\n bl2 = bl;\n if (n3 >= n) break;\n if (((String)object[n3]).startsWith(\"--zygote-socket=\")) {\n bl2 = true;\n break;\n }\n ++n3;\n } while (true);\n if (!bl2) throw new IllegalArgumentException(\"--start-child-zygote specified without --zygote-socket=\");\n }", "public static String parseInput(String[] args) {\n\t\treturn String.join(\" \", args);\n\t}", "public static void main(String[] args) throws ParseException {\n\t\t\n\t\t\n\t\t\n\t}", "private static void validateCommandLineArguments(AutomationContext context, String extendedCommandLineArgs[])\r\n\t{\r\n\t\t//fetch the argument configuration types required\r\n\t\tCollection<IPlugin<?, ?>> plugins = PluginManager.getInstance().getPlugins();\r\n \t\tList<Class<?>> argBeanTypes = plugins.stream()\r\n\t\t\t\t.map(config -> config.getArgumentBeanType())\r\n\t\t\t\t.filter(type -> (type != null))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\t\r\n\t\targBeanTypes = new ArrayList<>(argBeanTypes);\r\n\t\t\r\n\t\t//Add basic arguments type, so that on error its properties are not skipped in error message\r\n\t\targBeanTypes.add(AutoxCliArguments.class);\r\n\r\n\t\t//if any type is required creation command line options and parse command line arguments\r\n\t\tCommandLineOptions commandLineOptions = OptionsFactory.buildCommandLineOptions(argBeanTypes.toArray(new Class<?>[0]));\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tcommandLineOptions.parseBeans(extendedCommandLineArgs);\r\n\t\t} catch(MissingArgumentException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\r\n\t\t\tSystem.err.println(commandLineOptions.fetchHelpInfo(COMMAND_SYNTAX));\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch(Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.err.println(commandLineOptions.fetchHelpInfo(COMMAND_SYNTAX));\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "public boolean parseCommand(String[] args) {\n boolean retVal = false;\n // Set the defaults.\n this.help = false;\n this.debug = false;\n this.roleFile = null;\n // Parse the command line.\n CmdLineParser parser = new CmdLineParser(this);\n try {\n parser.parseArgument(args);\n if (this.help) {\n parser.printUsage(System.err);\n } else {\n // Create the role map.\n if (this.roleFile == null) {\n this.roleMap = null;\n if (debug) System.err.println(\"Functional assignments will be output.\");\n } else {\n this.roleMap = RoleMap.load(this.roleFile);\n if (debug) System.err.format(\"%d roles loaded from %s%n\", this.roleMap.fullSize(),\n this.roleFile);\n }\n // Load the genome.\n this.genome = new Genome(this.genomeFile);\n if (debug) System.err.format(\"%s loaded from file %s%n\", this.genome,\n this.genomeFile);\n // Load the stop prediction file.\n this.orfTrackerMap = ContigOrfTracker.readPredictionFile(this.startStopFile);\n if (debug) System.err.println(\"ORF predictions loaded from \" +\n this.startStopFile + \".\");\n // Load the role maps.\n this.startRoleMap = ContigStarts.contigStartsMap(this.genome, '+', this.roleMap);\n if (debug) System.err.println(\"Start roles computed.\");\n // We made it this far, we can run the application.\n retVal = true;\n }\n } catch (CmdLineException e) {\n System.err.println(e.getMessage());\n // For parameter errors, we display the command usage.\n parser.printUsage(System.err);\n } catch (IOException e) {\n e.printStackTrace(System.err);\n }\n return retVal;\n }", "public static void main(String args[]){\n if(args.length> 0) {\r\n PizzaParser miPizza = new PizzaParser(args[0]);\r\n int numeroFilas = miPizza.getNumeroFilas();\r\n int numeroColumnas = miPizza.getNumeroColumnas();\r\n int numeroIngredientes = miPizza.getNumeroIngredientes();\r\n int numeroMaxCeldasPorcion = miPizza.getNumeroMaxCeldasPorcion();\r\n ArrayList<Integer> pizzaPlana = miPizza.getPizzaPlana();\r\n System.out.println(\"Caracteristicas: \");\r\n System.out.print(\"Numero de filas: \"+ String.valueOf(numeroFilas));\r\n System.out.print(\"Numero de columnas: \"+ String.valueOf(numeroColumnas));\r\n System.out.print(\"Numero de Ingredientes: \"+ String.valueOf(numeroIngredientes));\r\n System.out.print(\"Numero de maximo de celdas por porcion: \"+ String.valueOf(numeroMaxCeldasPorcion));\r\n System.out.println(\"Pizza aplanada : \");\r\n System.out.println(pizzaPlana.toString());\r\n } else {\r\n System.out.println(\"Error no hay argumentos\");\r\n }\r\n }", "protected void parse(CommandLine cli)\n {\n // Application ID option\n if(hasOption(cli, Opt.APPLICATION_ID, false))\n {\n applicationId = Long.parseLong(getOptionValue(cli, Opt.APPLICATION_ID));\n logOptionValue(Opt.APPLICATION_ID, applicationId);\n }\n\n // Server ID option\n if(hasOption(cli, Opt.SERVER_ID, false))\n {\n serverId = Long.parseLong(getOptionValue(cli, Opt.SERVER_ID));\n logOptionValue(Opt.SERVER_ID, serverId);\n }\n\n // Category option\n if(hasOption(cli, Opt.CATEGORY, true))\n {\n category = getOptionValue(cli, Opt.CATEGORY);\n logOptionValue(Opt.CATEGORY, category);\n }\n\n // Name option\n if(hasOption(cli, Opt.NAME, true))\n {\n name = getOptionValue(cli, Opt.NAME);\n logOptionValue(Opt.NAME, name);\n }\n }", "@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }", "public static void main(String[] args) throws ParseException {\n\t}", "public void processArgs(final String args[]) throws OptionsException {\n\t\tOptionContainer option = null;\n\t\tint quant = -1;\n\t\tint qcount = 0;\n\t\tboolean moreData = false;\n\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\tif (option == null) {\n\t\t\t\tif (args[i].charAt(0) != '-')\n\t\t\t\t\tthrow new OptionsException(\"Unexpected value: \" + args[i]);\n\n\t\t\t\t// see what kind of argument we have\n\t\t\t\tif (args[i].length() == 1)\n\t\t\t\t\tthrow new OptionsException(\"Illegal argument: '-'\");\n\n\t\t\t\tif (args[i].charAt(1) == '-') {\n\t\t\t\t\t// we have a long argument\n\t\t\t\t\t// since we don't accept inline values we can take\n\t\t\t\t\t// everything left in the string as argument, unless\n\t\t\t\t\t// there is a = in there...\n\t\t\t\t\tfinal String tmp = args[i].substring(2);\n\t\t\t\t\tfinal int pos = tmp.indexOf('=');\n\t\t\t\t\tif (pos == -1) {\n\t\t\t\t\t\toption = opts.get(tmp);\n\t\t\t\t\t\tmoreData = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toption = opts.get(tmp.substring(0, pos));\n\t\t\t\t\t\t// modify the option a bit so the code below\n\t\t\t\t\t\t// handles the moreData correctly\n\t\t\t\t\t\targs[i] = \"-?\" + tmp.substring(pos + 1);\n\t\t\t\t\t\tmoreData = true;\n\t\t\t\t\t}\n\t\t\t\t} else if (args[i].charAt(1) == 'X') {\n\t\t\t\t\t// extra argument, same as long argument\n\t\t\t\t\tfinal String tmp = args[i].substring(1);\n\t\t\t\t\tfinal int pos = tmp.indexOf('=');\n\t\t\t\t\tif (pos == -1) {\n\t\t\t\t\t\toption = opts.get(tmp);\n\t\t\t\t\t\tmoreData = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toption = opts.get(tmp.substring(0, pos));\n\t\t\t\t\t\t// modify the option a bit so the code below\n\t\t\t\t\t\t// handles the moreData correctly\n\t\t\t\t\t\targs[i] = \"-?\" + tmp.substring(pos + 1);\n\t\t\t\t\t\tmoreData = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// single char argument\n\t\t\t\t\toption = opts.get(\"\" + args[i].charAt(1));\n\t\t\t\t\t// is there more data left in the argument?\n\t\t\t\t\tmoreData = args[i].length() > 2 ? true : false;\n\t\t\t\t}\n\n\t\t\t\tif (option != null) {\n\t\t\t\t\t// make sure we overwrite previously set arguments\n\t\t\t\t\toption.resetArguments();\n\t\t\t\t\tfinal int card = option.getCardinality();\n\t\t\t\t\tif (card == CAR_ONE) {\n\t\t\t\t\t\tif (moreData) {\n\t\t\t\t\t\t\toption.addArgument(args[i].substring(2));\n\t\t\t\t\t\t\toption = null;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tquant = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (card == CAR_ZERO_ONE) {\n\t\t\t\t\t\toption.setPresent();\n\t\t\t\t\t\tqcount = 1;\n\t\t\t\t\t\tquant = 2;\n\t\t\t\t\t\tif (moreData) {\n\t\t\t\t\t\t\toption.addArgument(args[i].substring(2));\n\t\t\t\t\t\t\toption = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (card == CAR_ZERO_MANY) {\n\t\t\t\t\t\toption.setPresent();\n\t\t\t\t\t\tqcount = 1;\n\t\t\t\t\t\tquant = -1;\n\t\t\t\t\t\tif (moreData) {\n\t\t\t\t\t\t\toption.addArgument(args[i].substring(2));\n\t\t\t\t\t\t\tqcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (card == CAR_ZERO) {\n\t\t\t\t\t\toption.setPresent();\n\t\t\t\t\t\toption = null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new OptionsException(\"Unknown argument: \" + args[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// store the `value'\n\t\t\t\toption.addArgument(args[i]);\n\t\t\t\tif (++qcount == quant) {\n\t\t\t\t\tquant = 0;\n\t\t\t\t\tqcount = 0;\n\t\t\t\t\toption = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\r\n\t\t\r\n\t\t\r\n\t\t//create an instance\r\n\t\tparser dpe = new parser(null);\r\n\t\t\r\n\t\tdpe.runParser();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private static TaskResultAnalysis extractArguments(String[] args) {\r\n\t\tif (args == null || args.length < 1)\r\n\t\t\treturn null;\r\n\t\tFile directory = null;\r\n\t\tFile output = null;\r\n\t\tString workflow = null;\r\n\t\tString header = null;\r\n\t\tboolean printTasks = false;\r\n\t\tfor (int i=0; i<args.length; i++) {\r\n\t\t\tString argument = args[i];\r\n\t\t\tif (argument == null)\r\n\t\t\t\treturn null;\r\n\t\t\telse if (argument.equals(\"-printTasks\"))\r\n\t\t\t\tprintTasks = true;\r\n\t\t\telse {\r\n\t\t\t\ti++;\r\n\t\t\t\tif (i >= args.length)\r\n\t\t\t\t\treturn null;\r\n\t\t\t\tString value = args[i];\r\n\t\t\t\tif (argument.equals(\"-directory\"))\r\n\t\t\t\t\tdirectory = new File(value);\r\n\t\t\t\telse if (argument.equals(\"-output\"))\r\n\t\t\t\t\toutput = new File(value);\r\n\t\t\t\telse if (argument.equals(\"-workflow\"))\r\n\t\t\t\t\tworkflow = value;\r\n\t\t\t\telse if (argument.equals(\"-header\"))\r\n\t\t\t\t\theader = value;\r\n\t\t\t\telse return null;\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn new TaskResultAnalysis(\r\n\t\t\t\toutput, directory, workflow, header, printTasks);\r\n\t\t} catch (Throwable error) {\r\n\t\t\tSystem.err.println(error.getMessage());\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private void scanArgs(String [] args)\n{\n int start = 0;\n if (args.length > 0 && args[0].startsWith(\"-P\")) start = 1;\n\n while (args.length >= start + 2) {\n if (args[start].startsWith(\"-d\") && lock_file == null) { // -d <lock data file>\n\t lock_file = new File(args[start+1]);\n\t start += 2;\n }\n else if (args[start].startsWith(\"-i\") && lock_file == null) { // -i <input>\n\t lock_file = new File(args[start+1] + \".out\");\n\t start += 2;\n }\n else if (args[start].startsWith(\"-o\") && output_file == null) { // -o <output>\n\t output_file = new File(args[start+1]);\n }\n else if (args[start].startsWith(\"-t\") && input_file == null) { // -t <trace file>\n\t input_file = new File(args[start+1]);\n }\n else break;\n }\n if (args.length >= start+1) {\n if (args[start].startsWith(\"-r\")) ++start;\n }\n\n // handle socket connection and dylute as in DylockRunner\n\n if (lock_file == null) badArgs();\n if (output_file == null) {\n String fnm = lock_file.getPath();\n int idx = fnm.lastIndexOf(\".\");\n if (idx >= 0) output_file = new File(fnm.substring(0,idx) + \".pats\");\n else output_file = new File(fnm + \".pats\");\n }\n if (input_file == null) {\n String fnm = lock_file.getPath();\n int idx = fnm.lastIndexOf(\".\");\n if (idx >= 0) input_file = new File(fnm.substring(0,idx) + \".csv\");\n else input_file = new File(fnm + \".csv\");\n if (!input_file.exists()) input_file = null;\n }\n}", "public static void main(String[] args) {\n switch (args[0]) {\r\n case \"-createUser\" -> createUser(args);\r\n case \"-showAllUsers\" -> showAllUsers();\r\n case \"-addTask\" -> addTask(args);\r\n case \"-showTasks\" -> showTasks();\r\n default -> {\r\n try {\r\n throw new IncorrectCommandFormatException();\r\n } catch (IncorrectCommandFormatException exception) {\r\n exception.printStackTrace();\r\n }\r\n }\r\n }\r\n }", "private int handleOptions(String[] args) {\r\n\r\n int status = 0;\r\n\r\n if ((args == null) || (args.length == 0)) { return status; }\r\n\r\n for (int i = 0; i < args.length; i++) {\r\n if (status != 0) { return status; }\r\n\r\n if (args[i].equals(\"-h\")) {\r\n displayUsage();\r\n status = 1;\r\n } else if (args[i].equals(\"-d\") || args[i].equals(\"-discourse\")) {\r\n if (++i < args.length) {\r\n try {\r\n this.discourseId = Long.parseLong(args[i]);\r\n if (discourseId < 0) {\r\n logger.error(\"Invalid discourse id specified: \" + args[i]);\r\n status = -1;\r\n }\r\n } catch (Exception exception) {\r\n logger.error(\"Error while trying to parse discourse id. \"\r\n + \"Please check the parameter for accuracy.\");\r\n throw new IllegalArgumentException(\"Invalid discourse id specified.\");\r\n }\r\n } else {\r\n logger.error(\"A discourse id must be specified with the -discourse argument\");\r\n displayUsage();\r\n status = -1;\r\n }\r\n } else if (args[i].equals(\"-e\") || args[i].equals(\"-email\")) {\r\n setSendEmailFlag(true);\r\n if (++i < args.length) {\r\n setEmailAddress(args[i]);\r\n } else {\r\n logger.error(\"An email address must be specified with this argument\");\r\n displayUsage();\r\n status = -1;\r\n }\r\n } else if (args[i].equals(\"-b\") || args[i].equals(\"-batchSize\")) {\r\n if (++i < args.length) {\r\n try {\r\n this.batchSize = Integer.parseInt(args[i]);\r\n if (batchSize <= 0) {\r\n logger.error(\"The batch size must be greater than zero.\");\r\n displayUsage();\r\n status = -1;\r\n }\r\n } catch (NumberFormatException exception) {\r\n logger.error(\"Error while trying to parse batch size: \" + args[i]);\r\n throw new IllegalArgumentException(\"Invalid batch size specified.\");\r\n }\r\n } else {\r\n logger.error(\"A batch size must be specified with the -batchSize argument\");\r\n displayUsage();\r\n status = -1;\r\n }\r\n } else if (args[i].equals(\"-p\") || args[i].equals(\"-project\")) {\r\n if (++i < args.length) {\r\n try {\r\n this.projectId = Integer.parseInt(args[i]);\r\n if (projectId < 0) {\r\n logger.error(\"Invalid project id specified: \" + args[i]);\r\n status = -1;\r\n }\r\n } catch (Exception exception) {\r\n logger.error(\"Error while trying to parse project id. \"\r\n + \"Please check the parameter for accuracy.\");\r\n throw new IllegalArgumentException(\"Invalid project id specified.\");\r\n }\r\n } else {\r\n logger.error(\"A project id must be specified with the -project argument\");\r\n displayUsage();\r\n status = -1;\r\n }\r\n }\r\n }\r\n\r\n return status;\r\n }", "private static String[] processArgs(String[] args) {\r\n if (args.length == 0) {\r\n args = new String[1];\r\n args[0] = config.getProperty(ConfigParam.inputTrace.name());\r\n System.out.println(\"Args:\"+args[0]);\r\n } else if (args.length > 1) {\r\n System.out.println(\"Usage: [Trace_File]\");\r\n System.out.println(\"Example: ./traces/fdct_trace_without_optimization.txt\");\r\n System.out.println(\"If no arguments are given, the trace file defined in \" +\r\n configFile + \" is used.\");\r\n System.exit(1);\r\n }\r\n\r\n return args;\r\n }", "public int parseArgs(String[] args, int i) {\r\n for (; i<args.length; ++i) {\r\n if (args[i].equals(\"-omitDeclaration\")) {\r\n setOmitDeclaration(true);\r\n }\r\n else if (args[i].equals(\"-omitEncoding\")) {\r\n setOmitEncoding(true);\r\n }\r\n else if (args[i].equals(\"-indent\")) {\r\n setIndent(args[++i]);\r\n }\r\n else if (args[i].startsWith(\"-expandEmpty\")) {\r\n setExpandEmptyElements(true);\r\n }\r\n else if (args[i].equals(\"-encoding\")) {\r\n setEncoding(args[++i]);\r\n }\r\n else if (args[i].equals(\"-newlines\")) {\r\n setNewlines(true);\r\n }\r\n else if (args[i].equals(\"-lineSeparator\")) {\r\n setLineSeparator(args[++i]);\r\n }\r\n else if (args[i].equals(\"-trimAllWhite\")) {\r\n setTrimAllWhite(true);\r\n }\r\n else if (args[i].equals(\"-textTrim\")) {\r\n setTextTrim(true);\r\n }\r\n else if (args[i].equals(\"-textNormalize\")) {\r\n setTextNormalize(true);\r\n }\r\n else {\r\n return i;\r\n }\r\n }\r\n return i;\r\n }", "public static void main(String[] args) /*\n\n\tYou can actually use the array of strings in your program\n\t\tBelow is a program that expects three string arguments\n\t\tThe arguments are taken initially as strings, but you can use the parse methods to get numbers if needed\n\n\t*/", "public LaunchKey parse(String[] args) {\n if (ArrayUtils.isEmpty(args) || StringUtils.isBlank(args[0])) {\n throw new RuntimeException(\"Missing path argument to Git project.\");\n }\n String target = args[0];\n boolean mergedOnly = true;\n Set<String> exclusions = new HashSet<>();\n\n String options = String.join(\" \", args).substring(target.length());\n\n if (options.contains(\"--mergedOnly\")) {\n Matcher matcher = MERGED_ONLY_REGEX.matcher(options);\n if (!matcher.matches()) {\n throw new RuntimeException(\"ERROR: Invalid 'mergedOnly' usage. Usage: --mergedOnly=<true|false>\");\n }\n mergedOnly = Boolean.parseBoolean(matcher.group(2));\n // Remove this from options\n options = options.replace(matcher.group(1), \"\");\n }\n\n if (options.contains(\"--exclude\")) {\n Matcher matcher = EXCLUDE_REGEX.matcher(options);\n if (!matcher.matches()) {\n throw new RuntimeException(\n \"ERROR: Invalid 'exclude' usage. Usage: --exclude=[<branch1>, <branch2>, ...]\");\n }\n exclusions = Arrays.stream(matcher.group(2).split(\",\"))\n .map(String::trim)\n .collect(Collectors.toSet());\n // Remove this from options\n options = options.replace(matcher.group(1), \"\");\n }\n\n if (StringUtils.isNotBlank(options)) {\n throw new RuntimeException(\"ERROR: Invalid arguments.\", new IllegalArgumentException(options.trim()));\n }\n return new LaunchKey(new Nuke(target, exclusions, mergedOnly), new BranchNuker());\n }", "public static void handleTerminalArguments(String[] args) {\n // Used to parse command line\n CommandLineParser parser = new DefaultParser();\n\n // Used to display help and errors from the parsing\n HelpFormatter formatter = new HelpFormatter();\n\n // Options\n Options options = new Options();\n\n Option helpOption = new Option(\"h\", \"help\", false, \"Show this help message \");\n Option portOption = new Option(\"p\", \"port\", true, \"Port for the server, defaults to 2000\");\n Option clientOption = new Option(\"c\", \"client\", false, \"Start client\");\n \n options.addOption(helpOption);\n options.addOption(portOption);\n options.addOption(clientOption);\n \n try {\n CommandLine commands = parser.parse(options, args);\n\n // display help\n if (commands.hasOption(\"help\")) {\n formatter.printHelp(\"GuessingGame\", options);\n System.exit(1);\n }\n \n // Handle client\n if (commands.hasOption(\"client\")) {\n ClientGUI.run();\n } else {\n // Handle server\n if (commands.hasOption(\"port\")) {\n if (!commands.getOptionValue(\"port\").matches(\"[0-9]+\")) {\n throw new ParseException(\"Port must be a number\");\n }\n int portNumber = Integer.parseInt(commands.getOptionValue(\"port\"));\n runServer(portNumber);\n } else {\n runServer(DEFAULT_PORT);\n }\n }\n \n } catch (ParseException e) {\n // Display error if there's missing parameters\n // or some parameters don't match.\n System.out.println(e.getMessage() + \"\\n\");\n formatter.printHelp(\"GuessingGame\", options);\n System.exit(1);\n }\n }", "public static void main(String[] args)\n/* */ {\n/* 214 */ DisabledPreferencesFactory.install();\n/* 215 */ String dataFilename = null;\n/* 216 */ String parserFilename = null;\n/* 217 */ ParserPanel parserPanel = new ParserPanel();\n/* 218 */ if (args.length > 0) {\n/* 219 */ if (args[0].equals(\"-h\")) {\n/* 220 */ System.out.println(\"Usage: java edu.stanford.nlp.parser.ui.ParserPanel [parserfilename] [textFilename]\");\n/* */ } else {\n/* 222 */ parserFilename = args[0];\n/* 223 */ if (args.length > 1) {\n/* 224 */ dataFilename = args[1];\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* 229 */ Parser parser = new Parser(parserFilename, dataFilename);\n/* 230 */ parser.setVisible(true);\n/* */ }", "public static void main(String[] args)\n {\n try\n {\n System.out.println(\"Regular expression [\"+args[0]+\"]\");\n NameParser parser = new NameParser();\n StringMatcher matcher = parser.parse(args[0]);\n for (int index = 1; index < args.length; index++)\n {\n String string = args[index];\n System.out.print(\"String [\"+string+\"]\");\n System.out.println(\" -> match = \"+matcher.matches(args[index]));\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "protected void handleArgs(String[] argv) throws IOException {\n String url = null, path = null, com = null;\n char c;\n boolean got_com = false;\n boolean error = false;\n edu.hkust.clap.monitor.Monitor.loopBegin(750);\nfor (int i = 0; i < argv.length; i++) { \nedu.hkust.clap.monitor.Monitor.loopInc(750);\n{\n if (argv[i].charAt(0) != '-' || argv[i].length() != 2) {\n error = true;\n break;\n }\n c = argv[i].charAt(1);\n switch(c) {\n case 'c':\n if (i == argv.length - 1) {\n System.err.println(\"Missing argument for -\" + c);\n error = true;\n break;\n }\n com = argv[++i].toUpperCase() + \"\\0\";\n got_com = true;\n break;\n case 'u':\n if (i == argv.length - 1) {\n System.err.println(\"Missing argument for -\" + c);\n error = true;\n break;\n }\n url = argv[++i];\n break;\n case 'p':\n if (i == argv.length - 1) {\n System.err.println(\"Missing argument for -\" + c);\n error = true;\n break;\n }\n path = argv[++i];\n break;\n case 's':\n if (i == argv.length - 1) {\n System.err.println(\"Missing argument for -\" + c);\n error = true;\n break;\n }\n _host_name = argv[++i];\n break;\n case 'P':\n if (i == argv.length - 1) {\n System.err.println(\"Missing argument for -\" + c);\n error = true;\n break;\n }\n try {\n _port = Integer.parseInt(argv[++i]);\n } catch (Exception e) {\n System.err.println(\"Invalid port number \\\"\" + argv[i] + \"\\\"\");\n _port = -1;\n error = true;\n }\n break;\n case 'v':\n ++_verbose;\n break;\n case 'h':\n usage();\n System.exit(OK);\n case 'V':\n version();\n System.exit(OK);\n default:\n error = true;\n }\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(750);\n\n if (!got_com) {\n System.err.println(\"No command specified\");\n error = true;\n }\n if (error) {\n usage();\n System.exit(FAILED);\n }\n if (_port == -1) {\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }\n if (_host_name.length() == 0) {\n _host_name = DEFAULT_SERVER;\n }\n int ev = 0;\n try {\n switch(PushCacheProtocol.instance().parseCommand(com)) {\n case PushCacheProtocol.ADD:\n add(path, url);\n break;\n case PushCacheProtocol.DEL:\n del(url);\n break;\n case PushCacheProtocol.PRS:\n if (!isPresent(url)) {\n ev = 1;\n }\n break;\n default:\n simpleCommand(com);\n }\n } catch (IllegalArgumentException e) {\n System.err.println(e.getMessage());\n usage();\n ev = FAILED;\n }\n sendBye();\n System.exit(ev);\n }", "public static void main (final String [] args)\n {\n String plotRequested = Main.OMDB_MOVIE_SHORT_PLOT_VALUE;\n String typeRequested = null;\n String movieNameRequested = null;\n String movieYearRequested = null;\n\n int argsIndex = 0;\n\n while (argsIndex < args.length)\n if (Main.PLOT_OPTION.equals (args[argsIndex]))\n {\n ++argsIndex;\n\n if (args.length <= argsIndex)\n Main.usage ();\n\n plotRequested = args[argsIndex++];\n\n Main.logger.debug (\"Using \\\"plot\\\" argument: \\\"{}\\\"\", plotRequested);\n }\n else if (Main.TYPE_OPTION.equals (args[argsIndex]))\n {\n ++argsIndex;\n\n if (args.length <= argsIndex)\n Main.usage ();\n\n typeRequested = args[argsIndex++];\n Main.logger.debug (\"Using \\\"type\\\" argument: \\\"{}\\\"\", typeRequested);\n }\n else if (null == movieNameRequested)\n {\n // First non-option is the movie name\n movieNameRequested = args[argsIndex++];\n Main.logger.debug (\"Using \\\"movie name\\\" argument: \\\"{}\\\"\", movieNameRequested);\n }\n else\n {\n // If there is another non-option, then that is movie year.\n movieYearRequested = args[argsIndex++];\n Main.logger.debug (\"Using \\\"movie year\\\" argument: \\\"{}\\\"\", movieYearRequested);\n }\n\n // If we didn't get at least a movie name, then we cannot proceed\n if (null == movieNameRequested)\n Main.usage ();\n\n try\n {\n // Build up the HTTP GET URL and URI to the OMDb database service\n final URIBuilder builder = new URIBuilder (Main.OMDB_API_URL);\n builder.addParameter (Main.MOVIE_TITLE_PARAM, movieNameRequested);\n builder.addParameter (Main.API_KEY_PARAM, OMDBProperties.getApiKey ());\n\n if (null != typeRequested)\n builder.addParameter (Main.TYPE_PARAM, typeRequested);\n\n builder.addParameter (Main.RESPONSE_DATA_TYPE_PARAM, Main.RESPONSE_JSON_TYPE);\n builder.addParameter (Main.OMDB_MOVIE_PLOT_TYPE, plotRequested);\n\n if (null != movieYearRequested)\n builder.addParameter (Main.MOVIE_YEAR_PARAM, movieYearRequested);\n\n // Perform the HTTP GET to the OMDb service\n final JsonStructure jsonResponse = OMDBUtil.wrappedCoreGet (builder.build ());\n\n // Make sure that we can handle the response type\n if (JsonValue.ValueType.OBJECT == jsonResponse.getValueType ())\n {\n // Move the response into an object that we can inspect\n final JsonObject movieJsonObject = (JsonObject) jsonResponse;\n\n // Did OMDb locate the movie?\n final String responseType = OMDBUtil.getValueIfKeyPresent (Main.RESPONSE_TYPE_KEY, movieJsonObject);\n\n if (Boolean.parseBoolean (responseType))\n {\n // OMDb did find the movie\n final String movieTitle = movieJsonObject.getString (Main.MOVIE_TITLE_VALUE_KEY);\n\n // Pick up all the attributes that OMDb gave us and output them to the log\n final StringBuffer label = new StringBuffer ();\n\n for (final Object keyObj : movieJsonObject.keySet ())\n {\n final String key = (String) keyObj;\n final Object valueObj = movieJsonObject.get (keyObj);\n\n if (valueObj instanceof JsonString)\n {\n final String value = valueObj.toString ();\n\n Main.logger.debug (\"Key: \\\"{}\\\", value: {}\", key, value);\n\n if (label.length () > 0)\n label.append (\", \");\n label.append (key + \": \" + value);\n }\n }\n\n Main.logger.info (\"Located {}\", label.toString ());\n\n // Scan through all the ratings (if any) looking for the \"Rotten Tomatoes\" rating\n final JsonArray ratings = movieJsonObject.getJsonArray (Main.RATINGS_KEY);\n\n boolean found = false;\n\n for (final JsonObject rating : ratings.getValuesAs (JsonObject.class))\n {\n final String ratingSource = OMDBUtil.getValueIfKeyPresent (Main.RATING_SOURCE_KEY, rating);\n\n final String movieRating = OMDBUtil.getValueIfKeyPresent (Main.RATING_VALUE_KEY, rating);\n\n if (Main.DESIRED_RATING_SOURCE.equals (ratingSource))\n {\n // We found a rating from \"Rotten Tomatoes\" (there may be more?)\n found = true;\n\n Main.logger.info (\"Movie title \\\"{}\\\" has rating of {} from \\\"{}\\\"\", movieTitle, movieRating, ratingSource);\n System.out.println (\"Movie title \\\"\" + movieTitle + \"\\\" has rating of \" + movieRating + \" from \\\"\" + ratingSource + \"\\\"\");\n }\n else\n Main.logger.info (\"Movie rating source ({}) of \\\"{}\\\" for Movie Title: {} is not the desired rating source ({})\", ratingSource, movieRating, movieTitle, Main.DESIRED_RATING_SOURCE);\n }\n\n // Check if we never found a rating from \"Rotten Tomatoes\"\n if (!found)\n Main.logger.warn (\"Could not find desired rating source ({}) for Movie Title: {}\", Main.DESIRED_RATING_SOURCE, movieTitle);\n }\n else\n {\n // OMDb could not find the movie\n final String errorMessage = OMDBUtil.getValueIfKeyPresent (Main.ERROR_KEY, movieJsonObject);\n Main.logger.warn (\"Could not retrieve movie \\\"{}\\\"{}: {}\", movieNameRequested, ((null == movieYearRequested) ? \"\" : \" for year \" + movieYearRequested), errorMessage);\n }\n }\n else\n Main.logger.error (\"Unhandled data type ({}) returned -- Not a JSON Object\", jsonResponse.getValueType ());\n }\n catch (final URISyntaxException e)\n {\n Main.logger.error (\"Cannot build URI for OMDb: {}\", e);\n }\n catch (IOException | LogicException | UnsupportedOperationException e)\n {\n Main.logger.error (\"Cannot perform request against OMDb: {}\", e);\n }\n }", "@Test\n public void parse_validArgs_returnsFindActivityTagCommand() {\n FindActivityTagCommand expectedFindActivityTagCommand =\n new FindActivityTagCommand(new ActivityTagContainsPredicate(Arrays.asList(\"Cheese\", \"Japan\")));\n assertParseSuccess(parser, \"Cheese Japan\", expectedFindActivityTagCommand);\n\n // multiple whitespaces between keywords\n assertParseSuccess(parser, \" \\n Cheese \\n \\t Japan \\t\", expectedFindActivityTagCommand);\n }", "private void cli (String[] args)\n {\n if (args.length != 2) {\n System.out.println(\"Usage: <analyzer> input-file output-file\");\n return;\n }\n dataFilename = args[1];\n super.cli(args[0], this);\n }", "private void argumentChecker(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tif (args.length != 2) {\n\t\t\tSystem.out.println(\"Invalid arguments. \\nExpected:\\tDriver inputFile.txt outputFile.txt\");\n\t\t}\n\t}", "private void handleCommandLineArgs(final String[] args) {\n if (args.length == 1) {\n final String value;\n if (args[0].startsWith(ToolArguments.MAP_FOLDER)) {\n value = getValue(args[0]);\n } else {\n value = args[0];\n }\n final File mapFolder = new File(value);\n if (mapFolder.exists()) {\n mapFolderLocation = mapFolder;\n } else {\n log.info(\"Could not find directory: \" + value);\n }\n } else if (args.length > 1) {\n log.info(\"Only argument allowed is the map directory.\");\n }\n // might be set by -D\n if (mapFolderLocation == null || mapFolderLocation.length() < 1) {\n final String value = System.getProperty(ToolArguments.MAP_FOLDER);\n if (value != null && value.length() > 0) {\n final File mapFolder = new File(value);\n if (mapFolder.exists()) {\n mapFolderLocation = mapFolder;\n } else {\n log.info(\"Could not find directory: \" + value);\n }\n }\n }\n }", "public static void main(String[] args) {\r\n\t\tArgumentParser parser = new ArgumentParser(args);\r\n\t\tString username = null;\r\n\t\ttry {\r\n\t\t\tusername = parser.getArgumentsFor(ArgumentRegistry.USERNAME);\r\n\t\t} catch (InvalidArgumentException e) {\r\n\t\t\tArgumentParser.doTooFewArguments(\"Username argument cannot be null.\");\r\n\t\t}\r\n\t\tnew TrackObj(username);\r\n\t}", "public static CommandLine parseCommandLine(String[] args) {\n Options options = getOptions();\n CommandLineParser cmdLineParser = new DefaultParser();\n\n CommandLine cmdLine = null;\n try {\n cmdLine = cmdLineParser.parse(options, args);\n } catch (ParseException pe) {\n printHelp(options);\n System.exit(1);\n }\n\n if (cmdLine == null) {\n printHelp(options);\n System.exit(1);\n }\n\n if (cmdLine.hasOption(\"help\")) {\n printHelp(options);\n System.exit(0);\n }\n\n return cmdLine;\n }", "public void parseUserInput(String[] args)\n {\n this.args = args;\n// Class cls = this.getClass();\n Method method;\n String parameter;\n int parameterPrefix = USER_OPTION.length();\n\n for (int parameterIndex=0; parameterIndex<args.length; parameterIndex++)\n {\n // Parse the input to find the corresponding function\n try\n {\n parameter = args[parameterIndex].substring(parameterPrefix);\n method = UserInput.class.getDeclaredMethod(parameter, Integer.class);\n parameterIndex = (int) method.invoke(this, parameterIndex);\n }\n catch (NoSuchMethodException | IllegalAccessException e )\n {\n throw new RuntimeException(\"Unhandled parameter: \" + args[parameterIndex] + \"\\n\" + e);\n }\n catch (InvocationTargetException e)\n {\n// e.printStackTrace();\n throw new RuntimeException(\"Missing or wrong parameters for the option: \" + args[parameterIndex] + \"\\n\" + e);\n }\n }\n }", "public static void main(String[] args) {\n EquationManipulator manipulator = new EquationManipulator();\n \n if (args.length == 3) {\n // arguments were passed in from the command line\n System.out.println(\"It looks like you passed in some arguments. Let me fetch those for you.\");\n checkPassedInArguments(args, manipulator);\n } else if (args.length != 0) {\n // User passed in an incorrect number of arguments\n printErrorMessage();\n handleUserInput(manipulator);\n } else { \n // User did not pass in any arguments\n handleUserInput(manipulator);\n }\n\n }", "public static void main(String[] args) {\n\t\tif (!processArguments(args)) {\n\t\t\tSystem.out.println(\"Invalid Arguments! Please try again..\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private void scanArgs(String [] args)\n{\n for (int i = 0; i < args.length; ++i) {\n if (args[i].startsWith(\"-\")) {\n\t badArgs();\n }\n else badArgs();\n }\n}" ]
[ "0.7365107", "0.73370343", "0.73165345", "0.7247158", "0.72371674", "0.72327834", "0.7196367", "0.71360135", "0.7122332", "0.7115695", "0.7110497", "0.70640963", "0.6972416", "0.6907391", "0.6843233", "0.6812715", "0.6792691", "0.6784042", "0.6756454", "0.6745158", "0.6744369", "0.66924495", "0.668817", "0.6662383", "0.6634243", "0.66300684", "0.6618709", "0.6578865", "0.65698713", "0.6511056", "0.6506103", "0.64740384", "0.6468397", "0.64338493", "0.64280576", "0.6423264", "0.64217705", "0.63972944", "0.6376903", "0.6364708", "0.63276047", "0.63181293", "0.6294994", "0.62888384", "0.62654316", "0.62419033", "0.6217789", "0.6202539", "0.619517", "0.616671", "0.6163228", "0.6158453", "0.6145129", "0.61443573", "0.6137977", "0.61318195", "0.61286074", "0.61206126", "0.6059827", "0.60499483", "0.6041657", "0.6040814", "0.6039082", "0.6026436", "0.60160875", "0.6014194", "0.6013153", "0.59999174", "0.5987045", "0.5980828", "0.59577924", "0.5931792", "0.5927037", "0.5921713", "0.59083277", "0.5905483", "0.5903467", "0.59030235", "0.59029436", "0.58990675", "0.5896452", "0.5896386", "0.5894586", "0.58912575", "0.5878811", "0.58745915", "0.5872548", "0.5850397", "0.58445525", "0.58321744", "0.5818304", "0.57908183", "0.57901585", "0.5789432", "0.57887745", "0.5772632", "0.5759765", "0.5758277", "0.57501346", "0.57489765", "0.5738792" ]
0.0
-1
When you make a new learning algorithm, you should add a line for it to this method.
public Learner getLearner(ArgParser parser, Random rand) throws Exception { String model = parser.getLearner(); switch (model) { case "baseline": return new BaselineLearner(); case "perceptron": return new Perceptron(rand); case "backpropagation": return new BackPropagation(rand); case "decisiontree": return new DecisionTree(); case "knn": return new NearestNeighbor(); case "kmeans": return new KMeans(Integer.parseInt(parser.getEvalParameter()), rand); // case "hac": // return new HAC(); default: throw new Exception("Unrecognized model: " + model); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void train ()\t{\t}", "public void startTrainingMode() {\n\t\t\r\n\t}", "public void train() throws Exception;", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "public void learn() throws FileNotFoundException {\n\t\tprintConfig();\n\t\taskConfirm(\"Are these your settings (y/n)?\");\n\t\tSystem.out.println(\"Start Learning Process\");\n\t\tFsmLearner learner = new FsmLearner();\n\t\ttry {\n\t\t\tlearner.setUpLearner();\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"The alphabet as specified in the config file was not found. Please check \"\n\t\t\t\t\t+ \"if the alphabet exists. If not, use 'alphabet:create' (for Android) to create a new \" + \"one.\");\n\t\t}\n\t\tboolean learning_done = false;\n\t\twhile (!learning_done) {\n\t\t\ttry {\n\t\t\t\tlearner.runExperiment();\n\t\t\t\tlearning_done = true;\n\t\t\t} catch (ConflictException ce) {\n\n\t\t\t\tSystem.out.println(\"ConflictException\");\n\t\t\t\tlearner.instantiateSulsReset();\n\t\t\t\tce.printStackTrace();\n\t\t\t\t// learner.setUpLearner();\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Something unforseen happened while learning\\nPrinting StackTrace:\");\n\t\t\t\te.printStackTrace();\n\t\t\t\tlearning_done = true;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tlearner.printResults();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"An error occurred while printing the results.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tlearner.stopExperiment();\n\t\tSystem.out.println(\"Query Cache Statistics:\");\n\t\tSystem.out.println(learner.sul.getSum());\n\t\tSystem.out.println(learner.sul.getNum());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Finished Learning, doing the postresults\");\n//\t\tthis.postLearning(learner, em.getInstrumentator());\n\t\tSystem.out.println(\"Results are in: \" + learner.getStamp());\n\t}", "@Override\n\tvoid bp_adam(double learning_rate, int epoch_num) {\n\t\t\n\t}", "@Override\n\tpublic void coreTraining() {\n\t\tSystem.out.println(\"加强进攻意识练习\");\n\t}", "public interface OnlineStructuredAlgorithm extends StructuredAlgorithm {\n\n\t/**\n\t * Strategy to update the learning rate.\n\t * \n\t * @author eraldof\n\t * \n\t */\n\tpublic enum LearnRateUpdateStrategy {\n\t\t/**\n\t\t * No update, i.e., constant learning rate.\n\t\t */\n\t\tNONE,\n\n\t\t/**\n\t\t * The learning rate is equal to n/t, where n is the initial learning\n\t\t * rate and t is the current iteration (number of processed examples).\n\t\t */\n\t\tLINEAR,\n\n\t\t/**\n\t\t * The learning rate is equal to n/(t*t), where n is the initial\n\t\t * learning rate and t is the current iteration (number of processed\n\t\t * examples).\n\t\t */\n\t\tQUADRATIC,\n\n\t\t/**\n\t\t * The learning rate is equal to n/(sqrt(t)), where n is the initial\n\t\t * learning rate and t is the current iteration (number of processed\n\t\t * examples).\n\t\t */\n\t\tSQUARE_ROOT\n\t}\n\n\t/**\n\t * Update the currect model using the given correct output and the predicted\n\t * output for this example. Attention: the given <code>predicted</code> is\n\t * only a placeholder to store the predicted structure, i.e., the prediction\n\t * will be done inside this method.\n\t * \n\t * @param input\n\t * the input structure.\n\t * @param output\n\t * the correct output structured.\n\t * @param predicted\n\t * a place holder for the predicted structured.\n\t * @return the loss function value for the given correct output and the\n\t * predicted output using the current weight vector (before the\n\t * possible update generated by the given example).\n\t */\n\tpublic double train(ExampleInput input, ExampleOutput output,\n\t\t\tExampleOutput predicted);\n\n\t/**\n\t * Set the learning rate.\n\t * \n\t * @param rate\n\t */\n\tpublic void setLearningRate(double rate);\n\n\t/**\n\t * Return the current iteration.\n\t * \n\t * @return\n\t */\n\tpublic int getIteration();\n\n}", "private AlgorithmTools() {}", "public interface AMDPModelLearner extends AMDPPolicyGenerator{\n\n\n public void updateModel(State s, Action a, List<Double> rewards, State sPrime, GroundedTask gt);\n\n\n}", "public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}", "Algorithm createAlgorithm();", "public void alg_INIT(){\r\n}", "protected LearningAbstractAgent(){}", "@Override\n\tpublic void assistTraining() {\n\t\tSystem.out.println(\"加强射门练习\");\n\t}", "public abstract void runAlgorithm();", "void pramitiTechTutorials() {\n\t\n}", "private boolean learning()\r\n\t{\r\n\t\tint temp = (int) (Math.random() * 100);\t\t//generate a random int between 0-100\r\n\t\tif(temp<=intelligence)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "void teach();", "Programming(){\n\t}", "public boolean isOnlineLearningSupported();", "public AlgorithmDesign() {\n initComponents();\n }", "public void SetLearnRate (double alpha) { this.alpha = alpha; }", "public void study() {\n\t\tSystem.out.println(\"学习Java\");\r\n\t}", "@Override\r\n public void onThinking() {\n }", "@Override\n public void performRecommendedDataMiningMethodForAnalysis(Analysis analysis) throws IOException {\n }", "private void testWithBacktrackingInput(LcssAlgorithm algorithm) {\n\t}", "@Override\n public void tuningInit() {\n\n }", "public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}", "public WekaLogitLearner() { super(new Logistic2()); }", "TrainingTest createTrainingTest();", "public abstract void Train() throws Exception;", "public void matarAPacman() {\n // TODO implement here\n }", "public void redibujarAlgoformers() {\n\t\t\n\t}", "public abstract StandaloneAlgorithm createAlgorithm();", "void activateFlowStorer();", "public TestLearningAPI(String arg0) throws GateException,\n MalformedURLException {\n super(arg0);\n if(!initialized) {\n Gate.init();\n learningHome = new File(new File(Gate.getGateHome(), \"plugins\"),\n \"Learning\");\n Gate.getCreoleRegister().addDirectory(learningHome.toURI().toURL());\n initialized = true;\n }\n }", "@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }", "public void setLearningRate(double rate);", "public interface IDetectionAlgorithm {\n\n /**\n * Creates a database where an algorithm would store its model\n *\n * @param modelName\n * Name of the database\n * @param dataAccessObject\n * An object of IDataAccessObject\n * @param trainingSettings\n * Training Settings\n * @throws TotalADSDBMSException\n * An exception related to the DBMS\n * @throws TotalADSGeneralException\n * An exception related to validation of parameters\n */\n public void initializeModelAndSettings(String modelName, IDataAccessObject dataAccessObject, String[] trainingSettings) throws TotalADSDBMSException, TotalADSGeneralException;\n\n /**\n * Returns the training settings/options of an algorithm as setting name at\n * index i and value at index i+1.\n *\n * @return Array of Strings as options/settings\n */\n public String[] getTrainingSettings();\n\n /**\n * Returns the testing options/settings of an algorithm as option name at\n * index i and value ate index i+1. It takes database name and connection\n * information, in case if the model (database) is already created and\n * previously modified settings exist in the database\n *\n * @param database\n * Database name\n * @param dataAccessObject\n * IDataAccessObject object\n * @return An array of String as options/settings\n * @throws TotalADSDBMSException\n * An exception related to the DBMS\n */\n public String[] getTestSettings(String database, IDataAccessObject dataAccessObject) throws TotalADSDBMSException;\n\n /**\n * Validates the testing options and saves them into the database. On error\n * throws exception\n *\n * @param options\n * Settings array\n * @param database\n * Model(database name)\n * @param dataAccessObject\n * An object to access database\n * @throws TotalADSGeneralException\n * An exception related to validation of parameters\n * @throws TotalADSDBMSException\n * An exception related to the DBMS\n */\n public void saveTestSettings(String[] options, String database, IDataAccessObject dataAccessObject) throws TotalADSGeneralException, TotalADSDBMSException;\n\n /**\n * Returns settings selected for a model by a user during training and\n * testing. These would be displayed in the properties view.\n *\n * @param database\n * Model(database) name\n * @param dataAccessObject\n * An object to access database\n * @return An array of selected settings\n * @throws TotalADSDBMSException\n * An exception related to the DBMS\n */\n public String[] getSettingsToDisplay(String database, IDataAccessObject dataAccessObject) throws TotalADSDBMSException;\n\n /**\n * An algorithm will take a trace through this function. Some algorithms can\n * train on the traces as they come and some need to wait till the last\n * trace. Caller will make isLastTrace true when the lastTrace will be sent\n * to this function. This function is called for every trace separately\n *\n * @param trace\n * Trace iterator to a trace\n * @param isLastTrace\n * True if the trace is the last trace, else false\n * @param database\n * Database/mode name\n * @param connection\n * Connection object\n * @param outStream\n * Use this object to display the events during processing\n * @throws TotalADSGeneralException\n * An exception related to validation of parameters\n * @throws TotalADSDBMSException\n * An exception related to DBMS\n * @throws TotalADSReaderException\n * An exception related to the trace reader\n */\n public void train(ITraceIterator trace, Boolean isLastTrace, String database, IDataAccessObject connection, IAlgorithmOutStream outStream) throws TotalADSGeneralException, TotalADSDBMSException, TotalADSReaderException;\n\n /**\n * This function is called after the train function has finished processing\n * and has built a model. This function is called for every single trace in\n * the validation set separately\n *\n * @param trace\n * Trace iterator to one trace\n * @param database\n * Database name\n * @param dataAccessObject\n * Connection name\n * @param isLastTrace\n * True if the trace is the last trace, else false\n * @param outStream\n * Use this object to display the events during processing\n * @throws TotalADSGeneralException\n * An exception related to validation of parameters\n * @throws TotalADSDBMSException\n * An exception related to DBMS\n * @throws TotalADSReaderException\n * An exception related to the trace reader\n */\n public void validate(ITraceIterator trace, String database, IDataAccessObject dataAccessObject, Boolean isLastTrace, IAlgorithmOutStream outStream) throws TotalADSGeneralException, TotalADSDBMSException, TotalADSReaderException;\n\n /**\n * This function evaluates an existing model in the database on the traces\n * in the test set. It is called for every single trace separately.\n *\n * @param trace\n * Trace iterator to a single trace\n * @param database\n * Database name\n * @param dataAccessObject\n * Data accessor\n * @param outputStream\n * Use this object to display the events during processing\n * @return An object of type Result containing the evaluation information of\n * a trace\n * @throws TotalADSGeneralException\n * An exception related to validation of parameters\n * @throws TotalADSDBMSException\n * An exception related to DBMS\n * @throws TotalADSReaderException\n * An exception related to reader\n */\n public Results test(ITraceIterator trace, String database, IDataAccessObject dataAccessObject, IAlgorithmOutStream outputStream) throws TotalADSGeneralException, TotalADSDBMSException, TotalADSReaderException;\n\n /**\n * Returns the total anomalies during testing\n *\n * @return total anomalies\n **/\n public Double getTotalAnomalyPercentage();\n\n /**\n * Returns the graphical result in the form of a chart if any for a trace.\n * Currently unimplemented.\n *\n * @param traceIterator\n * An iterator a trace\n * @return A chart object\n **/\n public org.swtchart.Chart graphicalResults(ITraceIterator traceIterator);\n\n /**\n * Returns a self created instance of the algorithm\n *\n * @return An instance of the algorithm\n **/\n public IDetectionAlgorithm createInstance();\n\n // /////////////////////////////////////////////////////////////////////////////////\n // An algorithm registers itself with the AlgorithmFactory\n // Each derived class must implement the following static method\n // public static void registerAlgorithm() throws TotalADSGeneralException;\n // /////////////////////////////////////////////////////////////////////////////////\n /**\n * Gets the name of the algorithm\n *\n * @return The name\n **/\n public String getName();\n\n /**\n * Gets the description of an algorithm\n *\n * @return The description\n */\n public String getDescription();\n\n /**\n * Returns the acronym of the algorithm; should only be three to four\n * characters long. This acronym is very important as it is used in the name\n * of a model and facilitates in finding out which algorithm represents the\n * model\n *\n * @return Acronym\n */\n public String getAcronym();\n\n /**\n * Returns true if online learning is supported. If false is returned it\n * would mean the algorithm can only train in batch mode and live training\n * is not supported\n *\n * @return True if online learning is supported, else false\n */\n public boolean isOnlineLearningSupported();\n}", "public void chooseAlgorithm() {\n boolean runloop = true;\n CustomArrayList<Integer>[] graph = null;\n graph = util.initializeCNF(statement);\n while (runloop) {\n io.println(\"Which algorithm do you want to use to solve this?\");\n io.println(\"1: Tarjan algorithm\\n2: Kosaraju algorithm\\n3: Brute force method\\n4: Print the truth distribution that solves the CNF\\n5: return\");\n String selection = io.nextLine();\n switch (selection) {\n case (\"1\"):\n tarjan = new TarjanAlgorithm(graph, numVariables);\n TarjanPrint();\n break;\n case (\"2\"):\n kosaraju = new KosarajuAlgorithm(graph, numVariables);\n KosarajuPrint();\n break;\n case (\"3\"):\n io.println(\"Warning! Brute force method has an exponential time complexity. Using this with CNF with more than 20 variables will take a really long time. \");\n io.println(\"Continue? y/n\");\n String affirmate = io.nextLine();\n switch (affirmate) {\n case (\"y\"):\n bruteForcePrint();\n break;\n case (\"n\"):\n break;\n }\n break;\n case (\"4\"):\n tarjan = new TarjanAlgorithm(graph, numVariables);\n if (tarjan.checkSatisfiability()) {\n printTruthAssesment();\n } else {\n io.println(\"Not satisfiable\");\n }\n break;\n case (\"5\"):\n io.println(\"Returning to main menu...\");\n runloop = false;\n break;\n }\n }\n }", "public void algorithmPerformed(AlgorithmBase algorithm) {\r\n\r\n /* if (algorithm instanceof AlgorithmRegVOILandmark) {\r\n\r\n if (algoRegVOILankmark.isCompleted() == true) {\r\n\r\n // display registered image\r\n Vector imageFrames = image.getImageFrameVector();\r\n\r\n for (int i = 0; i < imageFrames.size(); i++) {\r\n //((Frame) (imageFrames.elementAt(i))).setTitle(titles[i]);\r\n ((Frame) (imageFrames.elementAt(i))).setEnabled(true);\r\n\r\n if (((Frame) (imageFrames.elementAt(i))) != parentFrame) {\r\n UI.registerFrame((Frame) (imageFrames.elementAt(i)));\r\n }\r\n }\r\n\r\n if (parentFrame != null) {\r\n UI.registerFrame(parentFrame);\r\n }\r\n\r\n image.notifyImageDisplayListeners(null, true);\r\n }\r\n }*/\r\n\r\n // Update frame\r\n // ((ViewJFrameBase)parentFrame).updateImages(true);\r\n dispose();\r\n }", "double getLearningRate();", "public void launch(DataModel model) {\n //this template simple creates a UndirectedKNNAlgorithm and executes it,\n //replace as needed.\n// UndirectedKNNAlgorithm algorithm = new UndirectedKNNAlgorithm();\n// algorithm.execute();\n \n UndirectedKNNAlgorithm algorithm = new UndirectedKNNAlgorithm(model);\n algorithm.createGUIandRun(UndirectedKNNAlgorithm.ALGORITHM_NAME, \"\"); \n }", "public static void start(){\n mngr.getStpWds();\n mngr.getDocuments();\n mngr.calculateWeights();\n mngr.getInvertedIndex();\n mngr.getClusters();\n mngr.getCategories();\n mngr.getUserProfiles();\n mngr.makeDocTermMatrix();\n\n }", "private void addAI(){\n\n }", "public abstract void fit(BinaryData trainingData);", "private void runBest() {\n }", "public FeatureSynthesisMain() {\n super();\n }", "public void saveTrainingDataToFileHybridSampling1() throws Exception {\n NGramTokenizer tokenizer = new NGramTokenizer();\r\n tokenizer.setNGramMinSize(1);\r\n tokenizer.setNGramMaxSize(1);\r\n tokenizer.setDelimiters(\"\\\\W\");\r\n\r\n //set stemmer - set english stemmer\r\n SnowballStemmer stemmer = new SnowballStemmer();\r\n stemmer.setStemmer(\"english\");\r\n\r\n //set lemmatizer\r\n StanfordCoreNLPLemmatizer scnlpl = new StanfordCoreNLPLemmatizer();\r\n\r\n //create new filter for vector transformation\r\n StringToWordVector filter = new StringToWordVector();\r\n filter.setLowerCaseTokens(true);\r\n filter.setOutputWordCounts(true);\r\n filter.setTFTransform(true);\r\n filter.setIDFTransform(true);\r\n filter.setStopwords(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\StopWordsR2.txt\")); // stop word removal given in research paper\r\n filter.setTokenizer(tokenizer);\r\n filter.setStemmer(scnlpl);\r\n\r\n System.out.println(\"Stemmer Name- \" + filter.getStemmer());\r\n\r\n InstanceQuery query = new InstanceQuery();\r\n query.setUsername(\"root\");\r\n query.setPassword(\"\");\r\n\r\n int numberOfPapers = 5;\r\n Instances[] otherArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'other'\");\r\n otherArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='other'\");\r\n otherArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='other'\");\r\n otherArticles[2] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'other'\");\r\n otherArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'other'\");\r\n otherArticles[4] = query.retrieveInstances();\r\n\r\n Instances[] crimeArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'crime'\");\r\n crimeArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='crime'\");\r\n crimeArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='crime'\");\r\n crimeArticles[2] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'crime'\");\r\n crimeArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'crime'\");\r\n crimeArticles[4] = query.retrieveInstances();\r\n\r\n FastVector attributeList = new FastVector(2);\r\n Attribute a1 = new Attribute(\"text\", (FastVector) null);\r\n FastVector classVal = new FastVector();\r\n classVal.addElement(\"crime\");\r\n classVal.addElement(\"other\");\r\n Attribute c = new Attribute(\"@@class@@\", classVal);\r\n //add class attribute and news text\r\n attributeList.addElement(a1);\r\n attributeList.addElement(c);\r\n Instances trainingData = new Instances(\"TrainingNews\", attributeList, 0);\r\n trainingData.setClassIndex(1);\r\n\r\n //up sampling using SMOTE\r\n int crimeArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < crimeArticles[i].numInstances(); j++) {\r\n\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, crimeArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, crimeArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n crimeArticlesCount++;\r\n// if (crimeArticlesCount == 50) {\r\n// break;\r\n// }\r\n }\r\n// if (crimeArticlesCount == 50) {\r\n// break;\r\n// }\r\n }\r\n\r\n System.out.println(\"Total Number of Crime Instances: \" + crimeArticlesCount);\r\n\r\n //downsampling using ?? \r\n int otherArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < otherArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, otherArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, otherArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n otherArticlesCount++;\r\n\r\n if (otherArticlesCount == 4872) {\r\n break;\r\n }\r\n }\r\n if (otherArticlesCount == 4872) {\r\n break;\r\n }\r\n }\r\n System.out.println(\"Total Number of Other Instances: \" + otherArticlesCount);\r\n System.out.println(\"Total num of instances= \" + trainingData.numInstances());\r\n\r\n // apply the StringToWordVector filter\r\n filter.setInputFormat(trainingData);\r\n Instances dataFiltered = Filter.useFilter(trainingData, filter);\r\n System.out.println(\"Number of Attributes after stop words removal- \" + dataFiltered.numAttributes());\r\n System.out.println(\"\\n\\nFiltered data:\\n\\n\" + dataFiltered);\r\n\r\n /**\r\n * Resamples a dataset by applying the Synthetic Minority Oversampling\r\n * TEchnique (SMOTE)\r\n * http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume16/chawla02a-html/node6.html\r\n * http://weka.sourceforge.net/doc.packages/SMOTE/weka/filters/supervised/instance/SMOTE.html \r\n *\r\n */\r\n SMOTE s = new SMOTE();\r\n s.setInputFormat(dataFiltered);\r\n // Specifies percentage of SMOTE instances to create.\r\n s.setPercentage(300.0);//464\r\n Instances dataBalanced = Filter.useFilter(dataFiltered, s);\r\n\r\n Random r = new Random();\r\n dataBalanced.randomize(r);\r\n\r\n ArffSaver saver = new ArffSaver();\r\n saver.setInstances(dataBalanced);\r\n saver.setFile(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataHybridRandom.arff\"));\r\n saver.writeBatch();\r\n }", "private static boolean bayesian() {\n\t\tSystem.out.println(\"BAYESIAN\");\n\t\t\n//\t\tFFNeuralNetwork ffnn = new FFNeuralNetwork(ActivationFunction.SIGMOID0p5,5,5);\n\t\tModelLearner modeler = new ModelLearnerHeavy(100, new int[] {}, new int[] {5},\n\t\t\t\tnew int[] {}, ActivationFunction.SIGMOID0p5, 10);\n\t\t\n\t\tCollection<DataPoint> data = new ArrayList<DataPoint>();\n\t\tdata.add(new DataPoint(new double[] {0,0,1,0,0}, new double[] {0,0,0,1,0})); // move right\n\t\tdata.add(new DataPoint(new double[] {0,0,1,0,0}, new double[] {0,1,0,0,0})); // move left\n\t\tdata.add(new DataPoint(new double[] {0,1,0,0,0}, new double[] {1,0,0,0,0})); // move left again\n\t\tdata.add(new DataPoint(new double[] {0,0,0,1,0}, new double[] {0,0,1,0,0})); // move back to center\n\t\tdata.add(new DataPoint(new double[] {0,0,0,1,0}, new double[] {0,0,0,0,0})); // disappear\n\t\t\n//\t\tControlPanel.learnFromBackPropagation(ffnn.getInputNodes(), ffnn.getOutputNodes(), data,\n//\t\t\t\t10000, 1,1,0,0,0,0);\n\t\tfor (DataPoint dp : data) {\n\t\t\tmodeler.observePreState(dp.getInput());\n\t\t\tmodeler.observePostState(dp.getOutput());\n\t\t\tmodeler.saveMemory();\n\t\t}\n\t\tmodeler.learnFromMemory(1.5,0.5,0, false, 1000);\n\t\tmodeler.getTransitionsModule().getNeuralNetwork().report(data);\n\t\t\n\t\tdouble[] foresight = Foresight.montecarlo(modeler, new double[] {0,0,1,0,0}, null, null, 1, 10000, 10, 0.1);\n\t\tfor (double d : foresight) System.out.print(d + \"\t\");\n\t\tSystem.out.println(near(foresight[0],0) && near(foresight[1],0.5) && near(foresight[2],0)\n\t\t\t\t&& near(foresight[3],0.5) && near(foresight[4],0)\n\t\t\t\t? \"montecarlo 1 ok\" : \"montecarlo 1 sucks\");\n\t\tforesight = Foresight.montecarlo(modeler, new double[] {0,0,1,0,0}, null, null, 2, 10000, 10, 0.1);\n\t\tfor (double d : foresight) System.out.print(d + \"\t\");\n\t\tSystem.out.println(near(foresight[0],0.5) && near(foresight[1],0) && near(foresight[2],0.25)\n\t\t\t\t&& near(foresight[3],0) && near(foresight[4],0)\n\t\t\t\t? \"montecarlo 2 ok\" : \"montecarlo 2 sucks\");\n\n\t\treturn false;\n\t}", "private void trainLexicon() throws Exception\n\t{\n\t\tSystem.out.println(\"Starting reading Lexicon Training set ..\");\n\t\tInstanceList lexicon_instance = dbiterator.getInstancesFromAlphabets(DBInstanceIterator.DBSource.LEXICON);\n\t\tSystem.out.println(\"Lexicon Training set : \" + lexicon_instance.size());\n\t\t/*svm_parameter param = new svm_parameter();\n\t\tparam.gamma = 0.0;\n\t\tparam.C = 100.0;*/\n\t\tSVMClassifierTrainer trainer = new SVMClassifierTrainer(new LinearKernel(), true);\n\t\tSystem.out.println(\"SVM Starts Training on lexicon training set ..\");\n\t\tSVMClassifier classifier = trainer.train(lexicon_instance);\n\t\tSystem.out.println(\"Saving SVM Classifier ..\");\n\t\tSystem.out.println(lexicon_instance.targetLabelDistribution());\n\t\tsaveModel(classifier, Lexicon_Train);\n\t\tSystem.out.println(\"Lexicon classifier saved to : \" + Lexicon_Train);\n\t}", "public interface BayesEstimator {\n\n /**\n * Init the estimator.\n * <p/>\n * @param theTrainer The trainer.\n * @param theNetwork The network.\n * @param theData The data.\n */\n void init(TrainBayesian theTrainer, BayesianNetwork theNetwork,\n MLDataSet theData);\n\n /**\n * Perform an iteration.\n * <p/>\n * @return True, if we should contune.\n */\n boolean iteration();\n}", "private void learnStep(){\n Connection[][][] temp = this.connections;\r\n for(int trialIndex = 0; trialIndex< inputList.length; trialIndex++) {\r\n for (int layerIndex = 0; layerIndex < connections.length; layerIndex++) {\r\n for (int startIndex = 0; startIndex < connections[layerIndex].length; startIndex++) {\r\n for (int endIndex = 0; endIndex < connections[layerIndex][startIndex].length; endIndex++) {\r\n double weightDerivative = 0.0;\r\n double biasDerivative = 0.0;\r\n weightDerivative += learningRate* derivativeWeight(layerIndex, startIndex, endIndex, trialIndex);\r\n biasDerivative += learningRate * derivativeBias(layerIndex, startIndex, endIndex, trialIndex);\r\n double currentWeight = temp[layerIndex][startIndex][endIndex].getWeight();\r\n double currentBias = temp[layerIndex][startIndex][endIndex].getBias();\r\n temp[layerIndex][startIndex][endIndex] = new Connection(currentWeight - weightDerivative, currentBias - biasDerivative);\r\n\r\n }\r\n }\r\n }\r\n this.run();\r\n }\r\n this.connections = temp;\r\n }", "@Override\n\tpublic void lab() {\n\t\t\n\t}", "public void solution() {\n\t\t\n\t}", "public Algorithm configure() throws JMException {\n\t\tAlgorithm algorithm;\n\t\tOperator selection;\n\t\tOperator crossover;\n\t\tOperator mutation;\n\n\t\tHashMap parameters; // Operator parameters\n\n\t\t// Creating the problem\n\t\talgorithm = new NSGAII(problem_);\n\n\t\t// Algorithm parameters\n\t\talgorithm.setInputParameter(\"populationSize\", populationSize_);\n\t\talgorithm.setInputParameter(\"maxEvaluations\", maxEvaluations_);\n\n\t\t// Mutation and Crossover Binary codification\n\t\tparameters = new HashMap();\n\t\tparameters.put(\"probability\", crossoverProbability_);\n\t\tcrossover = CrossoverFactory.getCrossoverOperator(\"SinglePointCrossover\", parameters);\n\n\t\tparameters = new HashMap();\n\t\tparameters.put(\"probability\", mutationProbability_);\n\t\tmutation = MutationFactory.getMutationOperator(\"BitFlipMutation\", parameters);\n\n\t\t// Selection Operator\n\t\tparameters = null;\n\t\tselection = SelectionFactory.getSelectionOperator(\"BinaryTournament2\", parameters);\n\n\t\t// Add the operators to the algorithm\n\t\talgorithm.addOperator(\"crossover\", crossover);\n\t\talgorithm.addOperator(\"mutation\", mutation);\n\t\talgorithm.addOperator(\"selection\", selection);\n\n\t\treturn algorithm;\n\t}", "public void setAlgorithm(Algorithm alg) {\n this.algorithm=alg;\n }", "boolean addEasyLoss();", "public static void main(String[] args) throws FileFormatException,\n IOException {\n \n OpdfMultiGaussianFactory initFactoryPunch = new OpdfMultiGaussianFactory(\n 3);\n \n Reader learnReaderPunch = new FileReader(\n \"punchlearn.seq\");\n List<List<ObservationVector>> learnSequencesPunch = ObservationSequencesReader\n .readSequences(new ObservationVectorReader(), learnReaderPunch);\n learnReaderPunch.close();\n \n KMeansLearner<ObservationVector> kMeansLearnerPunch = new KMeansLearner<ObservationVector>(\n 10, initFactoryPunch, learnSequencesPunch);\n // Create an estimation of the HMM (initHmm) using one iteration of the\n // k-Means algorithm\n Hmm<ObservationVector> initHmmPunch = kMeansLearnerPunch.iterate();\n \n // Use BaumWelchLearner to create the HMM (learntHmm) from initHmm\n BaumWelchLearner baumWelchLearnerPunch = new BaumWelchLearner();\n Hmm<ObservationVector> learntHmmPunch = baumWelchLearnerPunch.learn(\n initHmmPunch, learnSequencesPunch);\n \n // Create HMM for scroll-down gesture\n \n OpdfMultiGaussianFactory initFactoryScrolldown = new OpdfMultiGaussianFactory(\n 3);\n \n Reader learnReaderScrolldown = new FileReader(\n \"scrolllearn.seq\");\n List<List<ObservationVector>> learnSequencesScrolldown = ObservationSequencesReader\n .readSequences(new ObservationVectorReader(),\n learnReaderScrolldown);\n learnReaderScrolldown.close();\n \n KMeansLearner<ObservationVector> kMeansLearnerScrolldown = new KMeansLearner<ObservationVector>(\n 10, initFactoryScrolldown, learnSequencesScrolldown);\n // Create an estimation of the HMM (initHmm) using one iteration of the\n // k-Means algorithm\n Hmm<ObservationVector> initHmmScrolldown = kMeansLearnerScrolldown\n .iterate();\n \n // Use BaumWelchLearner to create the HMM (learntHmm) from initHmm\n BaumWelchLearner baumWelchLearnerScrolldown = new BaumWelchLearner();\n Hmm<ObservationVector> learntHmmScrolldown = baumWelchLearnerScrolldown\n .learn(initHmmScrolldown, learnSequencesScrolldown);\n \n // Create HMM for send gesture\n \n OpdfMultiGaussianFactory initFactorySend = new OpdfMultiGaussianFactory(\n 3);\n \n Reader learnReaderSend = new FileReader(\n \"sendlearn.seq\");\n List<List<ObservationVector>> learnSequencesSend = ObservationSequencesReader\n .readSequences(new ObservationVectorReader(), learnReaderSend);\n learnReaderSend.close();\n \n KMeansLearner<ObservationVector> kMeansLearnerSend = new KMeansLearner<ObservationVector>(\n 10, initFactorySend, learnSequencesSend);\n // Create an estimation of the HMM (initHmm) using one iteration of the\n // k-Means algorithm\n Hmm<ObservationVector> initHmmSend = kMeansLearnerSend.iterate();\n \n // Use BaumWelchLearner to create the HMM (learntHmm) from initHmm\n BaumWelchLearner baumWelchLearnerSend = new BaumWelchLearner();\n Hmm<ObservationVector> learntHmmSend = baumWelchLearnerSend.learn(\n initHmmSend, learnSequencesSend);\n \n Reader testReader = new FileReader(\n \"scroll.seq\");\n List<List<ObservationVector>> testSequences = ObservationSequencesReader\n .readSequences(new ObservationVectorReader(), testReader);\n testReader.close();\n \n short gesture; // punch = 1, scrolldown = 2, send = 3\n double punchProbability, scrolldownProbability, sendProbability;\n for (int i = 0; i <= 4; i++) {\n punchProbability = learntHmmPunch.probability(testSequences\n .get(i));\n gesture = 1;\n scrolldownProbability = learntHmmScrolldown.probability(testSequences\n .get(i));\n if (scrolldownProbability > punchProbability) {\n gesture = 2;\n }\n sendProbability = learntHmmSend.probability(testSequences\n .get(i));\n if ((gesture == 1 && sendProbability > punchProbability)\n || (gesture == 2 && sendProbability > scrolldownProbability)) {\n gesture = 3;\n }\n if (gesture == 1) {\n System.out.println(\"This is a punch gesture\");\n } else if (gesture == 2) {\n System.out.println(\"This is a scroll-down gesture\");\n } else if (gesture == 3) {\n System.out.println(\"This is a send gesture\");\n }\n }\n }", "public KNN() {\r\n\t\tallowRun = true;\r\n\t}", "@Override\n\tpublic void learn(Dataset dataset, Alg alg) {\n\t\tsuper.learn(dataset, alg);\n\t\t\n\t\tbnetMap = BnetDistributedLearner.createDistributedBnet(dataset);\n\t\titemIds = bnetMap.keySet();\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\tfileName = \"out_\" + Program.getProgram().getFileName() + \"_\";\n\t\tint numAddStop = 0;\n\t\t//fileName = \"out_themida_\";\n\n\t\t//fileState.clearContentFile();\n\t\t//bkFile.clearContentFile();\n\t\toverallStartTime = System.currentTimeMillis();\n\t\tlong overallStartTemp = overallStartTime;\n\t\t// BE-PUM algorithm\n\t\tSystem.out.println(\"Starting On-the-fly Model Generation algorithm.\");\n\t\tprogram.getResultFileTemp().appendInLine('\\n' + program.getFileName() + '\\t');\n\t\t\n\t\t// Set up initial context\n\t\tX86TransitionRule rule = new X86TransitionRule();\n\t\tBPCFG cfg = Program.getProgram().getBPCFG();\n\t\tEnvironment env = new Environment();\n\t\t//env.getMemory().resetImportTable(program);\n\t\tAbsoluteAddress location = Program.getProgram().getEntryPoint();\n\t\tInstruction inst = Program.getProgram().getInstruction(location, env);\n\t\tList<BPPath> pathList = new ArrayList<BPPath>();\n\t\t\n\t\t// Insert start node\n\t\tBPVertex startNode = null;\n\t\tstartNode = new BPVertex(location, inst);\n\t\tstartNode.setType(0);\n\t\tcfg.insertVertex(startNode);\n\n\t\tBPState curState = null;\n\t\tBPPath path = null;\n\t\tcurState = new BPState(env, location, inst);\n\t\tpath = new BPPath(curState, new PathList(), new Formulas());\n\t\tpath.setCurrentState(curState);\n\t\tpathList.add(path);\n\n\t\t/*if (Program.getProgram().getFileName().equals(\"api_test_v2.3_lvl1.exe\") \n\t\t\t\t&& isRestored) {\n\t\t\tSystem.out.println(\"Restore State from File.\");\n\t\t\tFileProcess reFile = new FileProcess(\"data/data/restoreState.txt\");\n\t\t\tpathList = restoreState(reFile);\n\t\t\t// bkFile.clearContentFile();\n\t\t\tSystem.out.println(\"Finished restoring state!\");\n\t\t}*/\n\n\t\t// Update at first -----------------------------\n\t\tTIB.setBeUpdated(true);\n\t\tTIB.updateTIB(curState);\n\t\t// ---------------------------------------------\n\n\t\t// PHONG - 20150801 /////////////////////////////\n\t\t// Packer Detection via Header\n\t\tSystem.out.println(\"================PACKER DETECTION VIA HEADER ======================\");\n\t\tif (OTFModelGeneration.detectPacker)\n\t\t{\n\t\t\tprogram.getDetection().detectViaHeader(program);\n\t\t\tprogram.getDetection().setToLogFirst(program);\n\t\t}\n\t\tSystem.out.println(\"==================================================================\");\n\t\t/////////////////////////////////////////////////\n\t\t\n\t\tsynchronized (OTFThreadManager.getInstance()) {\n\t\t\ttry {\n\t\t\t\tOTFThreadManager.getInstance().check(this, pathList);\n\t\t\t\tOTFThreadManager.getInstance().wait();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// PHONG - 20150724\n\t\tSystem.out.println(\"================PACKER DETECTION VIA OTF======================\");\n\t\tprogram.getDetection().packedByTechniques();\n\t\tprogram.getDetection().packedByTechniquesFrequency();\n\t\tSystem.out.println(\"==============================================================\");\n\t}", "public AlgorithmRunner(AbstractEvolutionaryAlgorithm<S> algorithm) {\n this.algorithm = algorithm;\n }", "public BackPropagationLearningProcess(NeuralNetwork network) {\r\n\t\tsuper(network);\r\n\t}", "public void TrainDataset(){\n\t\ttry{\n\t\t\t//Testing delegate method\n\t\t\tMessageController.logToConsole(\"Hey, I'm from train button\");\n\t\t\t\n\t\t\t//Pass in the real training dataset\n\t\t\tfindSuitableK(new String[]{\"Hello\", \"World\"});\n\t\t\t\n\t\t\t//Pass in the 'k' and 'query string'\n\t\t\tfindKNN(2, \"anything\");\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tthrow ex;\n\t\t}\n\t\tfinally{\n\t\t\t\n\t\t}\n\t}", "private void postLearning(FsmLearner learner, AndroidEmulatorInstrumentator aei) {\n\t\tEmulator em = new Emulator(\"Nexus5X\");\t\t// Make sure you have setup a correct emulator\n\t\tem.start();\n\n\t\tapkConstruct(); // fills apkinfo\n\t\tResultProcessor rp = new ResultProcessor(learner.getStamp(), aei, this.apkInfo);\n\t\trp.run();\n\t\trp.print();\n\n\t}", "public static void main(String[] args) {\n\t\tUtility.dirPath = \"C:\\\\Users\\\\imSlappy\\\\workspace\\\\FeelingAnalysis\\\\Documents\\\\2_group_eng\";\n\t\tString sub[] = {\"dup\",\"bug\"};\n\t\tUtility.classLabel = sub;\n\t\tUtility.numdoc = 350;\n\t\tSetClassPath.read_path(Utility.dirPath);\n\t\tUtility.language = \"en\";\n\t\t\n\t\tUtility.stopWordHSEN = Fileprocess.FileHashSet(\"data/stopwordAndSpc_eng.txt\");\n\t\tUtility.dicen = new _dictionary();\n\t\tUtility.dicen.getDictionary(\"data/dicEngScore.txt\");\n\t\t\n\t\tUtility.vocabHM = new HashMap();\n\t\t// ================= completed initial main Program ==========================\n\n\t\tMainExampleNaive ob = new MainExampleNaive();\n\t\t\n\t\t// --------------------- Pre-process -----------------------\n\t\tob.word_arr = new HashSet [Utility.listFile.length][];\n\t\tob.wordSet = new ArrayList<String>();\n\t\tfor (int i = 0; i < Utility.listFile.length; i++) {\n\t\t\tob.word_arr[i]=new HashSet[Utility.listFile[i].length];\n\t\t\tfor (int j = 0; j < Utility.listFile[i].length; j++) {\n\t\t\t\tStringBuffer strDoc = Fileprocess.readFile(Utility.listFile[i][j]);\n\t\t\t\tob.word_arr[i][j]=ob.docTokenization(new String(strDoc));\n\t\t\t}\n\t\t\tob.checkBound(3, 10000);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"++ Total : \"+Utility.vocabHM.size()+\" words\");\n\t\tSystem.out.println(\"++ \"+Utility.vocabHM);\n\t\t\n\t\t// ---------------------- Selection ------------------------\n//\t\tInformationGain ig = new InformationGain(ob.word_arr.length*ob.word_arr[0].length , ob.wordSet,ob.word_arr);\n//\t\tArrayList<String> ban_word = ig.featureSelection(0.0); // selected out with IG = 0\n//\t\t//ob.banFeature(ban_word);\n//\t\tSystem.out.println(\"ban list[\"+ban_word.size()+\"] : \"+ban_word);\n//\t\t\n//\t\tSystem.out.println(\"-- After \"+Utility.vocabHM.size());\n//\t\tSystem.out.println(\"-- \"+Utility.vocabHM);\n\t\t\n\t\tob.setWordPosition();\n\t\t// ---------------------- Processing -----------------------\n\t\tNaiveBayes naive = new NaiveBayes();\n\t\tnaive.naiveTrain(true);\n\t\t\n\t\tint result = naive.naiveUsage(\"after cold reset of my pc (crash of xp) the favorites of firefox are destroyed and all settings are standard again! Where are firefox-favorites stored and the settings ? how to backup them rgularely? All other software on my pc still works properly ! even INternetExplorer\");\n\t\tSystem.out.println(\"\\nResult : \"+Utility.classLabel[result]);\n\t}", "public void lloydsAlgorithm();", "public void wekaCalculate()\n\t{\n\t\tfor (int categoryStep = 0; categoryStep < 6; categoryStep++)\n\t\t{\n\t\t\tString trainString = \"Train\";\n\t\t\tString testString = \"Test\";\n\t\t\tString categoryString;\n\t\t\tString resultString = \"Results\";\n\t\t\tString textString;\n\t\t\tString eventString;\n\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: categoryString = \"Cont.arff\"; break;\n\t\t\tcase 1: categoryString = \"Dona.arff\"; break;\n\t\t\tcase 2: categoryString = \"Offi.arff\"; break;\n\t\t\tcase 3: categoryString = \"Advi.arff\"; break;\n\t\t\tcase 4: categoryString = \"Mult.arff\"; break;\n\t\t\tdefault: categoryString = \"Good.arff\";\n\t\t\t}\n\t\t\t\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: textString = \"Cont.txt\"; break;\n\t\t\tcase 1: textString = \"Dona.txt\"; break;\n\t\t\tcase 2: textString = \"Offi.txt\"; break;\n\t\t\tcase 3: textString = \"Advi.txt\"; break;\n\t\t\tcase 4: textString = \"Mult.txt\"; break;\n\t\t\tdefault: textString = \"Good.txt\";\n\t\t\t}\n\t\t\t\n\t\t\tfor (int eventStep = 0; eventStep < 15; eventStep++)\n\t\t\t{\n\t\t\t\tString trainingData;\n\t\t\t\tString testData;\n\t\t\t\tString resultText;\n\n\t\t\t\tswitch (eventStep)\n\t\t\t\t{\n\t\t\t\tcase 0: eventString = \"2011Joplin\"; break;\n\t\t\t\tcase 1: eventString = \"2012Guatemala\"; break; \n\t\t\t\tcase 2: eventString = \"2012Italy\"; break;\n\t\t\t\tcase 3: eventString = \"2012Philipinne\"; break;\n\t\t\t\tcase 4: eventString = \"2013Alberta\";\tbreak;\n\t\t\t\tcase 5: eventString = \"2013Australia\"; break;\n\t\t\t\tcase 6: eventString = \"2013Boston\"; break;\t\t\t\t\n\t\t\t\tcase 7: eventString = \"2013Manila\"; break;\n\t\t\t\tcase 8: eventString = \"2013Queens\"; break;\n\t\t\t\tcase 9: eventString = \"2013Yolanda\"; break;\n\t\t\t\tcase 10: eventString = \"2014Chile\"; break;\n\t\t\t\tcase 11: eventString = \"2014Hagupit\"; break;\n\t\t\t\tcase 12: eventString = \"2015Nepal\"; break;\n\t\t\t\tcase 13: eventString = \"2015Paris\"; break;\n\t\t\t\tdefault: eventString = \"2018Florida\"; \t\t\t\t\n\t\t\t\t}\n\n\t\t\t\ttrainingData = eventString;\n\t\t\t\ttrainingData += trainString;\n\t\t\t\ttrainingData += categoryString;\n\n\t\t\t\ttestData = eventString;\n\t\t\t\ttestData += testString;\n\t\t\t\ttestData += categoryString;\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tresultText = eventString;\n\t\t\t\tresultText += resultString;\n\t\t\t\tresultText += textString;\n\t\t\t\t\n\n\t\t\t\ttry {\n\t\t\t\t\tConverterUtils.DataSource loader1 = new ConverterUtils.DataSource(trainingData);\n\t\t\t\t\tConverterUtils.DataSource loader2 = new ConverterUtils.DataSource(testData);\n\n\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(resultText));\n\t\t\t\t\tInstances trainData = loader1.getDataSet();\n\t\t\t\t\ttrainData.setClassIndex(trainData.numAttributes() - 1);\n\n\t\t\t\t\tInstances testingData = loader2.getDataSet();\n\t\t\t\t\ttestingData.setClassIndex(testingData.numAttributes() - 1);\n\n\t\t\t\t\tClassifier cls1 = new NaiveBayes();\t\t\t\t\t\n\t\t\t\t\tcls1.buildClassifier(trainData);\t\t\t\n\t\t\t\t\tEvaluation eval1 = new Evaluation(trainData);\n\t\t\t\t\teval1.evaluateModel(cls1, testingData);\t\n\t\t\t\t\tbw.write(\"=== Summary of Naive Bayes ===\");\n\t\t\t\t\tbw.write(eval1.toSummaryString());\n\t\t\t\t\tbw.write(eval1.toClassDetailsString());\n\t\t\t\t\tbw.write(eval1.toMatrixString());\n\t\t\t\t\tbw.write(\"\\n\");\n\n\t\t\t\t\tthis.evalNaiveBayesList.add(eval1);\n\n\t\t\t\t\tClassifier cls2 = new SMO();\n\t\t\t\t\tcls2.buildClassifier(trainData);\n\t\t\t\t\tEvaluation eval2 = new Evaluation(trainData);\n\t\t\t\t\teval2.evaluateModel(cls2, testingData);\n\t\t\t\t\tbw.write(\"=== Summary of SMO ===\");\n\t\t\t\t\tbw.write(eval2.toSummaryString());\n\t\t\t\t\tbw.write(eval2.toClassDetailsString());\n\t\t\t\t\tbw.write(eval2.toMatrixString());\n\n\t\t\t\t\tthis.evalSMOList.add(eval2);\n\n\t\t\t\t\tbw.close();\n\t\t\t\t} catch (Exception e) {\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void fitnessFunction()\n\t{\n\t\t\n\t}", "public void newAnalyseDatasetOfLanguage() throws ClassNotFoundException, SQLException {\n\t\topenConnection();\n\t}", "public static void main(String[] args) \n\t{\n\t\t// Konfiguration\n\t\tTraining training = new Training();\n\t\tint numberOfAttributes = 18;\n\t\tStatisticOutput statisticWriter = new StatisticOutput(\"data/statistics.txt\");\n\t\t\n\t\ttraining.printMessage(\"*** TCR-Predictor: Training ***\");\n\t\t\n\t\ttraining.printMessage(\"Datenbank von Aminosäure-Codierungen wird eingelesen\");\n\t\t// Lies die EncodingDB ein\n\t\tAAEncodingFileReader aa = new AAEncodingFileReader();\n\t\tAAEncodingDatabase db = aa.readAAEncodings(\"data/AAEncodings.txt\");\n\t\ttraining.printMessage(\"Es wurden \" + db.getEncodingDatabase().size() + \" Codierungen einglesen\");\n\t\t\n\t\ttraining.printMessage(\"Trainingsdatensatz wird eingelesen und prozessiert\");\n\t\t// Lies zunächst die gesamten Trainingsdaten ein\n\t\tExampleReader exampleReader = new ExampleReader();\n\t\t\n\t\t// Spalte das Datenset\n\t\tDataSplit dataSplit_positives = new DataSplit(exampleReader.getSequnces(\"data/positive.txt\"), 5);\n\t\tArrayList<ArrayList<String>> complete_list_positiv = dataSplit_positives.getDataSet();\n\t\t\n\t\tDataSplit dataSplit_negatives = new DataSplit(exampleReader.getSequnces(\"data/negative.txt\"), 5);\n\t\tArrayList<ArrayList<String>> complete_list_negativ = dataSplit_negatives.getDataSet();\n\t\t\n\t\t// Lege Listen für die besten Klassifizierer und deren Evaluation an\n\t\tModelCollection modelCollection = new ModelCollection();\n\t\t\n\t\t/*\n\t\t * \n\t\t * Beginne Feature Selection\n\t\t * \n\t\t */\n\t\tArrayList<String> positivesForFeatureSelection = training.concatenateLists(complete_list_positiv);\n\t\tArrayList<String> negativesForFeatureSelection = training.concatenateLists(complete_list_negativ);\n\t\t\n\t\ttraining.printMessage(\"Convertiere Daten ins Weka ARFF Format\");\t\t\n\t\t// Convertiere Daten in Wekas File Format\n\t\tARFFFileGenerator arff = new ARFFFileGenerator();\n\t\tInstances dataSet = arff.createARFFFile(positivesForFeatureSelection, negativesForFeatureSelection, db.getEncodingDatabase());\n\t\tdataSet.setClass(dataSet.attribute(\"activator\"));\t\t\t// Lege das nominale Attribut fest, wonach klassifiziert wird\n\t\tdataSet.deleteStringAttributes(); \t\t\t\t\t\t\t// Entferne String-Attribute\n\t\t\n\t\ttraining.printMessage(\"Führe Feature Selection (Filtering) aus\");\n\t\t// Beginne Feature Selection\n\t\tFeatureFilter featureFilter = new FeatureFilter();\n\t\tfeatureFilter.rankFeatures(dataSet, numberOfAttributes);\t\t\t\t\t// Wähle die x wichtigsten Features aus\n\t\tdataSet = featureFilter.getProcessedInstances();\n\t\ttraining.printMessage(\"Ausgewählte Features: \" + featureFilter.getTopResults());\n\n\t\t/*\n\t\t * Führe die äußere Evaluierung fünfmal durch und wähle das beste Modell\n\t\t */\n\t\tfor (int outer_run = 0; outer_run < 5; outer_run++)\n\t\t{\n\t\t\tstatisticWriter.writeString(\"===== Äußere Evaluation \" + (outer_run + 1) + \"/5 =====\\n\\n\");\n\t\t\t\n\t\t\t\n\t\t\tArrayList<ArrayList<String>> list_positives = new ArrayList<ArrayList<String>>();\n\t\t\tlist_positives.addAll(complete_list_positiv);\n\t\t\t\n\t\t\tArrayList<ArrayList<String>> list_negatives = new ArrayList<ArrayList<String>>();\n\t\t\tlist_negatives.addAll(complete_list_negativ);\n\t\t\t\n\t\t\t// Lege das erste Fragment beider Listen für nasted-Crossvalidation beiseite\n\t\t\tArrayList<String> outer_List_pos = new ArrayList<String>();\n\t\t\touter_List_pos.addAll(list_positives.get(outer_run));\n\t\t\tlist_positives.remove(outer_run);\n\t\t\t\n\t\t\tArrayList<String> outer_List_neg = new ArrayList<String>();\n\t\t\touter_List_neg.addAll(list_negatives.get(outer_run));\n\t\t\tlist_negatives.remove(outer_run);\n\t\t\t\n\t\t\t// Füge die verbleibende Liste zu einer Zusammen\n\t\t\tArrayList<String> inner_List_pos = training.concatenateLists(list_positives);\n\t\t\tArrayList<String> inner_List_neg = training.concatenateLists(list_negatives);\n\t\t\t\t\n\n\t\t\t/*\n\t\t\t * \n\t\t\t * Ab hier nur noch Arbeiten mit innerer Liste, die Daten zum Evaluieren bekommt Weka vorerst \n\t\t\t * nicht zu sehen!\n\t\t\t * \n\t\t\t */\n\t\t\ttraining.printMessage(\"Convertiere Daten ins Weka ARFF Format\");\t\t\n\t\t\t// Convertiere Daten in Wekas File Format\n\t\t\tarff = new ARFFFileGenerator();\n\t\t\tdataSet = arff.createARFFFile(inner_List_pos, inner_List_neg, db.getEncodingDatabase());\n\t\t\tdataSet.setClass(dataSet.attribute(\"activator\"));\t\t\t// Lege das nominale Attribut fest, wonach klassifiziert wird\n\t\t\tdataSet.deleteStringAttributes(); \t\t\t\t\t\t\t// Entferne String-Attribute\n\t\t\t\n\t\t\tfeatureFilter.processInstances(featureFilter.getRanking(), dataSet, numberOfAttributes); // Filtere das innere Datenset nach Vorgabe\n\t\t\tdataSet = featureFilter.getProcessedInstances();\n\t\t\t\n\t\t\ttraining.printMessage(\"Beginne Gridsearch\");\n\t\t\t// Gridsearch starten\n\t\n\t\t\t\n\t\t\t\n\t\t\tParameterOptimization optimizer = new ParameterOptimization();\n\t\t\tString logFileName = outer_run + \"_\" + numberOfAttributes;\n\t\t\tGridSearch gridSearch = optimizer.performGridSearch(dataSet, logFileName);\n\t\t\ttraining.printMessage(\"Gefundene Parameter [C, gamma]: \" + gridSearch.getValues()); // liefert unter diesen Settings 1.0 und 0.0\n\n\t\t\tSMO sMO = (SMO)gridSearch.getBestClassifier();\n\t\t\t\t\t\t\t\n\t\t\t/*\n\t\t\t * \n\t\t\t * Evaluationsbeginn \n\t\t\t *\n\t\t\t */\n\t\t\ttraining.printMessage(\"Evaluiere die Performance gegen das äußere Datenset\");\n\t\t\ttraining.printMessage(\"Transcodierung des Evaluationsdatensatzes\");\n\t\t\tarff = new ARFFFileGenerator();\n\t\t\tdataSet = arff.createARFFFile(outer_List_pos, outer_List_neg, db.getEncodingDatabase());\n\t\t\tdataSet.setClass(dataSet.attribute(\"activator\"));\t\t\t// Lege das nominale Attribut fest, wonach klassifiziert wird\n\t\t\tdataSet.deleteStringAttributes(); \t\t\t\t\t\t\t// Entferne String-Attribute\n\t\t\t\n\t\t\t// Führe Feature-Filtering mit den Einstellungen der GridSearch aus\n\t\t\ttraining.printMessage(\"Führe Feature Selection (Filtering) auf GridSearch-Basis aus\");\n\t\t\t// Beginne Feature Selection\n\t\t\tfeatureFilter.processInstances(featureFilter.getRanking(), dataSet, numberOfAttributes);\t // Wähle die x wichtigsten Features aus\n\t\t\tdataSet = featureFilter.getProcessedInstances();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttraining.printMessage(\"Ermittle Performance\");\n\t\t\tEvaluator eval = new Evaluator();\n\t\t\teval.classifyDataSet(sMO, dataSet);\n\t\t\ttraining.printMessage(eval.printRawData());\n\t\t\t\n\t\t\t/*\n\t\t\t * Füge das Modell und die externe Evaulation zur Sammlung hinzu\n\t\t\t */\t\t\t\n\t\t\tmodelCollection.bestClassifiers.add(sMO);\n\t\t\tmodelCollection.evalsOfBestClassifiers.add(eval);\n\t\t\tmodelCollection.listOfNumberOfAttributes.add(numberOfAttributes);\n\t\t\tmodelCollection.listOfFeatureFilters.add(featureFilter);\n\t\t\t\n\t\t\tstatisticWriter.writeString(\"Verwendete Attribute: \" + featureFilter.getTopResults());\n\t\t\tstatisticWriter.writeString(eval.printRawData());\n\t\t\t\n\t\t}\n\t\tstatisticWriter.close();\n\t\t\n\t\t// Wähle das beste aller Modelle aus\n\t\ttraining.printMessage(\"Ermittle die allgemein besten Einstellungen\");\n\t\tModelSelection modelSelection = new ModelSelection();\n\t\tmodelSelection.calculateBestModel(modelCollection);\n\t\t\n\t\ttraining.printMessage(\"Das beste Model: \");\n\t\ttraining.printMessage(modelSelection.getBestEvaluator().printRawData());\n\t\tSystem.out.println(\"------ SMO ------\");\n\t\tfor (int i = 0; i < modelSelection.getBestClassifier().getOptions().length; i++)\n\t\t{\n\t\t\tSystem.out.print(modelSelection.getBestClassifier().getOptions()[i] + \" \");\n\t\t}\n\t\tSystem.out.println(\"\\n--- Features ---\");\n\t\tSystem.out.println(modelSelection.getBestListOfFeatures().getTopResults());\n\t\t\n\t\t// Schreibe das Modell in eine Datei\n\t\ttraining.printMessage(\"Das beste Modell wird auf Festplatte geschrieben\");\n\t\ttry\n\t\t{\n\t\t\tSerializationHelper.write(\"data/bestPredictor.model\", modelSelection.getBestClassifier());\n\t\t\tSerializationHelper.write(\"data/ranking.filter\", modelSelection.getBestListOfFeatures().getRanking());\n\t\t\tSerializationHelper.write(\"data/components.i\", (modelSelection.getBestListOfFeatures().getProcessedInstances().numAttributes()-1));\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tSystem.err.println(\"Fehler beim Schreiben des Modells auf Festplatte: \" + ex);\n\t\t}\n\t}", "public Lesson(String name)\r\n { this.name = name;\r\n layer = 1; \r\n }", "void addHasRecommendation(PM_Learning_Material newHasRecommendation);", "@Override\r\n // WEI XU METHOD 2\r\n \r\n public void train(String sourceText) {\r\n String[] words1 = sourceText.split(\"[\\\\s]+\");\r\n // add starter to be a next word for the last word in the source text.\r\n List<String> words = new ArrayList<String>(Arrays.asList(words1));\r\n words.add(words1[0]);\r\n starter = words1[0];\r\n String prevWord = starter;\r\n for (int i = 1; i < words.size(); i++) {\r\n ListNode node = findNode(prevWord);//todo:it's a reference? but not a new Listnode? so no need set back?\r\n if (node == null) {\r\n node = new ListNode(prevWord);\r\n wordList.add(node);\r\n }\r\n node.addNextWord(words.get(i));//todo: why hashmap need set back value, linkedlist don't need?\r\n prevWord = words.get(i);\r\n }\r\n }", "public void testLearn()\n {\n RandomSubVectorThresholdLearner<String> instance = new RandomSubVectorThresholdLearner<String>(\n new VectorThresholdInformationGainLearner<String>(),\n 0.1, random);\n\n VectorFactory<?> vectorFactory = VectorFactory.getDefault();\n ArrayList<InputOutputPair<Vector, String>> data =\n new ArrayList<InputOutputPair<Vector, String>>();\n for (int i = 0; i < 10; i++)\n {\n data.add(new DefaultInputOutputPair<Vector, String>(vectorFactory.createUniformRandom(\n 100, 1.0, 10.0, random), \"a\"));\n }\n\n for (int i = 0; i < 10; i++)\n {\n data.add(new DefaultInputOutputPair<Vector, String>(vectorFactory.createUniformRandom(\n 100, 1.0, 10.0, random), \"b\"));\n }\n\n VectorElementThresholdCategorizer result = instance.learn(data);\n assertNotNull(result);\n assertTrue(result.getIndex() >= 0);\n assertTrue(result.getIndex() < 100);\n \n // Change the dimensions to consider.\n instance.setDimensionsToConsider(new int[] {10, 20, 30, 40, 50});\n instance.setPercentToSample(0.5);\n result = instance.learn(data);\n assertNotNull(result);\n assertTrue(result.getIndex() >= 10);\n assertTrue(result.getIndex() <= 50);\n assertTrue(result.getIndex() % 10 == 0);\n }", "public AI(){\n super();\n }", "public static void runIndividual(String algorithmCode, String[] parameters) {\r\n\t\tSystem.out.println(RankEvaluator.printTitle() + \"\\tAvgP\\tTrain Time\\tTest Time\");\r\n\t\t\r\n\t\t// Prefetching user/item similarity:\r\n\t\tif (userSimilarityPrefetch) {\r\n\t\t\tuserSimilarity = calculateUserSimilarity(MATRIX_FACTORIZATION, ARC_COS, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tuserSimilarity = new SparseMatrix(userCount+1, userCount+1);\r\n\t\t}\r\n\t\t\r\n\t\tif (itemSimilarityPrefetch) {\r\n\t\t\titemSimilarity = calculateItemSimilarity(MATRIX_FACTORIZATION, ARC_COS, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\titemSimilarity = new SparseMatrix(itemCount+1, itemCount+1);\r\n\t\t}\r\n\t\t\r\n\t\t// Loss code\r\n\t\tint lossCode = -1;\r\n\t\tif (parameters[0].equals(\"log_mult\")) lossCode = RankEvaluator.LOG_LOSS_MULT;\r\n\t\telse if (parameters[0].equals(\"log_add\")) lossCode = RankEvaluator.LOG_LOSS_ADD;\r\n\t\telse if (parameters[0].equals(\"exp_mult\")) lossCode = RankEvaluator.EXP_LOSS_MULT;\r\n\t\telse if (parameters[0].equals(\"exp_add\")) lossCode = RankEvaluator.EXP_LOSS_ADD;\r\n\t\telse if (parameters[0].equals(\"hinge_mult\")) lossCode = RankEvaluator.HINGE_LOSS_MULT;\r\n\t\telse if (parameters[0].equals(\"hinge_add\")) lossCode = RankEvaluator.HINGE_LOSS_ADD;\r\n\t\telse if (parameters[0].equals(\"abs\")) lossCode = RankEvaluator.ABSOLUTE_LOSS;\r\n\t\telse if (parameters[0].equals(\"sqr\")) lossCode = RankEvaluator.SQUARED_LOSS;\r\n\t\telse if (parameters[0].equals(\"expreg\")) lossCode = RankEvaluator.EXP_REGRESSION;\r\n\t\telse if (parameters[0].equals(\"l1reg\")) lossCode = RankEvaluator.SMOOTH_L1_REGRESSION;\r\n\t\telse if (parameters[0].equals(\"logistic\")) lossCode = RankEvaluator.LOGISTIC_LOSS;\r\n\t\telse lossCode = RankEvaluator.LOG_LOSS_MULT; // default\r\n\t\t\r\n\t\tif (algorithmCode.toLowerCase().equals(\"pgllorma\")) {\r\n\t\t\t// Run the baseline for calculating user/item similarity\r\n\t\t\tdouble learningRate = 0.005;\r\n\t\t\tdouble regularizer = 0.1;\r\n\t\t\tint maxIter = 100;\r\n\t\t\tbaseline = new RegularizedSVD(userCount, itemCount, maxValue, minValue,\t10, learningRate, regularizer, 0, maxIter, false);\r\n\t\t\tSystem.out.println(\"SVD\\tFro\\t10\\t\" + testRecommender(\"SVD\", baseline));\r\n\t\t\t\r\n\t\t\trunPairedGlobalLLORMA(lossCode, Integer.parseInt(parameters[1]), Integer.parseInt(parameters[2]), Double.parseDouble(parameters[3]), true);\r\n\t\t}\r\n\t\telse if (algorithmCode.toLowerCase().equals(\"ranksvd\")) {\r\n\t\t\trunRankBasedSVD(lossCode, Integer.parseInt(parameters[1]), Double.parseDouble(parameters[2]), true);\r\n\t\t}\r\n\t}", "private static void normal(){\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n\n //NSGAII algorithm = new NSGAII();\n SPEA2 algorithm = new SPEA2();\n //SPEAHADKA algorithm = new SPEAHADKA();\n //AEMMT algorithm = new AEMMT();\n //AEMMD algorithm = new AEMMD();\n //MOEAD algorithm = new MOEAD();\n\n int x =1;\n int counter = 0;\n\n if (AEMMD.class.isInstance(algorithm) || AEMMT.class.isInstance(algorithm)){\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n }\n else{\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n }\n\n while (counter < x) {\n algorithm.runAlgorithm(problem);\n counter++;\n }\n }", "private void doResearch() {\n\t\tSystem.out.println(\"Students must do research\");\n\t}", "public static void demo() {\n\t\tlab_2_2_5();\n\n\t}", "private void goGuide() {\n }", "@Override\n\tpublic void inputScore() {\n\n\t}", "@Override\n\tpublic void updateLevel() {\n\t\tthis.algorithm();\n\t\t\n\t}", "public void model() \n\t{\n\t\t\n\t\ttry \n\t\t{\n\t\t GRBEnv env = new GRBEnv();\n\t\t GRBModel model = new GRBModel(env, \"resources/students.lp\");\n\n\t\t model.optimize();\n\n\t\t int optimstatus = model.get(GRB.IntAttr.Status);\n\n\t\t if (optimstatus == GRB.Status.INF_OR_UNBD) {\n\t\t model.getEnv().set(GRB.IntParam.Presolve, 0);\n\t\t model.optimize();\n\t\t optimstatus = model.get(GRB.IntAttr.Status);\n\t\t }\n\n\t\t if (optimstatus == GRB.Status.OPTIMAL) {\n\t\t double objval = model.get(GRB.DoubleAttr.ObjVal);\n\t\t System.out.println(\"Optimal objective: \" + objval);\n\t\t } else if (optimstatus == GRB.Status.INFEASIBLE) {\n\t\t System.out.println(\"Model is infeasible\");\n\n\t\t // Compute and write out IIS\n\t\t model.computeIIS();\n\t\t model.write(\"model.ilp\");\n\t\t } else if (optimstatus == GRB.Status.UNBOUNDED) {\n\t\t System.out.println(\"Model is unbounded\");\n\t\t } else {\n\t\t System.out.println(\"Optimization was stopped with status = \"\n\t\t + optimstatus);\n\t\t }\n\n\t\t // Dispose of model and environment\n\t\t model.write(\"resources/model.sol\");\n\t\t model.dispose();\n\t\t env.dispose();\n\n\t\t } catch (GRBException e) {\n\t\t System.out.println(\"Error code: \" + e.getErrorCode() + \". \" +\n\t\t e.getMessage());\n\t\t }\n\t\t\n\t}", "public interface LDABetaInitStrategy{\n\t/**\n\t * Given a model and the corpus initialise the model's sufficient statistics\n\t * @param model\n\t * @param corpus\n\t */\n\tpublic void initModel(LDAModel model, Corpus corpus);\n\t\n\t/**\n\t * initialises beta randomly s.t. each each topicWord >= 1 and < 2\n\t * @author Sina Samangooei ([email protected])\n\t *\n\t */\n\tpublic static class RandomBetaInit implements LDABetaInitStrategy{\n\t\tprivate MersenneTwister random;\n\t\t\n\t\t/**\n\t\t * unseeded random\n\t\t */\n\t\tpublic RandomBetaInit() {\n\t\t\trandom = new MersenneTwister();\n\t\t}\n\t\t\n\t\t/**\n\t\t * seeded random\n\t\t * @param seed\n\t\t */\n\t\tpublic RandomBetaInit(int seed) {\n\t\t\trandom = new MersenneTwister(seed);\n\t\t}\n\t\t@Override\n\t\tpublic void initModel(LDAModel model, Corpus corpus) {\n\t\t\tfor (int topicIndex = 0; topicIndex < model.ntopics; topicIndex++) {\n\t\t\t\tfor (int wordIndex = 0; wordIndex < corpus.vocabularySize(); wordIndex++) {\n\t\t\t\t\tdouble topicWord = 1 + random.nextDouble();\n\t\t\t\t\tmodel.incTopicWord(topicIndex,wordIndex,topicWord);\n\t\t\t\t\tmodel.incTopicTotal(topicIndex, topicWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "public DigitGuessNeuralNetwork(){\r\n neuralNetwork=NeuralNetwork.load(MainActivity.neuralNetInputStream);\r\n }", "@Override\n\tpublic void selectAlgorithm(String algorithmName) {\n\t\tproblem.setAlgorithm(algorithmName);\n\t}", "public void start() throws Exception {\n String datasetPath = \"dataset\\\\arcene_train.arff\";\n\n Instances dataset = new Instances(fileSystemUtil.readDataSet(datasetPath));\n dataset.setClassIndex(dataset.numAttributes() - 1);\n\n // Creating instances of feature selection models\n List<FeatureSelectionModel> featureSelectionModels = new ArrayList<>();\n featureSelectionModels.add(new CorellationFeatureSelectionModel());\n featureSelectionModels.add(new InfoGainFeatureSelectionModel());\n featureSelectionModels.add(new WrapperAttributeFeatureSelectionModel());\n\n List<List<Integer>> listOfRankedLists = calculateRankedLists(dataset, featureSelectionModels);\n\n // Creating instances of classifiers\n List<AbstractClassifier> classifiers = createClassifiers();\n Instances datasetBackup = new Instances(dataset);\n\n int modelCounter = 0;\n for (FeatureSelectionModel model : featureSelectionModels) {\n System.out.println(\"============================================================================\");\n System.out.println(String.format(\"Classification, step #%d. %s.\", ++modelCounter, model));\n System.out.println(\"============================================================================\");\n\n // Ranking attributes\n List<Integer> attrRankList = listOfRankedLists.get(modelCounter - 1);\n\n for (int attrIndex = (int)(attrRankList.size() * WORST_ATTRIBUTES_NUMBER_PROPORTION - 1) + 1, removedCounter = 0;\n attrIndex >= attrRankList.size() * BEST_ATTRIBUTES_NUMBER_PROPORTION;\n attrIndex--, removedCounter++) {\n if (datasetBackup.numAttributes() == attrRankList.size()\n && attrIndex == 0) {\n continue;\n }\n// for (int attrIndex = attrRankList.size() * BEST_ATTRIBUTES_NUMBER_PROPORTION, removedCounter = 0;\n// attrIndex <= (attrRankList.size() * WORST_ATTRIBUTES_NUMBER_PROPORTION - 1);\n// attrIndex++, removedCounter++) {\n// if (datasetBackup.numAttributes() == attrRankList.size()\n// && attrIndex == attrRankList.size() - 1) {\n// continue;\n// }\n dataset = new Instances(datasetBackup);\n // Do not remove for first iteration\n if (removedCounter > 0) {\n // Selecting features (removing attributes one-by-one starting from worst)\n List<Integer> attrToRemoveList = attrRankList.subList(attrIndex,\n (int)(attrRankList.size() * WORST_ATTRIBUTES_NUMBER_PROPORTION));\n Collections.sort(attrToRemoveList);\n for (int i = attrToRemoveList.size() - 1; i >= 0; i--) {\n dataset.deleteAttributeAt(attrToRemoveList.get(i));\n }\n// for (Integer attr : attrToRemoveList) {\n// dataset.deleteAttributeAt(attr);\n// }\n System.out.println(\"\\n\\n-------------- \" + (removedCounter) + \" attribute(s) removed (of \" +\n (datasetBackup.numAttributes() - 1) + \") --------------\\n\");\n } else {\n System.out.println(\"\\n\\n-------------- First iteration - without feature selection --------------\\n\");\n }\n\n classify(classifiers, dataset);\n }\n }\n }", "public void experimentAndPlotter(){\n\t\tLearningAgentFactory qLearningFactory = new LearningAgentFactory() {\n\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"LR = 1\";\n\t\t\t}\n\n\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new QLearning(domain, 0.99, hashingFactory, 0., 1.);\n\t\t\t}\n\t\t};\n\n\t\tLearningAgentFactory qLearningFactory2 = new LearningAgentFactory() {\n\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"LR = 0.5\";\n\t\t\t}\n\n\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new QLearning(domain, 0.99, hashingFactory, 0., 0.5);\n\t\t\t}\n\t\t};\n\n\n\t\tLearningAlgorithmExperimenter exp = new LearningAlgorithmExperimenter(\n\t\t\tenv, 10, 50, qLearningFactory, qLearningFactory2);\n\t\texp.setUpPlottingConfiguration(500, 250, 2, 1000,\n\t\t\t\tTrialMode.MOST_RECENT_AND_AVERAGE,\n\t\t\t\tPerformanceMetric.STEPS_PER_EPISODE,\n\t\t\t\tPerformanceMetric.AVERAGE_EPISODE_REWARD);\n\n\t\texp.startExperiment();\n\t\texp.writeStepAndEpisodeDataToCSV(\"expData\");\n\n\t}", "protected abstract void preMatLab(World world, Object[] mlParams);", "public void saveAlgorithm(){\r\n \tthis.getLog().info(\" saveAlgorithm()\");\r\n \tif(selectedAlgorithmID>=0){\r\n \t\t// edited existing algorithm\r\n \t\talgorithmList.updateAlgorithmToDB(selectedAlgorithm);\r\n \t}else{\r\n \t\t// new algorithm\r\n \t}\r\n \tinitAlgorithmList(selectedAlgorithmID);\r\n }", "public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void upHomework() {\n\t\t\r\n\t}", "GUIbrain() {\n addMouseListener(this);\n addMouseMotionListener(this);\n createGUI(this);\n }", "public static void main(String [] argv) {\n// weka.gui.explorer.Explorer explorer=new weka.gui.explorer.Explorer();\n// String[] file={};\n// explorer.main(file);\n runClassifier(new ExtremeLearningMachine(), argv);\n }", "@Override\n\tpublic void learn(Dataset dataset, Alg alg) throws RemoteException {\n\t\tsuper.learn(dataset, alg);\n\t\t\n\t\tbnetMap = BnetDistributedLearner.createDistributedBnet(dataset);\n\t\titemIds = bnetMap.keySet();\n\t\t\n\t}", "public void learn() {\n best = birds.get(0);\n boolean allDead = true;\n for (final Bird bird : birds) {\n if (bird.dead)\n continue;\n allDead = false;\n\n //Set fitness to -1.0 to begin with, and then adjusts according to\n //the number of ticks and flaps. Note: the ticks are essentially a marker\n //for distance travelled as the ticks do not reset to 0 until the level\n //resets\n double fitness = ticks - bird.flaps * 1.5;\n fitness = fitness == 0.0 ? -1.0 : fitness;\n\n //updates the birds fitness (while still alive)\n bird.genome.fitness = fitness;\n if (fitness > Pool.maxFitness)\n Pool.maxFitness = fitness;\n\n //The best bird's fitness is updated as game progresses\n if (fitness > best.genome.fitness)\n best = bird;\n }\n\n //If all the birds are dead, start a new generation and restart the level\n if (allDead) {\n Pool.newGeneration();\n initializeGame();\n }\n }", "@Override\n public void newGame() {\n //TODO Implement this method\n }" ]
[ "0.6881185", "0.65707284", "0.649253", "0.6417927", "0.6402243", "0.6340479", "0.6257117", "0.62148905", "0.62109244", "0.62018055", "0.6132328", "0.6107932", "0.6087437", "0.60811776", "0.60791737", "0.6069936", "0.6011769", "0.5990617", "0.5952277", "0.5949773", "0.5939813", "0.59391934", "0.59325445", "0.59110945", "0.58901733", "0.58617026", "0.585321", "0.5850933", "0.58483315", "0.58476466", "0.58088684", "0.5807042", "0.58005875", "0.57523596", "0.5750196", "0.5739785", "0.571582", "0.56968606", "0.5696648", "0.56311417", "0.56308126", "0.56296706", "0.56210434", "0.5611245", "0.56045467", "0.5598649", "0.55849177", "0.55848897", "0.558145", "0.55762523", "0.55635613", "0.5558272", "0.5558128", "0.5556984", "0.5555787", "0.5553796", "0.55381364", "0.5535818", "0.55290395", "0.5526976", "0.5519853", "0.5515405", "0.55119467", "0.54980963", "0.5494853", "0.54931575", "0.5489773", "0.5488993", "0.54835963", "0.54794896", "0.5470692", "0.5469734", "0.5469666", "0.5463234", "0.54545146", "0.54526526", "0.54456586", "0.5442649", "0.543312", "0.5431743", "0.5420797", "0.5418034", "0.5416306", "0.54073155", "0.54004705", "0.53981245", "0.5396955", "0.53930324", "0.5388365", "0.53868806", "0.5376232", "0.53681076", "0.53668094", "0.5365958", "0.53628063", "0.53625906", "0.5340435", "0.533599", "0.53352153", "0.5328943", "0.5326174" ]
0.0
-1
/ access modifiers changed from: protected
public final void zza(zzg zzg, TaskCompletionSource<String> taskCompletionSource) throws RemoteException { taskCompletionSource.setResult(zzg.zza(true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
This routine Gets the nickname for employee and formats it in the form acceptable to the legacy system.
private static String fetchNickname(HashMap<String, Object> parameterMap) { String nickname = ""; PsName psName = PsName.findByEmployeeIdAndNameTypeAndEffectiveDate((String)parameterMap.get("employeeId"), "PRF", (Date)parameterMap.get("effectiveDate")); if(psName != null && psName.getFirstName() != null) { nickname = psName.getFirstName().trim().toUpperCase().replaceAll("'", "''"); if(nickname.length() > 20) { nickname.substring(0, 20); } } return nickname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getEmployeeName();", "java.lang.String getNickname();", "public java.lang.String getEmployeeName() {\n java.lang.Object ref = employeeName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n employeeName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getEmployeeName() {\n java.lang.Object ref = employeeName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n employeeName_ = s;\n return s;\n }\n }", "public String getNickname() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_NICKNAME);\r\n }", "public java.lang.String getNickname() {\n java.lang.Object ref = nickname_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n nickname_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getNickname() {\n java.lang.Object ref = nickname_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n nickname_ = s;\n return s;\n }\n }", "@java.lang.Override\n public com.google.protobuf.StringValue getNickname() {\n return nickname_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : nickname_;\n }", "public String getUserNickname()\n {\n if (nickName == null)\n nickName =\n provider.getInfoRetreiver().getNickName(\n provider.getAccountID().getUserID());\n\n return nickName;\n }", "public String getNickname() {\r\n return nickname;\r\n }", "@ApiModelProperty(value = \"The short display name of the payee as provided by the customer\")\n\n public String getNickname() {\n return nickname;\n }", "public String getNickname();", "public com.google.protobuf.StringValue getNickname() {\n if (nicknameBuilder_ == null) {\n return nickname_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : nickname_;\n } else {\n return nicknameBuilder_.getMessage();\n }\n }", "public String getNickname() {\n return nickname;\n }", "public String getNickname() {\n return nickname;\n }", "public String getNickname() {\n return nickname;\n }", "public String getNickname() {\n return nickname;\n }", "public String getNickname() {\n return nickname;\n }", "public String getNickname() {\n return nickname;\n }", "public String getNickname() {\n return nickname;\n }", "public String getNickname() {\n return nickname;\n }", "public String getNickname() {\n return nickname;\n }", "public String getNickname() {\n return nickname;\n }", "public String getNickname() {\n return nickname;\n }", "String getCurrentUserDisplayName() throws Exception;", "public com.google.protobuf.ByteString\n getEmployeeNameBytes() {\n java.lang.Object ref = employeeName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n employeeName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getEmployeeName();", "public static String name(PersonEntity pe)\n\t{\n\t\tif(pe == null) return null;\n\n\t\tPerson p = pe.getOx();\n\n\t\treturn cat(null, \" \", p.getLastName(),\n\t\t p.getFirstName(), p.getMiddleName()).toString();\n\t}", "java.lang.String getNick();", "java.lang.String getNick();", "public String getFriendlyUsername(Context ctx) {\n User user = DBHandler.getInstance(ctx).getUser(getPartnerId());\n String name = getState().toString();\n if (user == null || getState() != State.Open) {\n if (getState() != State.Open) {\n if(getState() == State.Close) {\n name = name + \" - \" + AndroidUtils.getFormattedTime(getTime());\n } else {\n name = ctx.getString(R.string.todays_match);\n }\n }\n } else {\n name = user.getFullName();\n }\n return name;\n }", "@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _employee.getUserName();\n\t}", "@Override\n\tpublic String getDisplayName() {\n\t\treturn getGivenName() + \" \" + getFamilyName();\n\t}", "com.google.protobuf.ByteString getNickname();", "protected String getDisplayName(final ChannelClientInfo channelClient, final String overrideNick) {\n if (channelClient == null) {\n return overrideNick.isEmpty() ? \"Unknown Client\" : overrideNick;\n } else if (overrideNick.isEmpty()) {\n return channelmodeprefix ? channelClient.toString() : channelClient.getClient().\n getNickname();\n } else {\n return channelmodeprefix ? channelClient.getImportantModePrefix() + overrideNick\n : overrideNick;\n }\n }", "public com.google.protobuf.ByteString\n getEmployeeNameBytes() {\n java.lang.Object ref = employeeName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n employeeName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getEmployeeName() {\r\n\t\r\n\t\treturn employeeName;\r\n\t}", "public void outputNames(){\n System.out.printf(\"\\n%9s%11s\\n\",\"Last Name\",\"First Name\");\n pw.printf(\"\\n%9s%11s\",\"Last Name\",\"First Name\");\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayName(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "public String getUserDisplayName() throws Exception\r\n {\n return null;\r\n }", "public static String getUserDisplayName() {\r\n return getUsername();\r\n }", "public String getUserDisplayName(String userId) {\n return \"Artichoke, Arty\";\n }", "@Override\n\tpublic String getNaam(){\n\t\tString pName= ctx.getCallerPrincipal().getName();\n\t\tPerson p=userEJB.findPerson(pName);\n\t\tString w=p.getName();\n\t\treturn w;\n\t}", "public java.lang.String getNickname() {\n return localNickname;\n }", "public com.google.protobuf.StringValueOrBuilder getNicknameOrBuilder() {\n if (nicknameBuilder_ != null) {\n return nicknameBuilder_.getMessageOrBuilder();\n } else {\n return nickname_ == null ?\n com.google.protobuf.StringValue.getDefaultInstance() : nickname_;\n }\n }", "java.lang.String getLastName();", "java.lang.String getLastName();", "public String getEmployeeName() {\r\n\t\treturn employeeName;\r\n\t}", "@AutoEscape\n\tpublic String getUser_name();", "public com.google.protobuf.ByteString\n getNicknameBytes() {\n java.lang.Object ref = nickname_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n nickname_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.protobuf.ByteString\n getEmployeeNameBytes();", "public static void EmployeeName() {\r\n\t\t\r\n\t\tJLabel e1 = new JLabel(\"Employee's Name:\");\r\n\t\te1.setFont(f);\r\n\t\tGUI1Panel.add(e1);\r\n\t\tGUI1Panel.add(employeeName);\r\n\t\te1.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t\t\r\n\t}", "public String toString() {\r\n\t\treturn \"Name : \"+name+\"\\nEmp# : \"+employeeNum;\r\n\t}", "String fullName();", "String getLastName();", "String getLastName();", "@java.lang.Override\n public com.google.protobuf.StringValueOrBuilder getNicknameOrBuilder() {\n return getNickname();\n }", "public String getnick() {\n return nickname;\n }", "public String getName(){\r\n\t\tString s=\"\";\r\n\r\n\t\tif(getPersonId() != null && getPersonId().length() != 0)\r\n\t\t\ts += \" \" + getPersonId();\r\n\t\t\r\n\t\tif(getStudySubjectId() != null && getStudySubjectId().length() != 0)\r\n\t\t\ts += \" \" + getStudySubjectId();\r\n\r\n\t\tif(getSecondaryId() != null && getSecondaryId().length() != 0)\r\n\t\t\ts += \" \" + getSecondaryId();\r\n\r\n\t\treturn s;\r\n\t}", "@AutoEscape\n\tpublic String getLast_name();", "public String newHumanName() {\n return String.format(\"%s %s\", newName(4, 6), newName(4, 8));\n }", "private String createDisplayName(User user, String listName) {\n assert ((user != null) && (user.getUsername() != null));\n String name = StringUtils.isNotBlank(user.getName()) ? user.getName() : user.getUsername();\n if (StringUtils.isNotBlank(user.getEmail()) && NAME_AND_EMAIL.equals(listName)) {\n name = name + \" <\" + user.getEmail() + \">\";\n } else if (NAME_AND_USERNAME.equals(listName)) {\n name = name + \" (\" + user.getUsername() + \")\";\n }\n assert (name != null);\n return name;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getNicknameBytes() {\n java.lang.Object ref = nickname_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n nickname_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@ApiModelProperty(value = \"昵称\")\n\tpublic String getNickname() {\n\t\treturn nickname;\n\t}", "public AddressInput getEmpfaengerName() throws RemoteException\n {\n if (empfName != null)\n return empfName;\n \n SepaDauerauftrag t = getTransfer();\n\n empfName = new AddressInput(t.getGegenkontoName(), AddressFilter.FOREIGN);\n empfName.setValidChars(HBCIProperties.HBCI_SEPA_VALIDCHARS_RELAX);\n empfName.setMandatory(true);\n empfName.addListener(new EmpfaengerListener());\n if (t.isActive())\n {\n boolean changable = getBPD().getBoolean(\"recnameeditable\",true) && getBPD().getBoolean(\"recktoeditable\",true);\n empfName.setEnabled(changable);\n }\n return empfName;\n }", "public String getNickname() throws RemoteException {\n \n\treturn this.nickname;\n\t\t\t }", "public String getEmployeeName() {\n return employeeName;\n }", "public com.google.protobuf.ByteString getNickname() {\n return nickname_;\n }", "public static String getUserName(long requestorId)\n\t {\n\t String fullName = StringPool.BLANK;\n\t try\n\t {\n\t User user = UserLocalServiceUtil.getUserById(requestorId);\n\t fullName = user.getFirstName() + StringPool.SPACE + user.getLastName();\n\t } catch (PortalException e)\n\t {\n\t LOGGER.error(\"Failed to find user details...\" + e.getMessage());\n\t } catch (SystemException e)\n\t {\n\t LOGGER.error(\"User not exist....\" + e.getMessage());\n\t }\n\t return fullName;\n\t }", "public static String getNickname(int userid) throws SQLException {\n\n\t\tUserDB newUser = new UserDB();\n\n\t\tif (newUser.getUserById(userid, true) == Variables.INVALID_ID\n\t\t\t\t.getValue())\n\t\t\treturn \"\";\n\n\t\treturn newUser.getNickname();\n\t}", "java.lang.String getUserName();", "java.lang.String getUserName();", "java.lang.String getUserName();", "public java.lang.String getLastName();", "public String getName (){\r\n return firstName + \" \" + lastName;\r\n }", "public com.google.protobuf.ByteString getNickname() {\n return nickname_;\n }", "public static String getShortName(String longName) {\n StringTokenizer strtok = new StringTokenizer(longName,\",\");\n String shortUserName = null;\n if (strtok.countTokens() > 1) {\n while ((null!=strtok) && (strtok.hasMoreTokens())) {\n\n String mytok1 = strtok.nextToken();\n if (null!=mytok1) {\n //filter for the shortened name\n StringTokenizer innerToken = new StringTokenizer(mytok1,\"=\");\n if ((null!=innerToken)&&(innerToken.countTokens()==2)) {\n String key = innerToken.nextToken();\n if (null!=key) {\n if ((key.equalsIgnoreCase(\"cn\"))||(key.equalsIgnoreCase(\"uid\"))) {\n shortUserName = innerToken.nextToken();\n break;\n }\n }\n }\n } //end:if (null!=mytok1) {\n } //end: while\n } else if (longName.contains(\"@\")) {\n shortUserName = longName.substring(0, longName.indexOf(\"@\"));\n }\n return shortUserName;\n }", "private void getUserName() {\n if (mAuth.getCurrentUser() != null) {\n nameOfCurrentUser = mAuth.getCurrentUser().getDisplayName();\n Log.d(TAG, \"getUserName: getDisplayName is not null\");\n if (nameOfCurrentUser != null && nameOfCurrentUser.contains(\" \")) {\n String[] nameArray = nameOfCurrentUser.split(\" \");\n personalWelcomeMessage.setText(\"Hello, \" + nameArray[0]);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser != null && !nameOfCurrentUser.contains(\" \")) {\n personalWelcomeMessage.setText(\"Hello, \" + nameOfCurrentUser);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser==null){\n personalWelcomeMessage.setText(\"Hello\");\n }\n }\n }", "@Override\n\tpublic String getGivenName() {\n\t\treturn user.getUserInfo().getGivenName();\n\t}", "String realmDisplayName();", "@Override\n public String returnName(){\n return this.nickName;\n }", "String extractUserNameFromData(String userInfoDataFromServer);", "private String getOne2OneDisplayName() {\n Logger.d(TAG, \"getOne2OneDisplayName() entry\");\n if (null != mChatMap) {\n Object obj = mChatMap.get(ChatListFragment.NUMBER);\n Logger.d(TAG, \"getOne2OneDisplayName() the obj is \" + obj);\n if (obj instanceof String) {\n String displayName = ContactsListManager.getInstance()\n .getDisplayNameByPhoneNumber((String) obj);\n Logger.d(TAG,\n \"getOne2OneDisplayName() the display name is \"\n + displayName);\n return displayName;\n } else {\n Logger.e(TAG, \"getOne2OneDisplayName() obj is not a String\");\n return null;\n }\n } else {\n Logger.e(TAG, \"getOne2OneDisplayName() mChatMap is null\");\n return null;\n }\n }", "protected String extractMemberNameFromEntity(Member entity) {\r\n return convert(entity.getMemberName(), String.class);\r\n }", "private String extarctStudentName(String record) throws noStudentNameException{\n\t\tString name = record.substring(0, record.indexOf(':'));\n\t\tname = name.trim();\n\t\tcheckNameValidation(name);\n\t\treturn name;\n\t}", "public static String makeNickName(String emailAddress) {\r\n\r\n // this is to help while debugging (to avoid the \"null pointer exception\"\r\n if (emailAddress == null) {\r\n return \"Can't make nickname from null email Address.\";\r\n }\r\n\r\n int nickNameLength = emailAddress.length();\r\n\r\n // create nickname as email address without the \"@...\"\r\n int atPosition = emailAddress.indexOf(\"@\"); // value is -1 if not found\r\n if (atPosition > 0) {\r\n nickNameLength = atPosition;\r\n }\r\n\r\n // create nickname as what's before a period \r\n int periodPosition = emailAddress.indexOf(\".\");\r\n if ((periodPosition > 0) && (periodPosition < nickNameLength)) {\r\n nickNameLength = periodPosition;\r\n }\r\n\r\n // return the first part of the emailAddress (up to right before the \".\" and/or the \"@\"\r\n return (emailAddress.substring(0, nickNameLength));\r\n\r\n }", "private String getUserName(Callback[] callbacks) throws LoginException\n {\n String userName = ((NameCallback)callbacks[0]).getName();\n if (userName == null) {\n throwLoginException(\"Username not supplied.\");\n }\n System.out.println(\"Username: \"+userName);\n return userName;\n }", "public String getNickname() throws RemoteException{\n return this.nickname;\n }", "public String getNotchianName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();" ]
[ "0.7208892", "0.6842712", "0.68378776", "0.6693423", "0.64720565", "0.6428523", "0.64013535", "0.6381893", "0.6371901", "0.63099235", "0.62849724", "0.6280617", "0.626043", "0.6241159", "0.6241159", "0.6241159", "0.6241159", "0.6241159", "0.6241159", "0.6241159", "0.6241159", "0.6241159", "0.6241159", "0.622719", "0.61407727", "0.6137866", "0.61165893", "0.61150247", "0.61036915", "0.61036915", "0.6099028", "0.60897815", "0.6086482", "0.605875", "0.605501", "0.6016986", "0.6001982", "0.5943141", "0.5926292", "0.5926292", "0.5926292", "0.5926292", "0.5926292", "0.5926292", "0.5910183", "0.59057826", "0.5900805", "0.58989227", "0.58883375", "0.58792955", "0.58775556", "0.58775556", "0.58769727", "0.5873715", "0.58519775", "0.5849914", "0.5827658", "0.5823917", "0.5820183", "0.580623", "0.580623", "0.57942164", "0.57780486", "0.57636577", "0.5760704", "0.57580674", "0.5752337", "0.575127", "0.57370824", "0.57370746", "0.5735876", "0.57231617", "0.5709677", "0.5706245", "0.5704865", "0.5695568", "0.5695568", "0.5695568", "0.5686325", "0.5677116", "0.5674568", "0.5672578", "0.56564814", "0.5655075", "0.5653882", "0.5651185", "0.5630699", "0.56231946", "0.5621522", "0.5621377", "0.5618781", "0.5598219", "0.5595401", "0.5590568", "0.5588229", "0.5588229", "0.5588229", "0.5588229", "0.5588229", "0.5588229" ]
0.71496564
1
This routine gets the driver license number and state and stores them in the legacy system format.
private static HashMap<String, Object> fetchDriversLicenseData(HashMap<String, Object> parameterMap) { PsDriversLicense psDriversLicense = PsDriversLicense.findByEmployeeId((String)parameterMap.get("employeeId")); if(psDriversLicense != null) { if(psDriversLicense.getDriversLicenseNumber() != null) { psDriversLicense.setDriversLicenseNumber(psDriversLicense.getDriversLicenseNumber().trim().toUpperCase().replaceAll("'", "''")); } if(psDriversLicense.getState() != null) { psDriversLicense.setState(psDriversLicense.getState().trim().toUpperCase()); } parameterMap.put("driversLicenseNumber", psDriversLicense.getDriversLicenseNumber()); parameterMap.put("driversLicenseState", psDriversLicense.getState()); } return parameterMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSoftwareDriverVersion();", "@Override\r\n\tpublic String getBind_vehicle_license_ind() {\n\t\treturn super.getBind_vehicle_license_ind();\r\n\t}", "static String getVendor() {return glVendor;}", "@Override\r\n\tpublic String getBind_driving_license_ind() {\n\t\treturn super.getBind_driving_license_ind();\r\n\t}", "public DriverForCreateBuilder licenseState(String licenseState) {\r\n driverForCreate.setLicenseState(licenseState);\r\n return this;\r\n }", "public String getLicense();", "public String getLicense() {\n\t\treturn license;\n\t}", "public LicenseInfo getLicenseInfo()\n {\n if(licenseInfo == null)\n {\n System.out.println(\"You need to initialize the account info before getting the details.\");\n return null;\n }\n return licenseInfo;\n }", "public int getLicenseNumber() {\n\n return licenseNumber;\n }", "public String getSoftwareDriverId();", "public String getLicenseNumber() {\n\t\treturn licenseNumber;\n\t}", "public void setLicenseNumber( int license ) {\n\n licenseNumber = license;\n }", "java.lang.String[] getLicenseWindows() throws java.io.IOException;", "public java.lang.String getLicenseNumber() {\n return licenseNumber;\n }", "String getLicensePlate();", "License update(License license);", "public void setSoftwareDriverVersion(String softwareIdVersion);", "License createLicense();", "License getLicense() throws TimeoutException, InterruptedException;", "@Override\n\tpublic java.lang.String getLicense() {\n\t\treturn _scienceApp.getLicense();\n\t}", "public Software getSoftware() throws InvalidFormatException;", "public String getLicenseModel() {\n return this.licenseModel;\n }", "public String getLicenseModel() {\n return this.licenseModel;\n }", "public String readDeviceSN(){\r\n return mFactoryBurnUtil.readDeviceSN();\r\n }", "public Peripheral getHardwareDriverFromSoftwareDriver();", "public String setState() {\r\n\t\ttry {\r\n\t\t\tVendorMasterModel model = new VendorMasterModel();\r\n\t\t\tmodel.initiate(context, session);\r\n\t\t\tmodel.setState(vendorMaster);\r\n\t\t\tmodel.terminate();\r\n\t\t\tgetNavigationPanel(2);\r\n\t\t\tvendorMaster.setEnableAll(\"Y\");\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn \"Data\";\r\n\t}", "public static void Ln4() {\r\n EBAS.L4_Timestamp.setText(GtDates.ldate);\r\n \r\n EBAS.L4_First_Sku.setEnabled(false);\r\n EBAS.L4_Qty_Out.setEnabled(false);\r\n EBAS.L4_First_Desc.setEnabled(false);\r\n EBAS.L4_Orig_Sku.setEnabled(false);\r\n EBAS.L4_Orig_Desc.setEnabled(false);\r\n EBAS.L4_Orig_Attr.setEnabled(false);\r\n EBAS.L4_Orig_Size.setEnabled(false);\r\n EBAS.L4_Orig_Retail.setEnabled(false);\r\n EBAS.L4_Manuf_Inspec.setEnabled(false);\r\n EBAS.L4_New_Used.setEnabled(false);\r\n EBAS.L4_Reason_DropDown.setEnabled(false);\r\n EBAS.L4_Desc_Damage.setEnabled(false);\r\n EBAS.L4_Cust_Satisf_ChkBox.setEnabled(false);\r\n EBAS.L4_Warranty_ChkBox.setEnabled(false);\r\n \r\n try {\r\n upDB();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n Logger.getLogger(EBAS.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public String getSupEntPlicense() {\n return supEntPlicense;\n }", "public void setLicense(String license) {\n\t\tthis.license = license;\n\t}", "@Value.Default\n public String getLicense() {\n\treturn \"\";\n }", "public String getLicenseId() {\n\t\treturn licenseId;\n\t}", "final int getDriverNum() {\n return device.getDriverNum(this);\n }", "public Object[] getExtUsrLicenseInfoImpl(String rdbname) throws NULMException\n {\n\tObject[] licenseInfo = new Object[2];\n\tboolean isMapped=false;\n DOMConfigurator.configure(\"resources//\"+ LOG4J_PROPERTIES);\n logger.debug(\"App Settings values for getExtUsrLicenseInfoImpl.\");\n Session session = null;\n try{\n session = sessionFactory.openSession();\n Criteria crt = session.createCriteria(NulmExtUsrLicense.class); \n \t\t \n listExtUsrLicenseInfo = crt.list();\n \n for (NulmExtUsrLicense conf : listExtUsrLicenseInfo){ \n if (rdbname.equals(conf.getRdb_name())){\n \t isMapped=true;\n \t licenseInfo[0] = conf.getMax_license();\n \t licenseInfo[1] = conf.getLogin_history_days();\n }\n }\n \n \n if (!isMapped){\n \t logger.info(\"getExtUsrLicenseInfoImpl method executed successfully\");\n throw new NULMException(NULMException.ErrorCode.RDB_DOES_NOT_EXIST);\n \n }\n return licenseInfo;\n }\n catch (SessionException e){\n logger.error(\"NULMException occured \"+ NULMException.ErrorCode.FAILED_TO_CREATE_SESSION + e );\n throw new NULMException(NULMException.ErrorCode.FAILED_TO_CREATE_SESSION, e);\n }\n catch (HibernateException e){\n logger.error(\"NULMException occured \"+ NULMException.ErrorCode.OTHER_HIBERNATE_EXCEPTION + e );\n throw new NULMException(NULMException.ErrorCode.OTHER_HIBERNATE_EXCEPTION, e);\n }\n catch (Exception e){\n logger.error(\"NULMException occured \"+ e);\n throw new NULMException(NULMException.ErrorCode.OTHER_EXCEPTION, e);\n }\n finally{\n \tHibernateUtil.sessionClose(session);\n }\n }", "DeviceState createDeviceState();", "public static void Ln2() {\r\n EBAS.L2_Timestamp.setText(GtDates.ldate);\r\n \r\n EBAS.L2_First_Sku.setEnabled(false);\r\n EBAS.L2_Qty_Out.setEnabled(false);\r\n EBAS.L2_First_Desc.setEnabled(false);\r\n EBAS.L2_Orig_Sku.setEnabled(false);\r\n EBAS.L2_Orig_Desc.setEnabled(false);\r\n EBAS.L2_Orig_Attr.setEnabled(false);\r\n EBAS.L2_Orig_Size.setEnabled(false);\r\n EBAS.L2_Orig_Retail.setEnabled(false);\r\n EBAS.L2_Manuf_Inspec.setEnabled(false);\r\n EBAS.L2_New_Used.setEnabled(false);\r\n EBAS.L2_Reason_DropDown.setEnabled(false);\r\n EBAS.L2_Desc_Damage.setEnabled(false);\r\n EBAS.L2_Cust_Satisf_ChkBox.setEnabled(false);\r\n EBAS.L2_Warranty_ChkBox.setEnabled(false);\r\n \r\n try {\r\n upDB();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n Logger.getLogger(EBAS.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public String getDevSerialNumber() {\n return devSerialNumber;\n }", "private void init() {\r\n if (_connInfo == null) {\r\n try {\r\n _connInfo = _conn.getMetaData();\r\n\r\n String dbProdVer = _connInfo.getDatabaseProductVersion();\r\n\r\n /* Some examples for the returned product version of Oracle DBs:\r\n * Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production\r\n * With the Partitioning, OLAP and Oracle Data Mining options\r\n * JServer Release 9.2.0.5.0 - Production\r\n * \r\n * Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production\r\n * With the Partitioning, OLAP and Data Mining options\r\n */\r\n\r\n String word = null;\r\n\r\n // search for the substring \"Release\" and read the following version number\r\n int idx = dbProdVer.indexOf(RELEASE);\r\n if (idx != -1) {\r\n idx += RELEASE_LENGTH;\r\n\r\n int n = dbProdVer.indexOf(' ', idx);\r\n word = (n != -1) ? dbProdVer.substring(idx, n) : dbProdVer.substring(idx);\r\n\r\n if (Character.isDigit(word.charAt(0))) { _dbVersion = word; }\r\n }\r\n\r\n if (_dbVersion == null) {\r\n // find the first numeric word in the version string \r\n int i = 0;\r\n while (true) {\r\n int n = dbProdVer.indexOf(' ', i);\r\n word = (n != -1) ? dbProdVer.substring(i, n) : dbProdVer.substring(i);\r\n\r\n if (Character.isDigit(word.charAt(0))) {\r\n _dbVersion = word;\r\n break;\r\n }\r\n\r\n if (n == -1) { break; }\r\n\r\n i = n + 1;\r\n }\r\n }\r\n } catch (SQLException e) {\r\n _dbVersion = \"\";\r\n _log.error(e);\r\n }\r\n }\r\n }", "public SxpLegacy(Version sxpVersion) {\n this.sxpVersion = sxpVersion;\n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\tAutoGrease = CAN1Comm.Get_AutoGreaseOperationStatus_3449_PGN65527();\n\t\tQuickcoupler = CAN1Comm.Get_QuickCouplerOperationStatus_3448_PGN65527();\n\t\tRideControl = CAN1Comm.Get_RideControlOperationStatus_3447_PGN65527();\n\t\tBeaconLamp = CAN1Comm.Get_BeaconLampOperationStatus_3444_PGN65527();\n\t\tMirrorHeat = CAN1Comm.Get_MirrorHeatOperationStatus_3450_PGN65527();\n\t\tFineModulation = CAN1Comm.Get_ComponentCode_1699_PGN65330_EHCU();\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\tAverageFuelRate = CAN1Comm.Get_AverageFuelRate_333_PGN65390();\n\t\tLatestFuelConsumed = CAN1Comm.Get_ADaysFuelUsed_1405_PGN65390();\t\n\t}", "private void populateLicense(MarriageRegister notice) {\n //fill date of issue\n //todo remove race from here and use if else inside JSP amith\n dateOfIssueLicense = new GregorianCalendar().getTime();\n //canceling date is (defined value in data base) days from printed date\n // get Calendar with current date\n java.util.GregorianCalendar gCal = new GregorianCalendar();\n gCal.add(Calendar.DATE, +appParametersDAO.getIntParameter(\"crs.license_cancel_dates\"));\n dateOfCancelLicense = gCal.getTime();\n //setting issuing location and user\n //display values\n DSDivision issuingDSDivision = dsDivisionDAO.getDSDivisionByPK(notice.getLicenseIssueLocation().getDsDivisionId());\n District issuingDistrict = issuingDSDivision.getDistrict();\n if (AppConstants.SINHALA.equals(notice.getPreferredLanguage())) {\n //Sinhala pref lang\n licenseIssuePlace = notice.getLicenseIssueLocation().getSienLocationSignature();\n licenseIssueUserSignature = notice.getLicensePrintUser().getUserSignature(AppConstants.SINHALA);\n maleRaceInOL = notice.getMale().getMaleRace() != null ? notice.getMale().getMaleRace().getSiRaceName() : \"\";\n femaleRaceInOL = notice.getFemale().getFemaleRace() != null ? notice.getFemale().getFemaleRace().getSiRaceName() : \"\";\n licenseIssueDistrictInOL = issuingDistrict.getSiDistrictName();\n licenseIssueDivisionInOL = issuingDSDivision.getSiDivisionName();\n } else {\n //tamil pref lang\n licenseIssuePlace = notice.getLicenseIssueLocation().getTaenLocationSignature();\n licenseIssueUserSignature = notice.getLicensePrintUser().getUserSignature(AppConstants.TAMIL);\n maleRaceInOL = notice.getMale().getMaleRace() != null ? notice.getMale().getMaleRace().getTaRaceName() : \"\";\n femaleRaceInOL = notice.getFemale().getFemaleRace() != null ? notice.getFemale().getFemaleRace().getTaRaceName() : \"\";\n licenseIssueDistrictInOL = issuingDistrict.getTaDistrictName();\n licenseIssueDivisionInOL = issuingDSDivision.getTaDivisionName();\n }\n //populate race name in sin and race name in en for male and female parties\n maleRaceInEn = notice.getMale().getMaleRace() != null ? notice.getMale().getMaleRace().getEnRaceName() : \"\";\n femaleRaceInEn = notice.getFemale().getFemaleRace() != null ? notice.getFemale().getFemaleRace().getEnRaceName() : \"\";\n licenseIssueDistrictInEN = issuingDistrict.getEnDistrictName();\n licenseIssueDivisionInEN = issuingDSDivision.getEnDivisionName();\n }", "public abstract String getDriver();", "public String getSysCode()\n/* */ {\n/* 80 */ return this.sysCode;\n/* */ }", "@Override public void onAfterStateSwitch() {\n assert SwingUtilities.isEventDispatchThread();\n assert isVisible();\n try {\n license = manager().load();\n onLicenseChange();\n manager().verify();\n } catch (final Exception failure) {\n JOptionPane.showMessageDialog(\n this,\n failure instanceof LicenseValidationException\n ? failure.getLocalizedMessage()\n : format(LicenseWizardMessage.display_failure),\n format(LicenseWizardMessage.failure_title),\n JOptionPane.ERROR_MESSAGE);\n }\n }", "public String getSoftware()\n\t{\n\t\treturn null;\n\t}", "public void setSoftwareDriverId(String softwareId);", "public final String getLicensePlate() {\n return licensePlate;\n }", "public DeviceDetails getDeviceDetails() throws LedgerException {\n ApduExchange.ApduResponse response = ApduExchange.exchangeApdu(device, CLA_BOLOS, INS_GET_VERSION, 0, 0);\n response.checkSW();\n return new DeviceDetails(response.getResponse());\n }", "@Deprecated\r\n\tpublic String readDeviceID(){\r\n\t\treturn mFactoryBurnUtil.readDeviceID();\r\n\t}", "public Long getLicence() {\r\n return licence;\r\n }", "public T generateLicense();", "public String getLicensePlate() {\n return licensePlate;\n }", "public void updateLicensePlate(LicensePlateForm form) {\n\t}", "protected boolean checkLicense() {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "public LicenseType licenseType() {\n return this.licenseType;\n }", "public org.hl7.fhir.String getSoftware()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.String target = null;\n target = (org.hl7.fhir.String)get_store().find_element_user(SOFTWARE$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public PrinterState getDriverState(){\n\t\treturn thePrinterState;\n\t}", "List<RawLicense> getRawLicenses();", "String getLicenseKey() {\n return null;\n }", "public String getFirmware() {\n\t\treturn \"2.1.0\";\n\t}", "public String getOSState() {\n return this.oSState;\n }", "public boolean isLicensed() {\n\t\tAdvancedConfigurationMeta acMeta = data.getAdvancedConfiguration();\n\t\tif (acMeta.getServiceType() == ServiceType.CVS) { return true; }\n\t\tif ((acMeta.getServiceType() == ServiceType.Web) && !Const.isEmpty(getCustomerID())) { return true; }\n\t\t// check product license\n\t\tif ((acMeta.getProducts() & MDPropTags.MDLICENSE_IPLocator) != 0 || (acMeta.getProducts() & MDPropTags.MDLICENSE_Community) != 0) { return true; }\n\t\treturn false;\n\t}", "private void doYourOpenUsbDevice(UsbDevice usbDevice) {\n connection = mUsbManager.openDevice(usbDevice);\n //add your operation code here\n\n if (connection == null) {\n Log.e(LOG_TAG, \"UsbDeviceConnection null\");\n }\n\n ProbeTable customTable = new ProbeTable();\n customTable.addProduct(0x067B, 0x2303, ProlificSerialDriver.class);\n customTable.addProduct(0x04E2, 0x1410, CdcAcmSerialDriver.class);\n\n UsbSerialProber prober = new UsbSerialProber(customTable);\n\n List<UsbSerialDriver> availableDrivers = prober.findAllDrivers(mUsbManager);\n if (availableDrivers.isEmpty()) {\n\n Log.e(LOG_TAG, \"No available drivers\");\n\n return;\n }\n\n // Open a connection to the first available driver.\n UsbSerialDriver driver = availableDrivers.get(0);\n// mUsbManager.requestPermission(driver.getDevice(), mPermissionIntent);\n boolean hasPermission = mUsbManager.hasPermission(driver.getDevice());\n\n Log.e(LOG_TAG, \"is permission \" + hasPermission);\n\n if (connection == null) {\n\n // You probably need to call UsbManager.requestPermission(driver.getDevice(), ..)\n return;\n }\n\n\n sPort = driver.getPorts().get(0);\n\n\n boundRate = Integer.parseInt(preferences.getString(\"boundRate\", \"9600\"));\n\n dataBits = Integer.parseInt(preferences.getString(\"dataBits\", \"8\"));\n\n String parityStr = preferences.getString(\"parity\", \"NONE\");\n\n\n if (parityStr.equalsIgnoreCase(\"ODD\")) {\n parity = UsbSerialPort.PARITY_ODD;\n } else if (parityStr.equalsIgnoreCase(\"EVEN\")) {\n parity = UsbSerialPort.PARITY_EVEN;\n } else if (parityStr.equalsIgnoreCase(\"NONE\")) {\n parity = UsbSerialPort.PARITY_NONE;\n } else {\n Toast.makeText(getApplicationContext(),\n \"Please select valid parity from settings\", Toast.LENGTH_SHORT).show();\n }\n\n\n String stopBitsStr = preferences.getString(\"stopBits\", \"1\");\n\n if (stopBitsStr.equalsIgnoreCase(\"1\")) {\n stopBits = UsbSerialPort.STOPBITS_1;\n } else if (stopBitsStr.equalsIgnoreCase(\"1.5\")) {\n stopBits = UsbSerialPort.STOPBITS_1_5;\n } else if (stopBitsStr.equalsIgnoreCase(\"2\")) {\n stopBits = UsbSerialPort.STOPBITS_2;\n } else {\n Toast.makeText(getApplicationContext(),\n \"Please select valid stop bits from settings\", Toast.LENGTH_SHORT).show();\n }\n\n\n try {\n sPort.open(connection);\n sPort.setParameters(boundRate, dataBits, stopBits, parity);\n sPort.setRTS(true);\n sPort.setDTR(true);\n\n tvResult.append(\"Connected to device.\\n\");\n svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n\n// showStatus(mDumpTextView, \"CD - Carrier Detect\", sPort.getCD());\n// showStatus(mDumpTextView, \"CTS - Clear To Send\", sPort.getCTS());\n// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n// showStatus(mDumpTextView, \"DTR - Data Terminal Ready\", sPort.getDTR());\n// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n// showStatus(mDumpTextView, \"RI - Ring Indicator\", sPort.getRI());\n// showStatus(mDumpTextView, \"RTS - Request To Send\", sPort.getRTS());\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error setting up device: \" + e.getMessage(), e);\n tvResult.append(\"Error opening device: \" + e.getMessage());\n svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n try {\n sPort.close();\n } catch (IOException e2) {\n // Ignore.\n }\n sPort = null;\n return;\n }\n tvResult.append(\"Serial device: \" + sPort.getClass().getSimpleName());\n svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n\n onDeviceStateChange();\n\n Log.e(LOG_TAG, \"Setting: \" + boundRate + \" \" + dataBits + \" \" + parity + \" \" + stopBits);\n\n// if (preferences.getString(\"boundRate\", null) != null) {\n//\n// boundRate = Integer.parseInt(preferences.getString(\"boundRate\", null));\n//\n//\n// if (preferences.getString(\"dataBits\", null) != null) {\n//\n// dataBits = Integer.parseInt(preferences.getString(\"dataBits\", null));\n//\n//\n// if (preferences.getString(\"parity\", null) != null) {\n//\n// String parityStr = preferences.getString(\"parity\", null);\n//\n// if (parityStr.equalsIgnoreCase(\"ODD\")) {\n// parity = UsbSerialPort.PARITY_ODD;\n// } else if (parityStr.equalsIgnoreCase(\"EVEN\")) {\n// parity = UsbSerialPort.PARITY_EVEN;\n// } else if (parityStr.equalsIgnoreCase(\"NONE\")) {\n// parity = UsbSerialPort.PARITY_NONE;\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select valid parity from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// if (preferences.getString(\"stopBits\", null) != null) {\n//\n// String stopBitsStr = preferences.getString(\"stopBits\", null);\n//\n// if (stopBitsStr.equalsIgnoreCase(\"1\")) {\n// stopBits = UsbSerialPort.STOPBITS_1;\n// } else if (stopBitsStr.equalsIgnoreCase(\"1.5\")) {\n// stopBits = UsbSerialPort.STOPBITS_1_5;\n// } else if (stopBitsStr.equalsIgnoreCase(\"2\")) {\n// stopBits = UsbSerialPort.STOPBITS_2;\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select valid stop bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// try {\n// sPort.open(connection);\n// sPort.setParameters(boundRate, dataBits, stopBits, parity);\n// sPort.setRTS(true);\n// sPort.setDTR(true);\n//\n// tvResult.append(\"Connected to device.\\n\");\n// svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n//\n//// showStatus(mDumpTextView, \"CD - Carrier Detect\", sPort.getCD());\n//// showStatus(mDumpTextView, \"CTS - Clear To Send\", sPort.getCTS());\n//// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n//// showStatus(mDumpTextView, \"DTR - Data Terminal Ready\", sPort.getDTR());\n//// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n//// showStatus(mDumpTextView, \"RI - Ring Indicator\", sPort.getRI());\n//// showStatus(mDumpTextView, \"RTS - Request To Send\", sPort.getRTS());\n//\n// } catch (IOException e) {\n// Log.e(LOG_TAG, \"Error setting up device: \" + e.getMessage(), e);\n// tvResult.append(\"Error opening device: \" + e.getMessage());\n// svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n// try {\n// sPort.close();\n// } catch (IOException e2) {\n// // Ignore.\n// }\n// sPort = null;\n// return;\n// }\n// tvResult.append(\"Serial device: \" + sPort.getClass().getSimpleName());\n// svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n//\n// onDeviceStateChange();\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Stop bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Parity bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Data bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Bound rate from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n// Log.e(LOG_TAG, \"Setting: \" + boundRate + \" \" + dataBits + \" \" + parity + \" \" + stopBits);\n }", "public Driver(String name, String familyName, String license){\r\n\t super(name,familyName);\r\n\t this.license = license;\r\n\t salary = 0;\r\n\t fines = 0;\r\n\t addings = 0;\r\n }", "public static String getGnssHardwareYear(Context context) {\n String year = \"\";\n LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {\n year = String.valueOf(locationManager.getGnssYearOfHardware());\n } else {\n Method method;\n try {\n method = locationManager.getClass().getMethod(\"getGnssYearOfHardware\");\n int hwYear = (int) method.invoke(locationManager);\n if (hwYear == 0) {\n year = \"<= 2015\";\n } else {\n year = String.valueOf(hwYear);\n }\n } catch (NoSuchMethodException e) {\n Log.e(TAG, \"No such method exception: \", e);\n } catch (IllegalAccessException e) {\n Log.e(TAG, \"Illegal Access exception: \", e);\n } catch (InvocationTargetException e) {\n Log.e(TAG, \"Invocation Target Exception: \", e);\n }\n }\n return year;\n }", "protected SoftwarePackage(NXCPMessage msg, long baseId) {\n\t\tname = msg.getFieldAsString(baseId);\n\t\tversion = msg.getFieldAsString(baseId + 1);\n\t\tvendor = msg.getFieldAsString(baseId + 2);\n\t\tinstallDate = msg.getFieldAsDate(baseId + 3);\n\t\tsupportUrl = msg.getFieldAsString(baseId + 4);\n\t\tdescription = msg.getFieldAsString(baseId + 5);\n\t}", "void printEditionInformation();", "java.lang.String getSerialNumber();", "java.lang.String getSerialNumber();", "public static String getOsFirmwareDate() throws IOException, InterruptedException, ParseException {\n \treturn pi4jSystemInfoConnector.getOsFirmwareDate();\r\n }", "private void createDriver() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L,\n new Licence(\"Full for over 2 years\", \"YXF87231\",\n LocalDate.parse(\"12/12/2015\", formatter),\n LocalDate.parse(\"12/12/2020\", formatter)));\n }", "public String getSystemID()\n/* */ {\n/* 1299 */ return this.systemID;\n/* */ }", "public void setLicence(Long licence) {\r\n this.licence = licence;\r\n }", "public String getLicensePlate() {\n\t\treturn licensePlate;\n\t}", "public static native int getSaioVersion(String packagename, int type, byte[] info);", "public String getDbVendor() {\n return dbVendor;\n }", "public abstract String getDriver() throws DataServiceException;", "public static void Ln8() {\r\n EBAS.L8_Timestamp.setText(GtDates.ldate);\r\n \r\n EBAS.L8_First_Sku.setEnabled(false);\r\n EBAS.L8_Qty_Out.setEnabled(false);\r\n EBAS.L8_First_Desc.setEnabled(false);\r\n EBAS.L8_Orig_Sku.setEnabled(false);\r\n EBAS.L8_Orig_Desc.setEnabled(false);\r\n EBAS.L8_Orig_Attr.setEnabled(false);\r\n EBAS.L8_Orig_Size.setEnabled(false);\r\n EBAS.L8_Orig_Retail.setEnabled(false);\r\n EBAS.L8_Manuf_Inspec.setEnabled(false);\r\n EBAS.L8_New_Used.setEnabled(false);\r\n EBAS.L8_Reason_DropDown.setEnabled(false);\r\n EBAS.L8_Desc_Damage.setEnabled(false);\r\n EBAS.L8_Cust_Satisf_ChkBox.setEnabled(false);\r\n EBAS.L8_Warranty_ChkBox.setEnabled(false);\r\n \r\n try {\r\n upDB();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n Logger.getLogger(EBAS.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "String getLicense_java_lang_String_();", "private void sensorInformation(){\n\t\tthis.name = this.paramName;\n\t\tthis.version = this.paramVersion;\n\t\tthis.author = this.paramVersion;\n\t}", "private static String m4387a() {\n String str;\n String str2 = \"\";\n try {\n Class cls = Class.forName(\"android.os.SystemProperties\");\n Method method = cls.getMethod(\"get\", new Class[]{String.class});\n if (method != null) {\n if (((String) method.invoke(cls.newInstance(), new Object[]{\"telephony.lteOnCdmaDevice\"})).equals(\"1\")) {\n Method method2 = Class.forName(\"com.huawei.android.hwnv.HWNVFuncation\").getMethod(\"getNVIMEI\", new Class[0]);\n if (method2 == null) {\n return str2;\n }\n method2.setAccessible(true);\n str = (String) method2.invoke(null, new Object[0]);\n return str;\n }\n }\n } catch (Throwable th) {\n }\n str = str2;\n return str;\n }", "public final String getVendorId(){\n return peripheralVendorId;\n }", "public void selectDriver();", "public void saveDriverId(String name) {\n editor.putString(KEY_DRIVERID, name);\n\n // Login Date\n //editor.putString(KEY_DATE, date);\n\n // commit changes\n editor.commit();\n }", "public abstract String[] exportState();", "Software update( Software s );", "public java.lang.String getSystemCode () {\r\n\t\treturn systemCode;\r\n\t}", "public static void Ln9() {\r\n EBAS.L9_Timestamp.setText(GtDates.ldate);\r\n \r\n EBAS.L9_First_Sku.setEnabled(false);\r\n EBAS.L9_Qty_Out.setEnabled(false);\r\n EBAS.L9_First_Desc.setEnabled(false);\r\n EBAS.L9_Orig_Sku.setEnabled(false);\r\n EBAS.L9_Orig_Desc.setEnabled(false);\r\n EBAS.L9_Orig_Attr.setEnabled(false);\r\n EBAS.L9_Orig_Size.setEnabled(false);\r\n EBAS.L9_Orig_Retail.setEnabled(false);\r\n EBAS.L9_Manuf_Inspec.setEnabled(false);\r\n EBAS.L9_New_Used.setEnabled(false);\r\n EBAS.L9_Reason_DropDown.setEnabled(false);\r\n EBAS.L9_Desc_Damage.setEnabled(false);\r\n EBAS.L9_Cust_Satisf_ChkBox.setEnabled(false);\r\n EBAS.L9_Warranty_ChkBox.setEnabled(false);\r\n \r\n try {\r\n upDB();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n Logger.getLogger(EBAS.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public String getSysNo() {\n return sysNo;\n }", "public String getDriver()\n {\n return m_driverName;\n }", "public String getMetnoLicense() {\n\t\treturn this.metnoLicense;\n\t}", "private static String getKernelVersion() {\n String procVersionStr;\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(\"/proc/version\"), 256);\n try {\n procVersionStr = reader.readLine();\n }\n finally {\n reader.close();\n }\n\n if (procVersionStr == null) {\n FLog.e(TAG, \"Unable to read the kernel version!\");\n return \"N/A\";\n }\n\n return procVersionStr;\n }\n catch (IOException e) {\n FLog.e(TAG, \"Getting kernel version failed\", e);\n return \"N/A\";\n }\n }", "public interface PeripheralSoftwareDriverInterface extends DriverBaseDataEventListener {\r\n\r\n /**\r\n * Is set in the BaseDriver, you can overwrite it, but for debugging\r\n * purposes not handy\r\n */\r\n public final static String DriverBaseName = \"driver:port\";\r\n\r\n /**\r\n * Returns the driver DB id.\r\n * @return \r\n */\r\n public int getId();\r\n \r\n /**\r\n * Starts the driver and runs the thread\r\n */\r\n public void startDriver();\r\n\r\n /**\r\n * Stops the driver and the thread the driver is running in\r\n */\r\n public void stopDriver();\r\n\r\n /**\r\n * Returns the Hardware driver which belongs to the given running software\r\n * driver.\r\n *\r\n * @return\r\n */\r\n public Peripheral getHardwareDriverFromSoftwareDriver();\r\n\r\n \r\n /**\r\n * Returns the hardware driver.\r\n * @return \r\n */\r\n public PeripheralHardwareDriverInterface getHardwareDriver();\r\n \r\n /**\r\n * Returns the amount of active devices attached to this driver.\r\n *\r\n * @return\r\n */\r\n public int getRunningDevicesCount();\r\n\r\n /**\r\n * Returns a list of running devices whom belong to this driver.\r\n *\r\n * @return\r\n */\r\n public List<Device> getRunningDevices();\r\n\r\n /**\r\n * Send a batch of commands through the proxy. This method is preferred when\r\n * sending multiple commands at once with a build in delay. this function\r\n * should create a batch with a default name (anonymous)\r\n *\r\n * @param batchData Strings with commands\r\n * @see #runBatch()\r\n * @see #runBatch(java.lang.String)\r\n */\r\n public void addBatch(List<Map<String, String>> batchData);\r\n\r\n /**\r\n * Send a batch of commands through the proxy. This method is preferred when\r\n * sending multiple commands at once with a build in delay.\r\n *\r\n * @param batchData Strings with commands\r\n * @param batchName String with the name of the batch to use later on with\r\n * runBatch()\r\n * @see #runBatch()\r\n * @see #runBatch(java.lang.String)\r\n */\r\n public void addBatch(List<Map<String, String>> batchData, String batchName);\r\n\r\n /**\r\n * Runs the batch previously set with the anonymous addBatch\r\n */\r\n public void runBatch();\r\n\r\n /**\r\n * Runs the batch previously set with addBatch with a batchName\r\n *\r\n * @param batchName Name of the batch to run\r\n */\r\n public void runBatch(String batchName);\r\n\r\n /**\r\n * Sends the data to the hardware itself\r\n *\r\n * @param data The data to send\r\n * @param prefix When having multiple devices supported by the hardware a\r\n * prefix can distinct the device in your hardware\r\n * @return result of the send command\r\n * @throws java.io.IOException\r\n * @Obsolete Use writeBytes.\r\n */\r\n public boolean sendData(String data, String prefix) throws IOException;\r\n\r\n /**\r\n * Sends the data to the hardware itself\r\n *\r\n * @param data The data to send\r\n * @return the result of the command\r\n * @throws java.io.IOException\r\n * @Obsolete Use WriteBytes.\r\n */\r\n public boolean sendData(String data) throws IOException;\r\n\r\n /**\r\n * Retrieves the name of the class.\r\n *\r\n * @return the name of the class\r\n */\r\n public String getName();\r\n\r\n /**\r\n * For adding an hardware driver.\r\n *\r\n * @param l\r\n */\r\n public void setPeripheralEventListener(PeripheralHardwareDriverInterface l);\r\n\r\n /**\r\n * for removing an hardware driver.\r\n *\r\n * @param l\r\n */\r\n public void removePeripheralEventListener(PeripheralHardwareDriverInterface l);\r\n\r\n /**\r\n * Handles data received from the hardware driver to be used by overwriting\r\n * classes.\r\n *\r\n * @param oEvent\r\n */\r\n @Override\r\n public void driverBaseDataReceived(PeripheralHardwareDataEvent oEvent);\r\n\r\n /**\r\n * Driver proxy for hardware data.\r\n *\r\n * @param oEvent\r\n */\r\n public void driverBaseDataReceivedProxy(PeripheralHardwareDataEvent oEvent);\r\n\r\n /**\r\n * Returns the package name of the driver as used in the database.\r\n *\r\n * @return The package name of this class\r\n */\r\n public String getPackageName();\r\n\r\n /**\r\n * Adds a device to the listers for whom data can exist.\r\n *\r\n * @param device\r\n */\r\n public void addDeviceListener(DeviceDriverListener device);\r\n\r\n /**\r\n * Removes a device from the listeners list.\r\n *\r\n * @param device\r\n */\r\n public void removeDeviceListener(DeviceDriverListener device);\r\n\r\n /**\r\n * Handle the data coming from a device driver to dispatch to the hardware\r\n * driver. With this function you can do stuff with the data. For example if\r\n * needed change from string to byte array?\r\n *\r\n * @param device\r\n * @param group\r\n * @param set\r\n * @param deviceData\r\n * @return A string which represents a result, human readable please.\r\n * @throws java.io.IOException\r\n */\r\n public boolean handleDeviceData(Device device, String group, String set, String deviceData) throws IOException;\r\n\r\n /**\r\n * Handles data coming from a device as is in the request!\r\n * @param device\r\n * @param request\r\n * @return\r\n * @throws IOException \r\n */\r\n public boolean handleDeviceData(Device device, DeviceCommandRequest request) throws IOException;\r\n \r\n /**\r\n * Sets the driver DB id.\r\n * @param driverDBId \r\n */\r\n public void setId(int driverDBId);\r\n \r\n /**\r\n * Sets the named id\r\n * @param dbNameId\r\n */\r\n public void setNamedId(String dbNameId);\r\n \r\n /**\r\n * Gets the named id\r\n * @return \r\n */\r\n public String getNamedId();\r\n \r\n /**\r\n * Returns if the driver supports custom devices.\r\n * @return \r\n */\r\n public boolean hasCustom();\r\n \r\n /**\r\n * Set if a driver has custom devices.\r\n * @param hasCustom\r\n * @return \r\n */\r\n public void setHasCustom(boolean hasCustom);\r\n \r\n /**\r\n * Returns the software driver id.\r\n *\r\n * @param softwareId\r\n */\r\n public void setSoftwareDriverId(String softwareId);\r\n\r\n /**\r\n * Returns the version set in the driver.\r\n *\r\n * @param softwareIdVersion\r\n */\r\n public void setSoftwareDriverVersion(String softwareIdVersion);\r\n\r\n /**\r\n * Returns the software driver id.\r\n *\r\n * @return\r\n */\r\n public String getSoftwareDriverId();\r\n\r\n /**\r\n * Returns the version set in the driver.\r\n *\r\n * @return\r\n */\r\n public String getSoftwareDriverVersion();\r\n\r\n /**\r\n * Returns true if there is a web presentation present.\r\n *\r\n * @return\r\n */\r\n public boolean hasPresentation();\r\n\r\n /**\r\n * Sets a web presentation;\r\n *\r\n * @param pres\r\n */\r\n public void addWebPresentationGroup(WebPresentationGroup pres);\r\n\r\n /**\r\n * Returns the web presentation.\r\n *\r\n * @return\r\n */\r\n public List<WebPresentationGroup> getWebPresentationGroups();\r\n\r\n /**\r\n * Sets the friendlyname.\r\n * @param name \r\n */\r\n public void setFriendlyName(String name);\r\n \r\n /**\r\n * Returns the friendlyname.\r\n * @return \r\n */\r\n public String getFriendlyName();\r\n \r\n /**\r\n * Sets a link with the device service.\r\n * @param deviceServiceLink \r\n */\r\n public void setDeviceServiceLink(PeripheralDriverDeviceMutationInterface deviceServiceLink);\r\n \r\n /**\r\n * Removes a device service link.\r\n */\r\n public void removeDeviceServiceLink();\r\n \r\n /**\r\n * Indicator to let know a device is loaded.\r\n * @param device \r\n */\r\n public void deviceLoaded(Device device);\r\n \r\n}", "int getPaymentDetailsVersion();", "public AS400 getSystem() {\r\n return system;\r\n }", "public Software getSoftware() {\n return software;\n }", "static String m13919a(Context context, C6924p paymentStateHandler) {\n JSONObject deviceInfo = new JSONObject();\n try {\n String androidId = Secure.getString(context.getContentResolver(), \"android_id\");\n deviceInfo.put(\"deviceFingerprintVersion\", \"1.0\");\n deviceInfo.put(\"platform\", \"android\");\n deviceInfo.put(\"apiVersion\", \"4\");\n deviceInfo.put(\"osVersion\", VERSION.SDK_INT);\n deviceInfo.put(\"sdkVersion\", \"1.10.0\");\n deviceInfo.put(\"deviceIdentifier\", androidId);\n deviceInfo.put(\"locale\", C6912j.m14059a(context));\n return Base64.encodeToString(deviceInfo.toString().getBytes(Charset.forName(\"UTF-8\")), 2);\n } catch (JSONException jsonException) {\n Log.e(f12559a, \"Token could not be created\", jsonException);\n paymentStateHandler.mo22387b((Throwable) jsonException);\n return \"\";\n }\n }", "public String getSystemVer() {\n return systemVer;\n }", "private int get_sreg() { return get_ioreg(SREG); }", "java.lang.String getProductCode();" ]
[ "0.58354235", "0.5735563", "0.5494783", "0.549178", "0.54319465", "0.5431522", "0.5304606", "0.5255618", "0.5242721", "0.52354914", "0.51602376", "0.51595783", "0.5148756", "0.51322174", "0.5128805", "0.5098236", "0.50853646", "0.5084388", "0.50810236", "0.50806856", "0.5048751", "0.5031757", "0.5031757", "0.50034934", "0.4997308", "0.49542835", "0.49306026", "0.49278906", "0.48895347", "0.48637554", "0.48607478", "0.48568195", "0.4832725", "0.48325372", "0.47997358", "0.47633803", "0.47492138", "0.47179312", "0.4716827", "0.47114012", "0.47071508", "0.46992972", "0.46879712", "0.46770626", "0.4669496", "0.46679327", "0.46604928", "0.46514118", "0.46484166", "0.46261242", "0.46177953", "0.46155548", "0.4612919", "0.46116433", "0.4592418", "0.45876405", "0.45865753", "0.45860764", "0.45826465", "0.45597854", "0.45542577", "0.45445284", "0.45363203", "0.4526968", "0.4526443", "0.45229915", "0.4520668", "0.4515927", "0.4515927", "0.45157838", "0.4509174", "0.45048544", "0.4504159", "0.4501562", "0.44870716", "0.44729173", "0.44720688", "0.4471077", "0.44706857", "0.44673496", "0.44649556", "0.44648653", "0.4463408", "0.44577682", "0.44542554", "0.44480014", "0.44447488", "0.4443231", "0.4442539", "0.4441568", "0.44365236", "0.44356662", "0.44349763", "0.4418938", "0.44171003", "0.44147947", "0.4413451", "0.44134134", "0.44075897", "0.44069973" ]
0.4886094
29
This routine gets the emergency contact information from the PS_EMERGENCY_CNTCT table and converts it to the legacy system format.
private static HashMap<String, Object> fetchEmergencyContactData(HashMap<String, Object> parameterMap) { PsEmergencyContact psEmergencyContact = PsEmergencyContact.findPrimaryByEmployeeId((String)parameterMap.get("employeeId")); if(psEmergencyContact != null) { if(psEmergencyContact.getContactName() != null) { psEmergencyContact.setContactName(psEmergencyContact.getContactName().trim().toUpperCase().replaceAll("'", "''")); } psEmergencyContact.setPhone(psEmergencyContact.getPhone() != null ? psEmergencyContact.getPhone().trim().replaceAll("[^a-zA-Z0-9] ", "") : psEmergencyContact.getPhone()); psEmergencyContact.setRelationship(formatRelationship(psEmergencyContact.getRelationship())); parameterMap.put("emergencyContactName", psEmergencyContact.getContactName()); parameterMap.put("emergencyContactPhone", psEmergencyContact.getPhone()); parameterMap.put("emergencyContactRelation", psEmergencyContact.getRelationship()); } return parameterMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void getEmergencyContact();", "private EmergencyContactInfo persistEmergencyContactInfo(Intent data){\n\t //Declarations\n\t\t\tEmergencyContactInfo emergencyContactInfo;\n\t\t\t\n\t\t\t//Get the contact details\n \tContactProvider contactProvider = ContactProvider.getContactProvider(getActivity());\n \tContactDetail contactDetail = contactProvider.getContact(data);\t\t\t \t \t \t\n \t\n \t//Check its availability in data store\n \tif(DataStore.getEmergencyContactInfo(getActivity()) == null)\n \t\temergencyContactInfo = new EmergencyContactInfo();\t \t\n \telse\n \t\temergencyContactInfo = DataStore.getEmergencyContactInfo(getActivity());\n \t\n \temergencyContactInfo.getContactDetails().put(mContactTag, contactDetail);\t \t\n \tDataStore.setEmergencyContactInfo(emergencyContactInfo);\n \tDataStore.commitEmergencyContactInfo(getActivity());\n \t\n \t\n \treturn emergencyContactInfo;\n\t\t}", "@Override\n\t\tpublic void emergencyServices() {\n\t\t\tSystem.out.println(\"FH--emergency services\");\t\n\t\t\t\n\t\t}", "private void displayData(){\n\t\t\t//Get the emergency contact info\n\t\t\tEmergencyContactInfo emergencyContactInfo = DataStore.getEmergencyContactInfo(getActivity());\n\t\t\t\t\t\t\t\t\n\t\t\tif(emergencyContactInfo != null)\n\t\t\t\tmContactsSection.displayData(emergencyContactInfo);\n\t\t\t\n\t\t}", "private static String fetchLegacyEthnicCode(HashMap<String, Object> parameterMap) {\n\t\tString ethnicGroupCode = PsDiversityEthnicity.findEthnicGroupCodeByEmployeeId((String)parameterMap.get(\"employeeId\"));\n\t\tString ethnicGroup = PsEthnicGroup.findEthnicGroupByEthnicGroupCode(ethnicGroupCode);\n\t\tString legacyEthnicCode = CrossReferenceEthnicGroup.findActiveLegacyEthnicCodeByEthnicGroup(ethnicGroup);\n\t\tif(legacyEthnicCode == null || legacyEthnicCode.isEmpty()) {\n\t\t\tparameterMap.put(\"errorProgram\", \"ZHRI105A\");\n\t\t\tparameterMap.put(\"errorMessage\", \"Ethnic Group is not found in XRef table PS_ZHRT_ETHCD_CREF\");\n\t\t\tMain.doErrorCommand(parameterMap);\n\t\t}\n\t\treturn legacyEthnicCode;\n\t}", "private static org.opencds.vmr.v1_0.schema.TelecommunicationAddressUse tELTelecomAddrUseInternal2TELTelecomAddrUse(TelecommunicationAddressUse pTC) \n\t\t\tthrows InvalidDataException {\n\n\t\tString _METHODNAME = \"tELTelecomAddrUseInternal2TELTelecomAddrUse(): \";\n\n\t\tif (pTC == null)\n\t\t\treturn null;\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"Internal TelecommunicationAddressUse value: \" + pTC);\n\t\t}\n\t\torg.opencds.vmr.v1_0.schema.TelecommunicationAddressUse lTelecomCapaExt = null;\n\t\ttry {\n\t\t\tlTelecomCapaExt = org.opencds.vmr.v1_0.schema.TelecommunicationAddressUse.valueOf(pTC.toString());\n\t\t}\n\t\tcatch (IllegalArgumentException iae) {\n\t\t\tString errStr = _METHODNAME + \"there was no direct value mapping from the internal to external enumeration\";\n\t\t\tthrow new InvalidDataException(errStr);\n\t\t}\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"External TelecommunicationAddressUse value: \" + lTelecomCapaExt.value());\n\t\t}\n\n\t\treturn lTelecomCapaExt;\n\t}", "public String epcString()\n {\n StringBuilder sb = new StringBuilder(epc.length * 2);\n\n for (int i = 0; i < epc.length; i++)\n {\n sb.append(String.format(\"%02X\", (epc[i] & 0xff)));\n }\n return new String(sb);\n }", "private static org.opencds.vmr.v1_0.schema.TelecommunicationCapability tELTelecomCapaInternal2TelecomCapa(TelecommunicationCapability pTC) \n\t\t\t\tthrows InvalidDataException {\n\n\t\t\tString _METHODNAME = \"tELTelecomInternal2TELTelecomCapa(): \";\n\n\t\t\tif (pTC == null)\n\t\t\t\treturn null;\n\n\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\tlogger.debug(_METHODNAME + \"Internal TelecommunicationCapability value: \" + pTC);\n\t\t\t}\n\t\t\torg.opencds.vmr.v1_0.schema.TelecommunicationCapability lTelecomCapaExt = null;\n\t\t\ttry {\n\t\t\t\tlTelecomCapaExt = org.opencds.vmr.v1_0.schema.TelecommunicationCapability.valueOf(pTC.toString());\n\t\t\t}\n\t\t\tcatch (IllegalArgumentException iae) {\n\t\t\t\tString errStr = _METHODNAME + \"there was no direct value mapping from the internal to external enumeration\";\n\t\t\t\tthrow new InvalidDataException(errStr);\n\t\t\t}\n\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\tlogger.debug(_METHODNAME + \"External TelecommunicationCapability value: \" + lTelecomCapaExt.value());\n\t\t\t}\n\n\t\t\treturn lTelecomCapaExt;\n\t\t}", "public boolean isEmergencyAlertMessage() {\n int id = mMessageIdentifier;\n return SmsCbHeader.isEmergencyMessage(id) &&\n id != SmsCbConstants.MESSAGE_ID_CMAS_ALERT_CHILD_ABDUCTION_EMERGENCY;\n }", "protected Object[] get_ComponentInfo()\n {\n return new Object[]\n {\n \"ReporterMBean contains settings and statistics for the Coherence JMX Reporter.\",\n \"com.bea.owner=Context,com.bea.VisibleToPartitions=ALWAYS\",\n };\n }", "private HashMap<String, String> getDefaultInEmergency(String state) {\n HashMap<Integer,HashMap<String,String>> defult\n = dbController.getDefaultInEmergency(state);\n\n for (Map.Entry<Integer,HashMap<String,String>> objs : defult.entrySet()){\n HashMap<String,String> obj = objs.getValue();\n String code = obj.get(\"default_caller\");\n HashMap<String,String> response = convertCodeToDefaultCallerSettings(code);\n //return value of who default in emergency\n return response;\n\n }\n return null;\n }", "private void startEmergency()\n {\n sendUserPresentLocationDetailsToEmergencyConatct();\n\n /*final ClientConfiguration clientConfiguration = getClientConfiguration();\n completedTime = completedTime + clientConfiguration.getTimeDelayEmergency();\n Timer timer = new Timer();\n timer.schedule(new TimerTask()\n {\n @Override\n public void run()\n {\n completedTime = completedTime + clientConfiguration.getTimeDelayEmergency();\n if (clientConfiguration.getMaxTimeEmergency() < completedTime)\n {\n completedTime = 0;\n cancel();\n notifyEmergencyCompleted();\n }\n else\n {\n sendUserPresentLocationDetailsToEmergencyConatct();\n }\n }\n }, clientConfiguration.getTimeDelayEmergency(), clientConfiguration.getTimeDelayEmergency());*/\n }", "public static void emergency(String message) {\n\t\tif (logger != null) {\n\t\t\tlogger.log(Level.EMERGENCY, message);\n\t\t}\n\t}", "public void emergencyStopMode() {\n this.outgoing.send(new Message(MessageKind.MODE_m, Mailbox.Mode.EMERGENCY_STOP));\n this.mode = State.EMERGENCY_STOP;\n }", "public static EcidContact doLookup(Context ctx, String number, int numberType)\n {\n Log.d(TAG, \"ECID AOSP VERSION: \" + ECID_AOSP_VERSION);\n if (ctx != null && !TextUtils.isEmpty(number)) {\n// EcidContact cidContact = getEcidContact(number);\n// if (cidContact != null) {\n// if (DBG) Log.d(TAG, \"Skip look up, already done previously: ctx: \" + ctx + \" number: \" + number);\n// return cidContact;\n// }\n EcidContact cidContact = new EcidContact();\n cidContact.m_number = PhoneNumberUtils.stripSeparators(number);\n cidContact.implLookup(ctx, number, numberType != Calls.OUTGOING_TYPE, false);\n m_mapEcidContacts.put(cidContact.m_number, cidContact);\n if (DBG) Log.d(TAG, \"added cidContact \" + cidContact + \"for number: \" + cidContact.m_number);\n\n if (DBG) Log.d(TAG, \"look up completed: number: \" + number);\n return cidContact;\n }\n else {\n Log.d(TAG, \"doLookup Invalid Args: ctx: \" + ctx + \" number: \" + number);\n return null;\n }\n }", "protected ComponentStruct[] getFrontEndComponents() throws SessionQueryException\n {\n ComponentStruct[] frontEnds = null;\n\n try\n {\n frontEnds = getSessionManagementAdminService().getComponentsForType(Components.CRITICAL_COMPONENT);\n\n GUILoggerHome.find().debug(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT, frontEnds);\n if (GUILoggerHome.find().isInformationOn())\n {\n GUILoggerHome.find().information(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT,\n \"Found \" + frontEnds.length + \" Front End Components\");\n }\n }\n catch(Exception e)\n {\n throw new SessionQueryException(\"Could not retrieve Front End Components.\", e);\n }\n\n return frontEnds;\n }", "private static byte[] getLsfileaeMessage100() throws HeaderPartException, HostMessageFormatException {\r\n Map < String, Object > map = new HashMap < String, Object >();\r\n map.put(Constants.CICS_PROGRAM_NAME_KEY, \"LSFILEAE\");\r\n map.put(Constants.CICS_LENGTH_KEY, \"79\");\r\n map.put(Constants.CICS_DATALEN_KEY, \"6\");\r\n \r\n LegStarMessage legstarMessage = new LegStarMessage();\r\n legstarMessage.setHeaderPart(new LegStarHeaderPart(map, 0));\r\n legstarMessage.addDataPart(new CommareaPart(\r\n HostData.toByteArray(LsfileaeCases.getHostBytesHexRequest100())));\r\n return legstarMessage.toByteArray();\r\n\r\n }", "public String processMessage() throws ICANException {\n String aSegment;\n HL7Group aGroup;\n HL7Message aInMess = new HL7Message(mHL7Message);\n HL7Segment aInMSHSegment = new HL7Segment(aInMess.getSegment(\"MSH\"));\n HL7Segment aOutMSHSegment = processMSHToUFD();\n if (mEnvironment.indexOf(\"TEST\") >= 0) {\n String aSendingApp = aOutMSHSegment.get(HL7_23.MSH_3_sending_application);\n if (aSendingApp.indexOf(\".TEST\") >= 0) {\n aOutMSHSegment.set(HL7_23.MSH_3_sending_application, aSendingApp.substring(0, aSendingApp.length() - 5));\n }\n }\n HL7Message aOutMess = new HL7Message(aOutMSHSegment.getSegment());\n\n if(aInMess.isEvent(\"A01, A02, A03, A08, A11, A12, A13, A21, A22, A28, A31\")) {\n aOutMess.append(processEVNToUFD());\n aOutMess.append(processPIDToUFD());\n aOutMess.append(processNK1s_ToUFD());\n aOutMess.append(processPV1ToUFD());\n aOutMess.append(processPV2ToUFD());\n aOutMess.append(processOBXs_ToUFD());\n aOutMess.append(processAL1s_ToUFD());\n aOutMess.append(processDG1s_ToUFD());\n aOutMess.append(processDRGToUFD());\n aOutMess.append(processPR1s_ToUFD());\n aOutMess.append(processGT1s_ToUFD());\n aOutMess.append(processInsuranceToUFD());\n aOutMess.append(processCSC_ZsegmentsToUFD());\n\n } else if (aInMess.isEvent(\"A17\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processA17GroupToUFD(1));\n aOutMess.append(processA17GroupToUFD(2));\n\n } else if (aInMess.isEvent(\"A34\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processPIDToUFD().getSegment());\n aOutMess.append(processMRGToUFD().getSegment());\n }\n if (aOutMess.getMessage().length() > 0) {\n aOutMess.append(setupZBX(\"MESSAGE\", \"SOURCE_ID\", aInMSHSegment.get(HL7_23.MSH_10_message_control_ID)));\n }\n return aOutMess.getMessage();\n }", "public static boolean isEmergencyNumber(String number, Context context) {\n\t\tLog.d(TAG, \"ContactsUtils isEmergencyNumber number=\" + number\n\t\t\t\t+ \" carrier=\" + getCarrierName(context));\n\t\tif (number != null) {\n\t\t\tif (getCarrierName(context).equals(Carrier_CMCC)) {\n\t\t\t\treturn (number.equals(\"112\") || number.equals(\"911\")\n\t\t\t\t\t\t|| number.equals(\"110\") || number.equals(\"999\")\n\t\t\t\t\t\t|| number.equals(\"000\") || number.equals(\"08\")\n\t\t\t\t\t\t|| number.equals(\"118\") || number.equals(\"119\"));\n\t\t\t} else if (getCarrierName(context).equals(Carrier_CT)) {\n\t\t\t\treturn (number.equals(\"112\") || number.equals(\"911\")\n\t\t\t\t\t\t|| number.equals(\"110\") || number.equals(\"999\")\n\t\t\t\t\t\t|| number.equals(\"120\") || number.equals(\"119\"));\n\t\t\t} else\n\t\t\t\treturn false;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public java.lang.String[][] getDptCEnm (java.lang.String dpt_cde, \n java.lang.String cenm_typ) throws com.mcip.orb.CoException {\n return this._delegate.getDptCEnm(dpt_cde, cenm_typ);\n }", "public java.lang.String getC660000023()\n {\n return this.c660000023;\n }", "public void emergencyStop(){\r\n\t\tif (grblPort.isConnected()){\r\n\t\t\tgrblPort.sendDataLine(\"\\u0018\");\r\n\t\t}\r\n\t}", "public CWE[] getRxa9_AdministrationNotes() {\r\n \tCWE[] retVal = this.getTypedField(9, new CWE[0]);\r\n \treturn retVal;\r\n }", "public CWE[] getAdministrationNotes() {\r\n \tCWE[] retVal = this.getTypedField(9, new CWE[0]);\r\n \treturn retVal;\r\n }", "public static EcidContact doCacheLookup(Context ctx, String number, int numberType)\n {\n Log.d(TAG, \"ECID AOSP VERSION: \" + ECID_AOSP_VERSION);\n if (ctx != null && !TextUtils.isEmpty(number)) {\n EcidContact cidContact = getEcidContact(number);\n return cidContact;\n }\n else {\n Log.d(TAG, \"doLookup Invalid Args: ctx: \" + ctx + \" number: \" + number);\n return null;\n }\n }", "public static void sendInfo(int cpuUsg, int mmUsg) {\n try {\n disObj.performanceInfo(1, cpuUsg, mmUsg); //cluster ID HC\n } catch (RemoteException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "public boolean isEtwsEmergencyUserAlert() {\n return SmsCbHeader.isEtwsMessage(mMessageIdentifier) &&\n SmsCbHeader.isEtwsEmergencyUserAlert(mMessageCode);\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.ECFMessageClaimData_Ext getECFMsg() {\n return (entity.ECFMessageClaimData_Ext)__getInternalInterface().getFieldValue(ECFMSG_PROP.get());\n }", "public String toString()\n {\n StringBuffer buf = new StringBuffer(\"EASInBandExceptionChannels\");\n buf.append(\": majorNumber=0x\").append(Integer.toHexString(this.exception_major_channel_number));\n buf.append(\"; minorNumber=0x\").append(Integer.toHexString(this.exception_minor_channel_number));\n return buf.toString();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.ECFMessageClaimData_Ext getECFMsg() {\n return (entity.ECFMessageClaimData_Ext)__getInternalInterface().getFieldValue(ECFMSG_PROP.get());\n }", "private static String getFixContactPhone(String field13Old) {\n\t\tString[] field13NewArray = new String[NUMBER_PID_SEQ];\n\t\tint i = 0;\n\t\tString[] field13OldTokenizer = field13Old.split(\"\\\\\" + COMPONENT_SEPARATOR);\n\t\tfor (String component : field13OldTokenizer) {\n\t\t\tfield13NewArray[i] = component;\n\t\t\ti++;\n\t\t}\n\t\tif (!StringUtils.isEmpty(field13NewArray[7 - 1])) {\n\t\t\tfield13NewArray[12 - 1] = field13NewArray[7 - 1];\n\t\t\tfield13NewArray[7 - 1] = StringUtils.EMPTY;\n\t\t}\n\t\tStringBuilder field13New = new StringBuilder();\n\t\tfor (String field : field13NewArray) {\n\t\t\tfield13New.append(field == null ? StringUtils.EMPTY : field);\n\t\t\tfield13New.append(COMPONENT_SEPARATOR);\n\t\t}\n\t\treturn field13New.toString().replaceAll(\"\\\\^{2,}$\", \"\");\n\t}", "public String toCVSLegacy(Context context){\n return String.format(\"%d,%d,%d,%d\\n\",\n getID(),\n getTime().getMillis(),\n getJob().getID(),\n getTask().getID() );\n }", "@Override\n\tpublic List<EmployeeComplaint> findAll() throws SystemException {\n\t\treturn findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "public static String getMsgExpl(String fsMsgCd, Session foSession)\n {\n R_MSGImpl loMsg = null; \n SearchRequest loSearchRequest = null;\n String lsMsgExpl = null;\n \n loSearchRequest = new SearchRequest();\n loSearchRequest.addParameter(\"R_MSG\", \"MSG_CD\", fsMsgCd);\n \n loMsg = (R_MSGImpl) R_MSGImpl.getObjectByKey(loSearchRequest, foSession);\n \n if (loMsg != null)\n {\n lsMsgExpl = loMsg.getMSG_EXPL();\n \n if (lsMsgExpl != null)\n {\n return lsMsgExpl;\n }\n }\n \n return \"\";\n }", "public String getString_entries_receiveEst() { \n char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,11)];\n int i;\n for (i = 0; i < carr.length; i++) {\n if ((char)getElement_entries_receiveEst(i) == (char)0) break;\n carr[i] = (char)getElement_entries_receiveEst(i);\n }\n return new String(carr,0,i);\n }", "public void fireEmergencyRequest() {\n\t\televatorManager.handleEmergency();\n\t}", "public void setC660000023(java.lang.String c660000023)\n {\n this.c660000023 = c660000023;\n }", "protected String getEmployeeNumber(\n \tContact contact\n ) throws ServiceException {\n \treturn null;\n }", "public boolean isSpecialEmergencyNumber(String dialString) {\n return (dialString.equals(\"110\") || dialString.equals(\"119\")\n || dialString.equals(\"000\") || dialString.equals(\"08\")\n || dialString.equals(\"118\") || dialString.equals(\"999\")\n || dialString.equals(\"120\"));\n }", "public static C40931c m37112aE(Activity activity) {\n AppMethodBeat.m2504i(49003);\n if (activity == null) {\n C4990ab.m7420w(\"MicroMsg.ProcessManager\", \"hy: ac is null\");\n AppMethodBeat.m2505o(49003);\n return null;\n } else if (activity.getIntent() == null) {\n C4990ab.m7420w(\"MicroMsg.ProcessManager\", \"hy: get intent is null\");\n AppMethodBeat.m2505o(49003);\n return null;\n } else {\n C40931c c40931c = (C40931c) AeR.get(activity.getIntent().getIntExtra(\"process_id\", 0));\n AppMethodBeat.m2505o(49003);\n return c40931c;\n }\n }", "private double[][] convertTimes(double[][] exafsEnergies, Double fromTime, Double toTime) {\n\t\tdouble start = exafsEnergies[0][0];\n\t\tdouble end = exafsEnergies[(exafsEnergies.length - 1)][0];\n\t\tdouble currentEnergy = start;\n\t\tdouble a = 0.0;\n\t\tdouble b = Math.pow(end - start, kWeighting);\n\t\tdouble c = toTime - fromTime;\n\t\tdouble time = 0.0;\n\t\tfor (int i = 0; i < exafsEnergies.length; i++) {\n\t\t\tcurrentEnergy = exafsEnergies[i][0];\n\t\t\tfor (int j = 1; j <= numberDetectors; j++) {\n\t\t\t\ta = Math.pow(currentEnergy - start, kWeighting);\n\t\t\t\ttime = fromTime + (a * c) / b;\n\t\t\t\texafsEnergies[i][j] = time;\n\t\t\t}\n\t\t}\n\t\treturn exafsEnergies;\n\t}", "public boolean emergencyStop()\n {\n return finchController.emergencyStop();\n }", "public AlertMessageModel getAlertMessageModel(String spc, String displayAlertID, String alertID) throws AAException;", "public java.lang.Short getCauseOfNoId() {\r\n return causeOfNoId;\r\n }", "public void m5015e() {\n if (C1663a.m5979a().m5993N() && (this.f3996b == null || \"\".equals(this.f3996b))) {\n C2201w.m8371a((int) C0965R.string.ota_low_version, 0);\n } else {\n this.f3997c.m4989a();\n }\n }", "public java.lang.String getC660000025()\n {\n return this.c660000025;\n }", "public CampusEbo getCampus() {\n if ( StringUtils.isBlank(campusCode) ) {\n campus = null;\n } else {\n if ( campus == null || !StringUtils.equals( campus.getCode(),campusCode) ) {\n ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CampusEbo.class);\n if ( moduleService != null ) {\n Map<String,Object> keys = new HashMap<String, Object>(1);\n keys.put(LocationConstants.PrimaryKeyConstants.CODE, campusCode);\n campus = moduleService.getExternalizableBusinessObject(CampusEbo.class, keys);\n } else {\n throw new RuntimeException( \"CONFIGURATION ERROR: No responsible module found for EBO class. Unable to proceed.\" );\n }\n }\n }\n return campus;\n }", "public static ApplicantContactInfo createUpdatedEntity(EntityManager em) {\n ApplicantContactInfo applicantContactInfo = new ApplicantContactInfo()\n .applicantsHomeAddress(UPDATED_APPLICANTS_HOME_ADDRESS)\n .telephoneNumber(UPDATED_TELEPHONE_NUMBER)\n .email(UPDATED_EMAIL)\n .employer(UPDATED_EMPLOYER)\n .employersAddress(UPDATED_EMPLOYERS_ADDRESS);\n return applicantContactInfo;\n }", "public CWE[] getSubstanceManufacturerName() {\r\n \tCWE[] retVal = this.getTypedField(17, new CWE[0]);\r\n \treturn retVal;\r\n }", "public void CheckRegStatus(long electCode) {\n }", "public Integer doAsciiToEbcdic(CommBufferLogic commBuffer, int ascii) {\n Integer temp = ASCIITOEBCDIC[ascii];\n\n Integer codePage = commBuffer.getConnectionData().getCodePage();\n if (codePage != 37) { // Default US\n // ASCII to EBCDIC based on CP037\n Integer idx, size;\n size = CP037_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP037_CP500[idx]) {\n temp = CP037_CP500[idx + size];\n break;\n }\n }\n switch (codePage) { // Latin_1 CCSID 697 only\n case 273: // Austria, Germany\n size = CP500_CP273.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP273[idx]) {\n temp = CP500_CP273[idx + size];\n break;\n }\n }\n break;\n case 277: // Denmark, Norway\n size = CP500_CP277.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP277[idx]) {\n temp = CP500_CP277[idx + size];\n break;\n }\n }\n break;\n case 278: // Finland, Sweden\n size = CP500_CP278.length / 2;\n for (idx = 0; idx < size; idx++)\n {\n if (temp == CP500_CP278[idx]) {\n temp = CP500_CP278[idx + size];\n break;\n }\n }\n break;\n case 280: // Italy\n size = CP500_CP280.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP280[idx]) {\n temp = CP500_CP280[idx + size];\n break;\n }\n }\n break;\n case 284: // Spain, Latin America\n size = CP500_CP284.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP284[idx]) {\n temp = CP500_CP284[idx + size];\n break;\n }\n }\n break;\n case 285: // United Kingdom\n size = CP500_CP285.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP285[idx]) {\n temp = CP500_CP285[idx + size];\n break;\n }\n }\n break;\n case 297: // France\n size = CP500_CP297.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP297[idx]) {\n temp = CP500_CP297[idx + size];\n break;\n }\n }\n break;\n case 871: // Iceland\n size = CP500_CP871.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP871[idx]) {\n temp = CP500_CP871[idx + size];\n break;\n }\n }\n break;\n }\n }\n return temp;\n }", "private void organizeEEPROM() {\n\t \n \n\t //put red, green, blue, and activitity values into r, g, b, and a\n\t for(int i = 0; i < EEPROM.length; i += 8) {\n\t\t r[(i)/8] = 256*EEPROM[i] + EEPROM[i + 1];\n\t\t g[(i)/8] = 256*EEPROM[i + 2] + EEPROM[i + 3];\n\t\t b[(i)/8] = 256*EEPROM[i + 4] + EEPROM[i + 5];\n\t\t a[(i)/8] = 256*EEPROM[i + 6] + EEPROM[i + 7];\n \n\t\t //set resets to zero by default\n\t\t if((r[(i)/8] == 65278) && (b[(i)/8] == 65278) && (g[i/8] == 0)) {\n\t\t\t r[(i)/8] = 0;\n\t\t\t g[(i)/8] = 0;\n\t\t\t b[(i)/8] = 0;\n\t\t\t a[(i)/8] = 0;\n\t\t }\n\t }\n \n\t //get end of address\n\t for(int i = 0; i < EEPROM.length; i += 8) {\n\t\t if((EEPROM[i] == 255) && (EEPROM[i + 1] == 255)) {\n\t\t\t endaddress = i/8;\n\t\t\t break;\n\t\t }\n\t }\n\t if(isnew) {\n\t\t ID = Integer.parseInt(asciiheader[8]);\n\t\t mm = Integer.parseInt(asciiheader[7].substring(0, 2));\n\t\t dd = Integer.parseInt(asciiheader[7].substring(3, 5));\n\t\t yy = Integer.parseInt(asciiheader[7].substring(6, 8));\n\t\t HH = Integer.parseInt(asciiheader[7].substring(9, 11));\n\t\t MM = Integer.parseInt(asciiheader[7].substring(12, 14));\n\t\t period = Integer.parseInt(asciiheader[3]);\n\t\t\t\t \n\t\t if(isUTC) {\n\t\t\t offset = Calendar.get(Calendar.DST_OFFSET) / 3600000;\n\t\t\t //apply offset, but if offset rolls us into a new day, we need to account for that\n\t\t\t if (HH + offset > 23) {\n\t\t\t\t dd += 1;\n\t\t\t\t HH = (HH + offset) % 24;\n\t\t\t\t //if our new day rolls us into a new month, account for that\n\t\t\t\t //30 days have September, April, June, and November\n\t\t\t\t if(dd > 30 && (mm == 9 || mm == 4 || mm == 6 || mm == 11)) {\n\t\t\t\t\t dd = 1;\n\t\t\t\t\t mm += 1;\n\t\t\t\t }\n\t\t\t\t //All the rest have 31, except for February who is a fuckwad.\n\t\t\t\t else if (dd > 31 && !(mm == 9 || mm == 4 || mm == 6 || mm == 11 || mm == 2)) {\n\t\t\t\t\t dd = 1;\n\t\t\t\t\t mm += 1;\n\t\t\t\t }\n\t\t\t\t //If it is February and not a leap year\n\t\t\t\t else if (dd > 28 && (yy%4 != 0)) {\n\t\t\t\t\t dd = 1;\n\t\t\t\t\t mm += 1;\n\t\t\t\t }\n\t\t\t\t //If it is February and a leap year\n\t\t\t\t else if (dd > 29 && (yy%4 == 0)) {\n\t\t\t\t\t dd = 1;\n\t\t\t\t\t mm += 1;\n\t\t\t\t }\n\t\t\t\t //Did we rollover our year doing this?\n\t\t\t\t if (mm > 12) {\n\t\t\t\t\t mm = 1;\n\t\t\t\t\t yy += 1;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t }\n\t\t\t else {\n\t\t\t\t HH = HH + offset;\n\t\t\t }\n\t\t }\n\t }\n\t else {\n\t\t ID = (header[3] - 48)*1000 + (header[4] - 48)*100 + (header[5] - 48)*10 + (header[6] - 48);\n\t\t mm = (header[9] - 48)*10 + (header[10] - 48);\n\t\t dd = (header[12] - 48)*10 + (header[13] - 48);\n\t\t yy = (header[15] - 48)*10 + (header[16] - 48);\n\t\t HH = (header[18] - 48)*10 + (header[19] - 48);\n\t\t MM = (header[21] - 48)*10 + (header[22] - 48);\n\t\t period = (header[25] - 48)*100 + (header[26] - 48)*10 + (header[27] - 48);\n\t }\n \t}", "public Integer doEbcdicToAscii(CommBufferLogic commBuffer, Integer Data) {\n // Euro -- IBM has new codepages 1140..1149 using 0x9F except for\n // Scandinavian 0x5A. Scandinavian translates 0x5A to 0x9F.\n // Thus CP500 (0x9F) to ASCII (CP858 0xD5) to ANSI (CP1252 0x80)\n // will work.\n Integer temp = Data;\n\n if (commBuffer.getConnectionData().getCodePage() != 37) { // Default US\n \t// Display EBCDIC to ASCII uses CP037\n Integer idx, size;\n switch (commBuffer.getConnectionData().getCodePage()) {\n case 273: // Austria, Germany\n size = CP273_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP273_CP500[idx]) {\n temp = CP273_CP500[idx + size];\n break;\n }\n }\n break;\n case 277: // Denmark, Norway\n size = CP277_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP277_CP500[idx]) {\n temp = CP277_CP500[idx + size];\n break;\n }\n }\n break;\n case 278: // Finland, Sweden\n size = CP278_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP278_CP500[idx]) {\n temp = CP278_CP500[idx + size];\n break;\n }\n }\n break;\n case 280: // Italy\n size = CP280_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP280_CP500[idx]) {\n temp = CP280_CP500[idx + size];\n break;\n }\n }\n break;\n case 284: // Spain, Latin America\n size = CP284_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP284_CP500[idx]) {\n temp = CP284_CP500[idx + size];\n break;\n }\n }\n break;\n case 285: // United Kingdom\n size = CP285_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP285_CP500[idx]) {\n temp = CP285_CP500[idx + size];\n break;\n }\n }\n break;\n case 297: // France\n size = CP297_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP297_CP500[idx]) {\n temp = CP297_CP500[idx + size];\n break;\n }\n }\n break;\n case 871: // Iceland\n size = CP871_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP871_CP500[idx]) {\n temp = CP871_CP500[idx + size];\n break;\n }\n }\n break;\n }\n size = CP500_CP037.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP037[idx]) {\n temp = CP500_CP037[idx + size];\n break;\n }\n }\n }\n\n Integer result = 0;\n if(temp < EBCDICTOASCII.length) {\n \tresult = EBCDICTOASCII[temp];\n }\n else {\n\t\t\tresult = 0;\n\t\t}\n \n return result;\n\t}", "public static String cS2CSInternal( org.opencds.vmr.v1_0.schema.CS cs )\n\t{\n\t\ttry {\n\t\t\tString st = cs.getCode();\n\t\t\treturn st;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(); \n\t\t\tthrow new RuntimeException( \"cS2Code(\" + cs.toString() + \") had errors: \" + e.getMessage() );\n\t\t}\n\t}", "Integer getChnlCde();", "public Emergency(String name, String department, String phoneNumber, String timing, String address, String placeType, int thumbnail,\n String geoCode, String email, String webPage, int cover) {\n this.name = name;\n this.department = department;\n this.phoneNumber = phoneNumber;\n this.placeType = placeType;\n this.thumbnail = thumbnail;\n this.geoCode = geoCode;\n this.email = email;\n this.webPage = webPage;\n this.address = address;\n this.timing = timing;\n this.cover = cover;\n }", "public void setC660000025(java.lang.String c660000025)\n {\n this.c660000025 = c660000025;\n }", "public String toString()\n {\n StringBuffer loMessage = null;\n\n loMessage = new StringBuffer().append(\"\\n\");\n\n // Message Code\n if (getMSG_CD() != null)\n {\n loMessage.append(\"Message Code: \" + getMSG_CD() + \"\\n\");\n }\n\n // Severity Level\n if (getMSG_SEV() >= 0)\n {\n switch (getMSG_SEV())\n {\n case AMSMsgUtil.SEVERITY_LEVEL_INFO:\n loMessage.append(\"Severity Level: INFO\\n\");\n case AMSMsgUtil.SEVERITY_LEVEL_WARNING:\n loMessage.append(\"Severity Level: WARNING\\n\");\n case AMSMsgUtil.SEVERITY_LEVEL_ERROR:\n loMessage.append(\"Severity Level: ERROR\\n\");\n case AMSMsgUtil.SEVERITY_LEVEL_SEVERE:\n loMessage.append(\"Severity Level: SEVERE\\n\");\n } // end switch (liIndex)\n }\n\n // Override\n if (getOV_LVL() >= 0)\n {\n loMessage.append(\"Override: \" + getOV_LVL() + \"\\n\");\n }\n\n // Message\n if (getMSG_TXT() != null)\n {\n loMessage.append(\"Message: \" + getMSG_TXT() + \"\\n\");\n }\n\n // Component Name\n if (getCOMP_NM() != null)\n {\n loMessage.append(\"Component Name: \" + getCOMP_NM() + \"\\n\");\n }\n\n // Attribute ID\n if (getATTR_NM() != null)\n {\n loMessage.append(\"AttributeID: \" + getATTR_NM() + \"\\n\");\n }\n\n // Error Context\n if (getDOC_ID() != null)\n {\n loMessage.append(\"Error Context: \");\n loMessage.append(\"DOC_CD = \" + getDOC_CD() + \" AND \");\n loMessage.append(\"DOC_DEPT_CD = \" + getDOC_DEPT_CD() + \" AND \");\n loMessage.append(\"DOC_ID = \" + getDOC_ID() + \" AND \");\n loMessage.append(\"DOC_VERS_NO = \" + getDOC_VERS_NO() + \"\\n\");\n }\n\n return loMessage.toString();\n }", "public String getEpaCertNo() {\n return epaCertNo;\n }", "public Collection<AdministeredComponentContact> getAdministeredComponentContact(){\r\n\t\treturn administeredComponentContact;\r\n\t}", "public HL7Group processCSC_ZsegmentsToUFD() throws ICANException {\n\n HL7Message aInMessage = new HL7Message(mHL7Message) ;\n HL7Group aOutGroup = new HL7Group();\n HL7Segment aPID = new HL7Segment(aInMessage.getSegment(\"PID\"));\n HL7Segment aPV1 = new HL7Segment(aInMessage.getSegment(\"PV1\"));\n HL7Segment aIN2 = new HL7Segment(aInMessage.getSegment(\"IN2\"));\n HL7Segment aZV1 = new HL7Segment(aInMessage.getSegment(\"ZV1\"));\n HL7Segment aZPD = new HL7Segment(aInMessage.getSegment(\"ZPD\"));\n HL7Segment aZMR = new HL7Segment(aInMessage.getSegment(\"ZMR\"));\n HL7Segment aZCD = new HL7Segment(aInMessage.getSegment(\"ZCD\"));\n\n// Patient (i.e PMI)related info\n aOutGroup.append(setupZBX(\"PMI\", \"TRAUMA\", aZV1.getField(CSC_23.ZV1_24_Diagnosis_Description)));\n aOutGroup.append(setupZBX(\"PMI\", \"OCCUPATION\", aIN2.get(HL7_23.IN2_46_job_title)));\n aOutGroup.append(setupZBX(\"PMI\", \"FINANCIAL_CLASS_REG\", aZV1.getField(CSC_23.ZV1_32_Financial_Class)));\n\n if (! aPID.isEmpty(HL7_23.PID_27_veterans_military_status, HL7_23.CE_text)) {\n aOutGroup.append(setupZBX(\"PMI\", \"DVA_CARD_TYPE\", aPID.get(HL7_23.PID_27_veterans_military_status, HL7_23.CE_text)));\n }\n\n// ED Connect\n String aGeneric = aZPD.getField(CSC_23.ZPD_4_Generic_Text);\n aGeneric = aGeneric.toUpperCase();\n\n if (aGeneric.indexOf(\"EDCON\") >= 0) {\n aOutGroup.append(setupZBX(\"VISIT\", \"ED_CONNECT_PATIENT\", \"Y\" ));\n } else if (aInMessage.isEvent(\"A01, A08, A28, A31\")) {\n aOutGroup.append(setupZBX(\"VISIT\", \"ED_CONNECT_PATIENT\", \"N\" ));\n }\n\n// HARP/CHORD logic\n if (aGeneric.indexOf(\"HARP\") >= 0) {\n aOutGroup.append(setupZBX(\"PMI\", \"HARP_FLAG\", \"HARP\"));\n } else if (aGeneric.indexOf(\"CHORD\") >= 0) {\n aOutGroup.append(setupZBX(\"PMI\", \"HARP_FLAG\", \"CHORD\"));\n } else {\n aOutGroup.append(setupZBX(\"PMI\", \"HARP_FLAG\", \"NULL\"));\n }\n\n aOutGroup.append(setupZBX(\"PMI\", \"INTERPRETER\", aZPD.getField(CSC_23.ZPD_11_Interpreter_Required)));\n aOutGroup.append(setupZBX(\"PMI\", \"MEDICARE_EXPIRY\", aZPD.getField(CSC_23.ZPD_7_Medicare_Expiry_Date)));\n aOutGroup.append(setupZBX(\"PMI\", \"PENSION_EXPIRY_DATE\", aZPD.getField(CSC_23.ZPD_9_Pension_Exp_Date)));\n aOutGroup.append(setupZBX(\"PMI\", \"PBS_SAFETYNET_NUMBER\", aZPD.getField(CSC_23.ZPD_10_PBS_Safetynet_Number)));\n aOutGroup.append(setupZBX(\"PMI\", \"DOB_ACCURACY\", aZPD.getField(\"ZPD_22\")));\n\n// Visit related A28 and A31 specific info\n if (aInMessage.isEvent(\"A28, A31\")) {\n if (! aPV1.isEmpty(HL7_23.PV1_8_referring_doctor)) {\n HL7Field aDrField = new HL7Field(aPV1.get(HL7_23.PV1_8_referring_doctor));\n String aDr = doDrTranslate(aPV1.get(HL7_23.PV1_8_referring_doctor, HL7_23.XCN_ID_num));\n aDrField.setSubField(aDr, HL7_23.XCN_ID_num);\n aOutGroup.append(setupZBX(\"VISIT\", \"GPCode\", aDr, aDrField));\n }\n }\n// Create referring doctor ZBX segment for HASS system interface which requires doctors that do not have ID numbers\n String aReferringDoctor = aPV1.get(HL7_23.PV1_8_referring_doctor);\n aOutGroup.append(setupZBX(\"VISIT\", \"REF_DOC_CODE\", aReferringDoctor));\n\n// Medical Records Movement\n String aMedRecDate = aZMR.getField(CSC_23.ZMR_1_Last_Movement_Date);\n String aMedRecTime = aZMR.getField(CSC_23.ZMR_2_Last_Movement_Time);\n aOutGroup.append(setupZBX(\"MEDREC\", \"LAST_MOVE_DATE_TIME\", aMedRecDate + aMedRecTime));\n aOutGroup.append(setupZBX(\"MEDREC\", \"VOLUME_NUMBER\", aZMR.getField(CSC_23.ZMR_3_Volume_Number)));\n aOutGroup.append(setupZBX(\"MEDREC\", \"LOCATION\", aZMR.getField(CSC_23.ZMR_4_Location)));\n aOutGroup.append(setupZBX(\"MEDREC\", \"RECEIVED_BY\", aZMR.getField(CSC_23.ZMR_5_Received_By)));\n aOutGroup.append(setupZBX(\"MEDREC\", \"EXTENSION\", aZMR.getField(CSC_23.ZMR_6_Extension_phone)));\n\n// Claim number and context\n if (! aZCD.isEmpty(CSC_23.ZCD_11_Claim_Number)) {\n String aClaimNumber = aZCD.get(CSC_23.ZCD_11_Claim_Number);\n String aContext = aZCD.get(CSC_23.ZCD_13_Compensable_Context);\n aOutGroup.append(setupZBX(\"FINANCE\", \"CLAIM_NUMBER\", aClaimNumber));\n aOutGroup.append(setupZBX(\"FINANCE\", \"CONTEXT\", aContext));\n }\n// Mental Health number\n aOutGroup.append(setupZBX(\"PMI\", \"MENTAL_HEALTH_NUMBER\", cMentalHealthID));\n\n /* WIES Value\n * ZV1-47 = WIES Value;\n * ZV1-48 = WIES Coder ID\n * ZV1-49 = Timestamp\n * ZV1-50 = Time\n */\n String WIESValue = aZV1.getField(CSC_23.ZV1_47_WIESVALUE); //aZV1.getField(47);\n String WIESCoderID = aZV1.getField( CSC_23.ZV1_48_WIESCoder);//aZV1.getField(48);\n String WIESDate = aZV1.getField( CSC_23.ZV1_49_WIESDate); //aZV1.getField(49);\n String WIESTime = aZV1.getField( CSC_23.ZV1_50_WIESTime );//aZV1.getField(50);\n System.out.println(\"++++ WIES Value: \" + WIESValue );\n System.out.println(\"++++ WIES Coder ID: \" + WIESCoderID );\n System.out.println(\"++++ WIES Date: \" + WIESDate );\n System.out.println(\"++++ WIES Time: \" + WIESTime );\n\n aOutGroup.append(setupZBX(\"VISIT\", \"WIESValue\", WIESValue ) );\n aOutGroup.append(setupZBX(\"VISIT\", \"WIESCoderID\", WIESCoderID));\n aOutGroup.append(setupZBX(\"VISIT\", \"WIESDate\", WIESDate) );\n aOutGroup.append(setupZBX(\"VISIT\", \"WIESTime\", WIESTime) );\n// End WIES Code\n\n return aOutGroup;\n }", "public String getAAE011() {\n return AAE011;\n }", "private ElectricalMeasurement transformTSSEintoElectricalMeasurement(TechnicalSystemStateEvaluation tsse) {\r\n\t\t\r\n\t\tFixedDouble fvVoltageL1 = null;\r\n\t\tFixedDouble fvVoltageL2 = null;\r\n\t\tFixedDouble fvVoltageL3 = null;\r\n\t\t\r\n\t\tFixedDouble fvCurrentL1 = null;\r\n\t\tFixedDouble fvCurrentL2 = null;\r\n\t\tFixedDouble fvCurrentL3 = null;\r\n\r\n\t\tFixedDouble fvCosPhiL1 = null;\r\n\t\tFixedDouble fvCosPhiL2 = null;\r\n\t\tFixedDouble fvCosPhiL3 = null;\r\n\r\n\t\tfor (int i = 0; i < tsse.getIOlist().size(); i++) {\r\n\t\t\t\r\n\t\t\tFixedDouble fdIoValue = (FixedDouble) tsse.getIOlist().get(i);\r\n\t\t\tswitch (fdIoValue.getVariableID()) {\r\n\t\t\tcase VOLTAGE_L1:\r\n\t\t\t\tfvVoltageL1 = fdIoValue;\r\n\t\t\t\tbreak;\r\n\t\t\tcase VOLTAGE_L2:\r\n\t\t\t\tfvVoltageL2 = fdIoValue;\r\n\t\t\t\tbreak;\r\n\t\t\tcase VOLTAGE_L3:\r\n\t\t\t\tfvVoltageL3 = fdIoValue;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CURRENT_L1:\r\n\t\t\t\tfvCurrentL1 = fdIoValue;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CURRENT_L2:\r\n\t\t\t\tfvCurrentL2 = fdIoValue;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CURRENT_L3:\r\n\t\t\t\tfvCurrentL3 = fdIoValue;\r\n\t\t\t\tbreak;\r\n\t\t\tcase COSPHI_L1:\r\n\t\t\t\tfvCosPhiL1 = fdIoValue;\r\n\t\t\t\tbreak;\r\n\t\t\tcase COSPHI_L2:\r\n\t\t\t\tfvCosPhiL2 = fdIoValue;\r\n\t\t\t\tbreak;\r\n\t\t\tcase COSPHI_L3:\r\n\t\t\t\tfvCosPhiL3 = fdIoValue;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tUniPhaseElectricalNodeState uniPhaseElectricalNodeStateL1 = new UniPhaseElectricalNodeState();\r\n\t\tUniPhaseElectricalNodeState uniPhaseElectricalNodeStateL2 = new UniPhaseElectricalNodeState();\r\n\t\tUniPhaseElectricalNodeState uniPhaseElectricalNodeStateL3 = new UniPhaseElectricalNodeState();\r\n\t\t\r\n\t\tuniPhaseElectricalNodeStateL1.setVoltageAbs(new UnitValue((float)fvVoltageL1.getValue(), \"V\"));\r\n\t\tuniPhaseElectricalNodeStateL2.setVoltageAbs(new UnitValue((float)fvVoltageL2.getValue(), \"V\"));\r\n\t\tuniPhaseElectricalNodeStateL3.setVoltageAbs(new UnitValue((float)fvVoltageL3.getValue(), \"V\"));\r\n\t\t\r\n\t\tuniPhaseElectricalNodeStateL1.setCurrent(new UnitValue((float)fvCurrentL1.getValue(), \"A\"));\r\n\t\tuniPhaseElectricalNodeStateL2.setCurrent(new UnitValue((float)fvCurrentL2.getValue(), \"A\"));\r\n\t\tuniPhaseElectricalNodeStateL3.setCurrent(new UnitValue((float)fvCurrentL3.getValue(), \"A\"));\r\n\t\t\r\n\t\tuniPhaseElectricalNodeStateL1.setCosPhi((float)fvCosPhiL1.getValue());\r\n\t\tuniPhaseElectricalNodeStateL2.setCosPhi((float)fvCosPhiL2.getValue());\r\n\t\tuniPhaseElectricalNodeStateL3.setCosPhi((float)fvCosPhiL3.getValue());\r\n\t\t\r\n\t\tTriPhaseElectricalNodeState triphaseElectricalNodeState = new TriPhaseElectricalNodeState();\r\n\t\ttriphaseElectricalNodeState.setL1(uniPhaseElectricalNodeStateL1);\r\n\t\ttriphaseElectricalNodeState.setL2(uniPhaseElectricalNodeStateL2);\r\n\t\ttriphaseElectricalNodeState.setL3(uniPhaseElectricalNodeStateL3);\r\n\t\t\r\n\t\tElectricalMeasurement electricalMeasurement = new ElectricalMeasurement();\r\n\t\telectricalMeasurement.setElectricalNodeState(triphaseElectricalNodeState);\r\n\t\t\r\n\t\treturn electricalMeasurement;\r\n\t}", "public boolean DecodeGetSystemInfoResponse(byte[] GetSystemInfoResponse) {\r\n DataDevice ma = (DataDevice) getApplication();\r\n //if the tag has returned a good response\r\n if (GetSystemInfoResponse[0] == (byte) 0x00 && GetSystemInfoResponse.length >= 12) {\r\n //DataDevice ma = (DataDevice)getApplication();\r\n String uidToString = \"\";\r\n byte[] uid = new byte[8];\r\n // change uid format from byteArray to a String\r\n for (int i = 1; i <= 8; i++) {\r\n uid[i - 1] = GetSystemInfoResponse[10 - i];\r\n uidToString += Helper.ConvertHexByteToString(uid[i - 1]);\r\n }\r\n\r\n //***** TECHNO ******\r\n ma.setUid(uidToString);\r\n if (uid[0] == (byte) 0xE0)\r\n ma.setTechno(\"ISO 15693\");\r\n else if (uid[0] == (byte) 0xD0)\r\n ma.setTechno(\"ISO 14443\");\r\n else\r\n ma.setTechno(\"Unknown techno\");\r\n\r\n //***** MANUFACTURER ****\r\n if (uid[1] == (byte) 0x02)\r\n ma.setManufacturer(\"STMicroelectronics\");\r\n else if (uid[1] == (byte) 0x04)\r\n ma.setManufacturer(\"NXP\");\r\n else if (uid[1] == (byte) 0x07)\r\n ma.setManufacturer(\"Texas Instruments\");\r\n else if (uid[1] == (byte) 0x01) //MOTOROLA (updated 20140228)\r\n ma.setManufacturer(\"Motorola\");\r\n else if (uid[1] == (byte) 0x03) //HITASHI (updated 20140228)\r\n ma.setManufacturer(\"Hitachi\");\r\n else if (uid[1] == (byte) 0x04) //NXP SEMICONDUCTORS\r\n ma.setManufacturer(\"NXP\");\r\n else if (uid[1] == (byte) 0x05) //INFINEON TECHNOLOGIES (updated 20140228)\r\n ma.setManufacturer(\"Infineon\");\r\n else if (uid[1] == (byte) 0x06) //CYLINC (updated 20140228)\r\n ma.setManufacturer(\"Cylinc\");\r\n else if (uid[1] == (byte) 0x07) //TEXAS INSTRUMENTS TAG-IT\r\n ma.setManufacturer(\"Texas Instruments\");\r\n else if (uid[1] == (byte) 0x08) //FUJITSU LIMITED (updated 20140228)\r\n ma.setManufacturer(\"Fujitsu\");\r\n else if (uid[1] == (byte) 0x09) //MATSUSHITA ELECTRIC INDUSTRIAL (updated 20140228)\r\n ma.setManufacturer(\"Matsushita\");\r\n else if (uid[1] == (byte) 0x0A) //NEC (updated 20140228)\r\n ma.setManufacturer(\"NEC\");\r\n else if (uid[1] == (byte) 0x0B) //OKI ELECTRIC (updated 20140228)\r\n ma.setManufacturer(\"Oki\");\r\n else if (uid[1] == (byte) 0x0C) //TOSHIBA (updated 20140228)\r\n ma.setManufacturer(\"Toshiba\");\r\n else if (uid[1] == (byte) 0x0D) //MITSUBISHI ELECTRIC (updated 20140228)\r\n ma.setManufacturer(\"Mitsubishi\");\r\n else if (uid[1] == (byte) 0x0E) //SAMSUNG ELECTRONICS (updated 20140228)\r\n ma.setManufacturer(\"Samsung\");\r\n else if (uid[1] == (byte) 0x0F) //HUYNDAI ELECTRONICS (updated 20140228)\r\n ma.setManufacturer(\"Hyundai\");\r\n else if (uid[1] == (byte) 0x10) //LG SEMICONDUCTORS (updated 20140228)\r\n ma.setManufacturer(\"LG\");\r\n else\r\n ma.setManufacturer(\"Unknown manufacturer\");\r\n\r\n if (uid[1] == (byte) 0x02) {\r\n //**** PRODUCT NAME *****\r\n if (uid[2] >= (byte) 0x04 && uid[2] <= (byte) 0x07) {\r\n ma.setProductName(\"LRI512\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x14 && uid[2] <= (byte) 0x17) {\r\n ma.setProductName(\"LRI64\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x20 && uid[2] <= (byte) 0x23) {\r\n ma.setProductName(\"LRI2K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x28 && uid[2] <= (byte) 0x2B) {\r\n ma.setProductName(\"LRIS2K\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x2C && uid[2] <= (byte) 0x2F) {\r\n ma.setProductName(\"M24LR64\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x40 && uid[2] <= (byte) 0x43) {\r\n ma.setProductName(\"LRI1K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x44 && uid[2] <= (byte) 0x47) {\r\n ma.setProductName(\"LRIS64K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x48 && uid[2] <= (byte) 0x4B) {\r\n ma.setProductName(\"M24LR01E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x4C && uid[2] <= (byte) 0x4F) {\r\n ma.setProductName(\"M24LR16E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x50 && uid[2] <= (byte) 0x53) {\r\n ma.setProductName(\"M24LR02E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x54 && uid[2] <= (byte) 0x57) {\r\n ma.setProductName(\"M24LR32E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x58 && uid[2] <= (byte) 0x5B) {\r\n ma.setProductName(\"M24LR04E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x5C && uid[2] <= (byte) 0x5F) {\r\n ma.setProductName(\"M24LR64E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x60 && uid[2] <= (byte) 0x63) {\r\n ma.setProductName(\"M24LR08E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x64 && uid[2] <= (byte) 0x67) {\r\n ma.setProductName(\"M24LR128E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x6C && uid[2] <= (byte) 0x6F) {\r\n ma.setProductName(\"M24LR256E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0xF8 && uid[2] <= (byte) 0xFB) {\r\n ma.setProductName(\"detected product\");\r\n ma.setBasedOnTwoBytesAddress(true);\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n }\r\n\r\n //*** DSFID ***\r\n ma.setDsfid(Helper.ConvertHexByteToString(GetSystemInfoResponse[10]));\r\n\r\n //*** AFI ***\r\n ma.setAfi(Helper.ConvertHexByteToString(GetSystemInfoResponse[11]));\r\n\r\n //*** MEMORY SIZE ***\r\n if (ma.isBasedOnTwoBytesAddress()) {\r\n String temp = new String();\r\n temp += Helper.ConvertHexByteToString(GetSystemInfoResponse[13]);\r\n temp += Helper.ConvertHexByteToString(GetSystemInfoResponse[12]);\r\n ma.setMemorySize(temp);\r\n } else\r\n ma.setMemorySize(Helper.ConvertHexByteToString(GetSystemInfoResponse[12]));\r\n\r\n //*** BLOCK SIZE ***\r\n if (ma.isBasedOnTwoBytesAddress())\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[14]));\r\n else\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[13]));\r\n\r\n //*** IC REFERENCE ***\r\n if (ma.isBasedOnTwoBytesAddress())\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[15]));\r\n else\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[14]));\r\n } else {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n //ma.setAfi(\"00 \");\r\n ma.setAfi(Helper.ConvertHexByteToString(GetSystemInfoResponse[11])); //changed 22-10-2014\r\n //ma.setDsfid(\"00 \");\r\n ma.setDsfid(Helper.ConvertHexByteToString(GetSystemInfoResponse[10])); //changed 22-10-2014\r\n //ma.setMemorySize(\"FF \");\r\n ma.setMemorySize(Helper.ConvertHexByteToString(GetSystemInfoResponse[12])); //changed 22-10-2014\r\n //ma.setBlockSize(\"03 \");\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[13])); //changed 22-10-2014\r\n //ma.setIcReference(\"00 \");\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[14])); //changed 22-10-2014\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // in case of Inventory OK and Get System Info HS\r\n else if (ma.getTechno() == \"ISO 15693\") {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n ma.setAfi(\"00 \");\r\n ma.setDsfid(\"00 \");\r\n ma.setMemorySize(\"3F \"); //changed 22-10-2014\r\n ma.setBlockSize(\"03 \");\r\n ma.setIcReference(\"00 \");\r\n return true;\r\n }\r\n\r\n //if the tag has returned an error code\r\n else\r\n return false;\r\n\r\n }", "com.polytech.spik.protocol.SpikMessages.Contact getContact();", "public String toString()\n {\n StringBuffer buf = new StringBuffer(\"EASInBandExceptionDescriptor\");\n buf.append(\": rfChannel=\").append(this.exception_RF_channel & 0xFF);\n buf.append(\"; qamFrequency=\").append(this.m_exceptionFrequency / 1000000);\n buf.append(\"; programNumber=0x\").append(Integer.toHexString(this.exception_program_number));\n return buf.toString();\n }", "public void takeEmergencyCallAction() {\n if (PhoneUtils.isInCall(this.mContext)) {\n PhoneUtils.resumeCall(this.mContext);\n return;\n }\n KeyguardUpdateMonitor.getInstance(this.mContext).reportEmergencyCallAction(true);\n this.mContext.startActivityAsUser(INTENT_EMERGENCY_DIAL, ActivityOptions.makeCustomAnimation(this.mContext, 0, 0).toBundle(), new UserHandle(KeyguardUpdateMonitor.getCurrentUser()));\n }", "@Override\n\t public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t if (resultCode == RESULT_OK) {\n\t switch (requestCode) {\n\t case CONTACT_PICKER_RESULT:\n\t // handle contact results\n\t \t \t\n\t \tEmergencyContactInfo emergencyContactInfo = persistEmergencyContactInfo(data);\n\t \tmContactsSection.displayData(emergencyContactInfo);\n\t \t\n\t \t\n\t \tbreak;\n\t }\n\t } else {\n\t // gracefully handle failure\n\t Log.w(\"Ara\", \"Warning: activity result not ok\");\n\t }\n\t }", "public HL7Segment processPV1ToUFD(String pHL7MessageBlock) throws ICANException {\n\n HL7Message aHL7Message = new HL7Message(mHL7Message);\n HL7Segment aPV1Segment = new HL7Segment(\"PV1\");\n\n CodeLookUp aPayClass = new CodeLookUp(\"CSC_PayClass.table\", mFacility, mEnvironment);\n\n\n// Special processing for PV1 segments received in A28 and A31 messages.\n if (aHL7Message.isEvent(\"A28, A31\")) {\n aPV1Segment.set(HL7_23.PV1_1_set_ID, \"1\");\n aPV1Segment.set(HL7_23.PV1_2_patient_class, \"R\");\n aPV1Segment.set(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_facility_ID, mFacility);\n aPV1Segment.set(HL7_23.PV1_18_patient_type, \"R\");\n aPV1Segment.set(HL7_23.PV1_19_visit_number, \"R\".concat(mPatientUR));\n if (mFacility.matches(\"BHH|MAR|PJC|ANG\")) {\n HL7Segment aInPV1Segment = new HL7Segment(aHL7Message.getSegment(HL7_23.PV1));\n String aPV1_8ReferringDoc = aInPV1Segment.get(HL7_23.PV1_8_referring_doctor);\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, aPV1_8ReferringDoc);\n }\n } else { // For all other message types ... i.e. \"A01 to A17\"\n aHL7Message = new HL7Message(pHL7MessageBlock);\n aPV1Segment.setSegment(aHL7Message.getSegment(HL7_23.PV1));\n aPV1Segment.set(HL7_23.PV1_2_patient_class, \"I\");\n\n// Sandringham funny Facility in Room position ....\n if (aPV1Segment.get(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_room).equalsIgnoreCase(\"23\")) {\n aPV1Segment.set(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_room, \"SDMH\");\n }\n if (aPV1Segment.get(HL7_23.PV1_6_prior_patient_location, HL7_23.PL_room).equalsIgnoreCase(\"23\")) {\n aPV1Segment.set(HL7_23.PV1_6_prior_patient_location, HL7_23.PL_room, \"SDMH\");\n }\n aPV1Segment.set(HL7_23.PV1_19_visit_number, \"I\".concat(aPV1Segment.get(HL7_23.PV1_19_visit_number)));\n\n// Translate the Financial Class\n if (mFacility.equalsIgnoreCase(\"BHH\") ||\n mFacility.equalsIgnoreCase(\"MAR\") ||\n mFacility.equalsIgnoreCase(\"ANG\") ||\n mFacility.equalsIgnoreCase(\"PJC\")) {\n\n //aPV1Segment.set(HL7_23.PV1_20_financial_class, aPayClass.getValue(mFacility + \"-\" + aPV1Segment.get(HL7_23.PV1_2_patient_class) + \"-\" + aPV1Segment.get(HL7_23.PV1_20_financial_class)));\n } else {\n aPV1Segment.set(HL7_23.PV1_20_financial_class, aPayClass.getValue(aPV1Segment.get(HL7_23.PV1_20_financial_class)));\n }\n\n\n// Check each of the Dr's have a valid Bayside code\n String aDr;\n// ... Attending Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_7_attending_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_7_attending_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_7_attending_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// ... Refering Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_8_referring_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// ... Consulting Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_9_consulting_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_9_consulting_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_9_consulting_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// Check for CSC sending invalid discharge/admit times of\n aPV1Segment.set(HL7_23.PV1_44_admit_date_time, doValidTimeCheck(aPV1Segment.get(HL7_23.PV1_44_admit_date_time)));\n aPV1Segment.set(HL7_23.PV1_45_discharge_date_time, doValidTimeCheck(aPV1Segment.get(HL7_23.PV1_45_discharge_date_time)));\n }\n return aPV1Segment;\n\n }", "public CWE getAdministeredUnits() { \r\n\t\tCWE retVal = this.getTypedField(7, 0);\r\n\t\treturn retVal;\r\n }", "public String toString()\n {\n StringBuffer buf = new StringBuffer(\"EASMessage\");\n buf.append(\": OOB alert=\").append(isOutOfBandAlert());\n buf.append(\"; sequence_number=\").append(this.sequence_number);\n buf.append(\"; protocol_version=\").append(this.protocol_version);\n buf.append(\"; EAS_event_ID=\").append(this.EAS_event_ID);\n buf.append(\"; EAS_originator_code=\").append(this.EAS_originator_code);\n buf.append(\"; EAS_event_code=\").append(this.EAS_event_code);\n return buf.toString();\n }", "public static String epistemicStatusToString(EpistemicStatus epst) {\n\t\tif (epst instanceof PrivateEpistemicStatus) {\n\t\t\tPrivateEpistemicStatus p = (PrivateEpistemicStatus)epst;\n\t\t\treturn p.agent;\n\t\t}\n\t\tif (epst instanceof AttributedEpistemicStatus) {\n\t\t\tAttributedEpistemicStatus a = (AttributedEpistemicStatus)epst;\n\t\t\tString s = a.agent + \"[\";\n\t\t\tIterator<String> i = a.attribagents.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\ts += i.next();\n\t\t\t\tif (i.hasNext()) s += \",\";\n\t\t\t}\n\t\t\ts += \"]\";\n\t\t\treturn s;\n\t\t}\n\t\tif (epst instanceof SharedEpistemicStatus) {\n\t\t\tSharedEpistemicStatus sh = (SharedEpistemicStatus)epst;\n\t\t\tString s = \"{\";\n\t\t\tIterator<String> i = sh.cgagents.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\ts += i.next();\n\t\t\t\tif (i.hasNext()) s += \",\";\n\t\t\t}\n\t\t\ts += \"}\";\n\t\t\treturn s;\n\t\t}\n\t\treturn \"?\";\n\t}", "public java.lang.String getC660000021()\n {\n return this.c660000021;\n }", "protected static SnacFamilyInfo readSnacFamilyInfo(ByteBlock block) {\n DefensiveTools.checkNull(block, \"block\");\n\n int family = BinaryTools.getUShort(block, 0);\n int version = BinaryTools.getUShort(block, 2);\n int toolid = BinaryTools.getUShort(block, 4);\n int toolver = BinaryTools.getUShort(block, 6);\n\n return new SnacFamilyInfo(family, version, toolid, toolver);\n }", "@Override\n public String getCoup(Echiquier e, List<IPiece> allys, List<IPiece> ennemies, Coord sC) {\n return chessIHM.getCoup(this, sC, ennemies, e);\n }", "int toTelecomDisconnectCauseCode(int telephonyDisconnectCause, int error);", "public void handleShowCMEmergency() {\n this.mIsCMSingleClicking = false;\n updateIndication();\n }", "public java.lang.String getC660000020()\n {\n return this.c660000020;\n }", "CharSequence toTelecomDisconnectCauseDescription(int telephonyDisconnectCause);", "public int getCertainty() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.telephony.SmsCbCmasInfo.getCertainty():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.getCertainty():int\");\n }", "public void setC660000020(java.lang.String c660000020)\n {\n this.c660000020 = c660000020;\n }", "public HL7Segment processPIDToUFD(String pHL7MessageBlock) throws ICANException {\n\n HL7Message aHL7Message = new HL7Message(pHL7MessageBlock);\n HL7Segment aZPDSegment = new HL7Segment(aHL7Message.getSegment(\"ZPD\"));\n HL7Segment aInPID = new HL7Segment(k.NULL);\n HL7Segment aOutPID = new HL7Segment(HL7_23.PID);\n\n HL7Field aTempField;\n String aPID_3_RepeatField[] = new String[5];\n String aPID_11_RepeatField[] = new String[5];\n String aPID_13_RepeatField[] = new String[5];\n int aRepeat = 0;\n aInPID.setSegment(aHL7Message.getSegment(HL7_23.PID));\n\n// Copy all fields indicated in aArray from IN segment ...\n aOutPID.linkTo(aInPID);\n\n String aArray[] = { HL7_23.PID_1_set_ID,\n HL7_23.PID_5_patient_name,\n HL7_23.PID_7_date_of_birth,\n HL7_23.PID_8_sex,\n HL7_23.PID_9_patient_alias,\n HL7_23.PID_10_race,\n HL7_23.PID_12_county_code,\n HL7_23.PID_13_home_phone,\n HL7_23.PID_14_business_phone,\n HL7_23.PID_15_language,\n HL7_23.PID_16_marital_status,\n HL7_23.PID_17_religion,\n HL7_23.PID_18_account_number,\n HL7_23.PID_19_SSN_number,\n HL7_23.PID_21_mothers_ID,\n HL7_23.PID_23_birth_place,\n HL7_23.PID_29_patient_death_date_time,\n HL7_23.PID_30_patient_death_indicator\n };\n aOutPID.copyFields(aArray);\n\n// Check patient death date is not less than patient birth date\n\n String aPatientDeathDateTime = aOutPID.get(HL7_23.PID_29_patient_death_date_time);\n if (aPatientDeathDateTime.length() > 2) {\n int aBirthDate = Integer.parseInt(aOutPID.get(HL7_23.PID_7_date_of_birth).substring(0, 8));\n int aDeathDate = Integer.parseInt(aPatientDeathDateTime.substring(0, 8));\n if (aDeathDate < aBirthDate) {\n throw new ICANException(\"F010\", mEnvironment);\n }\n }\n\n// ... make certain it gets a Set ID.\n if ( aInPID.isEmpty(HL7_23.PID_1_set_ID))\n aOutPID.setField(\"1\", HL7_23.PID_1_set_ID);\n\n// Patient UR Number\n if (! aInPID.isEmpty(HL7_23.PID_3_patient_ID_internal, HL7_23.CX_ID_number)) {\n aTempField = new HL7Field(aInPID.get(HL7_23.PID_3_patient_ID_internal));\n aTempField.setSubField(\"PI\",HL7_23.CX_ID_type_code );\n aPID_3_RepeatField[aRepeat++] = aTempField.getField();\n mPatientUR = aInPID.get(HL7_23.PID_3_patient_ID_internal, HL7_23.CX_ID_number);\n }\n// Patient Sex Indeterminate = Unknown\n if (aOutPID.get(HL7_23.PID_8_sex).equalsIgnoreCase(\"I\")) {\n aOutPID.set(HL7_23.PID_8_sex, \"U\");\n }\n\n// Correct the Rabbi prefix\n if (aOutPID.get(HL7_23.PID_5_patient_name, HL7_23.XPN_prefix).equalsIgnoreCase(\"RAB\")) {\n aOutPID.set(HL7_23.PID_5_patient_name, HL7_23.XPN_prefix, \"Rabbi\");\n }\n if (aOutPID.get(HL7_23.PID_9_patient_alias, HL7_23.XPN_prefix).equalsIgnoreCase(\"RAB\")) {\n aOutPID.set(HL7_23.PID_9_patient_alias, HL7_23.XPN_prefix, \"Rabbi\");\n }\n\n// Pension Number and Mental Health ID\n if (! aInPID.isEmpty(HL7_23.PID_4_alternate_patient_ID, HL7_23.CX_ID_number)) {\n String aField[] = aInPID.getRepeatFields(HL7_23.PID_4_alternate_patient_ID);\n int n;\n\n for (n = 0; n < aField.length; n++) {\n aTempField = new HL7Field(aField[n]);\n if (aTempField.getSubField(HL7_23.CX_ID_type_code).equalsIgnoreCase(\"PE\")) {\n aTempField.setSubField(\"PEN\",HL7_23.CX_ID_type_code );\n aTempField.setSubField(\"PEN\",HL7_23.CX_assigning_authority );\n aPID_3_RepeatField[aRepeat++] = aTempField.getField();\n\n } else\n if (aTempField.getSubField(HL7_23.CX_ID_type_code).equalsIgnoreCase(\"MH\")) {\n aTempField.setSubField(\"MH\",HL7_23.CX_ID_type_code );\n aTempField.setSubField(\"MHN\",HL7_23.CX_assigning_authority );\n aPID_3_RepeatField[aRepeat++] = aTempField.getField();\n cMentalHealthID = aTempField.getSubField(HL7_23.CX_ID_number);\n }\n\n }\n }\n\n// Medicare Number\n if (! aInPID.isEmpty(HL7_23.PID_19_SSN_number, HL7_23.CX_ID_number)) {\n aTempField = new HL7Field(aInPID.get(HL7_23.PID_19_SSN_number));\n } else {\n aTempField = new HL7Field(\"C-U\");\n }\n aTempField.setSubField(\"MC\",HL7_23.CX_ID_type_code );\n aTempField.setSubField(\"HIC\",HL7_23.CX_assigning_authority );\n aPID_3_RepeatField[aRepeat++] = aTempField.getField();\n\n// DVA Number\n if (!aInPID.isEmpty(HL7_23.PID_27_veterans_military_status, HL7_23.CX_ID_number) &&\n !aInPID.get(HL7_23.PID_27_veterans_military_status).equalsIgnoreCase(\"\\\"\\\"\")) {\n aTempField = new HL7Field(aInPID.get(HL7_23.PID_27_veterans_military_status, HL7_23.CX_ID_number));\n aTempField.setSubField(\"VA\",HL7_23.CX_ID_type_code );\n aTempField.setSubField(\"DVA\",HL7_23.CX_assigning_authority );\n aPID_3_RepeatField[aRepeat++] = aTempField.getField();\n }\n\n aOutPID.setRepeatFields(HL7_23.PID_3_patient_ID_internal, aPID_3_RepeatField);\n\n// Patients Address\n HL7Field aPID11Field = new HL7Field();\n HL7Field aPIDTmpField = new HL7Field();\n String aPID11Array[] = aInPID.getRepeatFields(HL7_23.PID_11_patient_address);\n// String aStateDesc = \"\";\n aRepeat = 0;\n int i;\n for (i=0; i < aPID11Array.length; i++) {\n aPIDTmpField = new HL7Field(aPID11Array[i]);\n aPID11Field.setSubField(aPIDTmpField.getSubField(HL7_23.XAD_street_1),HL7_23.XAD_street_1);\n aPID11Field.setSubField(aPIDTmpField.getSubField(HL7_23.XAD_street_2),HL7_23.XAD_street_2);\n aPID11Field.setSubField(aPIDTmpField.getSubField(HL7_23.XAD_city),HL7_23.XAD_city);\n\n //Norman Soh: Process State description based on PostCode\n// String aPostCodeStr = aPIDTmpField.getSubField(HL7_23.XAD_zip);\n// if (aPostCodeStr.length() > 0) {\n// try {\n// int aPostCode = Integer.parseInt(aPostCodeStr);\n// if (aPostCode >= 800 && aPostCode <= 899) {\n// aStateDesc = \"NT\";\n// } else if ((aPostCode >= 200 && aPostCode <= 299) ||\n// (aPostCode >= 2600 && aPostCode <= 2619) ||\n// (aPostCode >= 2900 && aPostCode <= 2920)) {\n// aStateDesc = \"ACT\";\n// } else if ((aPostCode >= 1000 && aPostCode <= 2599) ||\n// (aPostCode >= 2620 && aPostCode <= 2899) ||\n// (aPostCode >= 2921 && aPostCode <= 2999)) {\n// aStateDesc = \"NSW\";\n// } else if ((aPostCode >= 3000 && aPostCode <= 3999) ||\n// (aPostCode >= 8000 && aPostCode <= 8999)) {\n// aStateDesc = \"VIC\";\n// } else if (aPostCode == 8888) {\n// aStateDesc = \"OVERSEAS\";\n// } else if (aPostCode == 9990 || aPostCode == 9988) {\n// aStateDesc = \"\";\n// } else if ((aPostCode >= 4000 && aPostCode <= 4999) ||\n// (aPostCode >= 9000 && aPostCode <= 9799)) {\n// aStateDesc = \"QLD\";\n// } else if (aPostCode >= 5000 && aPostCode <= 5999) {\n// aStateDesc = \"SA\";\n// } else if (aPostCode >= 6000 && aPostCode <= 6999) {\n// aStateDesc = \"WA\";\n// } else if (aPostCode >= 7000 && aPostCode <= 7999) {\n// aStateDesc = \"TAS\";\n// }\n// aPID11Field.setSubField(aStateDesc, HL7_23.XAD_state_or_province);\n// } catch (Exception e) {\n// //Do nothing, postcode is not entered or is invalid\n// }\n// }\n //\n\n if (aPIDTmpField.getSubField(HL7_23.XAD_zip).equalsIgnoreCase(\"8888\")){\n aPID11Field.setSubField(\"OVERSEAS\", HL7_23.XAD_state_or_province);\n } else {\n aPID11Field.setSubField(aPIDTmpField.getSubField(HL7_23.XAD_state_or_province), HL7_23.XAD_state_or_province);\n }\n\n aPID11Field.setSubField(aPIDTmpField.getSubField(HL7_23.XAD_zip),HL7_23.XAD_zip);\n aPID11Field.setSubField(aPIDTmpField.getSubField(HL7_23.XAD_country),HL7_23.XAD_country);\n aPID11Field.setSubField(aPIDTmpField.getSubField(HL7_23.XAD_type),HL7_23.XAD_type);\n aPID11Field.setSubField(aPIDTmpField.getSubField(HL7_23.XAD_geographic_designation),HL7_23.XAD_geographic_designation);\n aPID11Field.setSubField(aPIDTmpField.getSubField(HL7_23.XAD_county_parish),HL7_23.XAD_county_parish);\n\n aPID_11_RepeatField[aRepeat++] = aPID11Field.getField();\n if (aRepeat == 4) {\n break;\n }\n }\n aOutPID.setRepeatFields(HL7_23.PID_11_patient_address, aPID_11_RepeatField);\n\n//Get first home phone number only\n if (! aZPDSegment.isEmpty(CSC_23.ZPD_12_Personal_Contact_Data_Phone_Numbers)) {\n String aZPD12Array[] = aZPDSegment.getRepeatFields(CSC_23.ZPD_12_Personal_Contact_Data_Phone_Numbers);\n HL7Field aPID13Field = new HL7Field();\n String aPID13Array[] = aZPDSegment.getRepeatFields(CSC_23.ZPD_12_Personal_Contact_Data_Phone_Numbers);\n HL7Field aPID14Field = new HL7Field();\n\n HL7Field aZPDField;\n\n HL7Field aTmpField = new HL7Field();\n aRepeat = 0;\n\n for (i=0; i < aZPD12Array.length; i++) {\n aZPDField = new HL7Field(aZPD12Array[i]);\n if (aZPDField.getSubField(HL7_23.XTN_telecom_use).equalsIgnoreCase(\"PRN\")) {\n aPID13Field.setSubField(aZPDField.getSubField(HL7_23.XTN_telephone_number), HL7_23.XTN_telephone_number);\n if (aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"H\") ||\n aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"R\") ||\n aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"P\") ||\n aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"RES\") ||\n aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"POB\") ||\n aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"PR1\") ||\n aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"PR2\")) {\n aPID13Field.setSubField(\"PRN\", HL7_23.XTN_telecom_use); // Home Phone\n } else {\n aPID13Field.setSubField(\"ORN\", HL7_23.XTN_telecom_use); // Overseas Phone Number\n }\n\n aPID_13_RepeatField[aRepeat++] = aPID13Field.getField();\n if (aRepeat == 4) {\n break;\n }\n }\n\n if (aZPDField.getSubField(HL7_23.XTN_telecom_use).equalsIgnoreCase(\"WPN\")) {\n //aPID14Field.setSubField(aZPDField.getSubField(HL7_23.XTN_telephone_number), HL7_23.XTN_telephone_number);\n if (aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"H\") ||\n aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"R\") ||\n aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"P\") ||\n aZPDField.getSubField(HL7_23.XTN_comment).equalsIgnoreCase(\"RES\")) {\n aPID14Field.setSubField(aZPDField.getSubField(HL7_23.XTN_telephone_number), HL7_23.XTN_telephone_number);\n aPID14Field.setSubField(\"WPN\", HL7_23.XTN_telecom_use); // Business Phone\n }\n }\n }\n if (aRepeat > 0) {\n aOutPID.setRepeatFields(HL7_23.PID_13_home_phone, aPID_13_RepeatField);\n }\n aOutPID.setField(aPID14Field.getField(), HL7_23.PID_14_business_phone);\n\n }\n return aOutPID;\n }", "public void setLegacyCategory(String legacyCategory) {\n this.legacyCategory = legacyCategory;\n }", "@Override\n\tpublic String toCLPInfo() {\n\t\treturn null;\n\t}", "public kr.pik.message.Profile.Contact getContact() {\n kr.pik.message.Profile.Contact result = kr.pik.message.Profile.Contact.valueOf(contact_);\n return result == null ? kr.pik.message.Profile.Contact.UNRECOGNIZED : result;\n }", "public StateEbo getOffCampusState() {\n if ( StringUtils.isBlank(KFSConstants.COUNTRY_CODE_UNITED_STATES ) || StringUtils.isBlank(offCampusStateCode) ) {\n offCampusState = null;\n } else {\n if ( offCampusState == null || !StringUtils.equals( offCampusState.getCountryCode(), KFSConstants.COUNTRY_CODE_UNITED_STATES)|| !StringUtils.equals( offCampusState.getCode(), offCampusStateCode)) {\n ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(StateEbo.class);\n if ( moduleService != null ) {\n Map<String,Object> keys = new HashMap<String, Object>(2);\n keys.put(LocationConstants.PrimaryKeyConstants.COUNTRY_CODE, offCampusCountryCode);\n keys.put(LocationConstants.PrimaryKeyConstants.CODE, offCampusStateCode);\n offCampusState = moduleService.getExternalizableBusinessObject(StateEbo.class, keys);\n } else {\n throw new RuntimeException( \"CONFIGURATION ERROR: No responsible module found for EBO class. Unable to proceed.\" );\n }\n }\n }\n \n return offCampusState;\n }", "public java.lang.String getC660000022()\n {\n return this.c660000022;\n }", "public CWE getRxa7_AdministeredUnits() { \r\n\t\tCWE retVal = this.getTypedField(7, 0);\r\n\t\treturn retVal;\r\n }", "public CWE[] getRxa17_SubstanceManufacturerName() {\r\n \tCWE[] retVal = this.getTypedField(17, new CWE[0]);\r\n \treturn retVal;\r\n }", "CharSequence toTelecomDisconnectCauseLabel(int telephonyDisconnectCause);", "public java.lang.String getStudent_contactEmail() {\n\t\treturn _primarySchoolStudent.getStudent_contactEmail();\n\t}", "public Map<Integer, EngineSpecifications> getMapOfEngineDisplacementCC() {\n\t\tengineDisplacementCCMap = new HashMap<>();\n\n\t\tfor (int i = 0; i < engineDisplacementCC.size(); i++) {\n\t\t\tengineDisplacementCCMap.put(engineDisplacementCC.get(i), engineTypeForEngineDisplacementCC.get(i));\n\t\t}\n\n\t\treturn engineDisplacementCCMap;\n\t}", "public void callHelp() {\n System.out.println(\"Enter emergency number: \");\n String emergencyNeed = input.nextLine();\n this.emergencyNeed = emergencyNeed;\n if (emergencyNeed.equals(police)) {\n System.out.println(\"Calling for police!\");\n }\n else if (emergencyNeed.equals(fire)) {\n System.out.println(\"Calling for fire department!\");\n }\n else if (emergencyNeed.equals(emt)) {\n System.out.println(\"Calling for emt!\");\n }\n else {\n System.out.println(\"Invalid emergency number.\");\n }\n }", "public void setCauseOfNoId(java.lang.Short causeOfNoId) {\r\n this.causeOfNoId = causeOfNoId;\r\n }", "public static ApplicantContactInfo createEntity(EntityManager em) {\n ApplicantContactInfo applicantContactInfo = new ApplicantContactInfo()\n .applicantsHomeAddress(DEFAULT_APPLICANTS_HOME_ADDRESS)\n .telephoneNumber(DEFAULT_TELEPHONE_NUMBER)\n .email(DEFAULT_EMAIL)\n .employer(DEFAULT_EMPLOYER)\n .employersAddress(DEFAULT_EMPLOYERS_ADDRESS);\n return applicantContactInfo;\n }", "private static String m21400e() {\n try {\n return new BufferedReader(new FileReader(new File(\"/sys/class/net/wlan0/address\"))).readLine();\n } catch (Throwable th) {\n C5205o.m21464a(th);\n return \"02:00:00:00:00:00\";\n }\n }", "public static WTChangeOrder2 getChangeNoticeByNumber(String sCNNumber) throws WTException \r\n\t{\n\t QuerySpec qs = new QuerySpec(WTChangeOrder2.class);\r\n\t SearchCondition condition = new SearchCondition(WTChangeOrder2.class, WTChangeOrder2.NUMBER, SearchCondition.EQUAL, sCNNumber);\r\n\t qs.appendWhere(condition, new int[]{0});\r\n\t QueryResult qr = PersistenceHelper.manager.find((StatementSpec)qs);\r\n\t WTChangeOrder2 cn = null;\r\n\t WTChangeOrder2 cn2 = null;\r\n\t\twhile(qr.hasMoreElements())\r\n\t\t{\r\n\t\t\tcn = (WTChangeOrder2)qr.nextElement();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tif(cn != null)\r\n\t\t{\r\n\t\t\tQueryResult qr2 = VersionControlHelper.service.allVersionsOf(cn);\r\n\t\t\tcn2= (WTChangeOrder2)qr2.nextElement();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn cn2;\r\n\t}", "public Map<Integer, SystemMessage> getSystemMessages(){\n\t\treturn hmSysMsg;\n\t}", "public static IndContactChar createUpdatedEntity(EntityManager em) {\n IndContactChar indContactChar = new IndContactChar()\n .type(UPDATED_TYPE)\n .streetOne(UPDATED_STREET_ONE)\n .streetTwo(UPDATED_STREET_TWO)\n .city(UPDATED_CITY)\n .stateOrProvince(UPDATED_STATE_OR_PROVINCE)\n .country(UPDATED_COUNTRY)\n .postCode(UPDATED_POST_CODE)\n .phoneNumber(UPDATED_PHONE_NUMBER)\n .emailAddress(UPDATED_EMAIL_ADDRESS)\n .faxNumber(UPDATED_FAX_NUMBER)\n .latitude(UPDATED_LATITUDE)\n .longitude(UPDATED_LONGITUDE)\n .svContactId(UPDATED_SV_CONTACT_ID)\n .isEmailValid(UPDATED_IS_EMAIL_VALID)\n .isAddressValid(UPDATED_IS_ADDRESS_VALID)\n .indConId(UPDATED_IND_CON_ID);\n return indContactChar;\n }", "public String getCause() {\n return cause;\n }" ]
[ "0.60359293", "0.5340732", "0.5299916", "0.50239855", "0.49329966", "0.4829148", "0.47530863", "0.4739942", "0.47302985", "0.4685911", "0.46713382", "0.46065208", "0.4560652", "0.45500216", "0.45362163", "0.45241657", "0.45141834", "0.44529936", "0.44276467", "0.44002813", "0.43925786", "0.43587238", "0.43234113", "0.43181217", "0.43156308", "0.43063986", "0.42918438", "0.42618412", "0.42590806", "0.423795", "0.4237763", "0.4234134", "0.42304102", "0.42120352", "0.42099118", "0.42000538", "0.41991758", "0.41958576", "0.4186164", "0.41847968", "0.4178051", "0.41765893", "0.4174968", "0.41710818", "0.4157856", "0.41578457", "0.41578233", "0.41543993", "0.41512424", "0.4151105", "0.41408968", "0.41382825", "0.41380036", "0.41094685", "0.410871", "0.40993354", "0.4098446", "0.4098277", "0.40972337", "0.40872273", "0.40819028", "0.4080042", "0.40709934", "0.40693283", "0.40691927", "0.40691525", "0.40605986", "0.4060383", "0.40600267", "0.4051226", "0.4040337", "0.4038354", "0.40322936", "0.40256345", "0.40192065", "0.4015843", "0.40065295", "0.40050468", "0.40016583", "0.39975327", "0.39928508", "0.39907286", "0.39884743", "0.39879295", "0.3987786", "0.3981979", "0.3979997", "0.3977678", "0.3976268", "0.39735845", "0.3971055", "0.39618564", "0.39441594", "0.39432055", "0.39370134", "0.3936839", "0.39285332", "0.3928157", "0.3927066", "0.3926211" ]
0.4684864
10
This routine converts referral codes from PeopleSoft to legacy system.
private static HashMap<String, Object> fetchReferralRecruitmentData(HashMap<String, Object> parameterMap) { //BEGIN-PROCEDURE HR05-GET-REFERRAL-SOURCE PsPersonalApplicantReferral psReferralSource = PsPersonalApplicantReferral.findByEmployeeIdAndEffectiveDate((String)parameterMap.get("employeeId"), (Date)parameterMap.get("effectiveDate")); //PS_PERS_APPL_REF BigInteger referralSourceId = psReferralSource.getSourceId(); PsRecruitmentSource psRecruitmentSource = PsRecruitmentSource.findBySourceId(referralSourceId); //PS_HRS_SOURCE_I String referralSourceDescription = psRecruitmentSource.getSourceDescription(); // PsRecruitmentSource psRecruitmentSource = PsRecruitmentSource.findByRecruitmentSourceId(recruitmentSourceId); //PS_HRS_SOURCE_I //LET $PSRecruit_Source_Code = LTRIM(RTRIM(&CHSI2.HRS_SOURCE_NAME,' '),' ') String referralSourceName = psRecruitmentSource.getSourceName(); String psSpecificReferralSource = ""; //DO HR05-FORMAT-REFERRAL-SOURCE //BEGIN-PROCEDURE HR05-FORMAT-REFERRAL-SOURCE //Let $Found = 'N' !Initialize the found indicator //!Based on the value in the PeopleSoft Recruit Source Code assign the //!corresponding legacy system code that will be passed. //Let $PSReferral_Source = &CPT101.ZHRF_LEGRECRUITSRC String referralSource = CrossReferenceReferralSource.findActiveLegacyRecruiterSourceByReferralSource(referralSourceName); //PS_ZHRT_RFSRC_CREF //IF ($Found = 'N') if(referralSource == null) { //LET $PSReferral_Source = ' ' referralSource = ""; //IF $PSRecruit_Source_Code = ' ' !If the Referral Source code was not entered in PS if(referralSourceName == null || referralSourceName.isEmpty()) { parameterMap.put("errorProgram", "ZHRI105A"); //LET $ErrorMessageParm = 'Referral source not selected in PeopleSoft.' parameterMap.put("errorMessage", "Referral source not selected in PeopleSoft."); //DO Prepare-Error-Parms ! JHV 09/11/02 fix Date Mask error ZHR_PRDSPT_INTF_ERROR //DO Call-Error-Routine !From ZHRI100A.SQR Main.doErrorCommand(parameterMap); } //ELSE else { //LET $PSSpecific_Refer_Src = SUBSTR($PSRefSourceDescr,1,35) psSpecificReferralSource = referralSourceDescription; // PSSpecific_Refer_Src = PSRefSourceDescr; //END-IF !$PSRecruit_Source_Code = ' ' } //END-IF !$Found = 'N' } //!Make sure not less than 35 long //LET $PSSpecific_Refer_Src = SUBSTR($PSRefSourceDescr,1,35) //TODO: //LET $PSSpecific_Refer_Src = RPAD($PSSpecific_Refer_Src,35,' ') psSpecificReferralSource = psSpecificReferralSource.substring(0, 35); String recruitmentSourceId = psRecruitmentSource.getSourceDescription(); if(recruitmentSourceId != null) { recruitmentSourceId = recruitmentSourceId.trim(); recruitmentSourceId = String.format("%1$-35s", recruitmentSourceId); } parameterMap.put("recruitmentSourceId", recruitmentSourceId); //END-PROCEDURE HR05-FORMAT-REFERRAL-SOURCE //Let $PSReferralSource = LTRIM(RTRIM(&CHSI2.HRS_SOURCE_NAME,' '),' ') // String PSReferralSource = psRecruitmentSource.getSourceName(); //END-PROCEDURE HR05-GET-REFERRAL-SOURCE referralSource = referralSource != null ? referralSource.trim() : referralSource; parameterMap.put("referralSource", referralSource); return parameterMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String doDrTranslate(String pDrCode) {\n\n byte[] aCode = pDrCode.getBytes();\n String aDrCode = pDrCode;\n\n if (aCode.length == 5 && !mFacility.matches(\"BHH|PJC|MAR|ANG\")) {\n int i;\n for (i = 1; i < aCode.length; i++) {\n if ((i == 1 || i == 2) && (aCode[i] < 'A' || aCode[i] > 'Z')) { // Check for \"aa\" part of format\n aDrCode = k.NULL ;\n } else if ((i == 3 || i == 4 || i==5) && (aCode[i] < '0' || aCode[i] > '9')) { // Check for \"nnn\" part of format\n aDrCode = k.NULL ;\n }\n }\n return pDrCode;\n\n } else {\n if (mFacility.equalsIgnoreCase(\"SDMH\")) {\n CodeLookUp aSDMHDrTranslate = new CodeLookUp(\"Dr_Translation.table\", \"SDMH\", mEnvironment);\n aDrCode = aSDMHDrTranslate.getValue(pDrCode);\n\n if (aDrCode.length() == 5 ) {\n aDrCode = k.NULL;\n }\n } else if (mFacility.equalsIgnoreCase(\"CGMC\")) {\n if (! pDrCode.equalsIgnoreCase(\"UNK\")) {\n aDrCode = k.NULL ;\n }\n } else if (mFacility.equalsIgnoreCase(\"ALF\")) {\n aDrCode = k.NULL ;\n } else {\n //covers eastern health systems\n aDrCode = pDrCode;\n }\n }\n return aDrCode;\n\n }", "public MaintenanceRechargeCode convertMaintenanceRechargeCode(String code){\n\t\tList<MaintenanceRechargeCode> maintRechargeCodes = lookupCacheService.getMaintenanceRechargeCodes();\n\t\tMaintenanceRechargeCode maintRechargeCode = null;\n\t\t\n\t\tfor(MaintenanceRechargeCode mrc : maintRechargeCodes){\n\t\t\tif(mrc.getCode().equals(code)){\n\t\t\t\tmaintRechargeCode = mrc;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn maintRechargeCode;\t\t\n\t}", "private static int convertLegacyAfMode(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.hardware.camera2.legacy.LegacyResultMapper.convertLegacyAfMode(java.lang.String):int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.camera2.legacy.LegacyResultMapper.convertLegacyAfMode(java.lang.String):int\");\n }", "private static final String m2193f() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"fb\");\n stringBuilder.append(C0560t.m1253e());\n stringBuilder.append(\"://authorize\");\n return stringBuilder.toString();\n }", "private void fixupLanguageCodes() {\n long timer = -System.currentTimeMillis();\n\n // Hack to fix ssl1->sil. If we ever have more, abstract this a bit more.\n String from = \"ssl1\";\n String to = \"sil\";\n RFC3066LanguageCode abstractLanguageCode = new RFC3066LanguageCode(to);\n MetadataValue<RFC3066LanguageCode> abstractMetadataLanguageCode = new MetadataValue<>(\n abstractLanguageCode);\n\n Transaction transaction = this.store.newTransaction();\n Collection<AudioItem> items = this.store.getAudioItems();\n int itemsFixed = 0;\n\n boolean success = false;\n try {\n for (AudioItem audioItem : items) {\n if (audioItem.getLanguageCode().equalsIgnoreCase(from)) {\n audioItem.getMetadata().putMetadataField(DC_LANGUAGE, abstractMetadataLanguageCode);\n transaction.add(audioItem);\n itemsFixed++;\n }\n }\n if (transaction.size() > 0) {\n transaction.commit();\n } else {\n transaction.rollback();\n }\n success = true;\n } catch (IOException e1) {\n e1.printStackTrace();\n } finally {\n if (!success) {\n try {\n transaction.rollback();\n } catch (IOException e) {\n LOG.log(Level.SEVERE, \"Unable to rollback transaction.\", e);\n }\n }\n }\n\n timer += System.currentTimeMillis();\n // If we did anything, or if the delay was perceptable (1/10th second), show the time.\n if (itemsFixed > 0 || timer > 100) {\n System.out.printf(\"Took %d ms to fix %d language codes%n\", timer, itemsFixed);\n }\n }", "private String setReferralzz(){\n String uid = mAuth.getCurrentUser().getUid();\n String link = INVITE_LINK+uid;\n FIRDynamicLinkComponents referalLink = new FIRDynamicLinkComponents(new NSURL(link) ,\"https://fingertipsandcompany.page.link\");\n\n FIRDynamicLinkIOSParameters iOSParameters = new FIRDynamicLinkIOSParameters(BUNDLE_ID);\n iOSParameters.setMinimumAppVersion(\"1.0.1\");\n iOSParameters.setAppStoreID(\"1496752335\");\n referalLink.setIOSParameters(iOSParameters);\n\n FIRDynamicLinkAndroidParameters androidParameters = new FIRDynamicLinkAndroidParameters(BUNDLE_ID);\n androidParameters.setMinimumVersion(125);\n referalLink.setAndroidParameters(androidParameters);\n\n\n referalLink.shorten(new VoidBlock3<NSURL, NSArray<NSString>, NSError>() {\n @Override\n public void invoke(NSURL shortURL, NSArray<NSString> nsStrings, NSError nsError) {\n if (nsError != null){\n System.out.println(\"Referal Link Shorter Error-------------------->\"+nsError);\n return;\n }\n mInvitationURL = shortURL.getAbsoluteString();\n System.out.println(\"Generated Referral Link \");\n\n }\n });\n\n return mInvitationURL;\n\n }", "private String processAsDynamic(String legacy) {\n return legacy.replaceAll(\"@\", \"#\");\n }", "private static synchronized String translateGuid(String anonimizedPatientId, String oldGuid) {\r\n \r\n String newGuid = guidHistory.get(new Guid(anonimizedPatientId, oldGuid));\r\n if (newGuid == null) {\r\n try {\r\n newGuid = UMROGUID.getUID();\r\n // This should always be true\r\n if (newGuid.startsWith(UMROGUID.UMRO_ROOT_GUID)) {\r\n newGuid = rootGuid + newGuid.substring(UMROGUID.UMRO_ROOT_GUID.length());\r\n }\r\n \r\n guidHistory.put(new Guid(anonimizedPatientId, oldGuid), newGuid);\r\n } catch (UnknownHostException e) {\r\n Log.get().logrb(Level.SEVERE, Anonymize.class.getCanonicalName(),\r\n \"translateGuid\", null, \"UnknownHostException Unable to generate new GUID\", e);\r\n }\r\n }\r\n return newGuid;\r\n }", "private static int convertLegacyAwbMode(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.hardware.camera2.legacy.LegacyResultMapper.convertLegacyAwbMode(java.lang.String):int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.camera2.legacy.LegacyResultMapper.convertLegacyAwbMode(java.lang.String):int\");\n }", "public CostAvoidanceReason convertCostAvoidanceReason(String code){\n\t\tList<CostAvoidanceReason> costAvoidanceReasons = lookupCacheService.getCostAvoidanceReasons();\n\t\tCostAvoidanceReason costAvoidanceReason = null;\n\t\t\n\t\tfor(CostAvoidanceReason reason : costAvoidanceReasons){\n\t\t\tif(reason.getCode().equals(code)){\n\t\t\t\tcostAvoidanceReason = reason;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn costAvoidanceReason;\t\t\n\t}", "public static String convert(String paramString)\n/* */ {\n/* 2703 */ if (paramString == null) {\n/* 2704 */ return null;\n/* */ }\n/* */ \n/* 2707 */ int i = -1;\n/* 2708 */ StringBuffer localStringBuffer = new StringBuffer();\n/* 2709 */ UCharacterIterator localUCharacterIterator = UCharacterIterator.getInstance(paramString);\n/* */ \n/* 2711 */ while ((i = localUCharacterIterator.nextCodePoint()) != -1) {\n/* 2712 */ switch (i) {\n/* */ case 194664: \n/* 2714 */ localStringBuffer.append(corrigendum4MappingTable[0]);\n/* 2715 */ break;\n/* */ case 194676: \n/* 2717 */ localStringBuffer.append(corrigendum4MappingTable[1]);\n/* 2718 */ break;\n/* */ case 194847: \n/* 2720 */ localStringBuffer.append(corrigendum4MappingTable[2]);\n/* 2721 */ break;\n/* */ case 194911: \n/* 2723 */ localStringBuffer.append(corrigendum4MappingTable[3]);\n/* 2724 */ break;\n/* */ case 195007: \n/* 2726 */ localStringBuffer.append(corrigendum4MappingTable[4]);\n/* 2727 */ break;\n/* */ default: \n/* 2729 */ UTF16.append(localStringBuffer, i);\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* 2734 */ return localStringBuffer.toString();\n/* */ }", "static void m1376e(Context context, String str) {\n String m = m1377m(str, \"conv\");\n if (m != null && m.length() > 0) {\n Yl.put(m, str);\n cy.m1453a(context, \"gtm_click_referrers\", m, str);\n }\n }", "public String convertWordOrPhoneme(String wordToConvert, String wordType,\n String legacyPhoneme) {\n String wordCurrentPhonemes = \"\";\n WordType type = WordType.getWordType(wordType);\n\n if (type == WordType.URL) {\n wordCurrentPhonemes = processAsUrl(wordToConvert);\n } else if (type == WordType.PRONUNCIATION) {\n wordCurrentPhonemes = processAsPronunciation(legacyPhoneme);\n } else if (type == WordType.DYNAMIC) {\n wordCurrentPhonemes = processAsDynamic(legacyPhoneme);\n } else {\n // A SUBSTITUTION/DYNAMIC/UNKNOWN\n wordCurrentPhonemes = wordToConvert;\n }\n\n return wordCurrentPhonemes;\n }", "private String m81844c(String str) {\n Uri uri;\n String a = UrlUtil.m84494a(this.f58071c, str);\n return (!TextUtils.isEmpty(a) || (uri = this.f58072d) == null) ? a : UrlUtil.m84494a(uri, str);\n }", "private static String getFixContactPhone(String field13Old) {\n\t\tString[] field13NewArray = new String[NUMBER_PID_SEQ];\n\t\tint i = 0;\n\t\tString[] field13OldTokenizer = field13Old.split(\"\\\\\" + COMPONENT_SEPARATOR);\n\t\tfor (String component : field13OldTokenizer) {\n\t\t\tfield13NewArray[i] = component;\n\t\t\ti++;\n\t\t}\n\t\tif (!StringUtils.isEmpty(field13NewArray[7 - 1])) {\n\t\t\tfield13NewArray[12 - 1] = field13NewArray[7 - 1];\n\t\t\tfield13NewArray[7 - 1] = StringUtils.EMPTY;\n\t\t}\n\t\tStringBuilder field13New = new StringBuilder();\n\t\tfor (String field : field13NewArray) {\n\t\t\tfield13New.append(field == null ? StringUtils.EMPTY : field);\n\t\t\tfield13New.append(COMPONENT_SEPARATOR);\n\t\t}\n\t\treturn field13New.toString().replaceAll(\"\\\\^{2,}$\", \"\");\n\t}", "private final void m46527f(String str) {\n if (C15333p.m44598e()) {\n if (m46510O() == null) {\n m46509N();\n }\n if (m46510O().booleanValue()) {\n m46523a(str, null);\n return;\n }\n String str2 = \"javascript:\";\n String valueOf = String.valueOf(str);\n m46525c(valueOf.length() != 0 ? str2.concat(valueOf) : new String(str2));\n return;\n }\n String str3 = \"javascript:\";\n String valueOf2 = String.valueOf(str);\n m46525c(valueOf2.length() != 0 ? str3.concat(valueOf2) : new String(str3));\n }", "private static String modifyID(final String fifteenid) {\n String eightid = fifteenid.substring(0, 6);\n eightid = eightid + \"19\";\n eightid = eightid + fifteenid.substring(6, 15);\n eightid = eightid + getVerify(eightid);\n return eightid;\n }", "private String prepare(String originStr)\r\n {\r\n String result=originStr.toLowerCase();\r\n result = result.replace('ä','a');\r\n result = result.replace('ö','o');\r\n result = result.replace('ü','u');\r\n// result = result.replace(':',' ');\r\n// result = result.replace(';',' ');\r\n// result = result.replace('<',' ');\r\n// result = result.replace('>',' ');\r\n// result = result.replace('=',' ');\r\n// result = result.replace('?',' ');\r\n// result = result.replace('[',' ');\r\n// result = result.replace(']',' ');\r\n// result = result.replace('/',' ');\r\n return result;\r\n }", "private final String m11182a(String str, int i, String str2) {\n if (this.f10029c.mo6511a(\"feature:targetedDownloadLinkFeature\")) {\n ReferrerDetails referrerDetails = new ReferrerDetails(str, C3739a.f10002k.mo10286a(this.f10027a, str2), C3744d.f10023r.mo10294a(i), null, 8, null);\n C12948z zVar = C12948z.f33530a;\n C3756e eVar = this.f10030d;\n String uri = referrerDetails.mo10279e().toString();\n C12932j.m33815a((Object) uri, \"referrerDetails.toUri().toString()\");\n Object[] objArr = {eVar.mo10313b(uri)};\n String format = String.format(\"https://zenlyapp.com/r/%s\", Arrays.copyOf(objArr, objArr.length));\n C12932j.m33815a((Object) format, \"java.lang.String.format(format, *args)\");\n String string = this.f10027a.getString(R.string.z_track5exp1var1_sms_conversion, new Object[]{format});\n C12932j.m33815a((Object) string, \"context.getString(R.stri…ar1_sms_conversion, link)\");\n return string;\n }\n String string2 = this.f10027a.getString(R.string.sms_conversion);\n C12932j.m33815a((Object) string2, \"context.getString(R.string.sms_conversion)\");\n return string2;\n }", "public HashMap<String, String> convertCodeToDefaultCallerSettings(String code) {\n HashMap<String,String> defalut = new HashMap<String,String>();\n defalut.put(\"column_name\",\"default_caller\");\n defalut.put(\"enum_code\", code );\n defalut.put(\"table_name\",\"DefaultCallerSettings\");\n\n //get DefaultCallerSettings value\n HashMap<Integer, HashMap<String, String>> data =\n dbController.getFromEnum(defalut);\n\n\n for (Map.Entry<Integer,HashMap<String,String>> objs : data.entrySet()){\n HashMap<String,String> response = new HashMap<String,String>();\n HashMap<String,String> obj = objs.getValue();\n response.put(\"name\",\"default_caller\");\n response.put(\"frequency\",obj.get(\"enum_value\")); // ???\n //Returns a map containing the name default caller and its value\n return response;\n }\n return null;\n }", "private static Uri m63903b(Cursor cursor, String str) {\n try {\n return Uri.parse(m63901a(cursor, str));\n } catch (NullPointerException unused) {\n return null;\n }\n }", "public MaintenanceCode convertMaintenanceCode(String code){\t\t\t\t\n\t\treturn maintenanceCodeDAO.findByCode(code);\t\t\n\t}", "String nextLegacyURL()\n {\n StringBuilder sb = new StringBuilder();\n\n while (!empty())\n {\n int ch = input.charAt(position);\n\n if (ch == '\\'' || ch == '\"' || ch == '(' || ch == ')' || isWhitespace(ch) || Character.isISOControl(ch))\n break;\n\n position++;\n if (ch == '\\\\')\n {\n if (empty()) // EOF: do nothing\n continue;\n // Escaped char sequence\n ch = input.charAt(position++);\n if (ch == '\\n' || ch == '\\r' || ch == '\\f') { // a CSS newline\n continue; // Newline: consume it\n }\n int hc = hexChar(ch);\n if (hc != -1) {\n int codepoint = hc;\n for (int i=1; i<=5; i++) {\n if (empty())\n break;\n hc = hexChar( input.charAt(position) );\n if (hc == -1) // Not a hex char\n break;\n position++;\n codepoint = codepoint * 16 + hc;\n }\n sb.append((char) codepoint);\n continue;\n }\n // Other chars just unescape to themselves\n // Fall through to append\n }\n sb.append((char) ch);\n }\n if (sb.length() == 0)\n return null;\n return sb.toString();\n }", "public static String enhanceMobileNumber(String oldNumber) {\n return oldNumber.replaceAll(\"[()\\\\s-]\", \"\").replace(\"+\", \"00\");\n }", "private String m81849m() {\n String str;\n if (this.f58083o) {\n str = UrlUtil.m84496b(UrlUtil.m84494a(this.f58071c, C6969H.m41409d(\"G738BEA0FAD3C\")));\n } else {\n str = this.f58070b;\n }\n if (!TextUtils.isEmpty(str)) {\n this.f58072d = Uri.parse(str);\n }\n return str;\n }", "void NCRtoUnicode()\r\n\t{\r\n\t\tStringBuffer ostr = new StringBuffer();\r\n\t\tint i1 = 0;\r\n\t\tint i2 = 0;\r\n\r\n\t\twhile (i2 < str.length()) {\r\n\t\t\ti1 = str.indexOf(\"&#\", i2);\r\n\r\n\t\t\tif (i1 == -1) {\r\n\t\t\t\tostr.append(str.substring(i2, str.length()));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tostr.append(str.substring(i2, i1));\r\n\t\t\ti2 = str.indexOf(\";\", i1);\r\n\r\n\t\t\tif (i2 == -1) {\r\n\t\t\t\tostr.append(str.substring(i1, str.length()));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tString tok = str.substring(i1 + 2, i2);\r\n\r\n\t\t\ttry {\r\n\t\t\t\tint radix = 10;\r\n\r\n\t\t\t\tif (tok.trim().charAt(0) == 'x') {\r\n\t\t\t\t\tradix = 16;\r\n\t\t\t\t\ttok = tok.substring(1, tok.length());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tostr.append((char) Integer.parseInt(tok, radix));\r\n\t\t\t} catch (NumberFormatException exp) {\r\n\t\t\t\tostr.append('?');\r\n\t\t\t}\r\n\r\n\t\t\ti2++;\r\n\t\t}\r\n\r\n\t\tstr = ostr.toString();\r\n\t}", "static StringBuffer convert(String conv_Number){\r\n StringBuffer obj = new StringBuffer(conv_Number);\r\n for (int i=0 ; i<obj.length();i++){\r\n if(obj.charAt(i)<48 || obj.charAt(i)>57){\r\n obj.deleteCharAt(i);\r\n }}\r\n return obj;\r\n//* aurther=====================================================================@Wajaht Masood_003_assign\r\n }", "private String translateCodebase() {\n if(codebase==null)\n return(codebase);\n if(System.getProperty(\"os.name\").startsWith(\"Win\") && codebase.startsWith(\"file://\")) {\n codebase = \"file:/\"+codebase.substring(7);\n }\n return(codebase);\n }", "protected void setLeadSurrogates() {\n /*\n // Can't load method instructions: Load method exception: null in method: android.icu.impl.coll.CollationDataBuilder.setLeadSurrogates():void, dex: in method: android.icu.impl.coll.CollationDataBuilder.setLeadSurrogates():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.setLeadSurrogates():void\");\n }", "public CWE getAdministeredCode() { \r\n\t\tCWE retVal = this.getTypedField(5, 0);\r\n\t\treturn retVal;\r\n }", "private void replaceWithSponsorBaseAdress(String sponsorCode){\r\n /**\r\n * Updated for REF ID :0003 Feb'21 2003.\r\n * Hour Glass implementation while DB Trsactions Wait\r\n * by Subramanya Feb' 21 2003\r\n */\r\n dlgWindow.setCursor( new Cursor( Cursor.WAIT_CURSOR ) );\r\n String rldxId = rldxController.getRolodexIdForSponsor(sponsorCode);\r\n RolodexDetailsBean rolodexBean =\r\n rldxController.displayRolodexInfo(rldxId);\r\n dlgWindow.setCursor( new Cursor( Cursor.DEFAULT_CURSOR ) );\r\n \r\n txtAddress1.setText(\r\n rolodexBean.getAddress1() == null ? \"\" : rolodexBean.getAddress1());\r\n txtAddress2.setText(\r\n rolodexBean.getAddress2() == null ? \"\" : rolodexBean.getAddress2());\r\n txtAddress3.setText(\r\n rolodexBean.getAddress3() == null ? \"\" : rolodexBean.getAddress3());\r\n txtCity.setText(\r\n rolodexBean.getCity() == null ? \"\" : rolodexBean.getCity());\r\n txtCounty.setText(\r\n rolodexBean.getCounty() == null ? \"\" : rolodexBean.getCounty());\r\n //Modified for Case#4252 - Rolodex state dropdown associated with country - Start\r\n cmbCountry.setSelectedItem(rolodexBean.getCountry());\r\n// cmbState.setSelectedItem(rolodexBean.getState());\r\n// if (((ComboBoxBean)cmbCountry.getSelectedItem()).getCode().trim().equals(\"USA\") ){\r\n//// cmbState.setShowCode(true);\r\n// setStateInfo();\r\n// }else{\r\n//// cmbState.setShowCode(false);\r\n// cmbState.removeAllItems();\r\n// ComboBoxBean cmbBean = rolodexBean.getState() != null ?\r\n// new ComboBoxBean(rolodexBean.getState(),rolodexBean.getState())\r\n// : new ComboBoxBean(\" \",\" \");\r\n// cmbState.addItem(cmbBean);\r\n// }\r\n //Case#4252 - End\r\n cmbState.setRequestFocusEnabled(false);\r\n cmbState.setSelectedItem(\r\n rolodexBean.getState() == null ? \" \" :rolodexBean.getState().toString());\r\n txtPostalCode.setText(\r\n rolodexBean.getPostalCode() == null ? \"\" : rolodexBean.getPostalCode());\r\n txtPhone.setText(\r\n rolodexBean.getPhone() == null ? \"\" : rolodexBean.getPhone());\r\n txtEMail.setText(\r\n rolodexBean.getEMail() == null ? \"\" : rolodexBean.getEMail());\r\n txtFax.setText(\r\n rolodexBean.getFax() == null ? \"\" : rolodexBean.getFax());\r\n }", "public void resolveAddress(){\n for(int i = 0; i < byteCodeList.size(); i++){\n if(byteCodeList.get(i) instanceof LabelCode){\n LabelCode code = (LabelCode)byteCodeList.get(i);\n labels.put(code.getLabel(), i);\n }else if(byteCodeList.get(i) instanceof LineCode){\n LineCode code = (LineCode)byteCodeList.get(i);\n lineNums.add(code.n);\n }\n }\n \n //walk through byteCodeList and assgin proper address\n for(int i = 0; i < byteCodeList.size(); i++){\n if(byteCodeList.get(i) instanceof GoToCode){\n GoToCode code = (GoToCode)byteCodeList.get(i);\n code.setNum((Integer)labels.get(code.getLabel()));\n }else if(byteCodeList.get(i) instanceof FalseBranchCode){\n FalseBranchCode code = (FalseBranchCode)byteCodeList.get(i);\n code.setNum((Integer)labels.get(code.getLabel()));\n }else if(byteCodeList.get(i) instanceof CallCode){\n CallCode code = (CallCode)byteCodeList.get(i);\n code.setNum((Integer)labels.get(code.getFuncName()));\n }\n }\n }", "public String conversion() {\n try {\n transactionFailure = null;\n amountConverted = converterFacade.conversion(fromCurrencyCode,\n toCurrencyCode, amountToConvert);\n } catch (Exception e) {\n handleException(e);\n }\n return jsf22Bugfix();\n }", "private static String fetchLegacyEthnicCode(HashMap<String, Object> parameterMap) {\n\t\tString ethnicGroupCode = PsDiversityEthnicity.findEthnicGroupCodeByEmployeeId((String)parameterMap.get(\"employeeId\"));\n\t\tString ethnicGroup = PsEthnicGroup.findEthnicGroupByEthnicGroupCode(ethnicGroupCode);\n\t\tString legacyEthnicCode = CrossReferenceEthnicGroup.findActiveLegacyEthnicCodeByEthnicGroup(ethnicGroup);\n\t\tif(legacyEthnicCode == null || legacyEthnicCode.isEmpty()) {\n\t\t\tparameterMap.put(\"errorProgram\", \"ZHRI105A\");\n\t\t\tparameterMap.put(\"errorMessage\", \"Ethnic Group is not found in XRef table PS_ZHRT_ETHCD_CREF\");\n\t\t\tMain.doErrorCommand(parameterMap);\n\t\t}\n\t\treturn legacyEthnicCode;\n\t}", "public static String convertUrlToPunycodeIfNeeded(String url) {\n if (!Charset.forName(\"US-ASCII\").newEncoder().canEncode(url)) {\n if (url.toLowerCase().startsWith(\"http://\")) {\n url = \"http://\" + IDN.toASCII(url.substring(7));\n } else if (url.toLowerCase().startsWith(\"https://\")) {\n url = \"https://\" + IDN.toASCII(url.substring(8));\n } else {\n url = IDN.toASCII(url);\n }\n }\n return url;\n }", "public interface C7878U {\n /* renamed from: Lg */\n public static final int f26781Lg = 1;\n /* renamed from: Mg */\n public static final int f26782Mg = 2;\n public static final int NOERROR = 0;\n /* renamed from: Ng */\n public static final int f26783Ng = 3;\n /* renamed from: Og */\n public static final int f26784Og = 4;\n /* renamed from: Pg */\n public static final int f26785Pg = 5;\n /* renamed from: Qg */\n public static final int f26786Qg = 6;\n}", "public static void m32218a(C40439f c40439f) {\n AppMethodBeat.m2504i(112323);\n if (c40439f == null) {\n C4990ab.m7412e(\"MicroMsg.GameDataUtil\", \"Null appInfo\");\n AppMethodBeat.m2505o(112323);\n } else if (C5046bo.isNullOrNil(c40439f.field_appId)) {\n C4990ab.m7412e(\"MicroMsg.GameDataUtil\", \"Invalid appId\");\n AppMethodBeat.m2505o(112323);\n } else {\n boolean z;\n boolean n;\n String str = c40439f.field_appId;\n C40439f bT = C46494g.m87739bT(str, true);\n if (bT == null) {\n bT = new C40439f();\n bT.field_appId = str;\n z = true;\n } else {\n z = false;\n }\n String dor = C4988aa.dor();\n if (dor.equals(\"zh_CN\")) {\n bT.field_appName = c40439f.field_appName;\n } else if (dor.equals(\"zh_TW\") || dor.equals(\"zh_HK\")) {\n bT.field_appName_tw = c40439f.field_appName;\n } else {\n bT.field_appName_en = c40439f.field_appName;\n }\n bT.field_appType = c40439f.field_appType;\n bT.field_packageName = c40439f.field_packageName;\n bT.mo44076ih(c40439f.dna);\n bT.mo44079ik(c40439f.dnf);\n bT.mo44071hq(c40439f.dnj);\n bT.mo44080il(c40439f.dng);\n bT.mo44085iq(c40439f.dnm);\n bT.mo44086ir(c40439f.dnn);\n bT.mo44083io(c40439f.dnk);\n bT.mo44084ip(c40439f.dnl);\n bT.mo44072hr(c40439f.dnp);\n if (!C5046bo.isNullOrNil(c40439f.dnd)) {\n bT.mo44077ii(c40439f.dnd);\n }\n if (z) {\n n = C34832a.bYJ().mo56573n(bT);\n C3753a.bYQ().mo25135Us(str);\n } else if (bT.field_appVersion < c40439f.field_appVersion) {\n C4990ab.m7417i(\"MicroMsg.GameDataUtil\", \"oldVersion = %s, newVersion = %s\", Integer.valueOf(bT.field_appVersion), Integer.valueOf(c40439f.field_appVersion));\n n = C34832a.bYJ().mo56566a(bT, new String[0]);\n C3753a.bYQ().mo25135Us(str);\n } else if (C20964d.m32219a(bT, c40439f)) {\n C4990ab.m7417i(\"MicroMsg.GameDataUtil\", \"oldIcon = %s, newIcon = %s\", bT.field_appIconUrl, c40439f.field_appIconUrl);\n bT.field_appIconUrl = c40439f.field_appIconUrl;\n n = C34832a.bYJ().mo56566a(bT, new String[0]);\n C34832a.bYH().mo48331dW(str, 1);\n C34832a.bYH().mo48331dW(str, 2);\n C34832a.bYH().mo48331dW(str, 3);\n C34832a.bYH().mo48331dW(str, 4);\n C34832a.bYH().mo48331dW(str, 5);\n } else {\n n = C34832a.bYJ().mo56566a(bT, new String[0]);\n }\n C4990ab.m7417i(\"MicroMsg.GameDataUtil\", \"Saving AppInfo, appId: %s, insert?: %s, return: %s\", str, Boolean.valueOf(z), Boolean.valueOf(n));\n AppMethodBeat.m2505o(112323);\n }\n }", "public java.lang.String getFteReasonCode(){\n return localFteReasonCode;\n }", "public CWE getRxa5_AdministeredCode() { \r\n\t\tCWE retVal = this.getTypedField(5, 0);\r\n\t\treturn retVal;\r\n }", "public static String tenantIdRemapping(String oldTenantId) {\n\t\tif (oldTenantId.equalsIgnoreCase(\"bukalapak\")) {\n\t\t\treturn \"bukalapak\";\n\t\t}\n\t\tif (oldTenantId.equalsIgnoreCase(\"familynara2014\")) {\n\t\t\treturn \"FAMILYNARA2014\";\n\t\t}\n\t\treturn oldTenantId;\n\t}", "private static String decode(final String extractedStr, Integer[] uncode) {\n if (null == extractedStr || extractedStr.isEmpty())\n return \"\";\n String decodedStr = extractedStr;\n for (Integer codeInt : uncode) {\n switch (codeInt) {\n case 0:\n break;\n case 1:\n decodedStr = changeUnicode(decodedStr);// unicode\n break;\n case 2:\n decodedStr = changeUrlcode(decodedStr, \"utf-8\");// urlcode\n break;\n case 3:\n decodedStr = changeMac(decodedStr);// Mac\n break;\n case 4:\n decodedStr = chageIdfa(decodedStr);\n break;\n case 5:\n decodedStr = chageMacTypeTwo(decodedStr);\n break;\n case 6:\n decodedStr = changeUrlcode(decodedStr, \"gb2312\");// urlcode\n break;\n case 7:\n\n break;\n case 8:\n decodedStr = changeBase64(decodedStr.toString());// base64\n break;\n case 9:\n decodedStr = decodedStr.toLowerCase();\n break;\n case 10:\n decodedStr = decodedStr.toUpperCase();\n break;\n case 11:\n Pattern p = Pattern.compile(\"\\\"scenicId\\\":.*?,\", Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(decodedStr);\n while (m.find()) {\n decodedStr = m.group().substring(\"\\\"scenicId\\\":\".length(), m.group().length() - 1);\n }\n break;\n case 12:\n p = Pattern.compile(\"\\\"productId\\\":.*?,\", Pattern.CASE_INSENSITIVE);\n m = p.matcher(decodedStr);\n while (m.find()) {\n decodedStr = m.group().substring(\"\\\"productId\\\":\".length(), m.group().length() - 1);\n }\n break;\n\n }\n }\n return decodedStr;\n }", "private static org.opencds.vmr.v1_0.schema.TelecommunicationAddressUse tELTelecomAddrUseInternal2TELTelecomAddrUse(TelecommunicationAddressUse pTC) \n\t\t\tthrows InvalidDataException {\n\n\t\tString _METHODNAME = \"tELTelecomAddrUseInternal2TELTelecomAddrUse(): \";\n\n\t\tif (pTC == null)\n\t\t\treturn null;\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"Internal TelecommunicationAddressUse value: \" + pTC);\n\t\t}\n\t\torg.opencds.vmr.v1_0.schema.TelecommunicationAddressUse lTelecomCapaExt = null;\n\t\ttry {\n\t\t\tlTelecomCapaExt = org.opencds.vmr.v1_0.schema.TelecommunicationAddressUse.valueOf(pTC.toString());\n\t\t}\n\t\tcatch (IllegalArgumentException iae) {\n\t\t\tString errStr = _METHODNAME + \"there was no direct value mapping from the internal to external enumeration\";\n\t\t\tthrow new InvalidDataException(errStr);\n\t\t}\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"External TelecommunicationAddressUse value: \" + lTelecomCapaExt.value());\n\t\t}\n\n\t\treturn lTelecomCapaExt;\n\t}", "private static String m63901a(Cursor cursor, String str) {\n return cursor.getString(cursor.getColumnIndexOrThrow(str));\n }", "public static String m106642a(Integer num) {\n String str = \"\";\n switch (num.intValue()) {\n case 0:\n return \"HOME\";\n case 1:\n return \"DISCOVER\";\n case 2:\n return \"PUBLISH\";\n case 3:\n return \"NOTIFICATION\";\n case 4:\n return \"USER\";\n case 5:\n return \"DISCOVER\";\n default:\n return str;\n }\n }", "private void m81855s() {\n try {\n String c = m81844c(C6969H.m41409d(\"G738BEA1BAF209420E2\"));\n if (!TextUtils.isEmpty(c)) {\n this.f58082n = Integer.parseInt(c);\n }\n } catch (Throwable th) {\n WebUtil.m68654a(C6969H.m41409d(\"G5C91D93EBA3CAE2EE71A95\"), th.getMessage());\n this.f58082n = 0;\n }\n if (this.f58082n == 0 && C6969H.m41409d(\"G7E94C254A538A221F3409347FF\").equals(this.f58071c.getHost())) {\n this.f58082n = AppIdRouterHelper.m81728a(this.f58072d.getPath());\n }\n }", "public static java.lang.String a(android.content.Context r16, android.net.Uri r17) {\n /*\n r1 = 2\n java.lang.Object[] r8 = new java.lang.Object[r1]\n r15 = 0\n r8[r15] = r16\n r6 = 1\n r8[r6] = r17\n com.meituan.robust.ChangeQuickRedirect r10 = f17527a\n java.lang.Class[] r13 = new java.lang.Class[r1]\n java.lang.Class<android.content.Context> r2 = android.content.Context.class\n r13[r15] = r2\n java.lang.Class<android.net.Uri> r2 = android.net.Uri.class\n r13[r6] = r2\n java.lang.Class<java.lang.String> r14 = java.lang.String.class\n r9 = 0\n r11 = 1\n r12 = 13601(0x3521, float:1.9059E-41)\n boolean r2 = com.meituan.robust.PatchProxy.isSupport(r8, r9, r10, r11, r12, r13, r14)\n if (r2 == 0) goto L_0x0041\n java.lang.Object[] r2 = new java.lang.Object[r1]\n r2[r15] = r16\n r2[r6] = r17\n r8 = 0\n com.meituan.robust.ChangeQuickRedirect r9 = f17527a\n r10 = 1\n r11 = 13601(0x3521, float:1.9059E-41)\n java.lang.Class[] r12 = new java.lang.Class[r1]\n java.lang.Class<android.content.Context> r0 = android.content.Context.class\n r12[r15] = r0\n java.lang.Class<android.net.Uri> r0 = android.net.Uri.class\n r12[r6] = r0\n java.lang.Class<java.lang.String> r13 = java.lang.String.class\n r7 = r2\n java.lang.Object r0 = com.meituan.robust.PatchProxy.accessDispatch(r7, r8, r9, r10, r11, r12, r13)\n java.lang.String r0 = (java.lang.String) r0\n return r0\n L_0x0041:\n r8 = 0\n if (r17 != 0) goto L_0x0045\n return r8\n L_0x0045:\n java.lang.String r1 = r17.getScheme()\n boolean r2 = com.bytedance.common.utility.StringUtils.isEmpty(r1)\n if (r2 != 0) goto L_0x010a\n java.lang.String r2 = \"file\"\n boolean r2 = r2.equals(r1)\n if (r2 == 0) goto L_0x0059\n goto L_0x010a\n L_0x0059:\n java.lang.String r2 = \"http\"\n boolean r2 = r2.equals(r1)\n if (r2 == 0) goto L_0x0066\n java.lang.String r0 = r17.toString()\n return r0\n L_0x0066:\n java.lang.String r2 = \"content\"\n boolean r1 = r2.equals(r1)\n if (r1 == 0) goto L_0x0109\n java.lang.String[] r11 = new java.lang.String[r6]\n java.lang.String r1 = \"_data\"\n r11[r15] = r1\n java.lang.String r9 = \"\"\n android.content.ContentResolver r1 = r16.getContentResolver() // Catch:{ Exception -> 0x00a3, all -> 0x009b }\n r4 = 0\n r5 = 0\n r10 = 0\n r2 = r17\n r3 = r11\n r12 = 1\n r6 = r10\n android.database.Cursor r1 = r1.query(r2, r3, r4, r5, r6) // Catch:{ Exception -> 0x00a4, all -> 0x009b }\n boolean r2 = r1.moveToFirst() // Catch:{ Exception -> 0x00a5, all -> 0x0099 }\n if (r2 == 0) goto L_0x0091\n java.lang.String r2 = r1.getString(r15) // Catch:{ Exception -> 0x00a5, all -> 0x0099 }\n r9 = r2\n L_0x0091:\n if (r1 == 0) goto L_0x0096\n r1.close() // Catch:{ Exception -> 0x00a5, all -> 0x0099 }\n L_0x0096:\n if (r1 == 0) goto L_0x00aa\n goto L_0x00a7\n L_0x0099:\n r0 = move-exception\n goto L_0x009d\n L_0x009b:\n r0 = move-exception\n r1 = r8\n L_0x009d:\n if (r1 == 0) goto L_0x00a2\n r1.close() // Catch:{ Exception -> 0x00a2 }\n L_0x00a2:\n throw r0\n L_0x00a3:\n r12 = 1\n L_0x00a4:\n r1 = r8\n L_0x00a5:\n if (r1 == 0) goto L_0x00aa\n L_0x00a7:\n r1.close() // Catch:{ Exception -> 0x00aa }\n L_0x00aa:\n r2 = r1\n r1 = r9\n boolean r3 = com.bytedance.common.utility.StringUtils.isEmpty(r1)\n if (r3 == 0) goto L_0x0108\n android.content.ContentResolver r9 = r16.getContentResolver() // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n java.lang.String r0 = \"_id= ?\"\n java.lang.String r3 = r17.getLastPathSegment() // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n int r4 = android.os.Build.VERSION.SDK_INT // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n r5 = 19\n if (r4 < r5) goto L_0x00d8\n boolean r4 = com.bytedance.common.utility.StringUtils.isEmpty(r3) // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n if (r4 != 0) goto L_0x00d8\n java.lang.String r4 = \":\"\n boolean r4 = r3.contains(r4) // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n if (r4 == 0) goto L_0x00d8\n java.lang.String r4 = \":\"\n java.lang.String[] r3 = r3.split(r4) // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n r3 = r3[r12] // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n L_0x00d8:\n java.lang.String[] r13 = new java.lang.String[r12] // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n r13[r15] = r3 // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n android.net.Uri r10 = android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n r14 = 0\n r12 = r0\n android.database.Cursor r3 = r9.query(r10, r11, r12, r13, r14) // Catch:{ Exception -> 0x0104, all -> 0x00fd }\n boolean r0 = r3.moveToFirst() // Catch:{ Exception -> 0x0105, all -> 0x00fa }\n if (r0 == 0) goto L_0x00ef\n java.lang.String r0 = r3.getString(r15) // Catch:{ Exception -> 0x0105, all -> 0x00fa }\n r1 = r0\n L_0x00ef:\n if (r3 == 0) goto L_0x00f4\n r3.close() // Catch:{ Exception -> 0x0105, all -> 0x00fa }\n L_0x00f4:\n if (r3 == 0) goto L_0x0108\n L_0x00f6:\n r3.close() // Catch:{ Exception -> 0x0108 }\n goto L_0x0108\n L_0x00fa:\n r0 = move-exception\n r2 = r3\n goto L_0x00fe\n L_0x00fd:\n r0 = move-exception\n L_0x00fe:\n if (r2 == 0) goto L_0x0103\n r2.close() // Catch:{ Exception -> 0x0103 }\n L_0x0103:\n throw r0\n L_0x0104:\n r3 = r2\n L_0x0105:\n if (r3 == 0) goto L_0x0108\n goto L_0x00f6\n L_0x0108:\n return r1\n L_0x0109:\n return r8\n L_0x010a:\n java.lang.String r0 = r17.getPath()\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bytedance.android.livesdk.utils.a.a(android.content.Context, android.net.Uri):java.lang.String\");\n }", "public static void traduitSiteFrancais() {\n\t\t\n\t}", "public String getLBR_ProtestCode();", "public static char demangle2(char char1, char char2) {\n switch (char1 << 16 | char2) {\n case 'A' << 16 | 'm': return '&';\n case 'A' << 16 | 't': return '@';\n case 'C' << 16 | 'l': return ':';\n case 'C' << 16 | 'm': return ',';\n case 'D' << 16 | 'q': return '\\\"';\n case 'D' << 16 | 't': return '.';\n case 'E' << 16 | 'q': return '=';\n case 'E' << 16 | 'x': return '!';\n case 'G' << 16 | 'r': return '>';\n case 'L' << 16 | 'B': return '[';\n case 'L' << 16 | 'C': return '{';\n case 'L' << 16 | 'P': return '(';\n case 'L' << 16 | 's': return '<';\n case 'M' << 16 | 'c': return '%';\n case 'M' << 16 | 'n': return '-';\n case 'N' << 16 | 'm': return '#';\n case 'P' << 16 | 'c': return '%';\n case 'P' << 16 | 'l': return '+';\n case 'Q' << 16 | 'u': return '?';\n case 'R' << 16 | 'B': return ']';\n case 'R' << 16 | 'C': return '}';\n case 'R' << 16 | 'P': return ')';\n case 'S' << 16 | 'C': return ';';\n case 'S' << 16 | 'l': return '/';\n case 'S' << 16 | 'q': return '\\\\';\n case 'S' << 16 | 't': return '*';\n case 'T' << 16 | 'l': return '~';\n case 'U' << 16 | 'p': return '^';\n case 'V' << 16 | 'B': return '|';\n }\n return (char) (-1);\n }", "void mo4873a(C4718l c4718l);", "private String normalizeDeviceName(String devname) {\r\n devname = devname.toUpperCase();\r\n\r\n if(devname.startsWith(\"SAM\")) {\r\n devname = \"AT\" + devname;\r\n } else if(devname.startsWith(\"32\")) {\r\n devname = \"PIC\" + devname;\r\n } else if(devname.startsWith(\"P32\")) {\r\n devname = \"PIC\" + devname.substring(1);\r\n }\r\n\r\n return devname;\r\n }", "@DISPID(1097) //= 0x449. The runtime will prefer the VTID if present\n @VTID(20)\n java.lang.String urlUnencoded();", "int toTelecomDisconnectCauseCode(int telephonyDisconnectCause, int error);", "public CWE getRxa25_AdministeredBarcodeIdentifier() { \r\n\t\tCWE retVal = this.getTypedField(25, 0);\r\n\t\treturn retVal;\r\n }", "private static void m2800a(List list, List list2) {\n for (int i = 0; i < list.size(); i++) {\n Uri uri = ((bcd) list.get(i)).f3233a;\n if (uri != null && !list2.contains(uri)) {\n list2.add(uri);\n }\n }\n }", "@Deprecated\n\tprivate void oldCode()\n\t{\n\t}", "public static String remove(String str){\n\t\tString str2 = str.trim();\n\t\tstr2 = str2.replaceAll(\"à|á|ả|ã|ạ|â|ầ|ấ|ẩ|ẫ|ậ|ằ|ắ|ẳ|ẵ|ặ|ă\", \"a\");\n\t\tstr2 = str2.replaceAll(\"í|ì|ỉ|ĩ|ị\",\"i\");\n\t\tstr2 = str2.replaceAll(\"ư|ứ|ừ|ử|ữ|ự|ú|ù|ủ|ũ|ụ\",\"u\");\n\t\tstr2 = str2.replaceAll(\"ế|ề|ể|ễ|ệ|é|è|ẻ|ẽ|ẹ|ê\",\"e\");\n\t\tstr2 = str2.replaceAll(\"ố|ồ|ổ|ỗ|ộ|ớ|ờ|ở|ỡ|ợ|ó|ò|ỏ|õ|ọ|ô|ơ\",\"o\");\n\t\tstr2= str2.replaceAll(\"ý|ỳ|ỷ|ỹ|ỵ\",\"y\");\n\t\t\n\t\tstr2 = str2.replaceAll(\"Ấ|Ầ|Ẩ|Ẫ|Ậ|Ắ|Ằ|Ẳ|Ẵ|Ặ|Á|À|Ả|Ã|Ạ|Â|Ă\",\"A\");\n\t\tstr2 = str2.replaceAll(\"Í|Ì|Ỉ|Ĩ|Ị\",\"I\");\n\t\tstr2 = str2.replaceAll(\"Ứ|Ừ|Ử|Ữ|Ự|Ú|Ù|Ủ|Ũ|Ụ|Ư\",\"U\");\n\t\tstr2 = str2.replaceAll(\"Ế|Ề|Ể|Ễ|Ệ|É|È|Ẻ|Ẽ|Ẹ|Ê\",\"E\");\n\t\tstr2 = str2.replaceAll(\"Ố|Ồ|Ổ|Ô|Ộ|Ớ|Ờ|Ở|Ỡ|Ợ|Ó|Ò|Ỏ|Õ|Ọ|Ô|Ơ\",\"O\");\n\t\tstr2= str2.replaceAll(\"Ý|Ỳ|Ỷ|Ỹ|Ỵ\",\"Y\");\n\t\tstr2 = str2.replaceAll(\"đ\",\"d\");\n\t\tstr2 = str2.replaceAll(\"Đ\",\"D\");\n\t\t\n\t\tstr2 = str2.replaceAll(\"ò\", \"\");\n\t\treturn str2;\n\t}", "public String mo81386a() {\n String d = C6969H.m41409d(\"G5C91D93EBA3CAE2EE71A95\");\n WebUtil.m68654a(d, C6969H.m41409d(\"G6691DC1DB63E9E3BEA54D0\") + this.f58070b);\n if (TextUtils.isEmpty(this.f58070b)) {\n return \"\";\n }\n this.f58071c = Uri.parse(this.f58070b);\n this.f58083o = m81839a(this.f58071c.getScheme());\n String m = m81849m();\n m81850n();\n m81852p();\n m81853q();\n m81854r();\n m81855s();\n m81856t();\n return m;\n }", "public static FeeDetail remapFeeAccount(SveaCredential cre, FeeDetail f) {\r\n\t\tif (f==null || f.getFeeType()==null) return f;\r\n\t\tif (cre==null)\r\n\t\t\treturn f;\r\n\t\tString acctNo = cre.getAccountMap().get(f.getFeeType());\r\n\t\tif (acctNo!=null) {\r\n\t\t\tf.setAccountNr(acctNo);\r\n\t\t\t// See if we need to remap\r\n\t\t\tif (cre.getAccountRemap()!=null) {\r\n\t\t\t\tString remap = cre.getAccountRemap().get(acctNo);\r\n\t\t\t\tif (remap!=null) {\r\n\t\t\t\t\tf.setAccountNr(remap);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn f;\r\n\t}", "public C26741Fb(C26631Eg r2, String str) {\n super(515);\n this.A01 = r2;\n this.A00 = str;\n }", "public com.walgreens.rxit.ch.cda.CE getReligiousAffiliationCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.CE target = null;\n target = (com.walgreens.rxit.ch.cda.CE)get_store().find_element_user(RELIGIOUSAFFILIATIONCODE$16, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "private static String loadConvert(String str) {\n\t\tint off = 0;\n\t\tint len = str.length();\n\t\tchar[] in = str.toCharArray();\n\t\tchar[] convtBuf = new char[1024];\n\t\tif (convtBuf.length < len) {\n\t\t\tint newLen = len * 2;\n\t\t\tif (newLen < 0) {\n\t\t\t\tnewLen = Integer.MAX_VALUE;\n\t\t\t}\n\t\t\tconvtBuf = new char[newLen];\n\t\t}\n\t\tchar aChar;\n\t\tchar[] out = convtBuf;\n\t\tint outLen = 0;\n\t\tint end = off + len;\n\n\t\twhile (off < end) {\n\t\t\taChar = in[off++];\n\t\t\tif (aChar == '\\\\') {\n\t\t\t\taChar = in[off++];\n\t\t\t\tif (aChar == 'u') {\n\t\t\t\t\t// Read the xxxx\n\t\t\t\t\tint value = 0;\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\taChar = in[off++];\n\t\t\t\t\t\tswitch (aChar) {\n\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\tvalue = (value << 4) + aChar - '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'a';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tcase 'B':\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'A';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Malformed \\\\uxxxx encoding.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tout[outLen++] = (char) value;\n\t\t\t\t} else {\n\t\t\t\t\tif (aChar == 't')\n\t\t\t\t\t\taChar = '\\t';\n\t\t\t\t\telse if (aChar == 'r')\n\t\t\t\t\t\taChar = '\\r';\n\t\t\t\t\telse if (aChar == 'n')\n\t\t\t\t\t\taChar = '\\n';\n\t\t\t\t\telse if (aChar == 'f')\n\t\t\t\t\t\taChar = '\\f';\n\t\t\t\t\tout[outLen++] = aChar;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout[outLen++] = aChar;\n\t\t\t}\n\t\t}\n\t\treturn new String(out, 0, outLen);\n\t}", "private String transversion(String ref) {\n\t\tif (ref == \"A\") {\n\t\t\tString[] alts = {\"C\", \"T\"};\n\t\t\tString alt = randomAllele(alts);\n\t\t\treturn alt;\n\t\t} else if (ref == \"C\") {\n\t\t\tString[] alts = {\"A\", \"G\"};\n\t\t\tString alt = randomAllele(alts);\n\t\t\treturn alt;\n\t\t} else if (ref == \"T\") {\n\t\t\tString[] alts = {\"A\", \"C\"};\n\t\t\tString alt = randomAllele(alts);\n\t\t\treturn alt;\t\t\n\t\t} else if (ref == \"G\") {\n\t\t\tString[] alts = {\"C\", \"T\"};\n\t\t\tString alt = randomAllele(alts);\n\t\t\treturn alt;\n\t\t}\n\t\t// else... something's wrong - left as an exercise for the user\n\t\treturn ref;\n\t}", "private static URI prependLanguageCode(URI oldUri, FormRequest.UserLanguage userLang) {\n if (userLang != FormRequest.UserLanguage.de) {\n // reconstruct the URL with a new path, but everything else the same\n try {\n return new URI(\n oldUri.getScheme(),\n oldUri.getAuthority(),\n \"/\" + userLang.toString() + oldUri.getPath(),\n oldUri.getQuery(),\n oldUri.getFragment()\n );\n } catch (URISyntaxException e) {\n // if we munge something, just return what we had before, which will still work...\n return oldUri;\n }\n }\n\n return oldUri;\n }", "public static DwLangNameRecord decode(long code) {\n for (DwLangNameRecord cc : values()) {\n if (cc.code() == code) {\n return cc;\n }\n }\n return DW_LANG_UNKNOWN;\n }", "private static org.opencds.vmr.v1_0.schema.PostalAddressUse aDPostalAddressUseInternal2ADPostalAddressUse(PostalAddressUse pPAUInternal) \n\t\t\tthrows InvalidDataException {\n\n\t\tString _METHODNAME = \"postalAddressUseInternal2PostalAddressUse(): \";\n\n\t\tif (pPAUInternal == null)\n\t\t\treturn null;\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"Internal PostalAddressUse value: \" + pPAUInternal);\n\t\t}\n\t\torg.opencds.vmr.v1_0.schema.PostalAddressUse lPostalAddressExt = null;\n\t\ttry {\n\t\t\tlPostalAddressExt = org.opencds.vmr.v1_0.schema.PostalAddressUse.valueOf(pPAUInternal.toString());\n\t\t}\n\t\tcatch (IllegalArgumentException iae) {\n\t\t\tString errStr = _METHODNAME + \"there was no direct value mapping from the internal to external enumeration\";\n\t\t\tthrow new InvalidDataException(errStr);\n\t\t}\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"External PostAddressUse value: \" + lPostalAddressExt.value());\n\t\t}\n\n\t\treturn lPostalAddressExt;\n\t}", "public String onChangeResidenceCode()\r\n {\r\n\ttry\r\n\t{\r\n\r\n\t SessionCO sessionCO = returnSessionObject();\r\n\t residenceTypesSC.setCompCode(sessionCO.getCompanyCode());\r\n\t residenceTypesSC.setPreferredLanguage(sessionCO.getPreferredLanguage());\r\n\t residenceTypesVO = residenceTypesBO.returnDependencyByCode(residenceTypesSC);\r\n\t if(residenceTypesVO == null)\r\n\t {\r\n\t\tthrow new BOException(MessageCodes.INVALID_MISSING_CODE);\r\n\t }\r\n\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t residenceTypesVO = new RESIDENCE_TYPESVO();\r\n\t handleException(e, null, null);\r\n\t}\r\n\treturn SUCCESS;\r\n }", "private String formatNumberForDotNet(String val)\n/* */ {\n/* 348 */ if (val == null)\n/* */ {\n/* 350 */ return \"-\";\n/* */ }\n/* */ \n/* 353 */ String ret = FormatUtil.formatNumber(val);\n/* 354 */ String troubleshootlink = com.adventnet.appmanager.util.OEMUtil.getOEMString(\"company.troubleshoot.link\");\n/* 355 */ if (ret.indexOf(\"-1\") != -1)\n/* */ {\n/* */ \n/* 358 */ return \"- &nbsp;<a class=\\\"staticlinks\\\" href=\\\"http://\" + troubleshootlink + \"#m44\\\" target=\\\"_blank\\\">\" + FormatUtil.getString(\"am.webclient.dotnet.troubleshoot\") + \"</a>\";\n/* */ }\n/* */ \n/* */ \n/* 362 */ return ret;\n/* */ }", "public String mo27182fR(String str) {\n String str2;\n if (TextUtils.isEmpty(str) || !str.contains(\".\")) {\n StringBuilder sb = new StringBuilder();\n sb.append(cmE);\n sb.append(str);\n sb.append(cmF);\n str2 = sb.toString();\n } else {\n String fM = C5485c.m14892fM(str);\n StringBuilder sb2 = new StringBuilder();\n sb2.append(cmE);\n sb2.append(fM);\n sb2.append(cmF);\n str2 = sb2.toString();\n }\n if (TextUtils.isEmpty(str2) || !C5488f.m14899fN(str2)) {\n return null;\n }\n return str2;\n }", "public void migrateFromLegacyIfNeeded(android.database.sqlite.SQLiteDatabase r12) {\n /*\n r11 = this;\n android.content.Context r0 = r11.mContext\n android.content.SharedPreferences r0 = android.preference.PreferenceManager.getDefaultSharedPreferences(r0)\n java.lang.String r1 = \"legacy_data_migration\"\n r2 = 0\n boolean r3 = r0.getBoolean(r1, r2)\n if (r3 == 0) goto L_0x0015\n java.lang.String r11 = \"Data migration was complete already\"\n log(r11)\n return\n L_0x0015:\n r3 = 1\n android.content.Context r11 = r11.mContext // Catch:{ Exception -> 0x00d3 }\n android.content.ContentResolver r11 = r11.getContentResolver() // Catch:{ Exception -> 0x00d3 }\n java.lang.String r4 = \"cellbroadcast-legacy\"\n android.content.ContentProviderClient r11 = r11.acquireContentProviderClient(r4) // Catch:{ Exception -> 0x00d3 }\n if (r11 != 0) goto L_0x003a\n java.lang.String r12 = \"No legacy provider available for migration\"\n log(r12) // Catch:{ all -> 0x00c5 }\n if (r11 == 0) goto L_0x002e\n r11.close() // Catch:{ Exception -> 0x00d3 }\n L_0x002e:\n android.content.SharedPreferences$Editor r11 = r0.edit()\n android.content.SharedPreferences$Editor r11 = r11.putBoolean(r1, r3)\n r11.commit()\n return\n L_0x003a:\n r12.beginTransaction() // Catch:{ all -> 0x00c5 }\n java.lang.String r4 = \"Starting migration from legacy provider\"\n log(r4) // Catch:{ all -> 0x00c5 }\n android.net.Uri r6 = android.provider.Telephony.CellBroadcasts.AUTHORITY_LEGACY_URI // Catch:{ RemoteException -> 0x00ba }\n java.lang.String[] r7 = QUERY_COLUMNS // Catch:{ RemoteException -> 0x00ba }\n r8 = 0\n r9 = 0\n r10 = 0\n r5 = r11\n android.database.Cursor r4 = r5.query(r6, r7, r8, r9, r10) // Catch:{ RemoteException -> 0x00ba }\n android.content.ContentValues r5 = new android.content.ContentValues // Catch:{ all -> 0x00ac }\n r5.<init>() // Catch:{ all -> 0x00ac }\n L_0x0053:\n boolean r6 = r4.moveToNext() // Catch:{ all -> 0x00ac }\n if (r6 == 0) goto L_0x0096\n r5.clear() // Catch:{ all -> 0x00ac }\n java.lang.String[] r6 = QUERY_COLUMNS // Catch:{ all -> 0x00ac }\n int r7 = r6.length // Catch:{ all -> 0x00ac }\n r8 = r2\n L_0x0060:\n if (r8 >= r7) goto L_0x006a\n r9 = r6[r8] // Catch:{ all -> 0x00ac }\n copyFromCursorToContentValues(r9, r4, r5) // Catch:{ all -> 0x00ac }\n int r8 = r8 + 1\n goto L_0x0060\n L_0x006a:\n java.lang.String r6 = \"_id\"\n r5.remove(r6) // Catch:{ all -> 0x00ac }\n java.lang.String r6 = \"broadcasts\"\n r7 = 0\n long r6 = r12.insert(r6, r7, r5) // Catch:{ all -> 0x00ac }\n r8 = -1\n int r6 = (r6 > r8 ? 1 : (r6 == r8 ? 0 : -1))\n if (r6 != 0) goto L_0x0053\n java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ all -> 0x00ac }\n r6.<init>() // Catch:{ all -> 0x00ac }\n java.lang.String r7 = \"Failed to insert \"\n r6.append(r7) // Catch:{ all -> 0x00ac }\n r6.append(r5) // Catch:{ all -> 0x00ac }\n java.lang.String r7 = \"; continuing\"\n r6.append(r7) // Catch:{ all -> 0x00ac }\n java.lang.String r6 = r6.toString() // Catch:{ all -> 0x00ac }\n loge(r6) // Catch:{ all -> 0x00ac }\n goto L_0x0053\n L_0x0096:\n r12.setTransactionSuccessful() // Catch:{ all -> 0x00ac }\n java.lang.String r2 = \"Finished migration from legacy provider\"\n log(r2) // Catch:{ all -> 0x00ac }\n if (r4 == 0) goto L_0x00a3\n r4.close() // Catch:{ RemoteException -> 0x00ba }\n L_0x00a3:\n r12.endTransaction() // Catch:{ all -> 0x00c5 }\n if (r11 == 0) goto L_0x00e8\n r11.close() // Catch:{ Exception -> 0x00d3 }\n goto L_0x00e8\n L_0x00ac:\n r2 = move-exception\n if (r4 == 0) goto L_0x00b7\n r4.close() // Catch:{ all -> 0x00b3 }\n goto L_0x00b7\n L_0x00b3:\n r4 = move-exception\n r2.addSuppressed(r4) // Catch:{ RemoteException -> 0x00ba }\n L_0x00b7:\n throw r2 // Catch:{ RemoteException -> 0x00ba }\n L_0x00b8:\n r2 = move-exception\n goto L_0x00c1\n L_0x00ba:\n r2 = move-exception\n java.lang.IllegalStateException r4 = new java.lang.IllegalStateException // Catch:{ all -> 0x00b8 }\n r4.<init>(r2) // Catch:{ all -> 0x00b8 }\n throw r4 // Catch:{ all -> 0x00b8 }\n L_0x00c1:\n r12.endTransaction() // Catch:{ all -> 0x00c5 }\n throw r2 // Catch:{ all -> 0x00c5 }\n L_0x00c5:\n r12 = move-exception\n if (r11 == 0) goto L_0x00d0\n r11.close() // Catch:{ all -> 0x00cc }\n goto L_0x00d0\n L_0x00cc:\n r11 = move-exception\n r12.addSuppressed(r11) // Catch:{ Exception -> 0x00d3 }\n L_0x00d0:\n throw r12 // Catch:{ Exception -> 0x00d3 }\n L_0x00d1:\n r11 = move-exception\n goto L_0x00f4\n L_0x00d3:\n r11 = move-exception\n java.lang.StringBuilder r12 = new java.lang.StringBuilder // Catch:{ all -> 0x00d1 }\n r12.<init>() // Catch:{ all -> 0x00d1 }\n java.lang.String r2 = \"Failed migration from legacy provider: \"\n r12.append(r2) // Catch:{ all -> 0x00d1 }\n r12.append(r11) // Catch:{ all -> 0x00d1 }\n java.lang.String r11 = r12.toString() // Catch:{ all -> 0x00d1 }\n loge(r11) // Catch:{ all -> 0x00d1 }\n L_0x00e8:\n android.content.SharedPreferences$Editor r11 = r0.edit()\n android.content.SharedPreferences$Editor r11 = r11.putBoolean(r1, r3)\n r11.commit()\n return\n L_0x00f4:\n android.content.SharedPreferences$Editor r12 = r0.edit()\n android.content.SharedPreferences$Editor r12 = r12.putBoolean(r1, r3)\n r12.commit()\n throw r11\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.cellbroadcastreceiver.CellBroadcastDatabaseHelper.migrateFromLegacyIfNeeded(android.database.sqlite.SQLiteDatabase):void\");\n }", "private Uri transcodeSchemeFileUri(Uri uri) {\n Uri newUri = null;\n Cursor cursor = null;\n String videoPath = uri.getPath();\n Log.v(TAG, \"transcodeSchemeFileUri, videoPath \" + videoPath);\n try {\n if (videoPath != null) {\n videoPath = videoPath.replaceAll(\"'\", \"''\");\n }\n cursor = getContentResolver()\n .query(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,\n new String[] { MediaStore.Video.Media._ID },\n MediaStore.Video.Media.DATA + \" = '\"\n + videoPath + \"'\", null, null);\n if (cursor != null && cursor.moveToFirst()\n && cursor.getCount() > 0) {\n int id = cursor.getInt(0);\n newUri = ContentUris.withAppendedId(\n MediaStore.Video.Media.EXTERNAL_CONTENT_URI, id);\n Log.v(TAG, \"transcodeSchemeFileUri, newUri = \" + newUri);\n } else {\n newUri = uri;\n Log.e(TAG, \"transcodeSchemeFileUri, The uri not existed in video table\");\n }\n return newUri;\n } catch (final SQLiteException ex) {\n ex.printStackTrace();\n } catch (final IllegalArgumentException ex) {\n ex.printStackTrace();\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n return null;\n }", "public static android.net.Uri a(android.content.Context r19, java.lang.String r20) {\n /*\n r2 = 2\n java.lang.Object[] r3 = new java.lang.Object[r2]\n r10 = 0\n r3[r10] = r19\n r11 = 1\n r3[r11] = r20\n com.meituan.robust.ChangeQuickRedirect r5 = f17527a\n java.lang.Class[] r8 = new java.lang.Class[r2]\n java.lang.Class<android.content.Context> r4 = android.content.Context.class\n r8[r10] = r4\n java.lang.Class<java.lang.String> r4 = java.lang.String.class\n r8[r11] = r4\n java.lang.Class<android.net.Uri> r9 = android.net.Uri.class\n r4 = 0\n r6 = 1\n r7 = 13600(0x3520, float:1.9058E-41)\n boolean r3 = com.meituan.robust.PatchProxy.isSupport(r3, r4, r5, r6, r7, r8, r9)\n if (r3 == 0) goto L_0x0042\n java.lang.Object[] r12 = new java.lang.Object[r2]\n r12[r10] = r19\n r12[r11] = r20\n r13 = 0\n com.meituan.robust.ChangeQuickRedirect r14 = f17527a\n r15 = 1\n r16 = 13600(0x3520, float:1.9058E-41)\n java.lang.Class[] r0 = new java.lang.Class[r2]\n java.lang.Class<android.content.Context> r1 = android.content.Context.class\n r0[r10] = r1\n java.lang.Class<java.lang.String> r1 = java.lang.String.class\n r0[r11] = r1\n java.lang.Class<android.net.Uri> r18 = android.net.Uri.class\n r17 = r0\n java.lang.Object r0 = com.meituan.robust.PatchProxy.accessDispatch(r12, r13, r14, r15, r16, r17, r18)\n android.net.Uri r0 = (android.net.Uri) r0\n return r0\n L_0x0042:\n boolean r2 = com.bytedance.common.utility.StringUtils.isEmpty(r20)\n r3 = 0\n if (r2 == 0) goto L_0x004a\n return r3\n L_0x004a:\n android.content.ContentResolver r4 = r19.getContentResolver() // Catch:{ Exception -> 0x0088, all -> 0x0081 }\n java.lang.String r7 = \"_data= ?\"\n java.lang.String[] r8 = new java.lang.String[r11] // Catch:{ Exception -> 0x0088, all -> 0x0081 }\n r8[r10] = r20 // Catch:{ Exception -> 0x0088, all -> 0x0081 }\n java.lang.String[] r6 = new java.lang.String[r11] // Catch:{ Exception -> 0x0088, all -> 0x0081 }\n java.lang.String r0 = \"_id\"\n r6[r10] = r0 // Catch:{ Exception -> 0x0088, all -> 0x0081 }\n android.net.Uri r5 = android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI // Catch:{ Exception -> 0x0088, all -> 0x0081 }\n r9 = 0\n android.database.Cursor r1 = r4.query(r5, r6, r7, r8, r9) // Catch:{ Exception -> 0x0088, all -> 0x0081 }\n boolean r0 = r1.moveToFirst() // Catch:{ Exception -> 0x0089, all -> 0x007e }\n if (r0 == 0) goto L_0x007b\n java.lang.String r0 = r1.getString(r10) // Catch:{ Exception -> 0x0089, all -> 0x007e }\n android.net.Uri r2 = android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI // Catch:{ Exception -> 0x0089, all -> 0x007e }\n long r4 = java.lang.Long.parseLong(r0) // Catch:{ Exception -> 0x0089, all -> 0x007e }\n android.net.Uri r0 = android.content.ContentUris.withAppendedId(r2, r4) // Catch:{ Exception -> 0x0089, all -> 0x007e }\n if (r1 == 0) goto L_0x007a\n r1.close()\n L_0x007a:\n return r0\n L_0x007b:\n if (r1 == 0) goto L_0x008e\n goto L_0x008b\n L_0x007e:\n r0 = move-exception\n r3 = r1\n goto L_0x0082\n L_0x0081:\n r0 = move-exception\n L_0x0082:\n if (r3 == 0) goto L_0x0087\n r3.close()\n L_0x0087:\n throw r0\n L_0x0088:\n r1 = r3\n L_0x0089:\n if (r1 == 0) goto L_0x008e\n L_0x008b:\n r1.close()\n L_0x008e:\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bytedance.android.livesdk.utils.a.a(android.content.Context, java.lang.String):android.net.Uri\");\n }", "private static java.lang.String m25224a(java.lang.String r7, java.lang.String r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"\";\n r1 = \"\\\\?\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r2 = 1;\n if (r1 <= r2) goto L_0x0033;\n L_0x000c:\n r7 = r7[r2];\n r1 = \"&\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r3 = 0;\n r4 = r0;\n r0 = 0;\n L_0x0018:\n if (r0 >= r1) goto L_0x0032;\n L_0x001a:\n r5 = r7[r0];\n r6 = \"=\";\n r5 = r5.split(r6);\n r6 = r5.length;\n if (r6 <= r2) goto L_0x002f;\n L_0x0025:\n r6 = r5[r3];\n r6 = r6.equals(r8);\n if (r6 == 0) goto L_0x002f;\n L_0x002d:\n r4 = r5[r2];\n L_0x002f:\n r0 = r0 + 1;\n goto L_0x0018;\n L_0x0032:\n r0 = r4;\n L_0x0033:\n r7 = \"UTF-8\";\t Catch:{ Exception -> 0x003a }\n r7 = java.net.URLDecoder.decode(r0, r7);\t Catch:{ Exception -> 0x003a }\n goto L_0x003b;\n L_0x003a:\n r7 = r0;\n L_0x003b:\n return r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.leanplum.messagetemplates.BaseMessageDialog.a(java.lang.String, java.lang.String):java.lang.String\");\n }", "private String formatNumberForDotNet(String val)\n/* */ {\n/* 342 */ if (val == null)\n/* */ {\n/* 344 */ return \"-\";\n/* */ }\n/* */ \n/* 347 */ String ret = FormatUtil.formatNumber(val);\n/* 348 */ String troubleshootlink = com.adventnet.appmanager.util.OEMUtil.getOEMString(\"company.troubleshoot.link\");\n/* 349 */ if (ret.indexOf(\"-1\") != -1)\n/* */ {\n/* */ \n/* 352 */ return \"- &nbsp;<a class=\\\"staticlinks\\\" href=\\\"http://\" + troubleshootlink + \"#m44\\\" target=\\\"_blank\\\">\" + FormatUtil.getString(\"am.webclient.dotnet.troubleshoot\") + \"</a>\";\n/* */ }\n/* */ \n/* */ \n/* 356 */ return ret;\n/* */ }", "@Test\n\tpublic void testFwdInfReasonerRewrites_Bug717() throws Exception {\n\t\timportProofSerializationProofs();\n\n\t\tfinal IPRRoot prFile = getProofRoot(\"exF\");\n\t\tfinal IPRProof proof = prFile.getProof(\"oldExF\");\n\n\t\t// a IllegalStateException is thrown when the bug is present:\n\t\tfinal IProofTree proofTree = proof.getProofTree(null);\n\n\t\t// ensure that the proof rule is deserialized:\n\t\tfinal IProofTreeNode root = proofTree.getRoot();\n\t\tassertFalse(root.isOpen());\n\t\tfinal IProofRule rule = root.getRule();\n\t\tassertEquals(SequentProver.PLUGIN_ID + \".exF\", rule.generatedBy().getReasonerID());\n\t\tassertEquals(3, rule.getAntecedents()[0].getHypActions().size());\n\t}", "public String convertCodeToGender(String code) {\n HashMap<String,String> defalut = new HashMap<String,String>();\n defalut.put(\"column_name\",\"gender\");\n defalut.put(\"enum_code\", code );\n defalut.put(\"table_name\",\"P_CommunityMembers\");\n //get gender\n HashMap<Integer, HashMap<String, String>> data =\n dbController.getFromEnum(defalut);\n\n //teturn gender type as a string\n for (Map.Entry<Integer,HashMap<String,String>> objs : data.entrySet()){\n HashMap<String,String> obj = objs.getValue();\n return obj.get(\"enum_value\");\n }\n return null;\n }", "static String m1375e(Context context, String str, String str2) {\n String str3 = (String) Yl.get(str);\n if (str3 == null) {\n SharedPreferences sharedPreferences = context.getSharedPreferences(\"gtm_click_referrers\", 0);\n str3 = sharedPreferences != null ? sharedPreferences.getString(str, \"\") : \"\";\n Yl.put(str, str3);\n }\n return m1377m(str3, str2);\n }", "private ProfileApi.ProfileBirthdayType convertStringToProfileBirthdayType(String str) {\r\n char c;\r\n switch (str.hashCode()) {\r\n case 48:\r\n if (str.equals(\"0\")) {\r\n c = 0;\r\n break;\r\n }\r\n c = 65535;\r\n break;\r\n case 49:\r\n if (str.equals(\"1\")) {\r\n c = 1;\r\n break;\r\n }\r\n c = 65535;\r\n break;\r\n case 50:\r\n if (str.equals(\"2\")) {\r\n c = 2;\r\n break;\r\n }\r\n c = 65535;\r\n break;\r\n default:\r\n c = 65535;\r\n break;\r\n }\r\n if (c == 0) {\r\n return ProfileApi.ProfileBirthdayType.SOLAR_BIRTHDAY;\r\n }\r\n if (c == 1) {\r\n return ProfileApi.ProfileBirthdayType.LUNAR_BIRTHDAY;\r\n }\r\n if (c != 2) {\r\n return ProfileApi.ProfileBirthdayType.INVALID;\r\n }\r\n return ProfileApi.ProfileBirthdayType.LEAP_BIRTHDAY;\r\n }", "public CWE getAdministeredBarcodeIdentifier() { \r\n\t\tCWE retVal = this.getTypedField(25, 0);\r\n\t\treturn retVal;\r\n }", "private void reverseLookupAD_Org_ID() throws Exception\r\n\t{\r\n\t\tStringBuilder sql = new StringBuilder();\r\n\t\tString msg = new String();\r\n\t\tint no = 0;\r\n\r\n\t\t//Reverese Look up AD_Org ID From JP_Org_Value\r\n\t\tmsg = Msg.getMsg(getCtx(), \"Matching\") + \" : \" + Msg.getElement(getCtx(), \"AD_Org_ID\")\r\n\t\t+ \" - \" + Msg.getMsg(getCtx(), \"MatchFrom\") + \" : \" + Msg.getElement(getCtx(), \"JP_Org_Value\") ;\r\n\t\tsql = new StringBuilder (\"UPDATE I_LocationJP i \")\r\n\t\t\t\t.append(\"SET AD_Org_ID=(SELECT AD_Org_ID FROM AD_org p\")\r\n\t\t\t\t.append(\" WHERE i.JP_Org_Value=p.Value AND (p.AD_Client_ID=i.AD_Client_ID or p.AD_Client_ID=0) ) \")\r\n\t\t\t\t.append(\" WHERE i.JP_Org_Value IS NOT NULL\")\r\n\t\t\t\t.append(\" AND i.I_IsImported='N'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t\tif (log.isLoggable(Level.FINE)) log.fine(msg +\"=\" + no + \":\" + sql);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + sql );\r\n\t\t}\r\n\r\n\t\t//Invalid JP_Org_Value\r\n\t\tmsg = Msg.getMsg(getCtx(), \"Invalid\")+Msg.getElement(getCtx(), \"JP_Org_Value\");\r\n\t\tsql = new StringBuilder (\"UPDATE I_LocationJP \")\r\n\t\t\t.append(\"SET I_ErrorMsg='\"+ msg + \"'\")\r\n\t\t\t.append(\" WHERE AD_Org_ID = 0 AND JP_Org_Value IS NOT NULL AND JP_Org_Value <> '0' \")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t\tif (log.isLoggable(Level.FINE)) log.fine(msg +\"=\" + no + \":\" + sql);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + msg +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\tif(no > 0)\r\n\t\t{\r\n\t\t\tcommitEx();\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + msg );\r\n\t\t}\r\n\r\n\t}", "private String formatNumberForDotNet(String val)\n/* */ {\n/* 339 */ if (val == null)\n/* */ {\n/* 341 */ return \"-\";\n/* */ }\n/* */ \n/* 344 */ String ret = FormatUtil.formatNumber(val);\n/* 345 */ String troubleshootlink = com.adventnet.appmanager.util.OEMUtil.getOEMString(\"company.troubleshoot.link\");\n/* 346 */ if (ret.indexOf(\"-1\") != -1)\n/* */ {\n/* */ \n/* 349 */ return \"- &nbsp;<a class=\\\"staticlinks\\\" href=\\\"http://\" + troubleshootlink + \"#m44\\\" target=\\\"_blank\\\">\" + FormatUtil.getString(\"am.webclient.dotnet.troubleshoot\") + \"</a>\";\n/* */ }\n/* */ \n/* */ \n/* 353 */ return ret;\n/* */ }", "private String m25428h() {\n if (this.a == null) {\n return null;\n }\n Uri parse;\n Builder builder;\n String a = AdSettings.m6374a();\n if (a != null) {\n if (!a.isEmpty()) {\n a = String.format(\"https://www.%s.facebook.com/audience_network/server_side_reward\", new Object[]{a});\n parse = Uri.parse(a);\n builder = new Builder();\n builder.scheme(parse.getScheme());\n builder.authority(parse.getAuthority());\n builder.path(parse.getPath());\n builder.query(parse.getQuery());\n builder.fragment(parse.getFragment());\n builder.appendQueryParameter(\"puid\", this.a.m7645a());\n builder.appendQueryParameter(\"pc\", this.a.m7646b());\n builder.appendQueryParameter(\"ptid\", this.f19103e);\n builder.appendQueryParameter(\"appid\", this.f19107i);\n return builder.build().toString();\n }\n }\n a = \"https://www.facebook.com/audience_network/server_side_reward\";\n parse = Uri.parse(a);\n builder = new Builder();\n builder.scheme(parse.getScheme());\n builder.authority(parse.getAuthority());\n builder.path(parse.getPath());\n builder.query(parse.getQuery());\n builder.fragment(parse.getFragment());\n builder.appendQueryParameter(\"puid\", this.a.m7645a());\n builder.appendQueryParameter(\"pc\", this.a.m7646b());\n builder.appendQueryParameter(\"ptid\", this.f19103e);\n builder.appendQueryParameter(\"appid\", this.f19107i);\n return builder.build().toString();\n }", "private int traslationType(Terser terser) throws HL7Exception{\n\t\t\n\t\tString destHosp = terser.get(\"PV1-3-4-1\");\n\t\tString orgHosp = terser.get(\"PV1-6-4-1\");\n\t\t\n\t\tif(orgHosp.endsWith(destHosp))\n\t\t\treturn SAME_HOSPITAL;\n\t\telse if(orgHosp.equals(HIE_ID))\n\t\t\treturn FROM_HIE2OTHER;\n\t\telse\n\t\t\treturn FROM_OTHER2HIE;\t\n\n\t}", "public static String getNoteTranscoding(String angloSaxonNote)\r\n {\r\n LinkedHashMap<String,String> noteTranscoding = new LinkedHashMap<>();\r\n noteTranscoding.put(\"C\", \"Do\");\r\n noteTranscoding.put(\"D\", \"Re\");\r\n noteTranscoding.put(\"E\", \"Mi\");\r\n noteTranscoding.put(\"F\", \"Fa\");\r\n noteTranscoding.put(\"G\", \"Sol\");\r\n noteTranscoding.put(\"A\", \"La\");\r\n noteTranscoding.put(\"B\", \"Si\");\r\n return noteTranscoding.get(angloSaxonNote.toUpperCase());\r\n }", "public void setReferrer(String str) {\n set(\"AF_REFERRER\", str);\n this.f50 = str;\n }", "public static String canonicalize(String localeID) {\n/* 400 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "java.lang.String getTranCode();", "public HL7Segment processPV1ToUFD(String pHL7MessageBlock) throws ICANException {\n\n HL7Message aHL7Message = new HL7Message(mHL7Message);\n HL7Segment aPV1Segment = new HL7Segment(\"PV1\");\n\n CodeLookUp aPayClass = new CodeLookUp(\"CSC_PayClass.table\", mFacility, mEnvironment);\n\n\n// Special processing for PV1 segments received in A28 and A31 messages.\n if (aHL7Message.isEvent(\"A28, A31\")) {\n aPV1Segment.set(HL7_23.PV1_1_set_ID, \"1\");\n aPV1Segment.set(HL7_23.PV1_2_patient_class, \"R\");\n aPV1Segment.set(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_facility_ID, mFacility);\n aPV1Segment.set(HL7_23.PV1_18_patient_type, \"R\");\n aPV1Segment.set(HL7_23.PV1_19_visit_number, \"R\".concat(mPatientUR));\n if (mFacility.matches(\"BHH|MAR|PJC|ANG\")) {\n HL7Segment aInPV1Segment = new HL7Segment(aHL7Message.getSegment(HL7_23.PV1));\n String aPV1_8ReferringDoc = aInPV1Segment.get(HL7_23.PV1_8_referring_doctor);\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, aPV1_8ReferringDoc);\n }\n } else { // For all other message types ... i.e. \"A01 to A17\"\n aHL7Message = new HL7Message(pHL7MessageBlock);\n aPV1Segment.setSegment(aHL7Message.getSegment(HL7_23.PV1));\n aPV1Segment.set(HL7_23.PV1_2_patient_class, \"I\");\n\n// Sandringham funny Facility in Room position ....\n if (aPV1Segment.get(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_room).equalsIgnoreCase(\"23\")) {\n aPV1Segment.set(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_room, \"SDMH\");\n }\n if (aPV1Segment.get(HL7_23.PV1_6_prior_patient_location, HL7_23.PL_room).equalsIgnoreCase(\"23\")) {\n aPV1Segment.set(HL7_23.PV1_6_prior_patient_location, HL7_23.PL_room, \"SDMH\");\n }\n aPV1Segment.set(HL7_23.PV1_19_visit_number, \"I\".concat(aPV1Segment.get(HL7_23.PV1_19_visit_number)));\n\n// Translate the Financial Class\n if (mFacility.equalsIgnoreCase(\"BHH\") ||\n mFacility.equalsIgnoreCase(\"MAR\") ||\n mFacility.equalsIgnoreCase(\"ANG\") ||\n mFacility.equalsIgnoreCase(\"PJC\")) {\n\n //aPV1Segment.set(HL7_23.PV1_20_financial_class, aPayClass.getValue(mFacility + \"-\" + aPV1Segment.get(HL7_23.PV1_2_patient_class) + \"-\" + aPV1Segment.get(HL7_23.PV1_20_financial_class)));\n } else {\n aPV1Segment.set(HL7_23.PV1_20_financial_class, aPayClass.getValue(aPV1Segment.get(HL7_23.PV1_20_financial_class)));\n }\n\n\n// Check each of the Dr's have a valid Bayside code\n String aDr;\n// ... Attending Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_7_attending_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_7_attending_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_7_attending_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// ... Refering Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_8_referring_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// ... Consulting Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_9_consulting_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_9_consulting_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_9_consulting_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// Check for CSC sending invalid discharge/admit times of\n aPV1Segment.set(HL7_23.PV1_44_admit_date_time, doValidTimeCheck(aPV1Segment.get(HL7_23.PV1_44_admit_date_time)));\n aPV1Segment.set(HL7_23.PV1_45_discharge_date_time, doValidTimeCheck(aPV1Segment.get(HL7_23.PV1_45_discharge_date_time)));\n }\n return aPV1Segment;\n\n }", "public String mo27015b(String str) {\n String str2 = (String) this.f18797b.get(str);\n return str2 == null ? \"\" : str2;\n }", "public String decode(String shortUrl) {\n return code2url.containsKey(shortUrl) ? code2url.get(shortUrl) : \"\";\n }", "public static String m9681a(Uri uri, Context context) {\n if (!zzbv.zzfj().m9668a(context)) {\n return uri.toString();\n }\n String e = zzbv.zzfj().m9675e(context);\n if (e == null) {\n return uri.toString();\n }\n if (((Boolean) zzkd.m10713e().m10897a(zznw.ae)).booleanValue()) {\n String str = (String) zzkd.m10713e().m10897a(zznw.af);\n String uri2 = uri.toString();\n if (uri2.contains(str)) {\n zzbv.zzfj().m9674d(context, e);\n return uri2.replace(str, e);\n }\n } else if (TextUtils.isEmpty(uri.getQueryParameter(\"fbs_aeid\"))) {\n uri = m9680a(uri.toString(), \"fbs_aeid\", e);\n zzbv.zzfj().m9674d(context, e);\n }\n return uri.toString();\n }", "private CharSequence replacewithSan(String uni1, String myString2) {\n try {\n JSONArray rule_array = new JSONArray(uni1);\n int max_loop = rule_array.length();\n myString2 = myString2.replace(\"null\", \"\\uFFFF\\uFFFF\");\n for (int i = 0; i < max_loop; i++) {\n JSONObject obj = rule_array.getJSONObject(i);\n String from = obj.getString(\"from\");\n String to = obj.getString(\"to\");\n myString2 = myString2.replaceAll(from, to);\n myString2 = myString2.replace(\"null\", \"\");\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n myString2 = myString2.replace(\"\\uFFFF\\uFFFF\", \"null\");\n return myString2;\n }", "public String getUnifieddealcode() {\n return unifieddealcode;\n }", "@Override\r\n\t\tpublic String decode(String str) {\r\n\t\t\t// str to char[]\r\n\t\t\tchar cs[] = (str).toCharArray();\r\n\r\n\t\t\t// per char\r\n\t\t\tStringBuilder result = new StringBuilder(cs.length);\r\n\t\t\tfor (int i = 0, ci = cs.length; i < ci; i++) {\r\n\t\t\t\tif(cs[i] == '&') {\r\n\t\t\t\t\tif(i < ci - 4 && cs[i + 1] == '#' && cs[i + 4] == ';'){\r\n\t\t\t\t\t\tif(cs[i + 2] == '6' && cs[i + 3] == '0'){\r\n\t\t\t\t\t\t\ti += 4;\r\n\t\t\t\t\t\t\tresult.append('<');\r\n\t\t\t\t\t\t}else if(cs[i + 2] == '6' && cs[i + 3] == '2'){\r\n\t\t\t\t\t\t\ti += 4;\r\n\t\t\t\t\t\t\tresult.append('>');\r\n\t\t\t\t\t\t}else if(cs[i + 2] == '3' && cs[i + 3] == '8'){\r\n\t\t\t\t\t\t\ti += 4;\r\n\t\t\t\t\t\t\tresult.append('&');\r\n\t\t\t\t\t\t}else if(cs[i + 2] == '3' && cs[i + 3] == '9'){\r\n\t\t\t\t\t\t\ti += 4;\r\n\t\t\t\t\t\t\tresult.append('\\'');\r\n\t\t\t\t\t\t}else if(cs[i + 2] == '3' && cs[i + 3] == '4'){\r\n\t\t\t\t\t\t\ti += 4;\r\n\t\t\t\t\t\t\tresult.append('\"');\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tresult.append(cs[i]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tresult.append(cs[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tresult.append(cs[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn result.toString();\r\n\t\t}", "public static String hackerSpeak(String str) {\n\n String replace = str.replace(\"a\", \"4\").replace(\"e\", \"3\").replace(\"i\", \"1\").replace(\"o\", \"0\").replace(\"s\", \"5\");\n return replace;\n }", "static void m1373c(Context context, String str) {\n cy.m1453a(context, \"gtm_install_referrer\", \"referrer\", str);\n m1376e(context, str);\n }", "private static C10387b m26008a(String str) {\n String str2;\n int i;\n if (str == null) {\n return null;\n }\n int indexOf = str.indexOf(44);\n if (indexOf >= 0) {\n str2 = str.substring(0, indexOf);\n i = indexOf + 1;\n } else {\n str2 = \"\";\n i = 0;\n }\n int indexOf2 = str.indexOf(47, i);\n String str3 = \"LogSamplerImpl\";\n if (indexOf2 <= 0) {\n String str4 = \"Failed to parse the rule: \";\n String valueOf = String.valueOf(str);\n Log.e(str3, valueOf.length() != 0 ? str4.concat(valueOf) : new String(str4));\n return null;\n }\n try {\n long parseLong = Long.parseLong(str.substring(i, indexOf2));\n long parseLong2 = Long.parseLong(str.substring(indexOf2 + 1));\n if (parseLong < 0 || parseLong2 < 0) {\n StringBuilder sb = new StringBuilder(72);\n sb.append(\"negative values not supported: \");\n sb.append(parseLong);\n sb.append(Constants.URL_PATH_DELIMITER);\n sb.append(parseLong2);\n Log.e(str3, sb.toString());\n return null;\n }\n C10388a h = C10387b.m26478h();\n h.mo28112a(str2);\n h.mo28111a(parseLong);\n h.mo28113b(parseLong2);\n return (C10387b) h.mo27817c();\n } catch (NumberFormatException e) {\n String str5 = \"parseLong() failed while parsing: \";\n String valueOf2 = String.valueOf(str);\n Log.e(str3, valueOf2.length() != 0 ? str5.concat(valueOf2) : new String(str5), e);\n return null;\n }\n }", "public CWE getPsl7_ProductServiceCode() { \r\n\t\tCWE retVal = this.getTypedField(7, 0);\r\n\t\treturn retVal;\r\n }", "public static String beautifyPhone(String phone) {\r\n\t\tif (isNullOrEmpty(phone)) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tif (phone.startsWith(\"84\")) {\r\n\t\t\treturn \"0\" + phone.substring(2);\r\n\t\t}\r\n\t\tif (phone.startsWith(\"+84\")) {\r\n\t\t\treturn \"0\" + phone.substring(3);\r\n\t\t}\r\n\t\treturn phone;\r\n\t}", "private String getAnomizedPostcode() {\r\n\tString postcode = (String) record.get(\"postcode\");\r\n\tif (postcode != null && postcode.length() > 0) {\r\n\t postcode = postcode.substring(0, 1);\r\n\t}\r\n\treturn postcode;\r\n }" ]
[ "0.54626954", "0.5162073", "0.5127206", "0.51003885", "0.50999916", "0.50804603", "0.50710195", "0.5062904", "0.5054172", "0.5052931", "0.50497", "0.5039666", "0.49952257", "0.49029467", "0.48979697", "0.48832974", "0.48812383", "0.484021", "0.48388344", "0.48008436", "0.47881478", "0.47857687", "0.47573376", "0.46968493", "0.46887746", "0.46724138", "0.46634167", "0.46618423", "0.46570653", "0.46382937", "0.46093804", "0.4583315", "0.4575537", "0.457499", "0.45727524", "0.4556802", "0.4552636", "0.4545159", "0.45447066", "0.45323113", "0.4522179", "0.45217413", "0.4521715", "0.4515314", "0.4515268", "0.4509024", "0.44987023", "0.44958454", "0.4489433", "0.44820806", "0.44741654", "0.44735736", "0.44713402", "0.44694626", "0.44672284", "0.4463288", "0.44513935", "0.44457644", "0.44415116", "0.44354355", "0.44204766", "0.4419686", "0.44110873", "0.44105273", "0.44086754", "0.44073442", "0.44061416", "0.44052038", "0.4404049", "0.44038925", "0.44018143", "0.43962377", "0.43948334", "0.4386441", "0.43809086", "0.43707058", "0.4369396", "0.43667185", "0.43663028", "0.4356915", "0.4351297", "0.43479174", "0.4335745", "0.43327576", "0.433245", "0.4330482", "0.432491", "0.4319498", "0.4318108", "0.43162408", "0.43146512", "0.4307753", "0.4307096", "0.43060762", "0.4305939", "0.4302717", "0.4302254", "0.42927444", "0.42896286", "0.42894596" ]
0.47845563
22
This routine gets the operator id for the Recruiter.
private static String fetchRecruiterId(HashMap<String, Object> parameterMap) { String responsibleId = PsEmployeeChecklist.findByEmployeeIdAndChecklistDate((String)parameterMap.get("employeeId"), (Date)parameterMap.get("effectiveDate")); String recruiterId = CrossReferenceEmployeeId.findLegacyEmployeeIdByEmployeeId(responsibleId); //BEGIN-PROCEDURE HR05-GET-NEXT-OPID //LET $Found = 'N' //BEGIN-SELECT //COD.ZHRF_LEG_EMPL_ID //COD.Emplid //LET $PSRecruiter_Id = &COD.ZHRF_LEG_EMPL_ID //LET $Found = 'Y' //FROM PS_ZHRT_EMPID_CREF COD //WHERE COD.Emplid = $PSResponsible_Id //END-SELECT //IF ($Found = 'N') if(recruiterId == null) { //LET $Hld_Wrk_Emplid = $Wrk_Emplid //LET $Hld_LegEmplid = $LegEmplid //LET $Wrk_Emplid = $PSResponsible_Id //LET $LegEmplid // //DO Get-Legacy-OprId !From ZHRI100A.SQR recruiterId = Main.fetchNewLegacyEmployeeId(parameterMap); //LET $PSRecruiter_ID = $LegEmplid //LET $Wrk_Emplid = $Hld_Wrk_Emplid //LET $LegEmplid = $Hld_LegEmplid //END-IF !Found = 'N' } //END-PROCEDURE HR05-GET-NEXT-OPID return recruiterId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getOperatorid() {\n return operatorid;\n }", "public long getOperatorId() {\r\n return operatorId;\r\n }", "public Integer getOperatorId() {\n return operatorId;\n }", "public Long getOperatorId() {\n return operatorId;\n }", "public String getSOperatorID() {\n return sOperatorID;\n }", "public java.lang.String getOperID() {\n return operID;\n }", "public java.lang.Integer getOperator() throws java.rmi.RemoteException;", "java.lang.String getOperationId();", "int getHjOpId();", "public int getOperatorNum() {\n return operatorNum;\n }", "public int getCurrentOperationId(){\n int nmr = 1;\n operationLock.lock();\n try (\n Statement s = rawDataSource.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n ResultSet res = s.executeQuery(\n \"SELECT OP_ID FROM APP.OPERATIONS ORDER BY OP_ID ASC\")) {\n\n if (res.last()) {\n nmr = Integer.parseInt(res.getString(\"OP_ID\")) + 1;\n }\n } catch (SQLException ex) {\n return nmr;\n }\n\n operationLock.unlock();\n return nmr;\n }", "public Long getOpId() {\n return opId;\n }", "public Long getOpId() {\n return opId;\n }", "public Long getOpId() {\n return opId;\n }", "public Long getOpId() {\n return opId;\n }", "public String getAssocOneIdExpr(String prefix, String operator);", "OperationIdT getOperationId();", "public Long getOperator() {\n return operator;\n }", "public int getAccOpId() {\n return accOpId_;\n }", "public java.lang.Integer getOperator() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.lang.Integer) __getCache(\"operator\")));\n }", "long getApikeyOpId();", "public int getAccOpId() {\n return accOpId_;\n }", "public java.lang.Integer getOperator() {\n\treturn operator;\n}", "java.lang.String getWorkerId();", "String getIdNumber();", "public com.hps.july.persistence.OperatorKey getOperatorKey() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((com.hps.july.persistence.OperatorKey) __getCache(\"operatorKey\")));\n }", "public String operator() {\n return this.operator;\n }", "com.google.protobuf.ByteString getOperationIdBytes();", "java.lang.String getRecognitionId();", "public String getOperator()\r\n {\r\n return operator;\r\n }", "public Long getAssignOperatorId() {\n return assignOperatorId;\n }", "public java.lang.String getRecUpdOperId () {\n\t\treturn recUpdOperId;\n\t}", "java.lang.String getID();", "public final Operator operator() {\n return operator;\n }", "public long getApikeyOpId() {\n return apikeyOpId_;\n }", "public Operator getOperator()\n {\n return operator;\n }", "int getSimObjID();", "public int getRaterId();", "public void setOperatorid(String operatorid) {\n this.operatorid = operatorid;\n }", "String getForOperationId();", "public int getID() {\n\t\tif (tone.getNoteID() < 0) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn (tone.getNoteID() + shift.getShiftID()) + (12 * octave) + 12;\n\t}", "public long getApikeyOpId() {\n return apikeyOpId_;\n }", "String experimentId();", "String getOp();", "String getOp();", "String getOp();", "java.lang.String getRecognizerId();", "public String getOperator() {\n return operator;\n }", "public String getOperator()\r\n\t{\r\n\t\tSystem.out.println(\"Choose the any operation from the following operations:\");\r\n System.out.println(\"1.+\");\r\n System.out.println(\"2.-\");\r\n System.out.println(\"3.*\");\r\n System.out.println(\"4./\");\r\n \r\n\t\tString op=sc.next();\r\n\t\treturn op;\r\n\t}", "public String getOperator() {\n return operator;\n }", "public String getOperator() {\n return operator;\n }", "public String getOperator() {\n return operator;\n }", "public String getOperator() {\n return operator;\n }", "public String getOperator() {\n return operator;\n }", "public String getOperator() {\n return operator;\n }", "public java.lang.String getOpNum() {\r\n return localOpNum;\r\n }", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String labPlanId();", "public int getRtoId() {\n\t\treturn id;\n\t}" ]
[ "0.73206973", "0.72568434", "0.7131252", "0.69961566", "0.6513962", "0.6485203", "0.6455604", "0.64093816", "0.640557", "0.63615257", "0.63432306", "0.6299114", "0.6299114", "0.6299114", "0.6299114", "0.6224817", "0.62239635", "0.6217052", "0.6184436", "0.6166588", "0.6146871", "0.614105", "0.61033815", "0.60455215", "0.5982786", "0.59590834", "0.5956976", "0.59441835", "0.5909537", "0.5884369", "0.5883053", "0.58740014", "0.5871396", "0.58613044", "0.58591", "0.58337736", "0.5827114", "0.5816582", "0.5811021", "0.58100593", "0.5807083", "0.5800171", "0.57835776", "0.5769019", "0.5769019", "0.5769019", "0.5766281", "0.5765647", "0.5765091", "0.57638264", "0.57638264", "0.57638264", "0.57638264", "0.57638264", "0.57638264", "0.57460684", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.57329476", "0.5732305", "0.572495" ]
0.0
-1
This routine will get the Personal Data row for each of the employee numbers entered in the trigger file.
public static HashMap<String, Object> fetchPersonalData (HashMap<String, Object> parameterMap) { //BEGIN-PROCEDURE HR05-GET-PERSONAL-DATA PsPersonalData psPersonalData = PsPersonalData.findByOriginalHireEmployeeId((String)parameterMap.get("employeeId")); if(psPersonalData != null) { //TO_CHAR(COHE.ORIG_HIRE_DT, 'YYYY-MM-DD') &CPD2Orig_Hire_Dt //CPD2.SEX //TO_CHAR(CPD2.Birthdate, 'YYYY-MM-DD') &CPD2Birthdate //LET $PSGender = &CPD2.SEX parameterMap.put("gender", psPersonalData.getSex()); //LET $PSBDate = &CPD2Birthdate //UNSTRING $PSBDate by '-' into $first $second $Third //LET $PSBirthdate = $Second || $Third || $first parameterMap.put("birthDate", new SimpleDateFormat("yyyyMMdd").format(psPersonalData.getBirthdate()).toUpperCase()); } Date originalHireDate = PsEmployeeOriginalHire.findOriginalHireDateByEmployeeId((String)parameterMap.get("employeeId")); //IF &CPD2Orig_Hire_Dt = '' if(originalHireDate != null) { //UNSTRING &CPD2Orig_Hire_dt by '-' into $first $second $Third //LET $PSStart_dt = $First || $Second || $Third parameterMap.put("startDate", new SimpleDateFormat("yyyyMMdd").format(originalHireDate).toUpperCase()); //END-IF } //END-PROCEDURE HR05-GET-PERSONAL-DATA return parameterMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[][] getResearchEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof ResearchCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "@DataProvider(name=\"empDataProviderExcel\")\n\tString [][]getEmpDataFromExcel() throws IOException{\n\t\tString dataSheetPath = System.getProperty(\"user.dir\")+\"/testDataAndTestCases/API_TestCases.xlsx\";\n\t\tString sheetName = \"EmployeeTestData\";\n\t\t\n\t\tint rowCount = XLUtills.getRowCount(dataSheetPath, sheetName);\n\t\tint colCount = XLUtills.getCellCount(dataSheetPath, sheetName, rowCount);\n\t\t\t\t\n\t\tString [][]empData = new String[rowCount][colCount];\n\t\t\n\t\tfor(int i = 1; i <= rowCount; i++) {\n\t\t\tfor(int j = 0; j < colCount; j++) {\n\t\t\t\tempData[i-1][j] = XLUtills.getCellData(dataSheetPath, sheetName, i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn empData;\n\t}", "public String[][] getVendorEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof VendorCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "@Logging\n\tprivate List<Employee> getEmployee(List<String> aFileList) {\n\t\t\n\t\tList<Employee> aEmployeList = aFileList.stream()\n\t\t\t\t.skip(1) // skip the header line\n\t\t\t\t.map(line -> line.split(\",\")) // transform each line to an array\n\t\t\t\t.map(employeeData -> new Employee(Long.parseLong(employeeData[0]), employeeData[1], employeeData[2],\n\t\t\t\t\t\temployeeData[3], employeeData[4])) // transform each array to an entity\n\t\t\t\t.collect(Collectors.toList());\n\t\t\n\t\treturn aEmployeList;\n\t\t\n\t}", "private Employee[] readEmployees() {\n Employee[] employees = null;\n \n try (DataInputStream inputStream = new DataInputStream(new FileInputStream(\"employeeBinary.dat\"))) {\n int numEmployees = inputStream.readInt();\n employees = new Employee[numEmployees];\n \n int length;\n String name;\n String dateString;\n LocalDate date;\n Double salary;\n \n for (int n = 0; n < numEmployees; ++n) {\n length = inputStream.readInt();\n name = readFixedString(length, inputStream);\n length = inputStream.readInt();\n dateString = readFixedString(length, inputStream);\n date = LocalDate.parse(dateString);\n salary = inputStream.readDouble();\n Employee temp = new Employee(name, salary, date);\n employees[n] = temp;\n }\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n return employees;\n }", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"[email protected]\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "public List<Contact> readEmployeePayrollDatabase(IOService ioService) throws CustomPayrollException {\n\t\tif (ioService.equals(IOService.DB_IO)) {\n\t\t\tthis.employeePayrollList = normalisedDBServiceObj.readData();\n\t\t}\n\t\treturn this.employeePayrollList;\n\t}", "private void addEmployeeInfo(Section catPart) throws SQLException, IOException{\r\n PdfPTable employee = new PdfPTable(1);\r\n \r\n Paragraph empId = new Paragraph(\"Medarbejdernummer: \"+model.getTimeSheet(0).getEmployeeId());\r\n PdfPCell empIdCell = new PdfPCell(empId);\r\n empIdCell.setBorderColor(BaseColor.WHITE);\r\n String name = fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getFirstName() +\" \"+ fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getLastName();\r\n Paragraph empName = new Paragraph(\"Navn: \" + name);\r\n PdfPCell empNameCell = new PdfPCell(empName);\r\n empNameCell.setBorderColor(BaseColor.WHITE);\r\n \r\n employee.setHeaderRows(0);\r\n employee.addCell(empIdCell);\r\n employee.addCell(empNameCell);\r\n employee.setWidthPercentage(80.0f);\r\n \r\n catPart.add(employee);\r\n }", "@DataProvider(name = \"empdataprovider\")\n\tString[][] getRegData() throws IOException {\n\t\tString path = System.getProperty(\"user.dir\") + \"/tradeBeaExcell/TradeBeaApiTest.xlsx\";\n\n\t\tint rownum = XLUtils.getRowCount(path, \"Registration\");\n\t\tint colcount = XLUtils.getCellCount(path, \"Registration\", 1);\n\n\t\tString empdata[][] = new String[rownum][colcount];\n\t\tfor (int i = 1; i <= rownum; i++) {\n\t\t\tfor (int j = 0; j < colcount; j++) {\n\t\t\t\tempdata[i - 1][j] = XLUtils.getCellData(path, \"Registration\", i, j);\n\t\t\t}\n\t\t}\n\n\t\treturn (empdata);\n\t}", "private void loadAllEmployees() throws AccessException, SQLException {\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = constructSQL();\n\t\tint[] empID = new int[1];\n\t\tint dailyOffset=0;\n\t\tif (WorkedNMinutesAlertSource.DAILY_CHECK.equalsIgnoreCase(\"yesterday\")) {\n\t\t\tdailyOffset = -1;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tif (minAgeSet) {\n\t\t\t\tDatetime birthThreshold = DateHelper.addDays(DateHelper.getCurrentDate(), -(365*minAge));\n\t\t\t\tps.setDate(1, new java.sql.Date(birthThreshold.getTime()));\n\t\t\t}\n\t\t\trs = ps.executeQuery();\n\t\t\tboolean isWeekly = tPeriod.equalsIgnoreCase(\"weekly\");\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\t//for each employee, retrieve work details for the day before\n\t\t\t\t//and process accordingly.\n\t\t\t\tempID[0] = new Integer(rs.getString(1)).intValue();\n\t\t\t\tWorkDetailAccess wrkDetAccess = new WorkDetailAccess(conn);\n\t\t\t\tWorkDetailList wdl = null;\n\n\t\t\t\tif (!isWeekly) {\n\t\t\t\t\twdl = wrkDetAccess.loadByEmpIdsAndDateRange(empID, DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getCurrentDate(), dailyOffset), DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getCurrentDate(), dailyOffset), \"D\", null);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString firstDayOfWeek = Registry.getVarString(\"/system/WORKBRAIN_PARAMETERS/DAY_WEEK_STARTS\");\n\t\t\t\t\twdl = wrkDetAccess.loadByEmpIdsAndDateRange(empID, DateHelper.getWeeksFirstDate(\n\t\t\t\t\t\t\tDateHelper.getCurrentDate(), firstDayOfWeek), DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getWeeksFirstDate(DateHelper.getCurrentDate(), \n\t\t\t\t\t\t\t\t\tfirstDayOfWeek), 7), \"D\", null);\n\t\t\t\t}\n\t\t\t\tIterator wdlIter = wdl.iterator();\n\t\t\t\taccumulatedTime=0;\n\t\t\t\twhile (wdlIter.hasNext()) {\n\t\t\t\t\tprocessWorkDetail((WorkDetailData) wdlIter.next(), rs\n\t\t\t\t\t\t\t.getString(2));\n\t\t\t\t}\n\t\t\t\tif (accumulatedTime >= new Integer(nMinutes).intValue()) {\n\t\t\t\t\tfor (int i=0;i < tempRows.size(); i++) {\n\t\t\t\t\t\trows.add(tempRows.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttempRows = null;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException();\n\t\t} finally {\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\n\t\t\tif (ps != null)\n\t\t\t\tps.close();\n\t\t}\n\n\t}", "public String importData() {\n\t\t\treturn employeeDAO.importData();\n\t\t}", "public String f9employee() throws Exception {\r\n\t\t/**\r\n\t\t * BUILD COMPLETE QUERY (ALONG WITH PARAMETERS) WHICH GIVES THE DESIRED\r\n\t\t * OUTPUT ALONG WITH PROFILES\r\n\t\t */\r\n\t\tString query = \"SELECT EMP_TOKEN, EMP_FNAME || ' ' || EMP_MNAME || ' ' || EMP_LNAME,\"\r\n\t\t\t\t+ \" EMP_ID,CENTER_NAME,RANK_NAME\"\r\n\t\t\t\t+ \" FROM HRMS_EMP_OFFC\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_CENTER ON(HRMS_CENTER.CENTER_ID=HRMS_EMP_OFFC.EMP_CENTER)\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_RANK ON(HRMS_RANK.RANK_ID=HRMS_EMP_OFFC.EMP_RANK) \";\r\n\r\n\t\tquery += \"\tORDER BY EMP_ID ASC \";\r\n\r\n\t\t/**\r\n\t\t * SET THE HEADER NAMES OF TABLE WHICH IS DISPLAYED IN POP-UP WINDOW. *\r\n\t\t */\r\n\r\n\t\tString[] headers = { getMessage(\"employee.id\"), getMessage(\"employee\") };\r\n\r\n\t\t/**\r\n\t\t * DEFINE THE PERCENT WIDTH OF EACH COLUMN\r\n\t\t */\r\n\t\tString[] headerWidth = { \"15\", \"35\" };\r\n\r\n\t\t/**\r\n\t\t * -SET THE FIELDNAMES INTO WHICH THE VALUES ARE BEING POPULATED AFTER A\r\n\t\t * ROW IS SELECTED. -USEFULL IN CASES WHERE SUBMIT FLAG IS 'false'\r\n\t\t * -PARENT FORM WILL SHOW THE VALUES IN THE FILDS CORRSPONDING TO COLUMN\r\n\t\t * INDEX. NOTE: LENGHT OF COLUMN INDEX MUST BE SAME AS THE LENGTH OF\r\n\t\t * FIELDNAMES\r\n\t\t */\r\n\r\n\t\tString[] fieldNames = { \"searchemptoken\", \"searchempName\",\r\n\t\t\t\t\"searchempId\" };\r\n\r\n\t\t/**\r\n\t\t * SET THE COLUMN INDEX E.G. SUPPOSE THE POP-UP SHOWS 4 COLUMNS, BUT ON\r\n\t\t * CLICKING A ROW ONLY SECOND AND FORTH COLUMN VALUES NEED TO BE SHOWN\r\n\t\t * IN THE PARENT WINDOW FIELDS THEN THE COLUMN INDEX CAN BE {1,3}\r\n\t\t * \r\n\t\t * NOTE: COLUMN NUMBERS STARTS WITH 0\r\n\t\t * \r\n\t\t */\r\n\t\tint[] columnIndex = { 0, 1, 2 };\r\n\r\n\t\t/**\r\n\t\t * WHEN SET TO 'true' WILL SUBMIT THE FORM\r\n\t\t * \r\n\t\t */\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\t/**\r\n\t\t * IF THE 'submitFlag' IS 'true' , THE FORM WILL SUBMIT AND CALL\r\n\t\t * FOLLOWING METHOD IN THE ACTION * NAMING CONVENSTION: <NAME OF\r\n\t\t * ACTION>_<METHOD TO CALL>.action\r\n\t\t */\r\n\t\tString submitToMethod = \"\";\r\n\r\n\t\t/**\r\n\t\t * CALL THIS METHOD AFTER ALL PARAMETERS ARE DEFINED *\r\n\t\t */\r\n\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "public static void main (String args[] ){\n\t\tScanner scanner = new Scanner( System.in );\r\n\t\tSystem.out.print ( \" 1. Load Employee (From File) \\n 2. Exit Program \\n Enter Your Selection: \" );\r\n\t\tint input = scanner.nextInt();\r\n\t\t\r\n\t\t//if user inputs 1 read the text file and print employees loaded from the file\r\n\t\tif (input == 1 ){\r\n\t\t\tString[] Data;\r\n\t\t\t/**\r\n\t\t\t**create four arrays each of type StaffPharmacist, PharmacyManager, StaffTechnician, Senior technician\r\n\t\t\t**in order to store the employee objects. create arrays of length 1\r\n\t\t\t**/\r\n\t\t\tStaffPharmacist [] Pharmacist = new StaffPharmacist[1];\t\t\r\n\t\t\tPharmacyManager [] Manager = new PharmacyManager[1];\t\t\t\r\n\t\t\tStaffTechnician [] staffTech = new StaffTechnician[1];\t\t\t\r\n\t\t\tSeniorTechnician [] seniorTech = new SeniorTechnician[1];\r\n\t\t\ttry{\r\n\t\t\t\t//read the text file using scanner\r\n\t\t\t\tFile file = new File(\"employees.txt\");\r\n\t\t\t\t\t\t\r\n\t\t\t\tScanner sc = new Scanner(file);\r\n\t\t\t\t\t\r\n\t\t\t\t//while text file has next line split the text to store all elements in to an array\r\n\t\t\t\twhile (sc.hasNextLine()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//read the text file and store it in an array called data. split the text file at , and read until we have next line\r\n\t\t\t\t\tData = sc.nextLine().split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t//create 4 employee objects of each employee type \r\n\t\t\t\t\tPharmacyManager pharmacyManager = new PharmacyManager(Data);\r\n\t\t\t\t\tStaffPharmacist staffPharmacist = new StaffPharmacist(Data);\r\n\t\t\t\t\tStaffTechnician staffTechnician = new StaffTechnician(Data);\r\n\t\t\t\t\tSeniorTechnician seniorTechnician = new SeniorTechnician(Data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tint i;\r\n\t\t\t\t\t/** parse through the text files to check the job id number.\r\n\t\t\t\t\tif the job id is one than the employee is pharmacy manager and there fore store it in an array of type pharmacy manager, else if job id == 2 than it is a staff pharmacist there fore store the staff pharmacist employee in the respective array. else if job id == 3 the employee is a staff technician therefore store the employee object staff technician in array of type staff technician and if the id == 4 than the employee is senior technician so store the employee senior technician in an array of type senior technician\r\n\t\t\t\t\t**/\r\n\t\t\t\t\tfor( i = 0; i < Data.length; i = i + 4){\r\n\t\t\t\t\t\tif( Integer.parseInt(Data[i]) == 1 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tManager[0] = pharmacyManager;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 2 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPharmacist[0] = staffPharmacist;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 3 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tstaffTech[0] = staffTechnician;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 4 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tseniorTech[0] = seniorTechnician;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t//close the file \r\n\t\t\t\tsc.close();\r\n\t\t\t\t\t\r\n\t\t\t\t//print that the file loaded success fully\r\n\t\t\t\tSystem.out.println ( \" \\n File Successfully Loaded! \" );\r\n\t\t\t\t\t\r\n\t\t\t\t//set a boolean variable named keepgoing equal to true.\r\n\t\t\t\tboolean keepGoing = true;\r\n\t\t\t\t//as long as keep going remains true, do the following steps\r\n\t\t\t\twhile(keepGoing){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ask the user what they would like to do next\r\n\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t\t//if user inputs 3 that is tries to print checks prior to entering hours worked than throw an error\r\n\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tSystem.out.println( \" Please enter the hours worked (Option #2) before trying to calculate the paycheck amounts! \" );\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//again ask the user after throwing the exception about what they would like to do\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//do this steps as long as user inputs 1 or 2\r\n\t\t\t\t\t\tdo{\r\n\t\t\t\t\t\t\t//if the user inputs 1 print the employee information described in respective classes of employees\r\n\t\t\t\t\t\t\tif(input == 1){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tManager[0].printPharmacyManager();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tPharmacist[0].printStaffPharmacist();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tseniorTech[0].printSeniorTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tstaffTech[0].printStaffTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//if the user inputs 2 prompt the user asking the number of hours worked by employees\r\n\t\t\t\t\t\t\telse if(input == 2){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tSystem.out.print( \" \\n Please enter the hours worked: \" );\r\n\t\t\t\t\t\t\t\tint workingHours = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//than again ask user what they would like to do\r\n\t\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t/**if user inputs 3 after they entered number of hours employees worked than calculate the employee pay checks\r\n\t\t\t\t\t\t\t\tusing the calculate pay method defined in employee class\r\n\t\t\t\t\t\t\t\tget the employees pay rate by using getHourlyRate method defined in employee class\r\n\t\t\t\t\t\t\t\t**/\r\n\t\t\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tManager[0].calculatePay(workingHours, Manager[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tPharmacist[0].calculatePay(workingHours, Pharmacist[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tstaffTech[0].calculatePay(workingHours, seniorTech[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tseniorTech[0].calculatePay(workingHours, staffTech[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//again show the menu to the user asking them what they would like to do\r\n\t\t\t\t\t\t\t//if user enters one or two or three repeat the above steps else exit the loop\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}while(input == 1 || input == 2 );\r\n\t\t\t\t\t}while(input == 3);\r\n\t\t\t\t\t//if user enters 4 set keepGoing = false print good bye and exit the loop.\r\n\t\t\t\t\tif(input == 4){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tkeepGoing = false;\r\n\t\t\t\t\t\tSystem.out.println( \" Goodbye! \" );\r\n\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//if the file is not found in the system throw an IO exception printing file not found\t\t\t\t\t\t\t\r\n\t\t\t}catch(FileNotFoundException fnfe){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t//catch the exception if the file is not found\r\n\t\t\t\tSystem.out.println(\" File Load Failed! \\n java.io.FileNotFoundException: employees.txt ( The system cannot find the file specified) \\n Program Exiting..... \");\r\n\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t//if the user inputs 2 in the main menu bar exit the loop and say goodBye!\r\n\t\tif(input == 2){\r\n\t\t\t\t\r\n\t\t\tSystem.out.println ( \"\\n Good Bye! \\n\" );\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "public void readStaffEntry()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tScanner reader = new Scanner(new FileReader(\"StaffEntryRecords.txt\"));\r\n\t\t\twhile (reader.hasNext())\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(reader.nextLine());\r\n\t\t\t}\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"FileNotFoundException\");\r\n\t\t}\r\n\t}", "private void loadEmployeesFromDatabase() {\n Cursor cursor = mDatabase.getAllEmployees();\n\n if (cursor.moveToFirst()) {\n\n usernameholder= cursor.getString(0);\n emailholder= cursor.getString(1);\n usertypeholder=cursor.getInt(2);\n\n\n\n\n\n }\n }", "public static void Read() throws IOException {\n\t\tFile file = new File(\"C:\\\\Users\\\\villu\\\\Documents\\\\Book12.xlsx\");\n\t\tFileInputStream excel= new FileInputStream(file);\n\t\tXSSFWorkbook workbook= new XSSFWorkbook(excel);\n\t\tXSSFSheet sheet= workbook.getSheetAt(0);\n\t\tIterator<Row> rowIterator=sheet.iterator();\n\t\twhile(rowIterator.hasNext()) {\n\t\t\tRow rowvalue=rowIterator.next();\n\t\t\tIterator<Cell> columnIterator=rowvalue.cellIterator();\n\t\t\tint i = 1;\n\t\t\twhile(columnIterator.hasNext()) \n\t\t\t{\n\t\t\t\tif(i==1) {\n\t\t\t\t\tFirst_Name.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==2)\n\t\t\t\t{\n\t\t\t\t\tMiddle_Name.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==3)\n\t\t\t\t{\n\t\t\t\t\tLast_Name.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==4)\n\t\t\t\t{\n\t\t\t\t\tUser_Name.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==5)\n\t\t\t\t{\n\t\t\t\t\tEmployee_Id.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==6)\n\t\t\t\t{\n\t\t\t\t\tPassword.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==7)\n\t\t\t\t{\n\t\t\t\t\tGender.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMarital_Status.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t}workbook.close();\n\t\n}", "public static void readfile() throws IOException {\n\t\t\n String excelFilePath = \"D:\\\\Docs\\\\Study Docs\\\\11th Semester\\\\CSE400\\\\Works\\\\Database\\\\StudentInfo.xlsx\";\n FileInputStream inputStream = new FileInputStream(new File(excelFilePath));\n \n Workbook workbook = new XSSFWorkbook(inputStream);\n Sheet firstSheet = workbook.getSheetAt(0);\n Iterator<Row> iterator = firstSheet.iterator();\n int flag=0;\n \n while (iterator.hasNext()) {\n Row nextRow = iterator.next();\n Iterator<Cell> cellIterator = nextRow.cellIterator();\n int c=0;\n String cid=\"\",sid=\"\";\n \n while (cellIterator.hasNext()) {\n Cell cell = cellIterator.next();\n if(c==0){//If it is first value\n \tsid=cell.getStringCellValue();\n \tc=1;\n }\n else{//If it is second value\n \tcid=cell.getStringCellValue();\n }\n }\n if(insert_data(sid,cid)==false) flag=1;//Insert to MSaccess\n //System.out.println(sid+\" \"+cid);\n }\n \n workbook.close();\n inputStream.close();\n if(flag==0)JOptionPane.showMessageDialog(null, \"All value imported successfully.\");\n else JOptionPane.showMessageDialog(null, \"Value importing was interrupted.\");\n }", "public void loadEmployees(String fileName)\r\n\t{\r\n\t\t//try block to attempt to open the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//declare local variables for the file name and data fields within the employeelist text file\r\n\t\t\t//these will all be Strings when pulled from the file, and then converted to the proper data type when they are assigned to the Employee objects\r\n\t\t\tString empID = \"\";\r\n\t\t\tString empLastName = \"\";\r\n\t\t\tString empFirstName = \"\";\r\n\t\t\tString empType = \"\";\t\r\n\t\t\tString empSalary = \"\"; //will convert to double\r\n\t\t\t\r\n\t\t\t//scan for file\r\n\t\t\tScanner infile = new Scanner(new FileInputStream(fileName));\r\n\t\t\t\r\n\t\t\t//while loop searching file records\r\n\t\t\twhile(infile.hasNext())\r\n\t\t\t{\r\n\t\t\t\t//split the field into segments with the comma (,) being the delimiter (employee ID, Last Name, First Name, employee type, and employee salary)\r\n\t\t\t\tString line = infile.nextLine();\r\n\t\t\t\tString[] fields = line.split(\",\");\r\n\t\t\t\tempID = fields[0];\r\n\t\t\t\tempLastName = fields[1];\r\n\t\t\t\tempFirstName = fields[2];\r\n\t\t\t\tempType = fields[3];\r\n\t\t\t\tempSalary = fields[4];\r\n\t\t\t\t\r\n\t\t\t\t//create a selection structure that creates the type of employee based on the empType\r\n\t\t\t\tif(empType.equalsIgnoreCase(\"H\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an HourlyEmployee and convert empSalary to a double\r\n\t\t\t\t\tHourlyEmployee hourlyEmp = new HourlyEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add hourlyEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(hourlyEmp);\r\n\t\t\t\t}//end create hourly employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create an exempt employee for E\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"E\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an exempt employee (salary) and convert the empSalary to a double\r\n\t\t\t\t\tExemptEmployee salaryEmp = new ExemptEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add salaryEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(salaryEmp);\r\n\t\t\t\t}//end create exempt (salary) employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a contractor \r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"C\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a contract employee and convert the empSalary to a double\r\n\t\t\t\t\tContractEmployee contractEmp = new ContractEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add contractEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(contractEmp);\r\n\t\t\t\t}//end create contractor employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a day laborer\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"d\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a day laborer and convert the empSalary to a double\r\n\t\t\t\t\tDayLaborer laborer = new DayLaborer(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add laborer to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(laborer);\r\n\t\t\t\t}//end create day laborer employee\r\n\t\t\t\t\r\n\t\t\t\t//else ignore the employee (looking at you Greyworm!)\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the employee type and id to return as an error\r\n\t\t\t\t\tempTypeError = empType;\r\n\t\t\t\t\tempIDError = empID;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ignore the employee \r\n\t\t\t\t\tempType = null;\r\n\t\t\t\t}//end ignore X employee\r\n\t\t\t}//end while loop cycling the records in the employeelist\r\n\t\t\t\r\n\t\t\t//close infile when done\r\n\t\t\tinfile.close();\r\n\t\t}//end of try block opening employeelist.txt file\r\n\t\t\r\n\t\t//catch block if file not found\r\n\t\tcatch(IOException ex)\r\n\t\t{\r\n\t\t\t//call ex object and display message\r\n\t\t\tex.printStackTrace();\r\n\t\t}//end of catch for file not found\r\n\t}", "public Vector<Employees> getEmployees() {\n\t\t\tVector<Employees> v = new Vector<Employees>();\n\t\t\ttry {\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\tResultSet rs = stmt\n\t\t\t\t\t\t.executeQuery(\"select * from employees_details order by employees_pf\");\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tint file_num = rs.getInt(1);\n\t\t\t\t\tString name = rs.getString(2);\n\t\t\t\t\tint drive = rs.getInt(3);\n\t\t\t\t\tEmployees employee = new Employees(file_num, name, drive);\n//\t\t\t\t\tCars cars = new Truck(reg, model, drive);\n\t\t\t\t\tv.add(employee);\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "private PIM_AddEmployeeListPage() {\n\t\tPropertyFileReader propReader = new PropertyFileReader();\n\t\tPIM_AddEmployeePageProperties = propReader.readPropertyFile(\"PIM_AddEmployeeListProperties\");\n\t}", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"[email protected]\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"[email protected]\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "private static Employee [] readFile(String fileName) {\n Employee[] employees = new Employee[0];\n try{\n File file = new File(fileName);\n try (Scanner scanner = new Scanner(file)) {\n while(scanner.hasNextLine())\n {\n StringTokenizer st = new StringTokenizer(scanner.nextLine());\n Employee employee = new Employee();\n employee.employee = st.nextToken();\n if(st.hasMoreTokens()) {\n String manager = st.nextToken();\n \n // Check if manager is not empty, if empty then last employee\n if(!\"\".equals(manager))\n employee.manager = manager;\n }\n \n employees = addEmployee(employees, employee);\n } }\n } catch (FileNotFoundException e)\n {\n }\n \n return employees;\n }", "public String[][] displayEmployee() {\r\n\t\t\t\t\r\n\t\t// Print the employee numbers for the employees stored in each bucket's ArrayList,\r\n\t\t// starting with bucket 0, then bucket 1, and so on.\r\n \r\n if (numInHashTable > 0){\r\n dataTable = new String[numInHashTable][5];\r\n int q = 0;\r\n \r\n for (ArrayList<EmployeeInfo> bucket : buckets){\r\n for (int i = 0; i < bucket.size(); i++){\r\n EmployeeInfo theEmployee = bucket.get(i);\r\n \r\n //display specfically for a PTE (All the general attributes plus the specifc ones)\r\n if (theEmployee instanceof PTE) {\r\n PTE thePTE = (PTE) theEmployee;\r\n dataTable[q][0] = Integer.toString(theEmployee.getEmpNum());\r\n dataTable[q][1] = \"PTE\";\r\n dataTable[q][2] = theEmployee.getFirstName();\r\n dataTable[q][3] = theEmployee.getLastName();\r\n dataTable[q][4] = Double.toString(thePTE.calcNetAnnualIncome()); \r\n q++;\r\n }\r\n \r\n //display specfically for a FTE (All the general attributes plus the specifc ones)\r\n if (theEmployee instanceof FTE){\r\n FTE theFTE = (FTE) theEmployee;\r\n dataTable[q][0] = Integer.toString(theEmployee.getEmpNum());\r\n dataTable[q][1] = \"FTE\";\r\n dataTable[q][2] = theEmployee.getFirstName();\r\n dataTable[q][3] = theEmployee.getLastName();\r\n dataTable[q][4] = Double.toString(theFTE.calcNetAnnualIncome());\r\n q++;\r\n } \r\n }\r\n }\r\n }\r\n return dataTable;\r\n }", "public void getUserData()\n\t{\n\t\tint count; //Loop counter\n\t\tString pathname = filename;\n\t\t\n\t\tString div = \",\"; //Used to divide info.\n\t\tString [] userArray; //To hold divided info.\n\t\t\n\t\ttry {\n FileReader reader = new FileReader(pathname);\n BufferedReader bufferedReader = new BufferedReader(reader);\n \n String line;\n \n //While getting each line of the data file, BUT stops when USER data found.\n //Loop through each line and determine which user data to choose.\n while ((line = bufferedReader.readLine()) != null) {\n // System.out.println(\"User Data in file: \" + line);\n \n System.out.println(\"Checking User name in line of data ...\");\n \n //This divides the info in the data file into an array.\n userArray = line.split(div); \n \n \n if (User.equals(userArray[0]))\n \t{\n \t\tSystem.out.println(\"User Found: \" + User);\n \t\tuser_line = line;\n \t\t//Assigning data to class variables.\n \t\tUserPassword = userArray[1].trim(); //Assigning the password.\n \t\tDevice_ID = Integer.parseInt(userArray[2].trim()); //Assigning device ID.\n \t\tisLost = (Integer.parseInt(userArray[3].trim()) == 0) ? false : true;\n \t\t\n \t\t//This reads out information.\n \t\tfor (count = 0; count < userArray.length; count++)\n {\n \t\t\tSystem.out.println(\"INFO: \" + userArray[count]);\n }\n \t\tbreak;\n \t}\n System.out.println(\"========================================\");\n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n\t}", "@Test\n public void test(){\n ExcelUtil qa3Sheet = new ExcelUtil(\"src/test/resources/Vytrack testusers.xlsx\", \"QA3-short\");\n // 1 based , not 0 based\n int rowCount = qa3Sheet.rowCount();\n // 1 based, not 0 based\n int colCount = qa3Sheet.columnCount();\n System.out.println(\"rowCount = \" + rowCount);\n System.out.println(\"colCount = \" + colCount);\n\n List<String> columnsNames = qa3Sheet.getColumnsNames();\n System.out.println(\"columnsNames = \" + columnsNames);\n // 0 based, get specific cell value based on index\n String cellData = qa3Sheet.getCellData(2, 3);\n System.out.println(\"cellData = \" + cellData);\n\n // get all table values in a list\n List<Map<String, String>> dataList = qa3Sheet.getDataList();\n\n System.out.println(dataList.get(5).get(\"firstname\"));\n\n String[][] dataArray = qa3Sheet.getDataArray();\n\n System.out.println(dataArray[1][1]);\n\n }", "public static List<Employee> getAllEmployees(){\n\t\t// Get the Datastore Service\n\t\tlog.severe(\"datastoremanager-\" + 366);\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tlog.severe(\"datastoremanager-\" + 368);\n\t\tQuery q = buildAQuery(null);\n\t\tlog.severe(\"datastoremanager-\" + 370);\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\tlog.severe(\"datastoremanager-\" + 373);\n\t\t//List for returning\n\t\tList<Employee> returnedList = new ArrayList<>();\n\t\tlog.severe(\"datastoremanager-\" + 376);\n\t\t//Loops through all results and add them to the returning list \n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.severe(\"datastoremanager-\" + 379);\n\t\t\t//Vars to use\n\t\t\tString actualFirstName = null;\n\t\t\tString actualLastName = null;\n\t\t\tBoolean attendedHrTraining = null;\n\t\t\tDate hireDate = null;\n\t\t\tBlob blob = null;\n\t\t\tbyte[] photo = null;\n\t\t\t\n\t\t\t//Get results via the properties\n\t\t\ttry {\n\t\t\t\tactualFirstName = (String) result.getProperty(\"firstName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tactualLastName = (String) result.getProperty(\"lastName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tattendedHrTraining = (Boolean) result.getProperty(\"attendedHrTraining\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\thireDate = (Date) result.getProperty(\"hireDate\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tblob = (Blob) result.getProperty(\"picture\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tphoto = blob.getBytes();\n\t\t\t} catch (Exception e){}\n\t\t\tlog.severe(\"datastoremanager-\" + 387);\n\t\t\t\n\t\t\t//Build an employee (If conditionals for nulls)\n\t\t\tEmployee emp = new Employee();\n\t\t \temp.setFirstName((actualFirstName != null) ? actualFirstName : null);\n\t\t \temp.setLastName((actualLastName != null) ? actualLastName : null);\n\t\t \temp.setAttendedHrTraining((attendedHrTraining != null) ? attendedHrTraining : null);\n\t\t \temp.setHireDate((hireDate != null) ? hireDate : null);\n\t\t \temp.setPicture((photo != null) ? photo : null);\n\t\t \tlog.severe(\"datastoremanager-\" + 395);\n\t\t \treturnedList.add(emp);\n\t\t}\n\t\tlog.severe(\"datastoremanager-\" + 398);\n\t\treturn returnedList;\n\t}", "private Contact getEmployeePayrollData(String name) {\n\t\treturn this.employeePayrollList.stream().filter(contactItem -> contactItem.name.equals(name)).findFirst()\n\t\t\t\t.orElse(null);\n\t}", "public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}", "public static void main(String[] args) throws IOException {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Main Menu\");\r\n\t\tSystem.out.println(\"1. Add an Employee\");\r\n\t\tSystem.out.println(\"2. Display All\");\r\n\t\tSystem.out.println(\"3. Exit\");\r\n\t\tFile f= new File(\"EmployeeDetails.txt\");\r\n\t\tint choice=0;\r\n\t\tdo\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter your choice: \");\r\n\t\t\tchoice=s.nextInt();\r\n\t\t\tswitch(choice)\r\n\t\t\t{\r\n\t\t\tcase 1:\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Enter Employee ID: \");\r\n\t\t\t\tint emp_id=s.nextInt();\r\n\t\t\t\tSystem.out.println(\"Enter Employee Name: \");\r\n\t\t\t\tString emp_name=s.next();\r\n\t\t\t\tSystem.out.println(\"Enter Employee age: \");\r\n\t\t\t\tint emp_age=s.nextInt();\r\n\t\t\t\tSystem.out.println(\"Enter Employee Salary:\");\r\n\t\t\t\tdouble emp_salary=s.nextDouble();\r\n\t\t\t\tString str=emp_id+\" \"+emp_name+\" \"+emp_age+\" \"+emp_salary;\r\n\t\t\t\tFileWriter fwrite=new FileWriter(f.getAbsoluteFile(),true);\r\n\t\t\t\tfor(int i=0;i<str.length();i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfwrite.write(str.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t\tfwrite.close();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tScanner fread= new Scanner(f);\r\n\t\t\t\tSystem.out.println(\"-----Report-----\");\r\n\t\t\t\twhile(fread.hasNext())\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(fread.nextLine());\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"-----End of Report-----\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tSystem.out.println(\"Exiting the system\");\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"Invalid input\");\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}while(choice<=3);\r\n\t\t\r\n\r\n\t}", "public void parseAndPrintRecords() {\n ArrayList<Employee> employees;\n\n employees = parseData(data);\n\n System.out.printf(\"%10s%10s%10s\\n\", \"Last\", \"First\", \"Salary\");\n for(Employee employee : employees) {\n System.out.printf(\"%10s%10s%10d\\n\", employee.lName, employee.fName, employee.salary);\n }\n\n }", "public String getEmployeeInfo() throws SQLException {\n String SQL = String.format(\"SELECT * FROM %s\", DbSchema.table_employees.name);\n Statement statement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n ResultSet results = statement.executeQuery(SQL);\n\n //Prepare format stuff\n String tableHeader = String.format(\"%s %s %s %s %s\\n\", table_employees.cols.id, table_employees.cols.first_name, table_employees.cols.last_name, table_employees.cols.age, table_employees.cols.salary);\n StringBuilder output = new StringBuilder(tableHeader);\n DecimalFormat format = new DecimalFormat(\"#,###.00\");\n\n while (results.next()) {\n //Iterate through each row (employee) and add each bit of info to table\n String row = String.format(\"%s %s %s %s %s\\n\",\n results.getInt(table_employees.cols.id),\n results.getString(table_employees.cols.first_name),\n results.getString(table_employees.cols.last_name),\n results.getInt(table_employees.cols.age),\n format.format(results.getDouble(table_employees.cols.salary)));\n output.append(row);\n }\n return output.toString();\n }", "public String f9employee() throws Exception {\r\n\t\tString query = \"SELECT HRMS_EMP_OFFC.EMP_TOKEN, \"\r\n\t\t\t\t+ \"\tHRMS_EMP_OFFC.EMP_FNAME||' '||HRMS_EMP_OFFC.EMP_MNAME||' '||HRMS_EMP_OFFC.EMP_LNAME ,HRMS_EMP_OFFC.EMP_ID,\"\r\n\t\t\t\t+ \"\tHRMS_EMP_OFFC.EMP_DIV,NVL(DIV_NAME,' ') FROM HRMS_EMP_OFFC \"\r\n\t\t\t\t+ \"\tINNER JOIN HRMS_CENTER ON HRMS_CENTER.CENTER_ID = HRMS_EMP_OFFC.EMP_CENTER\"\r\n\t\t\t\t+ \"\tINNER JOIN HRMS_DIVISION ON (HRMS_DIVISION.DIV_ID = HRMS_EMP_OFFC.EMP_DIV)\";\r\n\t\t\t\tquery += getprofileQuery(bulkForm16);\r\n\t\t\t\tquery += \"\tORDER BY HRMS_EMP_OFFC.EMP_ID\";\r\n\r\n\t\tString[] headers = { getMessage(\"employee.id\"), getMessage(\"employee\") };\r\n\r\n\t\tString[] headerWidth = { \"30\", \"70\" };\r\n\r\n\t\tString[] fieldNames = { \"empToken\", \"empName\", \"empId\",\r\n\t\t\t\t\"divisionId\", \"divisionName\" };\r\n\r\n\t\tint[] columnIndex = { 0, 1, 2, 3, 4 };\r\n\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\tString submitToMethod = \"\";\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "public ArrayList<Employee> parseData(ArrayList<String> data) {\n ArrayList<Employee> employees = new ArrayList<>();\n String[] buf;\n\n for (String line : data) {\n buf = line.split(delimiter);\n employees.add(new Employee(buf[1], buf[0], Integer.parseInt(buf[2])));\n }\n\n return employees;\n }", "public List<EmployeeEntity> retrieveAllEmployeeData(StorageContext context) throws PragmaticBookSelfException {\n\t\tList<EmployeeEntity> listOfEmployeeData = null;\n\n\t\tSession hibernateSession = context.getHibernateSession();\n\n\t\tString queryString = \"FROM EmployeeEntity\"; // select * from employee;//\n\t\ttry {\n\t\t\tQuery query = hibernateSession.createQuery(queryString);\n\t\t\tlistOfEmployeeData = query.list();\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\t\treturn listOfEmployeeData;\n\t}", "public static void main(String[] args) {\n System.out.println(\"How many employees would you like to type numbers for?\");\n Scanner emp_id_in = new Scanner(System.in);\n int emp_in = emp_id_in.nextInt();\n Employee EmployeeArr[] = new Employee[emp_in]; // should be size of the scanned input\n for (int i = 0; i < EmployeeArr.length; i++) {\n // Employee number\n System.out.println(\"Please enter the employees ID number(Enter a number from 0 to 999999)\");\n Scanner emp_id_scanner = new Scanner(System.in);\n int emp_id = emp_id_scanner.nextInt();\n // First\n System.out.println(\"Please enter the employees first name:\");\n Scanner first_name_scanner = new Scanner(System.in);\n String first_name = first_name_scanner.nextLine();\n // Last\n System.out.println(\"Please enter the employees last name:\");\n Scanner last_name_scanner = new Scanner(System.in);\n String last_name = last_name_scanner.nextLine();\n // Push entries into Name class\n Name name_obj = new Name();\n name_obj.get_employee_name(emp_id, first_name, last_name);\n //Street\n System.out.println(\"Please enter the employee's street name: \");\n Scanner street_name_scanner = new Scanner(System.in);\n String street_name = street_name_scanner.nextLine();\n // City\n System.out.println(\"Please enter the employee's city: \");\n Scanner city_name_scanner = new Scanner(System.in);\n String city_name = city_name_scanner.nextLine();\n // State\n System.out.println(\"Please enter the employee's state: \");\n Scanner state_name_scanner = new Scanner(System.in);\n String state_name = state_name_scanner.nextLine();\n System.out.println(\">>>>>>>>>>\" + state_name.split(\"\").length);\n // Zip\n System.out.println(\"Please enter the employee's zip code\");\n Scanner zip_code_scanner = new Scanner(System.in);\n int zip_code = zip_code_scanner.nextInt();\n // Push entries into Address class\n Address address_obj = new Address();\n address_obj.get_address_data(street_name, city_name, state_name, zip_code);\n // hire month\n System.out.println(\"Please enter the month the employee was hired(Eg. 1,2,3,... etc): \");\n Scanner month_scanner = new Scanner(System.in);\n int month = month_scanner.nextInt();\n // hire day\n System.out.println(\"Please enter the day the employee was hired(Eg. 1,2,3,... etc): \");\n Scanner day_scanner = new Scanner(System.in);\n int day = day_scanner.nextInt();\n // hire year\n System.out.println(\"Please enter the year the employee was hired: \");\n Scanner year_scanner = new Scanner(System.in);\n int year = year_scanner.nextInt();\n // Push data into Date class\n Date date_obj = new Date();\n date_obj.get_date_data(month, day, year);\n // Push data into employee class\n EmployeeArr[i] = new Employee();\n EmployeeArr[i].get_employee_information(name_obj.employee_number, name_obj.employee_first, name_obj.employee_last, address_obj.street, address_obj.zip_code,\n address_obj.city, address_obj.state, date_obj.hire_month, date_obj.hire_day, date_obj.hire_year);\n\n }\n // Show the data\n for (int j = 0; j < EmployeeArr.length; j++) {\n EmployeeArr[j].show_dat();\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\temployeerecords e1 = new employeerecords(\"emp001\",\"John Smith\",\"IT\",150000);\n\t\temployeerecords e2 = new employeerecords(\"emp002\",\"Brenda Kein\",\"FINANCE\",250000);\n\t\temployeerecords e3 = new employeerecords(\"emp003\", \"Clark Hope\",\"HR\",100000);\n\t\temployeerecords e4 = new employeerecords(\"emp004\",\"Diane Garner\",\"IT\",200000);\n\t\temployeerecords e5 = new employeerecords(\"emp005\",\"Julian Aniston\",\"MARKETING\",125000);\n\t\t\n\t\t\n\t\tHashMap hm = new HashMap();\n\t\t\n\t\thm.put(1,e1);\n\t\thm.put(2,e2);\n\t\thm.put(3,e3);\n\t\thm.put(4,e4);\n\t\thm.put(5,e5);\n\t\t\n\t\tIterator trav = hm.entrySet().iterator();\n\t\t\n\t\twhile(trav.hasNext())\n\t\t{\n\t\t\t\n\t\tMap.Entry record = (Map.Entry)trav.next();\n\t\temployeerecords e=(employeerecords)record.getValue();\n\t\tSystem.out.print(record.getKey() + \" \");\n\t\tSystem.out.println(e.employeeid +\" \"+ e.employeename+\" \"+e.officedepartment+\" \"+e.empsalary);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// Employers DATA BASE ----------------------------\n\t\t\n\t\temployee emp1 = new employee();\n\t\temp1.Name = \"John Billa\";\n\t\temp1.employeeCode = 001;\n\t\t\n\t\temployee emp2 = new employee();\n\t\temp2.Name = \"Anthony Woods\";\n\t\temp2.employeeCode = 002;\n\t\t\n\t\temployee emp3 = new employee();\n\t\temp3.Name = \"Jessica Underwood\";\n\t\temp3.employeeCode = 003;\n\t\t\t\t\n\t\t// End of Employers DATA BASE ---------------------\n\t\t\n\t\tSystem.out.println(\"Welcome! Please insert your EmployeeCode:\");\n\t\tint codeEnter = sc.nextInt();\n\t\t\n\t\tif(codeEnter == 001) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 002) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 003) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"ERROR!!! ERROR!!!\");\n\t\t\twhile (codeEnter > 003) {\n\t\t\t\tSystem.out.println(\"=====================================\");\n\t\t\t\tSystem.out.println(\"Insert Again your EmployeeCode\");\n\t\t\t\tcodeEnter = sc.nextInt();\n\t\t\t\t\n\t\t\t\tif(codeEnter == 001) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 002) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 003) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"======================================================= \");\n\t\tSystem.out.println(\"\");\n\t\t\n\t\tif (codeEnter == 001) {\n\t\t\tSystem.out.println(emp1.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse if (codeEnter == 002) {\n\t\t\tSystem.out.println(emp2.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(emp3.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1. New Delivery\");\n\t\tSystem.out.println(\"2. New Client\");\n\t\tSystem.out.println(\"3. Exit System\");\n\t\t\n\t\tint employeeChoice = sc.nextInt();\n\t\t\n\t\tswitch(employeeChoice){\n\t\t\tcase 1: \n\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 2: \n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"3\");\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsc.close();\n\t}", "@DataProvider(name=\"User Details\")\n\t\tpublic Object[][] userDetails() throws Exception{\n\t\t\t\n\t\t\tExcelSheet excelData = new ExcelSheet(\"E:/Assignments/exceldata/OpenCart.xlsx\",1);\n\t\t\tObject[][] data = new Object[1][11];\n\t\t\tfor(int cells=0;cells<11;cells++){\n\t\t\t\t\n\t\t\t\tdata[0][cells] = excelData.getData(1, cells);\n\t\t\t}\n\t\t\treturn data;\n\t\t}", "@DataProvider\r\n\tpublic static Object[][] loginTestData() {\r\n\t\t\r\n\t\tIExcelDataManager edm = new AddMultEmpExcel(\"testdata/OHRMTestData-Priya.xlsx\", \"OHRM-New-Emp-Data\", \"NewEmpData\");\r\n\t\treturn edm.getData();\r\n\t\t\r\n\t\t// A new overload in case excel has only one sheet\r\n\t\t//tableToReturn = edm.getExcelData(\"filePath\" , \"tableName\");\r\n\t\t\r\n\t\t// tableToReturn.length ---- Gives us row count\r\n\t\t/*\r\n\t\tfor(int i=0;i<tableToReturn.length;i++)\r\n\t\t{\r\n\t\t\t//tableToReturn[0].length ---- Col count in 0th row\r\n\t\t\t//for(int j=0;j<tableToReturn[i].length;j++)\r\n\t\t\t//{\r\n\t\t\t\t\r\n\t\t\t\tif(tableToReturn[i][0]==null)\r\n\t\t\t\t\tFirstName = \"\";\r\n\t\t\t\telse \r\n\t\t\t\t\tFirstName= tableToReturn[i][0].toString();\r\n\t\t\t\t\r\n\t\t\t\tif(tableToReturn[i][1]==null)\r\n\t\t\t\t\tMiddleName = \"\";\r\n\t\t\t\telse \r\n\t\t\t\t\tMiddleName = tableToReturn[i][1].toString();\r\n\t\t\t\t\r\n\t\t\t\tif(tableToReturn[i][1]==null)\r\n\t\t\t\t\tLastName = \"\";\r\n\t\t\t\telse \r\n\t\t\t\t\tLastName = tableToReturn[i][1].toString();\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t}", "private static void dataOfPatients(Scanner scanner, Employee employee) {\n\t\tList<Patient> patients = employee.getPatients();\n\t\tfor (Patient patient : patients) {\n\t\t\tSystem.out.println(patient.toString());\n\t\t}\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\ttry {\n\t\t\tList<Employee> empList = new ArrayList<Employee>();\n\t\t\tList<Map<String, Object>> rows = template.queryForList(\"select * from employee\");\n\t\t\tfor(Map<?, ?> rowNum : rows) {\n\t\t\t\tEmployee emp = new Employee();\n\t\t\t\temp.setEmployeeId((Integer)rowNum.get(\"empid\"));\n\t\t\t\temp.setFirstName((String)rowNum.get(\"fname\"));\n\t\t\t\temp.setLastName((String)rowNum.get(\"lname\"));\n\t\t\t\temp.setEmail((String)rowNum.get(\"email\"));\n\t\t\t\temp.setDesignation((String)rowNum.get(\"desig\"));\n\t\t\t\temp.setLocation((String)rowNum.get(\"location\"));\n\t\t\t\temp.setSalary((Integer)rowNum.get(\"salary\"));\n\t\t\t\tempList.add(emp);\n\t\t\t}\n\t\t\treturn empList;\n\t\t} catch (DataAccessException excep) {\n\t\t\treturn null;\n\t\t}\n\t}", "public Employee getEmployeeDetails() throws SQLException {\n Cursor cursor = db.query(true, Constants.EMPLOYEE_TABLE, new String[]{Constants.EMPLOYEE_PHOTO,\r\n Constants.EMPLOYEE_NAME, Constants.EMPLOYEE_AGE}, null, null, null, null, null, null);\r\n\r\n if (cursor.moveToLast()) { //if statement executes from top to down and decides whether a certain statement will executes or not\r\n String employeeName = cursor.getString(cursor.getColumnIndex(Constants.EMPLOYEE_NAME));\r\n String employeeAge = cursor.getString(cursor.getColumnIndex(Constants.EMPLOYEE_AGE));\r\n byte[] blob = cursor.getBlob(cursor.getColumnIndex(Constants.EMPLOYEE_PHOTO));\r\n cursor.close();\r\n return new Employee(employeeName, employeeAge, CommonUtilities.getPhoto(blob));\r\n }\r\n cursor.close();\r\n return null; // Return statement\r\n }", "private List<User> readFromFile() {\n\n List<String> lines = new ArrayList<>();\n List<User> contactList = new ArrayList<>();\n Map<String, PhoneNumber> phoneNumbersNewUser = new HashMap<>();\n\n try (BufferedReader in = new BufferedReader(new FileReader(contactsFile))) {\n String line;\n while ((line = in.readLine()) != null) {\n lines.add(line);\n }\n\n } catch (IOException ex) {\n System.out.println(\"File not found \\n\" + ex);\n ;\n }\n\n for (String line : lines) {\n String[] userProperties = line.split(\"\\\\|\");\n\n int id = Integer.parseInt(userProperties[0]);\n String fName = userProperties[1];\n String lName = userProperties[2];\n String email = userProperties[3];\n int age = Integer.parseInt(userProperties[4]);\n String[] phones = userProperties[5].split(\"\\\\,\");\n String[] homePhone = phones[0].split(\"\\\\_\");\n String[] mobilePhone = phones[1].split(\"\\\\_\");\n String[] workPhone = phones[2].split(\"\\\\_\");\n phoneNumbersNewUser.put(homePhone[0], new PhoneNumber(homePhone[1], homePhone[2]));\n phoneNumbersNewUser.put(mobilePhone[0], new PhoneNumber(mobilePhone[1], mobilePhone[2]));\n phoneNumbersNewUser.put(workPhone[0], new PhoneNumber(workPhone[1], workPhone[2]));\n String[] homeAdress = userProperties[6].split(\"\\\\,\");\n Address homeAdressNewUser = new Address(homeAdress[0], Integer.parseInt(homeAdress[1]), Integer.parseInt(homeAdress[2]),\n homeAdress[3], homeAdress[4], homeAdress[5], homeAdress[6]);\n String title = userProperties[7];\n String[] companyProperties = userProperties[8].split(\"\\\\_\");\n String[] companyAddress = companyProperties[1].split(\"\\\\,\");\n Address companyAddressNewUser = new Address(companyAddress[0], Integer.parseInt(companyAddress[1]),\n Integer.parseInt(companyAddress[2]), companyAddress[3], companyAddress[4], companyAddress[5],\n companyAddress[6]);\n String companyName = companyProperties[0];\n Company companyNewUser = new Company(companyName, companyAddressNewUser);\n boolean isFav = Boolean.parseBoolean(userProperties[9]);\n User user = new User(id, fName, lName, email, age, phoneNumbersNewUser, homeAdressNewUser, title, companyNewUser, isFav);\n contactList.add(user);\n }\n\n\n return contactList;\n }", "@Test\n\tpublic void data() throws IOException {\n\t\tString expectedtitle = \"Administrator - Home - vtiger CRM 5 - Commercial Open Source CRM\";\n\t\tString actualTitle = driver.getTitle();\n\t\tAssert.assertEquals(actualTitle, expectedtitle);\n\t\t/**\n\t\t * step2:create object of home page\n\t\t */\n\n\t\thp.ClickOnleadModule();\n\t\t/**\n\t\t * step3: create an object of Lead page\n\t\t */\n\n\t\tlp.createlead();\n\t\t/**\n\t\t * step4: select the option of lead page\n\t\t */\n\t\tWebElement selection = lp.getSalutation();\n\t\tlib.select(selection, 1);\n\n\t\t/**\n\t\t * step5:taking the data from excel and put in lead page\n\t\t */\n\t\tString firstname = flib.getExcelData(\"sheet2\", 1, 0) + lib.getRanDomNum();\n\t\tString lastname = flib.getExcelData(\"sheet2\", 1, 1) + lib.getRanDomNum();\n\t\tString company = flib.getExcelData(\"sheet2\", 1, 2) + lib.getRanDomNum();\n\n\t\t/**\n\t\t * step6:putting the data into lead page\n\t\t */\n\n\t\tlp.leadinformation(firstname, lastname, company);\n\t\tlp.savebtn();\n\n\t\t// ld.getClickOnFirstName();\n\t\t// ld.getClickOnLastName();\n\t\t// ld.getClickOnCompany();\n\t}", "@Override\n\tpublic Object ReadEmployee(int n) {\n\t\tEmployees em = new Employees();\n\t\t// Le asignamos una sesion y una sentencia que en este caso es leer\n\t\t// empleado dada su ID(cuando busque el empleado debe de darnos un unico\n\t\t// resultado).\n\t\tem = (Employees) sm.obtenerSesionNueva()\n\t\t\t\t.createSQLQuery(InstruccionesSQL.COSULTAR_EMPLEADO_X_ID)\n\t\t\t\t.addEntity(Employees.class).uniqueResult();\n\n\t\treturn em;\n\t}", "public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}", "@DataProvider(name =\"excel-data\")\n \tpublic Object[][] excelDP() throws IOException{\n \tObject[][] arrObj = getExcelData(\"C:\\\\Users\\\\kalpe\\\\eclipse-workspace\\\\DataProvider\\\\DataFiles\\\\loginData.xlsx\",\"Sheet1\");\n \treturn arrObj;\n \t}", "public int readPersonsFromFile(int numberOfLines) {\n listOfPatients = new Person[numberOfLines];\n StdIn.readLine();\n for(int i = 0 ; i < numberOfLines ; i ++){\n String data = StdIn.readLine();\n // System.out.println(data);\n String[] dataValues = data.split(\" \");\n for(int j = 0; j < dataValues.length ; j++){\n dataValues[j] = dataValues[j].trim();\n }\n \n Person p = new Person(Integer.parseInt(dataValues[0]),Integer.parseInt(dataValues[1]),Integer.parseInt(dataValues[2]),Integer.parseInt(dataValues[3]),Integer.parseInt(dataValues[4]),Integer.parseInt(dataValues[5]),Integer.parseInt(dataValues[6]));\n addPerson(p, i);\n }\n\n return numberOfLines;\n\n }", "public void readData() {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Enter employee ID \");\n int id = sc.nextInt();\n System.out.println(\"Enter Employee name \");\n String name = sc.next();\n System.out.println(\"Enter Employee salary \");\n double salary = sc.nextDouble();\n\n employeePayrollDataList.add(new EmployeePayrollData(id, name, salary));\n }", "private static void writeToFileEmployees() throws IOException {\n FileWriter write = new FileWriter(path2, append);\n PrintWriter print_line = new PrintWriter(write);\n for (int i = 0; i < RegisteredEmployees.listOfEmployees.size(); i++) {\n ArrayList<Integer> list = RegisteredEmployees.getEmployeeList();\n Integer ID = list.get(i);\n textLine = String.valueOf(ID);\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }", "public static void getData() throws Exception {\n\t\tString filepath = \"F:\\\\Selenium Practice\\\\Framework\\\\TestData\\\\TestData.xlsx\";\n\t\tFile f = new File(filepath);\n\t\tFileInputStream str = new FileInputStream(f);\n\t\tWorkbook w = new XSSFWorkbook(str);\n\t\tSheet sh = w.getSheet(\"TestData\");\n\t\tfor (int i = 0; i < sh.getPhysicalNumberOfRows(); i++) {\n\t\t\tRow r = sh.getRow(i);\n\t\t\tfor (int j = 0; j < r.getPhysicalNumberOfCells(); j++) {\n\t\t\t\tCell c = r.getCell(j);\n\t\t\t\tint ct = c.getCellType();\n\t\t\t\tString name = \"\";\n\t\t\t\tswitch (ct) {\n\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\tif (ct == 0) {\n\t\t\t\t\t\tif (DateUtil.isCellDateFormatted(c)) {\n\t\t\t\t\t\t\tSimpleDateFormat form = new SimpleDateFormat(\"dd-MMM-yy\");\n\t\t\t\t\t\t\tname = form.format(c.getDateCellValue());\n\t\t\t\t\t\t\tSystem.out.println(name);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble d = c.getNumericCellValue();\n\t\t\t\t\t\t\tlong l = (long) d;\n\t\t\t\t\t\t\tname = String.valueOf(l);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\tif (ct == 1) {\n\t\t\t\t\t\tname = c.getStringCellValue();\n\t\t\t\t\t\tSystem.out.println(name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n\tpublic List<Map<String, String>> employeeList() throws Exception {\n\t\treturn null;\n\t}", "public EmployeeInfo searchFromTable(int employeeNum){\r\n \r\n int targetBucket = calcBucket(employeeNum);\r\n \r\n\t\tfor(int i = 0 ; i < buckets[targetBucket].size(); i++) {\r\n\t\t\tif (buckets[targetBucket].get(i).getEmpNum() == employeeNum) {\r\n EmployeeInfo locatedEmployee = buckets[targetBucket].get(i);\r\n return locatedEmployee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n \r\n }", "@Override\n public void readDataFromTxtFile()\n throws NumberFormatException, DepartmentCreationException, EmployeeCreationException {\n\n }", "public void read(String fileName)\n\t{\n\t\tString line = \"\";\n\t\tint headCount = 0;\n\t\tEmployee helperEmployee;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t//FileReader is in charge of reading text files\n\t\t\tFileReader fileReader = new FileReader(fileName);\n\t\t\t\n\t\t\t//Wrapping FileReader in BufferedReader\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\t\t\n\t\t\t//Continue reading until we reach end of file\n\t\t\twhile( (line = bufferedReader.readLine()) != null)\n\t\t\t{\n\t\t\t\tString[] lineString = line.split(\",\");\n\t\t\t\t//Get the header information and arrange it just once, then read the rest of the information\n\t\t\t\tif(headCount == 0)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\thelperEmployee = new Employee();\n\t\t\t\t\thelperEmployee.setEmployeeName(lineString[0] + \"\" + lineString[1]); \n\t\t\t\t\thelperEmployee.setEmployeeNumber(Integer.parseInt(lineString[2]));\n\t\t\t\t\thelperEmployee.setEmployeeState(lineString[3]);\n\t\t\t\t\thelperEmployee.setEmployeeZipCode(Integer.parseInt(lineString[4]));\n\t\t\t\t\thelperEmployee.setEmployeeAge(Integer.parseInt(lineString[6]));\n\t\t\t\t\tadd(helperEmployee);\n\t\t\t\t}\n\t\n\t\t\t\t//Keep track of number of employees\n\t\t\t\theadCount++;\n\t\t\t}\n\t\t\t\n\t\t\t//Close file as good practice\n\t\t\tbufferedReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex)\n\t\t{\n\t\t\tSystem.out.println(\"Unable to open the file named '\" + fileName + \"'\");\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tSystem.out.println(\"Error when reading the file \" + fileName + \"'\");\n\t\t}\n\t}", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee getEmployeeArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().find_element_user(EMPLOYEE$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n }", "public ArrayList<String> getData(String testCaseName) throws IOException {\n\t\tArrayList<String> cellArray = new ArrayList();\n\n\t\t// File input stream argument\t\t\n\t\tFileInputStream fis = new FileInputStream(\"//Users//Oz//Documents//Selenium//SeleniumRepo//ExcelDriven//demoData.xlsx\");\n\n\t\t// instantiating workbook reading object \n\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis);\n\n\t\t// read only sheet1\n\t\tint numOfSheets = workbook.getNumberOfSheets();\n\t\tfor (int i = 0; i < numOfSheets; i++ ) {\n\n\t\t\tif (workbook.getSheetName(i).equals(\"testData\")) { \n\t\t\t\tXSSFSheet sheet = workbook.getSheetAt(i);\n\n\t\t\t\tIterator<Row> rows = sheet.iterator();\n\t\t\t\tRow firstRow = (Row) rows.next();\n\t\t\t\tIterator<Cell> cell = ((Row) firstRow).cellIterator();\n\n\n\t\t\t\t//find column number of \"TestCase\"\n\t\t\t\tint k = 0;\n\t\t\t\tint colIndex = 99; \n\n\t\t\t\twhile(cell.hasNext()) {\t\t\t\t\t\n\t\t\t\t\tCell value = cell.next();\n\t\t\t\t\tif (value.getStringCellValue().equalsIgnoreCase(\"TestCase\")) {\n\t\t\t\t\t\t//desired column\n\t\t\t\t\t\tcolIndex = k;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tk++;\n\t\t\t\t}\t\t\t\t\n\n\t\t\t\t// iterating through every row\n\t\t\t\twhile(rows.hasNext()) {\t\t\t\t\t\n\t\t\t\t\tRow value = rows.next();\n\t\t\t\t\tif (value.getCell(colIndex).getStringCellValue().equalsIgnoreCase(testCaseName)) {\n\t\t\t\t\t\tIterator<Cell> cv = value.cellIterator();\n\t\t\t\t\t\twhile(cv.hasNext()) {\n\t\t\t\t\t\t\tCell c = cv.next();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(cv.next().getStringCellValue().getClass().equals(Type.class) ) {\n\t\t\t\t\t\t\t\tcellArray.add(cv.next().getStringCellValue());\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t cellArray.add(NumberToTextConverter.toText(cv.next().getNumericCellValue()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn cellArray;\n\n\n\t}", "public static List<HashMap<String, String>> getData4() throws Exception {\n\t\tArrayList<HashMap<String, String>> mapDataList = new ArrayList<HashMap<String, String>>();\n\t\tString filepath = \"F:\\\\Selenium Practice\\\\Framework\\\\TestData\\\\TestData.xlsx\";\n\t\tFile f = new File(filepath);\n\t\tFileInputStream str = new FileInputStream(f);\n\t\tWorkbook w = new XSSFWorkbook(str);\n\t\tSheet sht = w.getSheet(\"TestData\");\n\t\tRow headerRow = sht.getRow(0);\n\t\tfor (int i = 0; i < sht.getPhysicalNumberOfRows(); i++) {\n\t\t\tRow currentRow = sht.getRow(i);\n\t\t\tHashMap<String, String> mapData = new HashMap<String, String>();\n\t\t\tfor (int j = 0; j < headerRow.getPhysicalNumberOfCells(); j++) {\n\t\t\t\tCell currentCell = currentRow.getCell(j);\n\t\t\t\tint ct = currentCell.getCellType();\n\t\t\t\tString name = \"\";\n\t\t\t\tswitch (ct) {\n\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\tif (ct == 0) {\n\t\t\t\t\t\tif (DateUtil.isCellDateFormatted(currentCell)) {\n\t\t\t\t\t\t\tSimpleDateFormat form = new SimpleDateFormat(\"dd-MMM-yy\");\n\t\t\t\t\t\t\tname = form.format(currentCell.getDateCellValue());\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble d = currentCell.getNumericCellValue();\n\t\t\t\t\t\t\tlong l = (long) d;\n\t\t\t\t\t\t\tname = String.valueOf(l);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmapData.put(headerRow.getCell(j).getStringCellValue(), name);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\tif (ct == 1) {\n\t\t\t\t\t\tname = currentCell.getStringCellValue();\n\t\t\t\t\t}\n\t\t\t\t\tmapData.put(headerRow.getCell(j).getStringCellValue(), name);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmapDataList.add(mapData);\n\t\t}\n\t\treturn mapDataList;\n\t}", "public List<Employee> getAllEmployeeDetail() {\n\t\treturn dao.getAllEmployeeDetail();\n\t}", "@DataProvider(name=\"excle\")\n\tpublic static Object[][] createaccountTest() throws IOException {\n\t\tObject content[][];\n\t\tFileInputStream file = new FileInputStream(\n\t\t\t\t\"D:\\\\Java_Workspace\\\\FinalKDDFramework\\\\Input\\\\Account.xlsx\");\n\t\tXSSFWorkbook book = new XSSFWorkbook(file);\n\t\tXSSFSheet sheet = book.getSheet(\"Sheet1\");\n\t\tint rows = sheet.getLastRowNum();\n\t\tcontent = new Object[(sheet.getLastRowNum())-1][sheet.getRow(1)\n\t\t\t\t.getLastCellNum()];\n\t\tRow row;\n\t\tSystem.out.println(\"total no of rows \" + rows);\n\t\tfor (int i = 1; i <rows; i++) \n\t\t{\n\t\t\trow = sheet.getRow(i);\n\t\t\tint cells = row.getLastCellNum();\n\t\t\tfor (int j = 0; j < cells; j++) \n\t\t\t{\n\t\t\t\tCell cell = row.getCell(j);\n\t\t\t\tif (cell.getCellTypeEnum().name().equals(\"NUMERIC\")) \n\t\t\t\t{\n\t\t\t\t\tcontent[i-1][j] = cell.getNumericCellValue();\t\n\t\t\t\t\n\t\t\t\t} \n\t\t\t\telse if (cell.getCellTypeEnum().name().equals(\"STRING\")) \n\t\t\t\t{\n\t\t\t\t\tcontent[i-1][j] = cell.getStringCellValue();\t\n\t\t\t\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t/*\n\t\t * catch (FileNotFoundException e) {\n\t\t * System.out.println(\"file not found\"); e.printStackTrace(); }\n\t\t */\n\t\treturn content;\n\t}", "@Test\n public void readExcelFile(){\n\n ExcelUtil qa3short =new ExcelUtil(\"src/test/resources/Vytracktestdata.xlsx\", \"QA3-short\");\n\n //how many row in the sheet\n System.out.println(\"qa3short.rowCount() = \" + qa3short.rowCount());\n //qa3short.rowCount() = 14\n\n //how many columns in the sheet\n System.out.println(\"qa3short.columnCount() = \" + qa3short.columnCount());\n //qa3short.columnCount() = 4\n\n //get all column names\n System.out.println(\"qa3short.getColumnsNames() = \" + qa3short.getColumnsNames());\n //qa3short.getColumnsNames() = [username, password, firstname, lastname]\n\n //get all data in List of maps\n\n //qa3short.getDataList(); right click create variable\n List<Map<String, String>> dataList = qa3short.getDataList();\n\n //iter --- onerow\n\n for (Map<String, String> onerow : dataList) {\n System.out.println( onerow);\n //{password=UserUser123, firstname=John, username=user1, lastname=Doe}\n //{password=UserUser123, firstname=Kyleigh, username=user4, lastname=Reichert}\n //{password=UserUser123, firstname=Nona, username=user5, lastname=Carroll}\n //{password=UserUser123, firstname=Geovany, username=storemanager51, lastname=Jenkins}\n //{password=UserUser123, firstname=Roma, username=storemanager52, lastname=Medhurst}\n //{password=UserUser123, firstname=Aditya, username=storemanager53, lastname=Rempel}\n //{password=UserUser123, firstname=Turner, username=storemanager54, lastname=Considine}\n //{password=UserUser123, firstname=Rachel, username=storemanager55, lastname=Oberbrunner}\n //{password=UserUser123, firstname=Peyton, username=salesmanager101, lastname=Harber}\n //{password=UserUser123, firstname=Patricia, username=salesmanager102, lastname=Doyle}\n //{password=UserUser123, firstname=Nellie, username=salesmanager103, lastname=Corwin}\n //{password=UserUser123, firstname=Nikita, username=salesmanager104, lastname=Wintheiser}\n //{password=UserUser123, firstname=Geraldine, username=salesmanager105, lastname=Parisian}\n\n }\n\n //get Nona as a value\n System.out.println(\"dataList.get(2) = \" + dataList.get(2));\n //dataList.get(2) = {password=UserUser123, firstname=Nona, username=user5, lastname=Carroll}\n System.out.println(\"dataList.get(2) = \" + dataList.get(2).get(\"firstname\"));\n //dataList.get(2) = Nona\n\n\n //get all data in 2d array\n\n String [][] dataArray =qa3short.getDataArray();\n\n System.out.println(Arrays.deepToString(dataArray));\n //[[username, password, firstname, lastname], [user1, UserUser123, John, Doe], [user4, UserUser123, Kyleigh, Reichert], [user5, UserUser123, Nona, Carroll], [storemanager51, UserUser123, Geovany, Jenkins], [storemanager52, UserUser123, Roma, Medhurst], [storemanager53, UserUser123, Aditya, Rempel], [storemanager54, UserUser123, Turner, Considine], [storemanager55, UserUser123, Rachel, Oberbrunner], [salesmanager101, UserUser123, Peyton, Harber], [salesmanager102, UserUser123, Patricia, Doyle], [salesmanager103, UserUser123, Nellie, Corwin], [salesmanager104, UserUser123, Nikita, Wintheiser], [salesmanager105, UserUser123, Geraldine, Parisian]]\n\n\n\n }", "private void fill() {\r\n\t\tmap = new TreeMap<String, String>();\r\n\t\tlist = new ArrayList<String>();\r\n\t\ttry {\r\n\r\n\t\t\tFileInputStream ExcelFileToRead = new FileInputStream(\"V:\\\\Public\\\\Venatorx Employee and Conference Room Phone List.xlsx\");\r\n\r\n\t\t\tXSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\r\n\t\t\tXSSFSheet sheet = wb.getSheetAt(0);\r\n\t\t\tXSSFRow row; \r\n\t\t\tXSSFCell cell;\r\n\t\t\t\r\n\t\t\tarr = new String[9];\r\n\t\t\tIterator<Row> rows = sheet.rowIterator();\r\n\t\t\tString temp = \"\";\r\n\t\t\r\n\t\t\twhile (temp.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\trow=(XSSFRow) rows.next();\r\n\t\t\t\tIterator<Cell> cells = row.cellIterator();\r\n\t\t\t\tfor (int i = 0; i < 9; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tcell=(XSSFCell) cells.next();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (cell.getCellType() == XSSFCell.CELL_TYPE_STRING)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString check = cell.getStringCellValue();\r\n\t\t\t\t\t\tif(check.equals(\"First Name\")) {\r\n\t\t\t\t\t\t\ttemp = \"First\";\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tarr[i] = cell.getStringCellValue();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//System.out.println(arr[i]);\r\n\t\t\t\t\t\t//System.out.print(cell.getStringCellValue()+\", \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(cell.getCellType() == XSSFCell.CELL_TYPE_NUMERIC)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tCell tempCell = cell;\r\n\t\t\t\t\t\tDataFormatter formatter = new DataFormatter();\r\n\t\t\t\t\t\tString strValue = formatter.formatCellValue(tempCell);\r\n\t\t\t\t\t\tarr[i] = strValue;\r\n\t\t\t\t\t\t//System.out.println(arr[i]);\r\n\t\t\t\t\t\t//System.out.print(cell.getNumericCellValue()+\", \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if((i == 0) && (cell.getCellType() == XSSFCell.CELL_TYPE_BLANK)) {\r\n\t\t\t\t\t\ttemp = \"Final line\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString unknown = \"Unknown\";\r\n\t\t\t\t\t\tarr[i] = unknown;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(temp.equals(\"Final line\")) {\r\n\t\t\t\t\ttemp = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse if(temp.equals(\"First\")) {\r\n\t\t\t\t\ttemp = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t\r\n\t\t\t\t\tString name = arr[0].trim() + \" \" + arr[1].trim();\r\n\t\t\t\t\tString accreditions = arr[2].trim();\r\n\t\t\t\t\tString title = arr[3].trim();\r\n\t\t\t\t\tString extension = arr[4].trim();\r\n\t\t\t\t\tString directNumber = arr[5].trim();\r\n\t\t\t\t\tString cellNumber = arr[6].trim();\r\n\t\t\t\t\tString email = arr[7].trim();\r\n\t\t\t\t\tString location = arr[8].trim();\r\n\t\t\t\t\t\r\n\t\t\t\t\tString info = accreditions + \":\" + title + \":\" + extension + \":\" + directNumber + \":\" + cellNumber + \":\" + email + \":\" + location;\r\n\t\t\t\t\t//System.out.println(name + info);\r\n\t\t\t\t\tmap.put(name, info);\r\n\t\t\t\t\t//set.add(name);\r\n\t\t\t\t\tlist.add(name);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr = new String[9];\r\n\t\t\t\t\t//System.out.println();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t \r\n\t\t } catch (FileNotFoundException e2) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te2.printStackTrace();\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public static void fillEmployees() {\n\t\tString name1;\n\t\tString name2;\n\t\tString name3;\n\t\tString name4;\n\t\tfor(int i=0;i<auxEmployees.length;i++) { //Va llenando de una en una las filas del array auxiliar de empleados (cada fila es una empresa) con nommbres aleatorios del array employees\n\t\t\tname1=\"\";\n\t\t\tname2=\"\";\n\t\t\tname3=\"\";\n\t\t\tname4=\"\";\n\t\t\twhile (name1.equals(name2) || name1.equals(name3) || name1.equals(name4) || name2.equals(name3) || name2.equals(name4) || name3.equals(name4)) { //Si los nombres son iguales vuelve a asignar nombres\n\t\t\t\tname1=employees[selector.nextInt(employees.length)];\n\t\t\t\tname2=employees[selector.nextInt(employees.length)];\n\t\t\t\tname3=employees[selector.nextInt(employees.length)];\n\t\t\t\tname4=employees[selector.nextInt(employees.length)];\n\t\t\t}\n\t\t\tauxEmployees[i][0]=name1;\n\t\t\tauxEmployees[i][1]=name2;\n\t\t\tauxEmployees[i][2]=name3;\n\t\t\tauxEmployees[i][3]=name4;\n\t\t}\n\t}", "public static List<Employee> getListEmployee() throws ParserConfigurationException {\n List<Employee> listEmployees = new ArrayList<>();\n String filePath = \"src/task2/employee.xml\";\n File file = new File(filePath);\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder;\n\n try {\n docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.parse(file);\n doc.getDocumentElement().normalize();\n NodeList nodeList = doc.getElementsByTagName(\"employee\");\n for (int i = 0; i < nodeList.getLength(); i++) {\n listEmployees.add(getEmployee(nodeList.item(i)));\n }\n return listEmployees;\n } catch (ParserConfigurationException | SAXException | IOException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n return null;\n }", "public void getDataFromDatabase(){\r\n\t \tArrayList<Object> row = HomeActivity.dbPrograms.getDetail(SelectedID);\r\n\t \t\r\n\t\t\t// store data to variables\r\n\t \tProgramID = Integer.parseInt(row.get(0).toString());\r\n\t \tWorkoutID = Integer.parseInt(row.get(1).toString());\r\n\t \tName = row.get(2).toString();\r\n\t \tSelectedDayID = Integer.parseInt(row.get(3).toString());\r\n\t \tImage = row.get(4).toString();\r\n\t \tTime = row.get(5).toString().trim();\r\n\t \tSteps = row.get(6).toString();\r\n\t \t\r\n\t }", "private static ArrayList<Ms3Person> readCSV(String fileName) {\r\n\t\tArrayList<Ms3Person> personsList = new ArrayList<>();\r\n\t\ttry (Scanner sc = new Scanner(new File(fileName))) {\r\n\t\t\t// skip the first line which is having column headers name\r\n\t\t\tsc.nextLine();\r\n\t\t\tint index = 1;\r\n\t\t\t// loop will go till end of file is reached ie.\r\n\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t// read single line at a time\r\n\t\t\t\tString personData = sc.nextLine();\r\n\t\t\t\tif(index >=5999)\r\n\t\t\t\t\tSystem.out.println(index+\" index\"+personData);\r\n\t\t\t\t//System.out.println(personData);\r\n\t\t\t\t//split the string by delimiter ,\r\n\t\t\t\tif(personData.length()>2) {\r\n\t\t\t\t\tString singlePersonRecord[] = personData.split(\",\");\r\n\t\t\t\t\t//the data we get is in form of sTring we need to convert\r\n\t\t\t\t\t//it to required data type for usage\r\n\t\t\t\t\tMs3Person person = convertDataToRequiredDataType(singlePersonRecord,index);\r\n\t\t\t\t\tif (person != null) {\r\n\t\t\t\t\t\t// add the person object in ArrayList\r\n\t\t\t\t\t\tpersonsList.add(person);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// bad data so create new file & write data\r\n // writing to the logfile\r\n \r\n \r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"index: \" + index);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tif(personData.length()<1) {//if no more line is there or only empty lines left\r\n\t\t\t\t\t\tSystem.out.println(\"finished reading the file...\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// if any exception arises while reading the file data that exception\r\n\t\t\t// will be caught in this block\r\n\t\t\tSystem.out.println(\"EXCEPTION: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn personsList;\r\n\t}", "public List<Employees>getEMPMenaning() {\n\tString sql = \"SELECT Id_employees, Name_and_surname, Password, Work_role FROM employees \";\n\t\n\tList<Employees>list = new ArrayList<Employees>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\n\t\twhile(resultSet.next()) {\n\t\t\tEmployees getEMPMenaning = new Employees();\n\t\t\tgetEMPMenaning.setIdEmployees(resultSet.getInt(\"Id_employees\"));\n\t\t getEMPMenaning.setNameAndSurname(resultSet.getString(\"Name_and_surname\"));\n\t\t getEMPMenaning.setPassword(resultSet.getString(\"Password\"));\n\t\t getEMPMenaning.setWorkRole(resultSet.getInt(\"Work_role\"));\n\t\t \n\t\t\tlist.add(getEMPMenaning);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n\n\n\t\n}", "public static Employee[] getAllEmployeesDetails(Connection conn) {\n\t\tEmployee [] empArray = new Employee[11];\n//\t\tWe are now creating a second option method and showing all the employees details in it\n\t\ttry {\n\t\t\t// Create the SQL query string which uses the \"getEmployeeCount\" stored procedure in the employee \n\t\t\tString sql = \"CALL getAllEmployeesDetails()\";\n\t\t\t// Create a new SQL statement \n\t\t\tStatement st = conn.createStatement();\n\t\t\t// Create a new results set which store the value returned by the when the SQL statement is executed \n\t\t\tResultSet rs = st.executeQuery(sql); \n\t\t\t// While there are still elements in the results set\n\t\t\tint i=0;\n//\t\t\twe are running a while loop and storing all the sql results in the main constructor\n\t\t\twhile (rs.next()) {\n\t\t\t\tempArray[i++] = new Employee(rs.getInt(\"emp_no\"), rs.getDate(\"birth_date\"), rs.getString(\"first_name\"),rs.getString(\"last_name\"), rs.getString(\"gender\"), rs.getDate(\"hire_date\"));\n\t\t\t}\n\t\t\t// close the results set\n\t\t\trs.close(); \n\t\t\t// close the statement\n\t\t\tst.close(); \n\t\t}\n\t\tcatch (SQLException e) {\n\t\t\tSystem.out.println(\"Error in getAllEmployeesDetails\");\n\t\t\te.printStackTrace();\n\t\t}\n//\t\treturn the array\n\t\treturn empArray;\n\t}", "public static List readFromACsv(String addressbookname){\n final String COMMA_DELIMITER = \",\";\n String PATH=\"C:/Users/Sukrutha Manjunath/IdeaProjects/Parctice+\" + addressbookname;\n List<Person> personList=new ArrayList<Person>();\n BufferedReader br =null;\n try{\n br=new BufferedReader(new FileReader(PATH));\n String line = \"\";\n br.readLine();\n while ((line = br.readLine()) != null)\n {\n String[] personDetails = line.split(COMMA_DELIMITER);\n\n if(personDetails.length > 0 )\n {\n //Save the employee details in Employee object\n Person person = new Person(personDetails[0],personDetails[1],personDetails[2],\n personDetails[3],personDetails[4], personDetails[5],personDetails[6]);\n personList.add(person);\n }\n }\n\n }catch (Exception ex){\n ex.printStackTrace();\n }\n finally {\n try{\n br.close();\n }\n catch (IOException e){\n e.printStackTrace();\n }\n }\n return personList;\n }", "public void displayAllContacts() {\n\n for (int i = 0; i < contacts.size(); i ++) {\n\n Contact contact = contacts.get(i);\n\n System.out.println(\" Name: \" + contact.getName());\n System.out.println(\" Title: \" + contact.getTitle());\n System.out.println(\" ID #: \" + contact.getID());\n System.out.println(\" Hoursrate: \" + contact.getHoursrate());\n System.out.println(\" Workhours \" + contact.getWorkhours());\n System.out.println(\"-------------\");\n\n\n\n Employee one = new Employee(\"A\", \"A\", \"A\", \"A\"); // I give it some contact information first.\n Employee two = new Employee(\"Bob\", \"Bob\", \"A\", \"A\");\n\n\n\n\n\n\n}\n\n\n//***************************************************************", "public void loadHours(String fileName)\r\n\t{\r\n\t\t//try block to try and open the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//declare local variables that will be assigned to the employee. These will be converted after split. \r\n\t\t\tString empID = \"\";\r\n\t\t\tString dailyHours = \"\";\r\n\t\t\tString day = \"\";\r\n\t\t\t//scan for the file \r\n\t\t\tScanner infile = new Scanner(new FileInputStream(fileName));\r\n\t\t\t\r\n\t\t\t//while loop if there is a next line\r\n\t\t\twhile(infile.hasNext())\r\n\t\t\t{\r\n\t\t\t\t//declare the line that was pulled as a single string \r\n\t\t\t\tString line = infile.nextLine();\r\n\t\t\t\t\r\n\t\t\t\t//break the line up by the delimiter (,)\r\n\t\t\t\tString fields[] = line.split(\",\");\r\n\t\t\t\t\r\n\t\t\t\t//assign the first field to day, 2nd to employeeID, and 3rd to dailyHours\r\n\t\t\t\tday = fields[0];\r\n\t\t\t\tempID = fields[1];\r\n\t\t\t\tdailyHours = fields[2];\r\n\t\t\t\t\r\n\t\t\t\t//cycle the Employee arrayList and see which employee ID matches the added ID\r\n\t\t\t\tfor (Employee employee : empList)\r\n\t\t\t\t{\r\n\t\t\t\t\t//selection structure checking if the empID matches the Employee list ID\r\n\t\t\t\t\tif(employee.getEmpoyeeId().equalsIgnoreCase(empID))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//add the hours to the employee object (convert dailyHours to a Double)\r\n\t\t\t\t\t\temployee.addHours(Double.parseDouble(dailyHours));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//now that the hours have been added to that individual employee, the hours need to be added to the date in the \r\n\t\t\t\t\t\t//DailyHours class by calling findEntryByDate\r\n\t\t\t\t\t\taddToDailyReport(day, Double.parseDouble(dailyHours), employee.getSalary());\r\n\t\t\t\t\t}//end employee ID found\r\n\t\t\t\t\t\r\n\t\t\t\t\t//else not found so set to null\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\temployee = null;\r\n\t\t\t\t\t}//end not found \r\n\t\t\t\t}//end for loop cycling the empList\t\r\n\t\t\t}//end the file has no more lines\r\n\t\t}//end try block\r\n\t\t\r\n\t\t//catch block incase try fails for OPENING THE FILE\r\n\t\tcatch(IOException ex)\r\n\t\t{\r\n\t\t\t//call ex object and display message\r\n\t\t\tex.printStackTrace();\r\n\t\t}//end of catch block\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tScanner fileLine = new Scanner(new File (\"/Users/bsandi/eclipse-workspace/5511/src/assignment_4/ds17s-Asg4-data\"));\n\n\t\t// Length of the array\n\t\tLineNumberReader lnr = new LineNumberReader(new FileReader(new File (\"/Users/bsandi/eclipse-workspace/5511/src/assignment_4/ds17s-Asg4-data\")));\n\t\tlnr.skip(Long.MAX_VALUE);\n\t\tint total_entries = lnr.getLineNumber()+1;\n\n\t\tfileLine.useDelimiter(\"\\\\n|:\");\n\t\tint col_num = 4;\n\n\n\t\t//Read data from text file\n\t\tString[][] inputArr = new String[total_entries][col_num];\t\n\t\tint j = 0;\n\t\tint l = 0;\n\t\twhile (l< total_entries ) {//fileLine.hasNext()) {\n\n\t\t\tfor (int k=0 ; k<col_num ; k++) {\n\t\t\t\tinputArr[j][k] = (fileLine.next());\n\t\t\t}\n\t\t\tl++;\n\t\t\tj++;\n\t\t}\n\t\tfileLine.close();\n\t\tlnr.close();\n\n\n\n\t\t// Ask for the the string to be searched \n\t\tint searchedField =-1;\n\t\tSystem.out.println(\"Choose a field to execute the search (1) Person’s name. (2) Email address. (3) Organization \");\n\t\tScanner field = new Scanner(System.in);\n\t\twhile (searchedField<1 || searchedField>3) {\t\n\t\t\tfield = new Scanner(System.in);\n\t\t\ttry {\n\t\t\t\tsearchedField = Integer.parseInt(field.nextLine());\n\t\t\t\tif (searchedField<1 || searchedField>3) {\n\t\t\t\t\tSystem.out.println(\"Input 1, 2 or 3 ((1) Person’s name. (2) Email address. (3) Organization) \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tSystem.out.println(\"Input 1, 2 or 3 ((1) Person’s name. (2) Email address. (3) Organization) \");\n\t\t\t}\n\t\t}\n\n\t\t\n\n\n\n\n\n\t\t// Ask for the the string to be searched \n\t\tSystem.out.println(\"Give a string you would like to search: \");\n\t\tScanner item = new Scanner(System.in);\n\t\tString searchedItem = item.nextLine();\n\t\t\n\t\t\n\t\tfield.close();\n\t\titem.close();\n\n\t\t\n\t\t\n\t\t// Create output array\n\t\tint outputIndex = 0;\n\t\tint outputItems = 0;\n\t\tString[] output = new String[total_entries]; //Change to dynamic \n\t\tfor (int i = 0 ; i< output.length ; i++) {\n\t\t\tif (bma(searchedItem,inputArr[i][searchedField-1])) {\n\t\t\t\toutput[outputIndex]= inputArr[i][0] + \" - \" + inputArr[i][1] + \" - \" +inputArr[i][2] + \" - \" + inputArr[i][3];\n\t\t\t\toutputIndex = outputIndex +1;\n\t\t\t\toutputItems = outputItems +1;\n\t\t\t}\n\t\t}\n\n\n\t\t// Print output array\n\t\tfor (int i=0 ; i < outputItems ; i++) {\n\t\t\tSystem.out.println(output[i]);\n\t\t}\n\t\tif (outputItems==0) {\n\t\t\tSystem.out.println(\"No items found\");\n\t\t}\n\n\n\n\t}", "private void getDataFromEmployeeDataCreate(Map<String, Object> empData,\n CustomerDataTypeDTO data,\n List<FileInfosDTO> listFiles, String formatDate) throws JsonProcessingException {\n if (FieldTypeEnum.FILE.getCode().equals(data.getFieldType())) {\n if (listFiles != null) {\n List<BaseFileInfosDTO> listSaveDb = new ArrayList<>();\n listFiles.forEach(file -> {\n BaseFileInfosDTO fileSaveDb = new BaseFileInfosDTO();\n fileSaveDb.setFileName(file.getFileName());\n fileSaveDb.setFilePath(file.getFilePath());\n listSaveDb.add(fileSaveDb);\n });\n empData.put(data.getKey(), objectMapper.writeValueAsString(listSaveDb));\n }\n } else if (StringUtils.isNotBlank(data.getValue()) && !STRING_ARRAY_EMPTY.equals(data.getValue())) {\n if (FieldTypeEnum.PULLDOWN.getCode().equals(data.getFieldType())\n || FieldTypeEnum.RADIO.getCode().equals(data.getFieldType())) {\n empData.put(data.getKey(), Long.valueOf(data.getValue()));\n } else if (FieldTypeEnum.MULTIPLE_PULLDOWN.getCode().equals(data.getFieldType())\n || FieldTypeEnum.CHECKBOX.getCode().equals(data.getFieldType())\n || FieldTypeEnum.RELATION.getCode().equals(data.getFieldType())) {\n List<Long> fValue = null;\n try {\n TypeReference<ArrayList<Long>> typeRef = new TypeReference<ArrayList<Long>>() {\n };\n fValue = objectMapper.readValue(data.getValue(), typeRef);\n } catch (IOException e) {\n log.error(e.getLocalizedMessage());\n }\n empData.put(data.getKey(), fValue);\n } else if (FieldTypeEnum.NUMBER.getCode().equals(data.getFieldType())) {\n if (CheckUtil.isNumeric(data.getValue())) {\n empData.put(data.getKey(), Long.valueOf(data.getValue()));\n } else {\n empData.put(data.getKey(), Double.valueOf(data.getValue()));\n }\n } else if (FieldTypeEnum.DATE.getCode().equals(data.getFieldType())) {\n getSystemDate(empData, formatDate, data.getValue(), data.getKey(), null);\n } else if (FieldTypeEnum.TIME.getCode().equals(data.getFieldType())) {\n getSystemTime(empData, DateUtil.FORMAT_HOUR_MINUTE, data.getValue(), data.getKey());\n } else if (FieldTypeEnum.DATETIME.getCode().equals(data.getFieldType())) {\n String date = data.getValue().substring(0, formatDate.length());\n String hour = data.getValue().substring(formatDate.length());\n getSystemDate(empData, formatDate, date, data.getKey(), hour);\n } else if (FieldTypeEnum.SELECT_ORGANIZATION.getCode().equals(data.getFieldType())) {\n List<Object> fValue = null;\n try {\n TypeReference<ArrayList<Object>> typeRef = new TypeReference<ArrayList<Object>>() {};\n fValue = objectMapper.readValue(data.getValue(), typeRef);\n } catch (IOException e) {\n log.error(e.getLocalizedMessage());\n }\n empData.put(data.getKey(), fValue);\n } else if (FieldTypeEnum.LINK.getCode().equals(data.getFieldType())\n || FieldTypeEnum.ADDRESS.getCode().equals(data.getFieldType())) {\n Map<String, String> fValue = new HashMap<>();\n try {\n TypeReference<Map<String, String>> typeRef = new TypeReference<Map<String, String>>() {};\n fValue = objectMapper.readValue(data.getValue(), typeRef);\n empData.put(data.getKey(), fValue);\n } catch (Exception e) {\n log.error(e.getLocalizedMessage());\n }\n } else {\n empData.put(data.getKey(), data.getValue());\n }\n }\n }", "public void readValuesfromtableWithoutHeadings()\n\t {\n\t\t open();\n\t\t List<Map<Object, String>> tab1= withColumns(\"Last Name \" ,\"First Name\",\"Email\", \"Due\" , \"Web Site\" , \"My Test\") \n\t\t\t\t .readRowsFrom(table);\n\t\t System.out.println(tab1);\n\t }", "public List<Contact> readEmployeePayrollForGivenDateRange(IOService ioService, LocalDate startDate,\n\t\t\tLocalDate endDate) throws CustomPayrollException {\n\t\tif (ioService.equals(IOService.DB_IO)) {\n\t\t\tthis.employeePayrollList = normalisedDBServiceObj.getEmployeeForDateRange(startDate, endDate);\n\t\t}\n\t\treturn employeePayrollList;\n\t}", "public static void main(String[] args) {\n\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\t//String fileName = \"C:\\\\Users\\\\DELL\\\\Desktop\\\\Sample Data\\\\50000 Records.csv\";\n\n//\t\tString fileName = \"C:\\\\Users\\\\DELL\\\\Desktop\\\\Sample Data\\\\Hr1m.csv\";\n\t\tString fileName = \"C:\\\\Users\\\\DELL\\\\Desktop\\\\Sample Data\\\\Hr5m.csv\";\n\t\t\n\t\t// Employee[] emp = new Employee[100];\n//\t\tEmployee[] emp = new Employee[50000];\n\t\tEmployee[] emp = new Employee[5000000];\n\t\tint bufferSize = 10240; // 10k\n\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(fileName), bufferSize)) {\n\n\t\t\tString line = br.readLine(); // Skiping first line (Extra read)\n\n\t\t\tint index = 0;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] valueArr = line.split(\",\");\n\n\t\t\t\tInteger empId = Integer.parseInt(valueArr[0]);\n\t\t\t\tString empName = valueArr[1] + \" \" + valueArr[2] + \" \" + valueArr[3] + \" \" + valueArr[4];\n\t\t\t\tLong salary = Long.parseLong(valueArr[25]);\n\t\t\t\tString gender = valueArr[5];\n\t\t\t\tString empMotherName = valueArr[8];\n\t\t\t\tLocalDate dateOfJoin = Utility.getDate(valueArr[14]);\n\n\t\t\t\temp[index++] = new Employee(empId, empName, salary, gender, empMotherName, dateOfJoin);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"Loaded file in \" + (System.currentTimeMillis() - startTime) / 1000 + \" seconds\");\n\n\t\tSystem.out.println(\"Total Employees: \" + emp.length);\n\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Top Ten Salary wise Employees \");\n\n\t\tstartTime = System.currentTimeMillis();\n\t\t\n//\t\tbubbleShort(emp);\n//\t\tselectionShort(emp);\n//\t\tinsertionShort(emp);\n\t\t\n\t\tQuickShort.sort(emp, 0, emp.length -1);\n\t\t\n\t\tSystem.out.println(\"Sorted in \" + (System.currentTimeMillis() - startTime) / 1000 + \" seconds with itration counter :: \"+Utility.counter);\n\n\t\tUtility.print(10, emp);\n\n\t}", "@DataProvider\n\tpublic String[][] getExcelData() throws InvalidFormatException, IOException {\n\t\tReadExcel read = new ReadExcel();\n\t\treturn read.getCellData(\"Testdata/FOE.xlsx\", \"sheet1\");\n\t }", "public static void printReport() throws Exception\r\n\t{\n\t\tFile file=new File(\"Data/Peopledetails.txt\");\r\n\t\tfs=new Scanner(file);\r\n\t\tfs.useDelimiter(\",|\\\\r\\n\");\r\n\t\t\r\n\t\t//Print out headers for table\r\n\t\tSystem.out.printf(\"%5s%20s%10s%15s%20s%15s%15s%20s%10s%20s%10s\\n\\n\", \r\n\t\t\t\t\"ID\", \"Name\", \"Gender\", \"Hourly Rate\", \"Contracted Hours\",\t\"Gross Pay\", \r\n\t\t\t\t\"Income Tax\", \"National Insurance\", \"Pension\", \"Total Deductions\", \"Net pay\");\r\n\t\t\r\n\t\twhile (fs.hasNext())\r\n\t\t{\r\n\t\t\tid=fs.nextInt();\r\n\t\t\tfname=fs.next();\r\n\t\t\tsname=fs.next();\r\n\t\t\tgen=fs.next();\r\n\t\t\thrate=fs.nextDouble();\r\n\t\t\thrs=fs.nextDouble();\r\n\t\t\t\t\t\t\r\n\t\t\tgross=hrs*hrate;\r\n\t\t\t\t\t\t\r\n\t\t\t//Calculates the overtime\r\n\t\t\tif(hrs>40)\r\n\t\t\t{\r\n\t\t\t\totime=hrs-40;\r\n\t\t\t\tstandard=40;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\totime=0;\r\n\t\t\t\tstandard=hrs;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgross=(standard*hrate+otime*hrate*1.5);\r\n\t\t\t\r\n\t\t\t//Calculates the annual gross in order to calculate the income tax per week\r\n\t\t\tannualgross=gross*52;\r\n\t\t\t\r\n\t\t\t//Calculates Income Tax\r\n\t\t\tdouble p,b,h,a;\r\n\t\t\t\r\n\t\t\tif(annualgross<=12500)\r\n\t\t\t{\r\n\t\t\t\tp=0;\r\n\t\t\t\tb=0;\r\n\t\t\t\th=0;\r\n\t\t\t\ta=0;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>12500 && annualgross<=50000)\r\n\t\t\t{\r\n\t\t\t\tp = 12500;\r\n\t\t\t\tb = annualgross - 12500;\r\n\t\t\t\th = 0;\r\n\t\t\t\ta = 0;\r\n\r\n\t\t\t}\r\n\t\t\telse if(annualgross>50000 && annualgross<=150000)\r\n\t\t\t{\r\n\t\t\t\tp = 12500;\r\n\t\t\t b = 37500;\r\n\t\t\t h = annualgross - 50000;\r\n\t\t\t a = 0;\r\n\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t p = 12500;\r\n\t\t b = 37500;\r\n\t\t h = 100000;\r\n\t\t a = annualgross - 150000;\r\n\r\n\t\t\t}\r\n\t\t\ttax= (p * 0 + b * 0.2 + h * 0.4 + a * 0.45)/52;\r\n\t\t\t\r\n\t\t\t//Calculates National Insurance Contribution\r\n\t\t\tif(annualgross>8500 && annualgross<50000)\r\n\t\t\t{\r\n\t\t\t\tnirate=0.12;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tnirate=0.02;\r\n\t\t\t}\r\n\t\t\tnitax=gross*nirate;\r\n\t\t\t\r\n\t\t\t//Calculates Pension Contribution\r\n\t\t\tif(annualgross<27698)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.074;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>=27698 && annualgross<37285)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.086;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>=37285 && annualgross<44209)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.096;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.117;\r\n\t\t\t}\r\n\t\t\tpension=gross*penrate;\r\n\t\t\t\r\n\t\t\t//Calculates total deductions\r\n\t\t\tdeduct=tax+nitax+pension;\r\n\t\t\t\r\n\t\t\t//Calculates net pay\r\n\t\t\tnet=gross-deduct;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.printf(\"%5d%20s%10s%15.2f%20.2f%15.2f%15.2f%15.2f%15.2f%20.2f%10.2f\\n\",\r\n\t\t\t\t\tid, fname+\" \"+sname, gen, hrate, hrs, gross, tax, nitax, pension, deduct, net);\r\n\t\t}\r\n\t\tfs.close();\r\n\t\t\r\n\t}", "public HashMap<Integer, Employee> viewAllEmployee() {\r\n\t\treturn employee1;\r\n\t}", "public void printData(String path , boolean isEmployee) {\n try {\n\n FileReader fileReader = new FileReader(path);\n BufferedReader buffReader = new BufferedReader(fileReader);\n String line ;\n boolean firstLine = true;\n\n // reading csv file and setting to person proto\n while((line = buffReader.readLine()) != null)\n {\n if ( firstLine) {\n firstLine = false;\n continue;\n }\n String [] data = line.split(\",\");\n\n if (isEmployee)\n readEmployeeData(data);\n else\n readBuildingData(data);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public List<EmployeeEntity> getEmployeeDataByName(String name, StorageContext context)\n\t\t\tthrows PragmaticBookSelfException {\n\t\tList<EmployeeEntity> result = null;\n\t\ttry {\n\t\t\tSession hibernateSeesion = context.getHibernateSession();\n\t\t\tString retrieveEmployeebyNameQuery = \"FROM EmployeeEntity e WHERE e.fname LIKE :fname or e.lname LIKE :lname\";\n\t\t\tQuery query = hibernateSeesion.createQuery(retrieveEmployeebyNameQuery);\n\t\t\tquery.setParameter(\"fname\", name);\n\t\t\tquery.setParameter(\"lname\", name);\n\t\t\tresult = (List<EmployeeEntity>) query.list();\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n String inputLine = \"\";\n char action = ' ';\n Employee[] employees = new Employee[] {\n new Employee(\"John\", \"+1-518-383-9901\", 9000),\n new Employee(\"Tom\", \"+1-518-383-6664\", 12000),\n new Employee(\"Diane\", \"+1-518-383-4025\", 5000),\n new Employee(\"Robert\", \"+1-518-383-7971\", 16000),\n new Employee(\"Patrick\", \"+1-518-383-5503\", 7000),\n new Employee(\"David\", \"+1-518-383-9905\", 8000),\n new Employee(\"Kate\", \"+1-518-383-3334\", 2000),\n new Employee(\"Mary\", \"+1-518-383-4545\", 4500),\n new Employee(\"Steven\", \"+1-518-383-7845\", 3500),\n new Employee(\"Bill\", \"+1-518-383-0456\", 7500),\n new Employee(\"Peter\", \"+1-518-383-3578\", 2500),\n new Employee(\"Mike\", \"+1-518-383-3895\", 3500),\n new Employee(\"Amanda\", \"+1-518-383-1001\", 4000)\n } ;\n Company company = new Company(\"1741 Technology Drive, Suite 400, San Jose, California 95110\", \"+1-408-273-8900\", employees);\n\n while (true) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n System.out.println(\"Input 1 to add new employee/ Input 2 to remove employee / Input 3 to get list of company employees\");\n System.out.println(\"Input 3 to print sum of all salaries/ Input 4 to print average salary / Input 5 to print employee name with the highest salary\");\n System.out.println(\"Input 7 to Exit\");\n inputLine = br.readLine();\n action = inputLine.charAt(0);\n\n switch (action) {\n case '1':\n System.out.print(\"Input employee name: \");\n String name = br.readLine();\n System.out.print(\"Input employee phone: \");\n String phone = br.readLine();\n System.out.print(\"Input employee salary: \");\n String salaryStr = br.readLine();\n int salary = Integer.parseInt(salaryStr);\n Employee emp = new Employee(name, phone, salary);\n company.addEmployee(emp);\n break;\n case '2':\n System.out.println(\"Input name of employee to remove\");\n String employeeName = br.readLine();\n company.removeEmployee(employeeName);\n break;\n case '3':\n System.out.println(\"Here is list of all company employees\");\n company.printEmployees();\n break;\n case '4':\n System.out.println(\"Sum of all salaries is \" + company.getSumOfAllSalaries());\n break;\n case '5':\n System.out.println(\"Average company salary is \" + company.getAverageSalary());\n break;\n case '6':\n System.out.println(\"Employee name with the highest salary is \" + company.getEmployeeNameWithMaxSalary());\n break;\n case '7': System.exit(0);\n default:\n System.out.println(\"You have written wrong or not supported action!\");\n break;\n }\n }\n catch (NumberFormatException e) {\n System.out.println(\"You entered non-number salary for employee!\");\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "public void userLogInInfoRead(String filepath2, HashMap<String, EmpInfo> mergeData) {\n String data;\n String[] userLogInInfoToken;\n File userLogInInfoFile = new File(filepath2);\n Scanner scanner = null;\n try {\n scanner = new Scanner(userLogInInfoFile);\n } catch (FileNotFoundException e) {\n out.println(\"file not found\");\n }\n if (scanner != null) {\n while (scanner.hasNextLine()) {\n data = scanner.nextLine();\n userLogInInfoToken = data.split(\",\");\n // store userid in mergeData as a key\n EmpInfo empInfo = new EmpInfo(Integer.parseInt(userLogInInfoToken[0]),\n userLogInInfoToken[1], userLogInInfoToken[2], userLogInInfoToken[3]);\n EmpInfo uRole = mergeData.get(userLogInInfoToken[0]);\n uRole.setUserRole(userLogInInfoToken[3]);\n /* merge data have already 6 key and 6 emp information if new key is equal to old key\n then hash map not put new key and hashmap put userRole at old key,hashmap allowed only unique kay*/\n mergeData.put(userLogInInfoToken[0], uRole);\n // all employee log in information add in arraylist for printing information\n userLogInInfo.add(empInfo);\n }\n }\n }", "private void RetrieveEditTextData() {\n\n strFirstName = etFirstName.getText().toString();\n strMiddleName = etMiddleName.getText().toString();\n strLastName = etLastName.getText().toString();\n strEmployId = etEmployId.getText().toString();\n strDesignation = etDesignation.getText().toString();\n strCompName = etCompName.getText().toString();\n strCategory = etCategory.getText().toString();\n strDOB = etDOB.getText().toString();\n\n }", "public static void main(String[] args) {\n File data = new File(\"C:\" + File.separatorChar + \"temp\" + File.separatorChar \r\n + \"labFile.txt\");\r\n \r\n BufferedReader in = null;\r\n int count = 0;\r\n int recordCount = 0;\r\n try {\r\n //FileReader is being decorated by BufferedReader to make it read faster\r\n //buffered allows us to talk to file\r\n //open the stream\r\n in = new BufferedReader(new FileReader(data));\r\n //read the first line\r\n String line = in.readLine();\r\n //so long as line we just read is not null then continue reading file\r\n //if line is null it's end of file\r\n while (line != null) {\r\n \r\n \r\n if (count == 0) {\r\n String[] myStringArray = line.split(\" \");\r\n \r\n System.out.println(\"First Name: \" + myStringArray[0]);\r\n System.out.println(\"Last Name: \" + myStringArray[1]); \r\n } else if (count == 1) {\r\n \r\n System.out.println(\"Street Address: \" + line); \r\n } else if (count == 2) {\r\n \r\n String[] myStringArray = line.split(\" \");\r\n System.out.println(\"City: \" + myStringArray[0].replace(\",\", \" \"));\r\n System.out.println(\"State: \" + myStringArray[1]);\r\n System.out.println(\"Zip: \" + myStringArray[2]);\r\n \r\n count = -1;\r\n recordCount++;\r\n System.out.println(\"\");\r\n System.out.println(\"Number of records read: \" + recordCount);\r\n System.out.println(\"\");\r\n } \r\n count++;\r\n \r\n //reads next line\r\n line = in.readLine(); // strips out any carriage return chars\r\n \r\n }\r\n\r\n } catch (IOException ioe) {\r\n System.out.println(\"Houston, we have a problem! reading this file\");\r\n //want to close regardless if there is an error or not\r\n } finally {\r\n try {\r\n //close the stream\r\n //closing the file throws a checked exception that has to be surrounded by try catch\r\n in.close();\r\n } catch (Exception e) {\r\n\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tArrayList <Person> employee_list = new ArrayList <>();\r\n\r\n//taking input for the file name\r\n\t\tSystem.out.println(\"Please enter the name of the file (with the extension) that you want to process: \");\r\n\t\tScanner sc= new Scanner(System.in);\r\n\t\tString file_name=sc.nextLine();\r\n\t\t\r\n//opening and reading the file\r\n\t\t\r\n\t\ttry {\r\n List<String> empl_Lines = Files.readAllLines(java.nio.file.Paths.get(file_name), StandardCharsets.UTF_8);\r\n for (String line: empl_Lines) {\r\n \t String[] tokens = line.split(\",\");\r\n \temployee_list.add((Person)Employee.parse(line));\r\n }\r\n }\r\n\t\tcatch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\t\t\r\n System.out.println(\"Showing the data in the unsorted format\");\r\n System.out.println();\r\n for(Person emp: employee_list) {\r\n \tSystem.out.println(emp);\r\n }\r\n System.out.println();\r\n\r\n//sorting the employee list based on their IDs in ascending order\r\n \r\n Object[] person_array = employee_list.toArray();\r\n Arrays.sort(person_array, (a,b) -> (\"\"+((Person) a).getID()).compareTo(((Person) b).getID()));\r\n System.out.println(\"Sorting the array by the people's ID:\");\r\n System.out.println();\r\n Stream<Object> stream1 = Arrays.stream(person_array);\r\n stream1.forEach(System.out::println);\r\n System.out.println();\r\n \r\n\t\t\r\n//sorting the employee list alphabetically based on their first name\r\n System.out.println(\"Sorting based on First names: \");\r\n System.out.println();\r\n Arrays.sort(person_array, (a,b) -> (\"\"+((Person) a).getFirstName()).compareTo(\"\"+((Person) b).getFirstName())); \r\n Stream<Object> stream2 = Arrays.stream(person_array);\r\n stream2.forEach(System.out::println);\r\n System.out.println();\r\n \r\n//sorting the employee list alphabetically based on their last name, if same last name, then sorting based on first name\r\n System.out.println(\"Sorting based on Last names: \");\r\n System.out.println();\r\n Arrays.sort(person_array, (a,b) -> (\"\"+((Person) a).getLastName()).compareTo(\"\"+((Person) b).getLastName())); \r\n Arrays.sort(person_array, (a, b) -> {\r\n \tint ck = (\"\" + ((Person) a).getLastName()).compareTo(\"\" + ((Person) b).getLastName()); // lastName\r\n \treturn ck != 0? ck:\r\n \t(\"\" + ((Person) a).getFirstName()).compareTo(\"\" + ((Person) b).getFirstName()); // then firstFame\r\n \t});\r\n\r\n Stream<Object> stream3 = Arrays.stream(person_array);\r\n stream3.forEach(System.out::println);\r\n System.out.println(); \r\n\t\t\r\n//showing the total average and the number of the total employees using a stream\r\n\t\t\t\tObject[] empl_array= employee_list.toArray();\r\n\t\t\t\tStream<Object> stream = Arrays.stream(empl_array);\r\n\t\t\t\tdouble avg= stream.mapToDouble(e->((Employee) e).getSalary().doubleValue()).average().getAsDouble();\r\n\t\t\t\tBigDecimal avg_sal= new BigDecimal(avg);\r\n\t\t\t\tSystem.out.print(\"The average salary is: \");\r\n\t\t\t\tSystem.out.printf(\"%.2f\", avg_sal);\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(\"The total number of employees is: \"+ empl_array.length);\r\n\t\t\t\tSystem.out.println();\r\n \t\t \r\n//grouping the employees based on their salary range\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\tMap<Object, DoubleSummaryStatistics> result = employee_list.stream()\r\n\t\t\t\t\t\t\t.collect(Collectors.groupingBy(emp -> \r\n\t\t\t\t\t\t\t\t\t ((Employee) emp).getSalary().doubleValue() < 25000 ? \"<25000\" :\r\n\t\t\t\t\t\t\t\t ((Employee) emp).getSalary().doubleValue() < 40000 ? \"25000-40000\" :\r\n\t\t\t\t\t\t\t\t ((Employee) emp).getSalary().doubleValue() < 70000 ? \"40000-70000\" :\r\n\t\t\t\t\t\t\t\t\t ((Employee) emp).getSalary().doubleValue() > 70000 ? \">70000\" : \">70000\",\r\n\t\t\t\t\t\t\t\t Collectors.summarizingDouble(emp -> ((Employee) emp).getSalary().doubleValue())));\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\tDoubleSummaryStatistics sal_25 = result.get(\"<25000\");\r\n\t\t\t\tdouble avg_25 = sal_25 == null ? 0.0 : sal_25.getAverage();\r\n\t\t\t\tSystem.out.println(\"<25000 --> employee count: \" + sal_25.getCount() + \" --> avg salary: \" + String.format(\"%.2f\",avg_25));\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\tDoubleSummaryStatistics sal_25_40 = result.get(\"25000-40000\");\r\n\t\t\t\tdouble avg_25_40 = sal_25_40 == null ? 0.0 : sal_25_40.getAverage();\r\n\t\t\t\tSystem.out.println(\"25000-40000 --> employee count: \" + sal_25_40.getCount() + \" --> avg salary: \" + String.format(\"%.2f\",avg_25_40));\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\tDoubleSummaryStatistics sal_40_70 = result.get(\"40000-70000\");\r\n\t\t\t\tdouble avg_40_70 = sal_40_70 == null ? 0.0 : sal_40_70.getAverage();\r\n\t\t\t\tSystem.out.println(\"40000-70000 --> employee count: \" + sal_40_70.getCount() + \" --> avg salary: \" + String.format(\"%.2f\",avg_40_70));\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\tDoubleSummaryStatistics sal_70 = result.get(\">70000\");\r\n\t\t\t\tdouble avg_70 = sal_70 == null ? 0.0 : sal_70.getAverage();\r\n\t\t\t\tSystem.out.println(\">70000 --> employee count: \" + sal_70.getCount() + \" --> avg salary: \" + String.format(\"%.2f\",avg_70));\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t \r\n\t}", "@Override\r\n\tpublic List<Employee> findAllEMployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\r\n\t\tString findData = \"select * from employee\";\r\n\r\n\t\ttry {\r\n\t\t\tStatement s = dataSource.getConnection().createStatement();\r\n\r\n\t\t\tResultSet set = s.executeQuery(findData);\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\tEmployee employee = new Employee(id, sal, name, tech);\r\n\t\t\t\temployees.add(employee);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employees;\r\n\r\n\t}", "private void getDATA()\n\t{ \n\t\ttry \n\t\t{ \n\t\t\tint L_intROWNO =0;\n\t\t\tintRECCT = 0;\n\t\t\tM_strSQLQRY=\" select PT_PRTCD,PT_ADR01,PT_ZONCD,PT_PRTNM from CO_PTMST \";\n\t\t\tM_strSQLQRY+=\" where PT_GRPCD ='XXXXX' \";\n\t\t\tM_strSQLQRY+=\" and PT_PRTTP= '\"+txtPRTTP.getText().trim()+\"'\";\n\t\t\tM_strSQLQRY+= (txtFLTDS.getText().length()==0 ? \"\" : \" and upper(PT_PRTNM) like '\"+(chkSTRFL.isSelected() ? \"\" : \"%\")+txtFLTDS.getText().trim()+\"%'\");\n\t\t\tM_strSQLQRY+= \" AND isnull(PT_STSFL,' ') <> 'X' order by PT_PRTNM \";\n\t\t\tM_rstRSSET = cl_dat.exeSQLQRY1(M_strSQLQRY);\n\t\t\tif(M_rstRSSET !=null)\n\t\t\t{\n\t\t\t\tintRECCT = 0;\n\t\t\t\twhile(M_rstRSSET.next())\n\t\t\t\t{\n\t\t\t\t\ttblPRTLS.setValueAt(nvlSTRVL(M_rstRSSET.getString(\"PT_PRTCD\"),\"\"),L_intROWNO,TB1_PRTCD);\n\t\t\t\t\ttblPRTLS.setValueAt(nvlSTRVL(M_rstRSSET.getString(\"PT_ADR01\"),\"\"),L_intROWNO,TB1_ADD01);\n\t\t\t\t\ttblPRTLS.setValueAt(nvlSTRVL(M_rstRSSET.getString(\"PT_ZONCD\"),\"\"),L_intROWNO,TB1_ZONCD);\n\t\t\t\t\ttblPRTLS.setValueAt(nvlSTRVL(M_rstRSSET.getString(\"PT_PRTNM\"),\"\"),L_intROWNO,TB1_PRTNM);\n\t\t\t\t\tL_intROWNO ++;\n\t\t\t\t\tintRECCT++;\n\t\t\t\t}\n\t\t\t\tM_rstRSSET.close();\n\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"getdata\");\n\t\t}\n\t}", "@Override\r\n\tpublic List<EmployeeBean> getAllData() {\n\r\n\t\tEntityManager manager = entityManagerFactory.createEntityManager();\r\n\r\n\t\tString query = \"from EmployeeBean\";\r\n\r\n\t\tjavax.persistence.Query query2 = manager.createQuery(query);\r\n\r\n\t\tList<EmployeeBean> list = query2.getResultList();\r\n\t\tif (list != null) {\r\n\t\t\treturn list;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public static Employee[] getEmployeeByLastName(Connection conn, String input_last_name) {\n\n\t\tEmployee[] empArray2 = new Employee[1];\n//\t\trunning the loop with the input from the option and we are storing the last name so we ca use it below\n\t\ttry {\n\n\t\t\t// Create an SQL query that uses the procedure stored in the procedures.sql file \n\n\t\t\tString sql = \"CALL getEmployeeByLastName(\\\"\" + input_last_name + \"\\\")\"; \n\t\t\t// Create an SQL query\n\t\t\tStatement st = conn.createStatement();\n\t\t\t// generate a result \n\t\t\tResultSet rs = st.executeQuery(sql);\n\n//\t\t\trunning a similar loop from get all employees method where we are showing the details from the employee\n\t\t\t\n\t\t\tint i=0;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tempArray2[i] = new Employee(rs.getInt(\"emp_no\"), rs.getDate(\"birth_date\"), rs.getString(\"first_name\"),rs.getString(\"last_name\"), rs.getString(\"gender\"), rs.getDate(\"hire_date\")); \n\n\t\t\t\t//Print it out\n\n\t\t\t\tSystem.out.println(empArray2[i++].toString());\n\n\t\t\t}\n\t\t\t\n\t\t\t// close the result and the statement\t\t\t\n\t\t\trs.close();\n\t\t\t// close the statement\n\t\t\tst.close();\n\n\t\t}\n\n\t\tcatch (SQLException e) {\n\n\t\t\tSystem.out.println(\"Error in getEmployeeByLastName\");\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t\treturn empArray2;\n\n\t}", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n if (employeelistBuilder_ == null) {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n } else {\n return employeelistBuilder_.getMessage();\n }\n }", "private void doViewAllEmployees() {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"***Hors Management System:: System Administration:: View All Staffs\");\n\n List<Employee> employees = employeeControllerRemote.retrieveAllEmployees();\n\n employees.forEach((employee) -> {\n System.out.println(\"Employee ID: \" + employee.getEmployeeId() + \"First Name: \" + employee.getFirstName() + \"Last Name: \" + employee.getLastName() + \"Job Role: \" + employee.getJobRole().toString() + \"Username: \" + employee.getUserName() + \"Password: \" + employee.getPassword());\n });\n\n System.out.println(\"Press any key to continue...>\");\n sc.nextLine();\n }", "public void readTableData1() {\n\t\t// Find row size\n\t\tList<WebElement> rowCount = driver.findElements(By.xpath(\"//*[@id='industry-filter-results']/div[2]/table/tbody/tr/td/parent::*\"));\n\t\tfor(WebElement data:rowCount){\n\t\t\tSystem.out.println(data.getText());\n\t\t}\n\t}", "public static String getData2(int rownum, int cellnum) throws Exception {\n\t\tString filepath = \"F:\\\\Selenium Practice\\\\Framework\\\\TestData\\\\TestData.xlsx\";\n\t\tFile f = new File(filepath);\n\t\tFileInputStream str = new FileInputStream(f);\n\t\tWorkbook w = new XSSFWorkbook(str);\n\t\tSheet sh = w.getSheet(\"TestData\");\n\t\tRow r = sh.getRow(rownum);\n\t\tCell c = r.getCell(cellnum);\n\t\tint ct = c.getCellType();\n\t\tString name = \"\";\n\t\tswitch (ct) {\n\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\tif (ct == 0) {\n\t\t\t\tif (DateUtil.isCellDateFormatted(c)) {\n\t\t\t\t\tSimpleDateFormat form = new SimpleDateFormat(\"dd-MMM-yy\");\n\t\t\t\t\tname = form.format(c.getDateCellValue());\n\n\t\t\t\t} else {\n\t\t\t\t\tdouble d = c.getNumericCellValue();\n\t\t\t\t\tlong l = (long) d;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\tif (ct == 1) {\n\t\t\t\tname = c.getStringCellValue();\n\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}", "@Override\n\tpublic List<Employee> getEmpInfo() {\n\t\treturn null;\n\t}", "public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}" ]
[ "0.62226224", "0.60380197", "0.59191096", "0.57977575", "0.5746925", "0.57225424", "0.5707953", "0.5668827", "0.5655875", "0.5602238", "0.55872613", "0.55834687", "0.55819255", "0.55659574", "0.55645335", "0.5555054", "0.55452776", "0.5545165", "0.5499072", "0.5476336", "0.5455718", "0.5451106", "0.5422638", "0.5408409", "0.5403136", "0.53616625", "0.5356419", "0.5348764", "0.5337994", "0.5314052", "0.5308206", "0.53051656", "0.5293111", "0.5285696", "0.5284802", "0.52800715", "0.5278515", "0.5274575", "0.5273294", "0.52694243", "0.5267661", "0.5263935", "0.5232458", "0.5219908", "0.5216704", "0.52136475", "0.52005523", "0.5200352", "0.5197373", "0.5182796", "0.5182549", "0.51747185", "0.5156638", "0.51480675", "0.5144353", "0.5128302", "0.51207846", "0.5115802", "0.5115749", "0.51155066", "0.51020783", "0.5096544", "0.5084809", "0.5071848", "0.5068497", "0.5062875", "0.5062655", "0.5052619", "0.50489414", "0.50471884", "0.50388455", "0.5034108", "0.5033146", "0.50326556", "0.50283116", "0.5020685", "0.5005808", "0.500515", "0.5000313", "0.499699", "0.4984095", "0.49821827", "0.49790227", "0.49782917", "0.49766988", "0.4970701", "0.49680963", "0.49614185", "0.49588865", "0.4957793", "0.49560332", "0.4955975", "0.49549845", "0.49547535", "0.495267", "0.49507734", "0.49472988", "0.49436814", "0.49433437", "0.49290195" ]
0.5845964
3
This routine gets the diversity information about an employee and converts it to the legacy system codes.
private static String fetchLegacyEthnicCode(HashMap<String, Object> parameterMap) { String ethnicGroupCode = PsDiversityEthnicity.findEthnicGroupCodeByEmployeeId((String)parameterMap.get("employeeId")); String ethnicGroup = PsEthnicGroup.findEthnicGroupByEthnicGroupCode(ethnicGroupCode); String legacyEthnicCode = CrossReferenceEthnicGroup.findActiveLegacyEthnicCodeByEthnicGroup(ethnicGroup); if(legacyEthnicCode == null || legacyEthnicCode.isEmpty()) { parameterMap.put("errorProgram", "ZHRI105A"); parameterMap.put("errorMessage", "Ethnic Group is not found in XRef table PS_ZHRT_ETHCD_CREF"); Main.doErrorCommand(parameterMap); } return legacyEthnicCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getEmployeeName();", "public static void main(String[] args) {\n\t\tSalariedEmployee salariedemployee = new SalariedEmployee(\"John\",\"Smith\",\"111-11-1111\",new Date(9,25,1993),800.0);\n\t\tHourlyEmployee hourlyemployee = new HourlyEmployee(\"Karen\",\"Price\",\"222-22-2222\",new Date(10,25,1993),900.0,40);\n\t\t\n\t\tCommissionEmployee commissionemployee = new CommissionEmployee(\"jahn\",\"L\",\"333-33-333\",new Date(11,25,1993),1000.0,.06);\n\t\t\n\t\tBasePlusCommissionEmployee basepluscommissionemployee = new BasePlusCommissionEmployee(\"bob\",\"L\",\"444-44-444\",new Date(12,25,1993),1800.0,.04,300);\n\t\t\n\t\tPieceWorker pieceworker = new PieceWorker(\"julee\",\"hong\", \"555-55-555\",new Date(12,25,1993) , 1200, 10);\n\t\tSystem.out.println(\"Employees processes individually\");\n\t\t//System.out.printf(\"%n%s%n%s: $%,.2f%n%n\", SalariedEmployee,\"earned\",SalariedEmployee.earnings());\n\n\t\t//creating employee array\n\t\t\n\t\tEmployee[] employees = new Employee[5];\n\t\t\n\t\t//intializing array with employees \n\t\temployees[0] = salariedemployee;\n\t\temployees[1] = hourlyemployee;\n\t employees[2] = commissionemployee;\n\t\temployees[3] = basepluscommissionemployee;\n\t\temployees[4]= pieceworker;\n\t\t\n\t\tSystem.out.println(\"employees processed polymorphically\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\tint currentMonth = Integer.parseInt(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\t\n\t\t//processing each element into the array\n\t\tfor(Employee currentemployee:employees){\n\t\t\t\n\t\t\t/*if(currentemployee.getBirthDate().getMonth()==currentMonth)\n\t\tSystem.out.println(\"current earnings\"+(currentemployee.earnings()+100));\n\t\t\telse\n\t\t\t\tSystem.out.println(\"current earnings\"+currentemployee.earnings());\n\t\t\t\t*/\n\t\t\tSystem.out.println(currentemployee.toString());\n\t\t}\n\t}", "private static Employees toSting() {\n\t\treturn null;\n\t}", "public void setEmployeeCode(String value) {\n this.employeeCode = value;\n }", "public String getEmployeeMangerDetails(Employeedetails employeedetails);", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"[email protected]\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"[email protected]\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "public String enameGet(String emp_id) throws Exception;", "@Override\r\n\tpublic Employee selectEmployeeByCode(Connection con, Employee employee) {\n\t\treturn null;\r\n\t}", "public CriminalCaseMap getCases(String employeeId);", "public Employeedetails getEmployeeDetailByName(String employeeId);", "public String getEmployee()\r\n/* 38: */ {\r\n/* 39:43 */ return this.employee;\r\n/* 40: */ }", "public CWE getAdministeredCode() { \r\n\t\tCWE retVal = this.getTypedField(5, 0);\r\n\t\treturn retVal;\r\n }", "public Employee convert() {\n\n Application app = Application.getInstance();\n Employee employee = new Employee();\n employee.setLWantCom(null);\n employee.setResume(getRes());\n employee.setNotifiStack(getNotifiStack());\n\n /*\n I update his friends because if i don't\n they will have the old user as a friend\n whilst i need them to befriend the new employee\n */\n for (int i = 0; i < getFriends().size();) {\n employee.add(getFriends().get(i));\n getFriends().get(i).remove(this);\n }\n app.remove(this);\n\n return employee;\n\n }", "@Override\n\tpublic long getEmployeeDesignationId() {\n\t\treturn _candidate.getEmployeeDesignationId();\n\t}", "public Integer doAsciiToEbcdic(CommBufferLogic commBuffer, int ascii) {\n Integer temp = ASCIITOEBCDIC[ascii];\n\n Integer codePage = commBuffer.getConnectionData().getCodePage();\n if (codePage != 37) { // Default US\n // ASCII to EBCDIC based on CP037\n Integer idx, size;\n size = CP037_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP037_CP500[idx]) {\n temp = CP037_CP500[idx + size];\n break;\n }\n }\n switch (codePage) { // Latin_1 CCSID 697 only\n case 273: // Austria, Germany\n size = CP500_CP273.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP273[idx]) {\n temp = CP500_CP273[idx + size];\n break;\n }\n }\n break;\n case 277: // Denmark, Norway\n size = CP500_CP277.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP277[idx]) {\n temp = CP500_CP277[idx + size];\n break;\n }\n }\n break;\n case 278: // Finland, Sweden\n size = CP500_CP278.length / 2;\n for (idx = 0; idx < size; idx++)\n {\n if (temp == CP500_CP278[idx]) {\n temp = CP500_CP278[idx + size];\n break;\n }\n }\n break;\n case 280: // Italy\n size = CP500_CP280.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP280[idx]) {\n temp = CP500_CP280[idx + size];\n break;\n }\n }\n break;\n case 284: // Spain, Latin America\n size = CP500_CP284.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP284[idx]) {\n temp = CP500_CP284[idx + size];\n break;\n }\n }\n break;\n case 285: // United Kingdom\n size = CP500_CP285.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP285[idx]) {\n temp = CP500_CP285[idx + size];\n break;\n }\n }\n break;\n case 297: // France\n size = CP500_CP297.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP297[idx]) {\n temp = CP500_CP297[idx + size];\n break;\n }\n }\n break;\n case 871: // Iceland\n size = CP500_CP871.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP871[idx]) {\n temp = CP500_CP871[idx + size];\n break;\n }\n }\n break;\n }\n }\n return temp;\n }", "public String getEmployeeDetails(int employeeId) {\n\treturn employeeService.getEmployeeDetails(employeeId).toString(); \n }", "public static void main(String[] args) throws NullPointerException {\n\n\t\t// default constructor\n\t\tEmployeeInfo employeeInfo = new EmployeeInfo();\n\t\tEmployeeInfo employeeInfo1 = new EmployeeInfo(\" FORTUNE COMPANY \");\n\n\t\tEmployeeInfo emp1 = new EmployeeInfo(1, \"Abrah Lincoln\", \"Accounts\", \"Manager\", \"Hodgenville, KY\");\n\t\tEmployeeInfo emp2 = new EmployeeInfo(2, \"John F Kenedey\", \"Marketing\", \"Executive\", \"Brookline, MA\");\n\t\tEmployeeInfo emp3 = new EmployeeInfo(3, \"Franklin D Rossevelt\", \"Customer Realation\", \"Assistnt Manager\",\n\t\t\t\t\"Hyde Park, NY\");\n\n\n\t\t// Printing Employee information in this pattern\n\t\t// \"ID Name Number Department Position Years Worked Pension Bonus Total salary \"\n\n\t\tSystem.out.println(emp1.employeeId() + \"\\t\" + emp1.employeeName() + \"\\t\\t\" + emp1.getDepartment() + \"\\t\\t\"\n\t\t\t\t+ emp1.getJobTitle() + \"\\t\\t\\t\" + emp1.getYearsWorked() + \"\\t\\t\" + emp1.calculateEmployeePension()\n\t\t\t\t+ \"\\t\" + emp1.calculateEmployeeBonus() + \"\\t\\t\" + emp1.calculateSalary());\n\n\t\tSystem.out.println(emp2.employeeId() + \"\\t\" + emp2.employeeName() + \"\\t\\t\" + emp2.getDepartment() + \"\\t\\t\"\n\t\t\t\t+ emp2.getJobTitle() + \"\\t\\t\" + emp2.getYearsWorked() + \"\\t\\t\" + emp2.calculateEmployeePension() + \"\\t \"\n\t\t\t\t+ emp2.calculateEmployeeBonus() + \"\\t\\t\" + emp2.calculateSalary());\n\n\t\tSystem.out.println(emp3.employeeId() + \"\\t\" + emp3.employeeName() + \"\\t\" + emp3.getDepartment() + \"\\t\"\n\t\t\t\t+ emp3.getJobTitle() + \"\\t\" + emp3.getYearsWorked() + \"\\t\\t \" + emp3.calculateEmployeePension() + \"\\t\"\n\t\t\t\t+ emp3.calculateEmployeeBonus() + \" \\t\\t\" + emp3.calculateSalary());\n\n\n\n\t}", "public String[][] getVendorEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof VendorCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "public String getEmployeeNumber() {\n return (String)getAttributeInternal(EMPLOYEENUMBER);\n }", "@Override\n\tpublic void ModifyEmployee() {\n\t\t\n\t}", "public String getEmployeeName();", "public Department employeeDepartment(String employeeName) {\n\n String departmentOfEmployee = \"\";\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n departmentOfEmployee = departmentField;\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n System.out.print(\"This employee belongs to the following department: \");\n if (departmentOfEmployee.equals(Department.Executive.toString())) {\n return Department.Executive;\n }\n if (departmentOfEmployee.equals(Department.Development.toString())) {\n return Department.Development;\n }\n if (departmentOfEmployee.equals(Department.Accounting.toString())) {\n return Department.Accounting;\n }\n if (departmentOfEmployee.equals(Department.Human_Resources.toString())) {\n return Department.Human_Resources;\n }\n else return Department.No_Department;\n\n }", "@Override\n\tString toString(Employee obj) {\n\t\treturn null;\n\t}", "private static ENXP eNXP2ENXPInternal(org.opencds.vmr.v1_0.schema.ENXP pENXP) \n\t\t\tthrows DataFormatException, InvalidDataException {\n\n\t\tString _METHODNAME = \"eNXP2ENXPInternal(): \";\n\t\tif (pENXP == null)\n\t\t\treturn null;\n\n\t\tENXP lENXPInt = new ENXP();\n\n\t\t// set XP.value \n\t\tlENXPInt.setValue(pENXP.getValue());\n\n\t\t// Now translate the external EntityNamePartType to external EntityNamePartType\n\t\torg.opencds.vmr.v1_0.schema.EntityNamePartType lEntityNamePartTypeExt = pENXP.getType();\n\t\tif (lEntityNamePartTypeExt == null) {\n\t\t\tString errStr = _METHODNAME + \"EntityPartType of external ENXP datatype not populated; required by vmr spec\";\n\t\t\tthrow new DataFormatException(errStr);\n\t\t}\n\t\tString lEntityNamePartTypeStrExt = lEntityNamePartTypeExt.toString();\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"External EntityNamePartType value: \" + lEntityNamePartTypeStrExt);\n\t\t}\n\t\tEntityNamePartType lEntityNamePartTypeInt = null;\n\t\ttry {\n\t\t\tlEntityNamePartTypeInt = EntityNamePartType.valueOf(lEntityNamePartTypeStrExt);\n\t\t}\n\t\tcatch (IllegalArgumentException iae) {\n\t\t\tString errStr = _METHODNAME + \"there was no direct value mapping from the external to internal enumeration\";\n\t\t\tthrow new InvalidDataException(errStr);\n\t\t}\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"Internal EntityNamePartType value: \" + lEntityNamePartTypeInt);\n\t\t}\n\t\tlENXPInt.setType(lEntityNamePartTypeInt);\n\n\t\t// Finally create the list of internal EntityNamePartQualifiers (optional in spec)\n\t\tList<org.opencds.vmr.v1_0.schema.EntityNamePartQualifier> lPartQualifierListExt = pENXP.getQualifier();\n\t\tif (lPartQualifierListExt != null) {\n\t\t\tIterator<org.opencds.vmr.v1_0.schema.EntityNamePartQualifier> lPartQualifierIterExt = lPartQualifierListExt.iterator();\n\t\t\twhile (lPartQualifierIterExt.hasNext()) {\n\t\t\t\t// Take each internal EntityNamePartQualifier and convert to internal EntityNamePartQualifier for addition to internal EN\n\t\t\t\torg.opencds.vmr.v1_0.schema.EntityNamePartQualifier lPartQualifierExt = lPartQualifierIterExt.next();\n\t\t\t\tEntityNamePartQualifier lPartQualifierInt = eNPartQualifier2eNPartQualifierInternal(lPartQualifierExt);\n\t\t\t\tlENXPInt.getQualifier().add(lPartQualifierInt);\n\t\t\t}\n\t\t}\t\t\n\n\t\treturn lENXPInt;\n\t}", "public StrColumn getEbiOrganismScientific() {\n return delegate.getColumn(\"ebi_organism_scientific\", DelegatingStrColumn::new);\n }", "public String getEmployeeNum() {\n return employeeNum;\n }", "@Override\n\tpublic List<Employee> getEmpInfo() {\n\t\treturn null;\n\t}", "private static org.opencds.vmr.v1_0.schema.ENXP eNXPInternal2ENXP(ENXP pENXP) \n\t\t\tthrows DataFormatException, InvalidDataException {\n\n\t\tString _METHODNAME = \"eNXPInternal2ENXP(): \";\n\t\tif (pENXP == null)\n\t\t\treturn null;\n\n\t\torg.opencds.vmr.v1_0.schema.ENXP lENXPExt = new org.opencds.vmr.v1_0.schema.ENXP();\n\n\t\t// set external XP.value \n\t\tlENXPExt.setValue(pENXP.getValue());\n\n\t\t// Now translate the internal EntityNamePartType to external EntityNamePartType\n\t\tEntityNamePartType lEntityNamePartTypeInt = pENXP.getType();\n\t\tif (lEntityNamePartTypeInt == null) {\n\t\t\tString errStr = _METHODNAME + \"EntityPartType of external ENXP datatype not populated; required by vmr spec\";\n\t\t\tthrow new DataFormatException(errStr);\n\t\t}\n\t\tString lEntityNamePartTypeStrInt = lEntityNamePartTypeInt.toString();\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"Internal EntityNamePartType value: \" + lEntityNamePartTypeStrInt);\n\t\t}\n\n\t\torg.opencds.vmr.v1_0.schema.EntityNamePartType lEntityNamePartTypeExt = null;\n\t\ttry {\n\t\t\tlEntityNamePartTypeExt = org.opencds.vmr.v1_0.schema.EntityNamePartType.valueOf(lEntityNamePartTypeStrInt);\n\t\t}\n\t\tcatch (IllegalArgumentException iae) {\n\t\t\tString errStr = _METHODNAME + \"there was no direct value mapping from the internal to external enumeration\";\n\t\t\tthrow new InvalidDataException(errStr);\n\t\t}\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"External EntityNamePartType value: \" + lEntityNamePartTypeExt);\n\t\t}\n\t\tlENXPExt.setType(lEntityNamePartTypeExt);\n\n\t\t// Finally create the list of external EntityNamePartQualifiers (optional in spec)\n\t\tList<EntityNamePartQualifier> lPartQualifierListInt = pENXP.getQualifier();\n\t\tif (lPartQualifierListInt != null) {\n\t\t\tIterator<EntityNamePartQualifier> lPartQualifierIterInt = lPartQualifierListInt.iterator();\n\t\t\twhile (lPartQualifierIterInt.hasNext()) {\n\t\t\t\t// Take each internal EntityNamePartQualifier and convert to internal EntityNamePartQualifier for addition to internal EN\n\t\t\t\tEntityNamePartQualifier lPartQualifierInt = lPartQualifierIterInt.next();\n\t\t\t\torg.opencds.vmr.v1_0.schema.EntityNamePartQualifier lPartQualifierExt = eNPartQualifierInternal2ENPartQualifier(lPartQualifierInt);\n\t\t\t\tlENXPExt.getQualifier().add(lPartQualifierExt);\n\t\t\t}\n\t\t}\t\t\n\n\t\treturn lENXPExt;\n\t}", "public void setEmployeeid(long employeeid)\n {\n this.employeeid = employeeid;\n }", "public EmployeeHierarchy getEmployeeHierarchy(List<Employee> allEmployees) {\n if (!isValidList(allEmployees))\n throw new IllegalArgumentException(\"This Employee List is invalid.\");\n\n //Get the CEO of the company\n //Didn't check optional.isPresent() because we already checked in\n // isValidList(allEmployees) method which is called above\n Employee cEO = allEmployees.stream().filter(e -> e.getManagerId() == null).findFirst().get();\n\n Set<Employee> seenEmployees = new HashSet<>();\n\n // a recursive method to go through all the employees and create a hierarchical representation\n cEO = fillSubordinates(cEO, allEmployees, seenEmployees);\n\n // some employees are not covered in the hierarchy\n if(seenEmployees.size() != allEmployees.size())\n throw new RuntimeException(\"Some Employees are out of the hierarchy\");\n\n return getHierarchyObject(cEO);\n }", "public getEmployeeInfo_result(getEmployeeInfo_result other) {\n if (other.isSetSuccess()) {\n this.success = new com.moseeker.thrift.gen.employee.struct.EmployeeInfo(other.success);\n }\n if (other.isSetE()) {\n this.e = new com.moseeker.thrift.gen.common.struct.BIZException(other.e);\n }\n }", "public void setEmployeeCode(String employeeCode) {\n\t\tthis.employeeCode = employeeCode;\n\t}", "public Employeedetails getEmployee(Employeedetails employeeDetail,\n\t\t\tConnection connection) {\n\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tString employeeId = employeeDetail.getEmployeeId();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tString squery = \"select * from employeeregister where employeeid ='\"\n\t\t\t\t\t+ employeeId + \"';\";\n\t\t\trs = statement.executeQuery(squery);\n\t\t\tif (rs.next()) {\n\t\t\t\t/*\n\t\t\t\t * return \"<h2>Details of Employee # \" + employeeId + \" </h2><p><h3>Employee\n\t\t\t\t * name: \" + rs.getString(2) + \"</h3>\";\n\t\t\t\t */\n\t\t\t\temployeeDetail.setEmployeeName(rs.getString(2));\n\n\t\t\t} else {\n\t\t\t\temployeeDetail.setEmployeeName(\"0\");\n\t\t\t}\n\n\t\t} catch (SQLException sqle) {\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn employeeDetail;\n\n\t}", "protected String getEmployeeNumber(\n \tContact contact\n ) throws ServiceException {\n \treturn null;\n }", "@Override\n public Employee getEmployee(int employeeId) {\n return null;\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// Employers DATA BASE ----------------------------\n\t\t\n\t\temployee emp1 = new employee();\n\t\temp1.Name = \"John Billa\";\n\t\temp1.employeeCode = 001;\n\t\t\n\t\temployee emp2 = new employee();\n\t\temp2.Name = \"Anthony Woods\";\n\t\temp2.employeeCode = 002;\n\t\t\n\t\temployee emp3 = new employee();\n\t\temp3.Name = \"Jessica Underwood\";\n\t\temp3.employeeCode = 003;\n\t\t\t\t\n\t\t// End of Employers DATA BASE ---------------------\n\t\t\n\t\tSystem.out.println(\"Welcome! Please insert your EmployeeCode:\");\n\t\tint codeEnter = sc.nextInt();\n\t\t\n\t\tif(codeEnter == 001) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 002) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 003) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"ERROR!!! ERROR!!!\");\n\t\t\twhile (codeEnter > 003) {\n\t\t\t\tSystem.out.println(\"=====================================\");\n\t\t\t\tSystem.out.println(\"Insert Again your EmployeeCode\");\n\t\t\t\tcodeEnter = sc.nextInt();\n\t\t\t\t\n\t\t\t\tif(codeEnter == 001) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 002) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 003) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"======================================================= \");\n\t\tSystem.out.println(\"\");\n\t\t\n\t\tif (codeEnter == 001) {\n\t\t\tSystem.out.println(emp1.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse if (codeEnter == 002) {\n\t\t\tSystem.out.println(emp2.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(emp3.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1. New Delivery\");\n\t\tSystem.out.println(\"2. New Client\");\n\t\tSystem.out.println(\"3. Exit System\");\n\t\t\n\t\tint employeeChoice = sc.nextInt();\n\t\t\n\t\tswitch(employeeChoice){\n\t\t\tcase 1: \n\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 2: \n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"3\");\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsc.close();\n\t}", "public static void returnVehicle(Employee[] employeeList, Employee employee) {\n\t\t\n\t}", "private static List<Department> compute(Collection<Employee> employees) {\n Map<String, Employee> employeeMap = employees.stream().collect(Collectors.toMap(e -> e.getDeptName(), Function.identity(), (old, newOne) -> newOne));\n\n\n// Map<string, dept>\n// getEmp\n// get account\n// check slap\n// construct department\n// put department in List\n\n\nreturn null;\n\n }", "public Map<String, String> getNamesAndDepartmentsOfEmployees() {\n HashMap<String, String> nameDpt = new HashMap<>();\n List<String> names = getNamesFromAllTab();\n List<String> dpts = getEmployeeDepartmentsFromDisplayedDptTab();\n\n for (int i = 0; i < countEmployeeCardsDisplayed(); i++) {\n nameDpt.put(names.get(i), dpts.get(i));\n }\n return nameDpt;\n }", "@Override\n\tpublic int updateOrgEmployee(Org_employee orgEmloyee) {\n\t\treturn 0;\n\t}", "public String toString() {\r\n\t\treturn \"Name : \"+name+\"\\nEmp# : \"+employeeNum;\r\n\t}", "public static void main(String[] args) \r\n\t{\n\t\tSystem.out.print(\"*****Lab Description: Design and implement a class hierarchy representing individuals involved in a business***** \\n\");\r\n\t\tSystem.out.print(\"**[A. The Company Executive list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\t\r\n\t\tAddress E1 = new Address();\r\n\t\tExecutive EX1 = new Executive(\"Bob\", \"Jim\", 18, 1001);\r\n\t\tE1.setCity(\"San Jose\");\r\n\t\tE1.setState(\"CA\");\r\n\t\tE1.setStreetName(\"S 11st street\");\r\n\t\tE1.setZipCode(98119);\r\n\t\tE1.setStreetNumber(89);\r\n\t\tEX1.setEmployeeId(\"EX-01\");\r\n\t\tEX1.setlevelOfEducation(\"Master\");\r\n\t\tEX1.setspecoalAccomo(\"NO\");\r\n\t\tEX1.setYearlyBonus(8000);\r\n\t\tEX1.setYearlySalary(380000);\r\n\t\tEX1.computePay();\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tEX1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tE1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress E2 = new Address();\r\n\t\tExecutive EX2 = new Executive(\"Sam\", \"Time\", 26, 1002);\t\r\n\t\tE2.setCity(\"San Jose\");\r\n\t\tE2.setState(\"CA\");\r\n\t\tE2.setStreetName(\"N 68st street\");\r\n\t\tE2.setZipCode(92269);\r\n\t\tE2.setStreetNumber(669);\r\n\t\tEX2.setEmployeeId(\"EX-02\");\r\n\t\tEX2.setlevelOfEducation(\"Master\");\r\n\t\tEX2.setspecoalAccomo(\"NO\");\r\n\t\tEX2.setYearlyBonus(5000);\r\n\t\tEX2.setYearlySalary(520000);\r\n\t\tEX2.computePay();\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tEX2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tE2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\t\t\r\n\t\tSystem.out.print(\"**[B. The Company Full-time Salaried Employees list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress F1 = new Address();\r\n\t\tFullTimeSalaryEmployee FS1 = new FullTimeSalaryEmployee(\"Kit\", \"Amy\", 24, 2001);\r\n\t\tF1.setCity(\"San, Jose\");\r\n\t\tF1.setState(\"CA\");\r\n\t\tF1.setStreetName(\"W 16th strret\");\r\n\t\tF1.setStreetNumber(669);\r\n\t\tF1.setZipCode(96335);\r\n\t\tFS1.setEmployeeId(\"FS-2001\");\r\n\t\tFS1.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFS1.setspecoalAccomo(\"Yes\");\r\n\t\tFS1.setYearlySalary(30000);\r\n\t\tFS1.setYearlyBonus(2000);\r\n\t\tFS1.computePay(4);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tFS1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tF1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress F2 = new Address();\r\n\t\tFullTimeSalaryEmployee FS2 = new FullTimeSalaryEmployee(\"Him\", \"Lmy\", 28, 2002);\r\n\t\tF2.setCity(\"San, Cruz\");\r\n\t\tF2.setState(\"CA\");\r\n\t\tF2.setStreetName(\"E 169th strret\");\r\n\t\tF2.setStreetNumber(42);\r\n\t\tF2.setZipCode(94561);\r\n\t\tFS2.setEmployeeId(\"FS-2002\");\r\n\t\tFS2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFS2.setspecoalAccomo(\"NO\");\r\n\t\tFS2.setYearlySalary(45000);\r\n\t\tFS2.setYearlyBonus(2000);\r\n\t\tFS2.computePay(3);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tFS2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tF2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[C. The Company Full-time Hourly Employees list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress H1 = new Address();\r\n\t\tFullTimeHourlyEmployee FH1 = new FullTimeHourlyEmployee(\"Lk\", \"Bit\", 19, 3001);\r\n\t\tH1.setCity(\"San Jose\");\r\n\t\tH1.setState(\"CA\");\r\n\t\tH1.setStreetName(\"Willmams Street\");\r\n\t\tH1.setStreetNumber(779);\r\n\t\tH1.setZipCode(96654);\r\n\t\tFH1.setEmployeeId(\"FH-3001\");\r\n\t\tFH1.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFH1.setspecoalAccomo(\"NO\");\r\n\t\tFH1.setHourlyPay(100);\r\n\t\tFH1.setOverTimePay(200);\r\n\t\tFH1.computePay(43);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tFH1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tH1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress H2 = new Address();\r\n\t\tFullTimeHourlyEmployee FH2 = new FullTimeHourlyEmployee(\"Ak\", \"Jit\", 21, 3002);\r\n\t\tH2.setCity(\"San Jose\");\r\n\t\tH2.setState(\"CA\");\r\n\t\tH2.setStreetName(\"Willmams Street\");\r\n\t\tH2.setStreetNumber(779);\r\n\t\tH2.setZipCode(96654);\r\n\t\tFH2.setEmployeeId(\"FH-3002\");\r\n\t\tFH2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFH2.setspecoalAccomo(\"NO\");\r\n\t\tFH2.setHourlyPay(100);\r\n\t\tFH2.setOverTimePay(200);\r\n\t\tFH2.computePay(38);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tFH2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tH1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[D. The Company Part-time Hourly Employees list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress P1 = new Address();\r\n\t\tPartTimeHourlyEmployee PH1 = new PartTimeHourlyEmployee(\"Kitch\", \"Aml\", 18, 4001);\r\n\t\tP1.setCity(\"San jose\");\r\n\t\tP1.setState(\"CA\");\r\n\t\tP1.setStreetName(\"Jim Street\");\r\n\t\tP1.setStreetNumber(66);\r\n\t\tP1.setZipCode(96334);\r\n\t\tPH1.setlevelOfEducation(\"Master\");\r\n\t\tPH1.setspecoalAccomo(\"NO\");\r\n\t\tPH1.setHourlyPay(60);\r\n\t\tPH1.computePay(30);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tPH1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tP1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress P2 = new Address();\r\n\t\tPartTimeHourlyEmployee PH2 = new PartTimeHourlyEmployee(\"Kim\", \"Boy\", 19, 4002);\r\n\t\tP2.setCity(\"San jose\");\r\n\t\tP2.setState(\"CA\");\r\n\t\tP2.setStreetName(\"Amy Street\");\r\n\t\tP2.setStreetNumber(696);\r\n\t\tP2.setZipCode(96465);\r\n\t\tPH2.setlevelOfEducation(\"Master\");\r\n\t\tPH2.setspecoalAccomo(\"NO\");\r\n\t\tPH2.setHourlyPay(60);\r\n\t\tPH2.computePay(30);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tPH2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tP2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[E. The Company Hourly Paid Contractors list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress c1 = new Address();\r\n\t\tContractor C1 = new Contractor(\"Ace\", \"EL\", 27, 5001);\r\n\t\tc1.setCity(\"San Jose\");\r\n\t\tc1.setState(\"CA\");\r\n\t\tc1.setStreetNumber(556);\r\n\t\tc1.setStreetName(\"S 28th Street\");\r\n\t\tc1.setZipCode(96348);\r\n\t\tC1.setEmployeeId(\"CO-5001\");\r\n\t\tC1.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tC1.setspecoalAccomo(\"NO\");\r\n\t\tC1.setHourlyPay(180.5);\r\n\t\tC1.setOverTimePay(400);\r\n\t\tC1.computePay(40);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tC1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tc1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\r\n\t\tAddress c2 = new Address();\r\n\t\tContractor C2 = new Contractor(\"Aty\", \"Jack\", 24, 5002);\r\n\t\tc2.setCity(\"San Jose\");\r\n\t\tc2.setState(\"CA\");\r\n\t\tc2.setStreetNumber(556);\r\n\t\tc2.setStreetName(\"W 18th Street\");\r\n\t\tc2.setZipCode(96987);\r\n\t\tC2.setEmployeeId(\"CO-5002\");\r\n\t\tC2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tC2.setspecoalAccomo(\"NO\");\r\n\t\tC2.setHourlyPay(150.5);\r\n\t\tC2.setOverTimePay(300);\r\n\t\tC2.computePay(42);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tC2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tc2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[F. The Company Customers/Clients list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress U1 = new Address();\r\n\t\tCustomer CU1 = new Customer(\"Cat\", \"AP\", 34, 6001);\r\n\t\tU1.setCity(\"LA\");\r\n\t\tU1.setState(\"CA\");\r\n\t\tU1.setStreetName(\"Josh Street\");\r\n\t\tU1.setStreetNumber(447);\r\n\t\tU1.setZipCode(50063);\r\n\t\tCU1.setCustomerId(\"CU-6001\");\r\n\t\tCU1.setDirectDeposit(\"YES\");\r\n\t\tCU1.setlevelOfEducation(\"Master\");\r\n\t\tCU1.setPaymentMethod(\"Credit Card\");\r\n\t\tCU1.setPreferredMethod(\"Credit Card\");\r\n\t\tCU1.setspecoalAccomo(\"NO\");\r\n\t\tCU1.makePayment();\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tCU1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tU1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress U2 = new Address();\r\n\t\tCustomer CU2 = new Customer(\"Frank\", \"Keeny\", 29, 6002);\r\n\t\tU2.setCity(\"San Jose\");\r\n\t\tU2.setState(\"CA\");\r\n\t\tU2.setStreetName(\"E 19th Street\");\r\n\t\tU2.setStreetNumber(112);\r\n\t\tU2.setZipCode(92663);\r\n\t\tCU2.setCustomerId(\"CU-6002\");\r\n\t\tCU2.setDirectDeposit(\"NO\");\r\n\t\tCU2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tCU2.setPaymentMethod(\"Cash\");\r\n\t\tCU2.setPreferredMethod(\"Cash Check\");\r\n\t\tCU2.setspecoalAccomo(\"NO\");\r\n\t\tCU2.makePayment();\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tCU2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tU1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\t\r\n\t}", "public static void main(String[] args) {\n Employee employee = getEmployee(Identity.Code.TEST_CODE);\n for (Identity identity : employee.getIdentities()) {\n System.out.println(identity.getCode());\n }\n\n // This method doesn't give any exception, we need to figure out in next method what is breaking\n Employee employee2 = getEmployeeByIdentity1(Identity.Code.TEST_CODE);\n for (Identity identity : employee2.getIdentities()) {\n System.out.println(identity.getCode());\n }\n Identity identity1 = employee2.getIdentities().first();\n System.out.println(identity1.getCode());\n\n // This method gives the Exception :\n /**\n * Exception in thread \"main\" java.lang.ClassCastException: com.example.core.comparable.employeeidentity cannot\n * be cast to java.lang.Comparable\n */\n /*Employee employee1 = getEmployeeByIdentity(Identity.Code.TEST_CODE);\n for (Identity identity : employee1.getIdentities()) {\n System.out.println(identity.getCode());\n }*/\n\n\n\n }", "public java.lang.String getEmployeeName() {\n java.lang.Object ref = employeeName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n employeeName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setEmployeeId(long employeeId) {\n this.employeeId = employeeId;\n }", "String getEACCode();", "public long getEmployeeId();", "public Employee getEmployeeById(Long custId)throws EmployeeException;", "public void setEmployeeNum(String employeeNum) {\n this.employeeNum = employeeNum == null ? null : employeeNum.trim();\n }", "public CWE getAdministeredUnits() { \r\n\t\tCWE retVal = this.getTypedField(7, 0);\r\n\t\treturn retVal;\r\n }", "public String getEmployeeId() {\n return employeeId;\n }", "public String getEmployeeId() {\n return employeeId;\n }", "public Employee getEmployee(String n, String d, String ph){\r\n Employee e = new Employee(n,d,ph);\r\n for(Employee i: listOfEmployees){\r\n if(i.name.toLowerCase().equals(e.name.toLowerCase()) && i.departmentName.toLowerCase().equals(e.departmentName.toLowerCase()) &&\r\n i.contactNumber.equals(e.contactNumber)){\r\n e.name = i.name;\r\n e.departmentName = i.departmentName;\r\n e.contactNumber = i.contactNumber;\r\n }\r\n }\r\n return e;\r\n }", "@Transactional(readOnly = true)\r\n\tpublic Employee getEmployee(String dniEmployee) {\r\n\t\tdniEmployee = dniEmployee.trim();\r\n\t\treturn (Employee) em.createQuery(\"select e from Employee e where e.idemployee='\"+dniEmployee+\"'\").getResultList().get(0);\r\n\t}", "private EmployeeDto toDto(Employee employee){\n\t\tEmployeeDto employeeDto = new EmployeeDto();\n\t\temployeeDto.id = employee.getId();\n\n\t\temployeeDto.name = employee.getName();\n\t\temployeeDto.email = employee.getEmail();\n\n\t\temployeeDto.jobTypeId = employee.getJobtype().getId();\n\n\t\temployeeDto.bossId = employee.getBossId();\n\n\t\temployeeDto.netPayment = employee.getNetPayment();\n\t\temployeeDto.grossPayment = employee.getGrossPayment();\n\t\temployeeDto.employerTotalCost = employee.getEmployerTotalCost();\n\t\temployeeDto.workHours = employee.getWorkHours();\n\n\t\temployeeDto.children = employee.getChildren();\n\n\t\temployeeDto.workStatus = employee.getWorkStatus().getStringValue();\n\n\t\temployeeDto.isEntrant = employee.isEntrant();\n\t\temployeeDto.isJustMarried = employee.isJustMarried();\n\t\temployeeDto.isSingleParent = employee.isSingleParent();\n\n\t\treturn employeeDto;\n\t}", "public Map<String, String> getNamesAndDptsOfEmployeesFromDepartmentTabs() {\n\n List<WebElement> teamCats = teamPageFactory.teamDepartments;\n int qtyCategories = teamCats.size();\n Map<String, String> otherEmployeesNamesDpts = new HashMap<>();\n\n for (int i = 1; i < qtyCategories; i++) {\n teamCats.get(i).click();\n otherEmployeesNamesDpts.putAll(getNamesAndDepartmentsOfEmployees());\n }\n return otherEmployeesNamesDpts;\n }", "@Override\n public String getHighEdu() {\n return high_education;\n }", "static public Employee getEmployeeFromString(String lineRead){\n\t\tString[] newEmployee = lineRead.split(\",\");\n\t\tString name = newEmployee[0];\n\t\tFloat number = Float.parseFloat(newEmployee[1]);\n\t\tDepartment department = Department.valueOf(newEmployee[2]);\n\t\tEmployee finalEmployee = new Employee(name, number, department);\n\t\treturn finalEmployee;\n\t}", "public java.lang.String getEmployeeName() {\n java.lang.Object ref = employeeName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n employeeName_ = s;\n return s;\n }\n }", "public java.lang.String HR_GetEmployeeHierarchy4(java.lang.String accessToken, java.lang.String hie3) throws java.rmi.RemoteException;", "public String f9employee() throws Exception {\r\n\t\tString query = \"SELECT HRMS_EMP_OFFC.EMP_TOKEN, \"\r\n\t\t\t\t+ \"\tHRMS_EMP_OFFC.EMP_FNAME||' '||HRMS_EMP_OFFC.EMP_MNAME||' '||HRMS_EMP_OFFC.EMP_LNAME ,HRMS_EMP_OFFC.EMP_ID,\"\r\n\t\t\t\t+ \"\tHRMS_EMP_OFFC.EMP_DIV,NVL(DIV_NAME,' ') FROM HRMS_EMP_OFFC \"\r\n\t\t\t\t+ \"\tINNER JOIN HRMS_CENTER ON HRMS_CENTER.CENTER_ID = HRMS_EMP_OFFC.EMP_CENTER\"\r\n\t\t\t\t+ \"\tINNER JOIN HRMS_DIVISION ON (HRMS_DIVISION.DIV_ID = HRMS_EMP_OFFC.EMP_DIV)\";\r\n\t\t\t\tquery += getprofileQuery(bulkForm16);\r\n\t\t\t\tquery += \"\tORDER BY HRMS_EMP_OFFC.EMP_ID\";\r\n\r\n\t\tString[] headers = { getMessage(\"employee.id\"), getMessage(\"employee\") };\r\n\r\n\t\tString[] headerWidth = { \"30\", \"70\" };\r\n\r\n\t\tString[] fieldNames = { \"empToken\", \"empName\", \"empId\",\r\n\t\t\t\t\"divisionId\", \"divisionName\" };\r\n\r\n\t\tint[] columnIndex = { 0, 1, 2, 3, 4 };\r\n\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\tString submitToMethod = \"\";\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "public static void main(String[] args) {\n Employee employee = new GovernmentEmployee();\n\n GovernmentEmployee employee2 = (GovernmentEmployee) employee;\n employee.commonMethod();\n \n GovernmentEmployee governmentEmployee = new GovernmentEmployee();\n Employee governmentEmployee1 = governmentEmployee;\n\n\n }", "public void fetchEmployeeDetailsByPromotionCode(EmpCredit empCredit, String promotionCode){\r\n\t\ttry {\r\n\t\t\t String empDetailQuery = \"SELECT HRMS_EMP_OFFC.EMP_TOKEN , HRMS_EMP_OFFC.EMP_FNAME||' '||HRMS_EMP_OFFC.EMP_MNAME||' '||HRMS_EMP_OFFC.EMP_LNAME AS NAME,\" \r\n\t\t\t\t\t+ \" HRMS_CENTER.CENTER_NAME, HRMS_RANK.RANK_NAME,\"\r\n\t\t\t\t\t+ \" NVL(SALGRADE_TYPE,' ') ,SALGRADE_CODE, HRMS_EMP_OFFC.EMP_ID,\" \r\n\t\t\t\t\t+ \" HRMS_SALARY_MISC.GROSS_AMT,DECODE(HRMS_SALARY_MISC.SAL_EPF_FLAG,'Y','true','N','false'), NVL(SAL_ACCNO_REGULAR,' '), \"\r\n\t\t\t\t\t+ \" NVL(SAL_PANNO,' '), NVL(DEPT_NAME,' '), DEPT_ID , TO_CHAR(EMP_REGULAR_DATE,'DD-MM-YYYY'), NVL(CADRE_NAME,' '), HRMS_PROMOTION.PRO_GRADE, NVL(CTC,0)\" \r\n\t\t\t\t\t+ \" FROM HRMS_EMP_OFFC \" \r\n\t\t\t\t\t+ \" INNER JOIN HRMS_PROMOTION ON(HRMS_PROMOTION.EMP_CODE = HRMS_EMP_OFFC.EMP_ID AND HRMS_PROMOTION.PROM_CODE =\"+promotionCode+\")\"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_RANK ON (HRMS_RANK.RANK_ID=HRMS_PROMOTION.PRO_DESG)\" \r\n\t\t\t\t\t+ \" INNER JOIN HRMS_CENTER ON (HRMS_CENTER.CENTER_ID = HRMS_PROMOTION.PRO_BRANCH)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_TITLE ON (HRMS_EMP_OFFC.EMP_TITLE_CODE = HRMS_TITLE.TITLE_CODE)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_DEPT ON (HRMS_DEPT.DEPT_ID = HRMS_PROMOTION.PRO_DEPT )\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_CADRE ON (HRMS_CADRE.CADRE_ID = HRMS_PROMOTION.PRO_GRADE)\"\r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_SALGRADE_HDR ON(HRMS_SALGRADE_HDR.SALGRADE_CODE = HRMS_PROMOTION.PROM_SALGRADE)\"\r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_SALARY_MISC ON(HRMS_SALARY_MISC.EMP_ID = HRMS_EMP_OFFC.EMP_ID)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_FORMULABUILDER_HDR ON(HRMS_FORMULABUILDER_HDR.FORMULA_ID = HRMS_SALARY_MISC.FORMULA_ID)\";\r\n\t\t\tObject empDetailObj[][] = getSqlModel().getSingleResult(empDetailQuery);\r\n\t\t\t\r\n\t\t\tif(empDetailObj!=null && empDetailObj.length>0){\r\n\t\t\t\r\n\t\t\t\tempCredit.setEmpToken(String.valueOf(empDetailObj[0][0]));\r\n\t\t\t\tempCredit.setEmpName(String.valueOf(empDetailObj[0][1]));\r\n\t\t\t\tempCredit.setEmpCenter(String.valueOf(empDetailObj[0][2]));\r\n\t\t\t\tempCredit.setEmpRank(String.valueOf(empDetailObj[0][3]));\r\n\t\t\t\tempCredit.setGradeName(String.valueOf(empDetailObj[0][4]));\r\n\t\t\t\tempCredit.setGradeId(String.valueOf(empDetailObj[0][5]));\r\n\t\t\t\tempCredit.setEmpId(String.valueOf(empDetailObj[0][6]));\r\n\t\t\t\tempCredit.setGrsAmt(String.valueOf(empDetailObj[0][7]));\r\n\t\t\t\tempCredit.setPfFlag(String.valueOf(empDetailObj[0][8]));\r\n\t\t\t\tempCredit.setEmpAccountNo(String.valueOf(empDetailObj[0][9]));\r\n\t\t\t\tempCredit.setEmpPanNo(String.valueOf(empDetailObj[0][10]));\r\n\t\t\t\tempCredit.setEmpDeptName(String.valueOf(empDetailObj[0][11]));\r\n\t\t\t\tempCredit.setEmpDeptId(String.valueOf(empDetailObj[0][12]));\r\n\t\t\t\tempCredit.setJoiningDate(String.valueOf(empDetailObj[0][13]));\r\n\t\t\t\tempCredit.setEmpGradeName(String.valueOf(empDetailObj[0][14]));\r\n\t\t\t\tempCredit.setEmpGradeId(String.valueOf(empDetailObj[0][15]));\r\n\t\t\t\tempCredit.setCtcAmt(String.valueOf(empDetailObj[0][16]));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfetchIncrementPeriod(empCredit);\r\n\t}", "private Employee toEntity(EmployeeDto employeeDto, JobType jobType){\n\t\tEmployee employee = new Employee();\n\t\temployee.setId(employeeDto.id);\n\n\t\temployee.setName(employeeDto.name);\n\t\temployee.setEmail(employeeDto.email);\n\n\t\temployee.setJobtype(jobType);\n\n\t\temployee.setBossId(employeeDto.bossId);\n\n\t\temployee.setGrossPayment(employeeDto.grossPayment);\n\t\tint netPayment = paymentCalculator.getNetPayment(employeeDto.grossPayment, employeeDto.children);\n\t\temployee.setNetPayment(netPayment);\n\t\tint employerTotalCost = paymentCalculator.getEmployerTotalCost(employeeDto.grossPayment, employeeDto.isEntrant);\n\t\temployee.setEmployerTotalCost(employerTotalCost);\n\n\t\temployee.setWorkHours(employeeDto.workHours);\n\n\t\temployee.setChildren(employeeDto.children);\n\n\t\temployee.setWorkStatus(WorkStatus.get(employeeDto.workStatus));\n\n\t\temployee.setEntrant(employeeDto.isEntrant);\n\t\temployee.setJustMarried(employeeDto.isJustMarried);\n\t\temployee.setSingleParent(employeeDto.isSingleParent);\n\n\t\treturn employee;\n\t}", "public long getEmployeeId() {\n return employeeId;\n }", "protected static Electronics goodElectronicValues(String eidField, String enameField, String eyearField, String epriceField, String emakerField) throws Exception {\n Electronics myElec;\n String[] ID, strPrice;\n String Name;\n int Year;\n double Price;\n\n try {\n ID = eidField.split(\"\\\\s+\");\n if (ID.length > 1 || ID[0].equals(\"\")) {\n throw new Exception(\"ERROR: The ID must be entered\\n\");\n }\n if (ID[0].length() != 6) {\n throw new Exception(\"ERROR: ID must be 6 digits\\n\");\n }\n if (!(ID[0].matches(\"[0-9]+\"))) {\n throw new Exception(\"ERROR: ID must only contain numbers\");\n }\n Name = enameField;\n if (Name.equals(\"\")) {\n throw new Exception(\"ERROR: Name of product must be entered\\n\");\n }\n if (eyearField.equals(\"\") || eyearField.length() != 4) {\n throw new Exception(\"ERROR: Year of product must be entered\\n\");\n } else {\n Year = Integer.parseInt(eyearField);\n if (Year > 9999 || Year < 1000) {\n throw new Exception(\"ERROR: Year must be between 1000 and 9999 years\");\n }\n }\n\n strPrice = epriceField.split(\"\\\\s+\");\n if (strPrice.length > 1 || strPrice[0].equals(\"\")) {\n Price = 0;\n } else {\n Price = Double.parseDouble(strPrice[0]);\n }\n\n myElec = new Electronics(ID[0], Name, Year, Price, emakerField);\n ProductGUI.Display(\"elec fields are good\\n\");\n return myElec;\n } catch (Exception e) {\n throw new Exception(e.getMessage());\n }\n\n }", "private void checkforEIDMismatch(Person person)\n\t\t\tthrows PersonIdServiceException {\n\t\tlog.debug(\"Checking for EID mismatch...\");\n\t\ttry {\n\t\t\tMap eidmap = new HashMap();\n\t\t\tString problemDomain = null;\n\t\t\tfor (Iterator i = person.getPersonIdentifiers().iterator(); i\n\t\t\t\t\t.hasNext();) {\n\t\t\t\tPersonIdentifier pi = (PersonIdentifier) i.next();\n\t\t\t\tString domain = pi.getAssigningAuthority().getNameSpaceID();\n\t\t\t\tString corpId = pi.getCorpId();\n\t\t\t\tString updatedCorpId = pi.getUpdatedCorpId();\n\n\t\t\t\tif (eidmap.containsKey(domain)) {\n\t\t\t\t\tString eid = (String) eidmap.get(domain);\n\t\t\t\t\tif (updatedCorpId != null) {\n\t\t\t\t\t\tif (!eid.equals(updatedCorpId)) {\n\t\t\t\t\t\t\tlog.debug(\"EID mismatch found for:\\n\" + \"Domain: \"\n\t\t\t\t\t\t\t\t\t+ domain + \"\\n\" + \"EID1: \" + eid + \"\\n\"\n\t\t\t\t\t\t\t\t\t+ \"EID2: \" + updatedCorpId);\n\t\t\t\t\t\t\tproblemDomain = domain;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!eid.equals(corpId)) {\n\t\t\t\t\t\t\tlog.debug(\"EID mismatch found for:\\n\" + \"Domain: \"\n\t\t\t\t\t\t\t\t\t+ domain + \"\\n\" + \"EID1: \" + eid + \"\\n\"\n\t\t\t\t\t\t\t\t\t+ \"EID2: \" + corpId);\n\t\t\t\t\t\t\tproblemDomain = domain;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tString veid = (updatedCorpId != null) ? updatedCorpId\n\t\t\t\t\t\t\t: corpId;\n\t\t\t\t\tif (veid != null) {\n\t\t\t\t\t\teidmap.put(domain, veid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (problemDomain != null) {\n\t\t\t\t// check to see if we care about this problemDomain\n\t\t\t\tif (!getEIDDomains().contains(problemDomain)) {\n\t\t\t\t\tlog\n\t\t\t\t\t\t\t.debug(\"EID mismatch exists but alerting is not configured for domain: \"\n\t\t\t\t\t\t\t\t\t+ problemDomain);\n\t\t\t\t} else {\n\t\t\t\t\tString description = \"Multiple EID attributes exist for single CDE person\";\n\t\t\t\t\tif (!new ReviewQueue().exists(description, person)) {\n\t\t\t\t\t\tPersonReview r = new PersonReview();\n\t\t\t\t\t\tr.setDescr(description);\n\t\t\t\t\t\tr.setDomainId(problemDomain);\n\t\t\t\t\t\tr.setUserId(\"System\");\n\t\t\t\t\t\tr.addPerson(person);\n\t\t\t\t\t\tsubmitReview(r);\n\t\t\t\t\t\tlog.debug(\"EID mismatch PersonReview sent. Domain: \"\n\t\t\t\t\t\t\t\t+ problemDomain);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog\n\t\t\t\t\t\t\t\t.debug(\"EID mismatch exists but is already recorded in Review Queue\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlog.debug(\"No EID mismatch found\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.error(e, e);\n\t\t\tthrow new PersonIdServiceException(e.getMessage());\n\t\t}\n\t}", "int getEmployeeId();", "@Override\n\tpublic long getEmployeeId() {\n\t\treturn _userSync.getEmployeeId();\n\t}", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "public String getSysCode()\n/* */ {\n/* 80 */ return this.sysCode;\n/* */ }", "public long getEmployeeId() {\n\t\treturn employeeId;\n\t}", "@Override\n\tpublic long getEmployeeDepartmentId() {\n\t\treturn _candidate.getEmployeeDepartmentId();\n\t}", "public String getEmployeeInfo() throws SQLException {\n String SQL = String.format(\"SELECT * FROM %s\", DbSchema.table_employees.name);\n Statement statement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n ResultSet results = statement.executeQuery(SQL);\n\n //Prepare format stuff\n String tableHeader = String.format(\"%s %s %s %s %s\\n\", table_employees.cols.id, table_employees.cols.first_name, table_employees.cols.last_name, table_employees.cols.age, table_employees.cols.salary);\n StringBuilder output = new StringBuilder(tableHeader);\n DecimalFormat format = new DecimalFormat(\"#,###.00\");\n\n while (results.next()) {\n //Iterate through each row (employee) and add each bit of info to table\n String row = String.format(\"%s %s %s %s %s\\n\",\n results.getInt(table_employees.cols.id),\n results.getString(table_employees.cols.first_name),\n results.getString(table_employees.cols.last_name),\n results.getInt(table_employees.cols.age),\n format.format(results.getDouble(table_employees.cols.salary)));\n output.append(row);\n }\n return output.toString();\n }", "public Object caseEngineeringDomain(EngineeringDomain object) {\n\t\treturn null;\n\t}", "@Test\n\tpublic void searhEmpIdtoAddress() {\n\t\tEmployee employee = employeeService.searhEmpIdtoAddress();\n\t\tAssert.assertEquals(id.intValue(), employee.getId().intValue());\n\t\n\t}", "public abstract String printEmployeeInformation();", "public void setEmployee (jkt.hms.masters.business.MasEmployee employee) {\n\t\tthis.employee = employee;\n\t}", "public String[][] displayEmployee() {\r\n\t\t\t\t\r\n\t\t// Print the employee numbers for the employees stored in each bucket's ArrayList,\r\n\t\t// starting with bucket 0, then bucket 1, and so on.\r\n \r\n if (numInHashTable > 0){\r\n dataTable = new String[numInHashTable][5];\r\n int q = 0;\r\n \r\n for (ArrayList<EmployeeInfo> bucket : buckets){\r\n for (int i = 0; i < bucket.size(); i++){\r\n EmployeeInfo theEmployee = bucket.get(i);\r\n \r\n //display specfically for a PTE (All the general attributes plus the specifc ones)\r\n if (theEmployee instanceof PTE) {\r\n PTE thePTE = (PTE) theEmployee;\r\n dataTable[q][0] = Integer.toString(theEmployee.getEmpNum());\r\n dataTable[q][1] = \"PTE\";\r\n dataTable[q][2] = theEmployee.getFirstName();\r\n dataTable[q][3] = theEmployee.getLastName();\r\n dataTable[q][4] = Double.toString(thePTE.calcNetAnnualIncome()); \r\n q++;\r\n }\r\n \r\n //display specfically for a FTE (All the general attributes plus the specifc ones)\r\n if (theEmployee instanceof FTE){\r\n FTE theFTE = (FTE) theEmployee;\r\n dataTable[q][0] = Integer.toString(theEmployee.getEmpNum());\r\n dataTable[q][1] = \"FTE\";\r\n dataTable[q][2] = theEmployee.getFirstName();\r\n dataTable[q][3] = theEmployee.getLastName();\r\n dataTable[q][4] = Double.toString(theFTE.calcNetAnnualIncome());\r\n q++;\r\n } \r\n }\r\n }\r\n }\r\n return dataTable;\r\n }", "public java.lang.String HR_GetEmployeeHierarchy5(java.lang.String accessToken, java.lang.String hie3, java.lang.String hie4) throws java.rmi.RemoteException;", "public void setEmployeeId(String employeeId) {\n this.employeeId = employeeId;\n }", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tEmployeeService service=new EmployeeService();\r\n\t Map<Integer,Employee> acc=new TreeMap<Integer,Employee>();\r\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString choice=\"\";\r\n\t\twhile(true)\r\n\t\t{\r\n\t\tSystem.out.println(\"Menu\");\r\n\t\tSystem.out.println(\"======================\");\r\n\t\tSystem.out.println(\"1 for creating employee and getting details from user\");\r\n\t\tSystem.out.println(\"2 for calculating scheme\");\r\n\t\tSystem.out.println(\"3 for display\");\r\n\t\tSystem.out.println(\"4 for exit\");\r\n\t\tchoice=br.readLine();\r\n\t\tswitch(choice)\r\n\t\t{\r\n\t\tcase \"1\":int eid=0;String ename=\"\"; double salary=0.0; String designation=\"\";\r\n\t\t\t System.out.println(\"employee id\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_id=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_id, Validator.idpattern);\r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t eid=Integer.parseInt(s_id);\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee number in numeric\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter id in 3 digits\");\r\n\t\t\t \t }\r\n\t\t }//end of employee id while\r\n\t\t \r\n\t\t\t System.out.println(\"employee name\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_na=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_na, Validator.namepattern);\r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t ename=s_na;\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee number in alphabetical order\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter name in correct format\");\r\n\t\t\t \t }\r\n\t\t }//end of employee name while\r\n\t\t \r\n\t\t\t System.out.println(\"employee designation\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_d=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_d, Validator.despattern);\r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t designation=s_d;\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee designation in alphabets\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter designation again\");\r\n\t\t\t \t }\r\n\t\t }//end of employee id while\r\n\t\t\t System.out.println(\"employee salary\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_sa=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_sa, Validator.salpattern);\r\n\t\t\t \t \r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t salary=Double.parseDouble(s_sa);\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee salary in numeric\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter salary again \");\r\n\t\t\t \t }\r\n\t\t\t \t \r\n\t\t\t \t if(salary<0)\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter the salary greater than zero \");\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t \r\n\t\t }//end of employee id while\r\n\t\t\t Employee ob=new Employee(eid,ename,salary,designation);\r\n\t \t\t acc.put(ob.getEid(),ob);\r\n\t\t\t System.out.println(\"Employee added\");\r\n\t\t break;\r\n\t\t \r\n\t\tcase \"2\"://System.out.println(\"enter employee id \");\r\n\t\t //eid=Integer.parseInt(br.readLine());\r\n\t\t\t Collection<Employee> v=acc.values();\r\n\t List<Employee> acclis=new ArrayList<Employee>(v);\r\n\t for(Employee o:acclis)\r\n\t {\r\n\t \t service.calculateScheme(o);\r\n\t }\r\n\t\t //System.out.println(service.calculateScheme(acc.get(eid)));\r\n\t\t break;\r\n\t\t \r\n\t\tcase \"3\":System.out.println(\"The details for employees are\");\r\n\t\t System.out.println(\"=============================\");\r\n\t\t Collection<Employee> vc=acc.values();\r\n\t\t List<Employee> acclist=new ArrayList<Employee>(vc);\r\n\t\t for(Employee o:acclist)\r\n\t\t {\r\n\t\t \t service.display(o);\r\n\t\t }\r\n\t\t break;\r\n\t\t \r\n\t\tcase \"4\":System.out.println(\"System exiting\");\r\n\t\t System.exit(0);\r\n\t\t break;\r\n\t\t \r\n\t\tdefault:System.out.println(\"wrong choice\");\r\n\t\t}\r\n\t\t}\r\n\t}", "public static java.util.List<es.davinciti.liferay.model.SapEmployee> findByEmployeeId(\n\t\tlong employeeID)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().findByEmployeeId(employeeID);\n\t}", "com.google.protobuf.ByteString\n getEmployeeNameBytes();", "public static Employee getEmployee(Node node) {\n Employee employee = new Employee();\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element e = (Element) node;\n employee.setId(e.getElementsByTagName(\"id\").item(0).getChildNodes().item(0).getTextContent());\n employee.setName(e.getElementsByTagName(\"name\").item(0).getChildNodes().item(0).getTextContent());\n employee.setSex(Integer.parseInt(e.getElementsByTagName(\"sex\").item(0).getChildNodes().item(0).getNodeValue()));\n employee.setDateOfBirth(e.getElementsByTagName(\"dateOfBirth\").item(0).getChildNodes().item(0).getTextContent());\n employee.setAddress(e.getElementsByTagName(\"address\").item(0).getChildNodes().item(0).getTextContent());\n employee.setIdDepartment(e.getElementsByTagName(\"idDepartment\").item(0).getChildNodes().item(0).getTextContent());\n employee.setSalary(Double.parseDouble(e.getElementsByTagName(\"salary\").item(0).getChildNodes().item(0).getNodeValue()));\n }\n return employee;\n }", "public com.walgreens.rxit.ch.cda.EntityDeterminer xgetDeterminerCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.EntityDeterminer target = null;\n target = (com.walgreens.rxit.ch.cda.EntityDeterminer)get_store().find_attribute_user(DETERMINERCODE$32);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.EntityDeterminer)get_default_attribute_value(DETERMINERCODE$32);\n }\n return target;\n }\n }", "public String toString() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"M/d/yyyy\");\n\t\treturn employeeName + \" \" + EID + \" \" + address + \" \" + phoneNumber + \" \" + sdf.format(DOB) + \" \" + securityClearance;\n\t}", "private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public String pid_011C(String str){\n\nString standar=\"Unknow\";\n switch(str.charAt(1)){\n case '1':{standar=\"OBD-II as defined by the CARB\";break;} \n case '2':{standar=\"OBD as defined by the EPA\";break;}\n case '3':{standar=\"OBD and OBD-II\";break;}\n case '4':{standar=\"OBD-I\";break;}\n case '5':{standar=\"Not meant to comply with any OBD standard\";break;}\n case '6':{standar=\"EOBD (Europe)\";break;}\n case '7':{standar=\"EOBD and OBD-II\";break;}\n case '8':{standar=\"EOBD and OBD\";break;}\n case '9':{standar=\"EOBD, OBD and OBD II\";break;}\n case 'A':{standar=\"JOBD (Japan)\";break;}\n case 'B':{standar=\"JOBD and OBD II\";break;} \n case 'C':{standar=\"JOBD and EOBD\";break;}\n case 'D':{standar=\"JOBD, EOBD, and OBD II\";break;} \n default: {break;} \n }\n \n return standar;\n}", "public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }", "public java.lang.String getDeterminerCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DETERMINERCODE$32);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(DETERMINERCODE$32);\n }\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public CWE[] getSubstanceManufacturerName() {\r\n \tCWE[] retVal = this.getTypedField(17, new CWE[0]);\r\n \treturn retVal;\r\n }", "public int getEmploymentType()\n\t{\n\t\treturn getBigDecimal(WareHouse.EMPLOYMENTTYPE).intValue();\n\t}", "public java.lang.String HR_GetEmployeeHierarchy6(java.lang.String accessToken, java.lang.String hie3, java.lang.String hie4, java.lang.String hie5) throws java.rmi.RemoteException;", "@Override\n\tpublic Employee getEmployeeById(int empId) {\n\t\treturn null;\n\t}", "public String getJP_BankData_EDI_Info();", "private EmployeeHierarchy getHierarchyObject(Employee processedCEO) {\n if (processedCEO.getClass()!= Manager.class) // does not have any subordinates\n throw new RuntimeException(\"CEO Does not have any subordinates\");\n return new EmployeeHierarchy((Manager) processedCEO);\n }", "public Employee getPurchaseEmployee() {\n Discount[] txnDiscounts = compositePOSTransaction.getDiscountsArray();\n if (txnDiscounts != null && txnDiscounts.length > 0) {\n for (int i = 0; i < txnDiscounts.length; i++) {\n if (txnDiscounts[i] instanceof CMSEmployeeDiscount) {\n return ((CMSEmployeeDiscount)txnDiscounts[i]).getEmployee();\n }\n }\n }\n return null;\n }", "@Override\n\tpublic long getEmpId() {\n\t\treturn _employee.getEmpId();\n\t}" ]
[ "0.5244128", "0.52344257", "0.52283424", "0.51670974", "0.5159103", "0.49800932", "0.49700758", "0.49399385", "0.48815784", "0.48664203", "0.48479512", "0.48284665", "0.48222357", "0.47809848", "0.47627482", "0.4761402", "0.47604734", "0.47534406", "0.47526065", "0.47525865", "0.47494316", "0.47465807", "0.47320792", "0.47318417", "0.47267497", "0.4723384", "0.47217914", "0.4714793", "0.47083244", "0.47036198", "0.47036022", "0.47020733", "0.4696787", "0.46967492", "0.46694207", "0.46665448", "0.46360102", "0.46347296", "0.46264446", "0.4624205", "0.4609369", "0.46061704", "0.45829192", "0.45697218", "0.45572802", "0.4554382", "0.45511314", "0.4548314", "0.4547081", "0.45445564", "0.4536565", "0.45359042", "0.45359042", "0.45344132", "0.45220602", "0.45212257", "0.45118618", "0.4508092", "0.45073262", "0.44955817", "0.44914272", "0.44864684", "0.44770637", "0.44745088", "0.44671747", "0.44668356", "0.44667017", "0.4464219", "0.44616708", "0.44575742", "0.4456535", "0.44540766", "0.44511804", "0.44489878", "0.4444109", "0.4442747", "0.44414192", "0.44361255", "0.44349542", "0.44324678", "0.4427095", "0.44191548", "0.44190413", "0.4416921", "0.4408221", "0.4407192", "0.44049114", "0.4403425", "0.44009426", "0.4393538", "0.43888795", "0.43882018", "0.43870378", "0.43866813", "0.43848222", "0.4380106", "0.43767482", "0.43701434", "0.4369532", "0.4365321" ]
0.5408394
0
This procedure converts the PeopleSoft relationship codes to legacy system relationship descriptions.
public static String formatRelationship(String relationship) { Date asofToday = ErdUtils.asOfToday(); PsTranslationItem psXlatItem = PsTranslationItem.findByFieldNameAndFieldValueAndEffectiveDate("RELATIONSHIP", relationship, asofToday); relationship = psXlatItem.getXlatLongName(); if(relationship != null) { relationship = relationship.toUpperCase(); if(relationship.length() > 20) { relationship = relationship.substring(0, 20); } } return relationship; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String replaceIntermediateObjectWithRel(Context context, String strOldRelId ,String strNewRelId ,String strNewRelIdSide,Map attributeMap) throws Exception {\r\n\r\n\t\tString strNewConnId=\"\";\r\n\t\tboolean isRelToRel = true;\r\n\t\tboolean isFrom = true;\r\n\r\n\t\ttry{\r\n\r\n\t\tDomainRelationship domRel = new DomainRelationship(strOldRelId);\r\n //Get the attributes on Relationship\r\n /*Map attributeMap = new HashMap();\r\n attributeMap = domRel.getAttributeMap(context,true);*/\r\n\r\n\r\n\t\t//Get the \"Type\" of rel\r\n\t\tStringList slRelSelects = new StringList(1);\r\n slRelSelects.addElement(DomainRelationship.SELECT_TYPE);\r\n\r\n if(strNewRelIdSide!=null && strNewRelIdSide.equalsIgnoreCase(\"from\")){\r\n \t//New Rel replaces FL/GBOM which is on \"from\" side of Old Rel hence we query now \"to\" side of Old Rel\r\n \tslRelSelects.add(\"to.id\");\r\n slRelSelects.add(\"torel.id\");\r\n\r\n }else if(strNewRelIdSide!=null && strNewRelIdSide.equalsIgnoreCase(\"to\")){\r\n \t//New Rel replaces FL/GBOM which is on \"to\" side of Old Rel hence we query now \"from\" side of Old Rel\r\n \tslRelSelects.add(\"from.id\");\r\n slRelSelects.add(\"fromrel.id\");\r\n }\r\n\r\n Hashtable htRelData = domRel.getRelationshipData(context,slRelSelects);\r\n\r\n String strFromSideOfRel =\"\";\r\n String strToSideOfRel =\"\";\r\n String strRelId =\"\";\r\n String strObjId =\"\";\r\n\r\n StringList slRelTypes = (StringList) htRelData.get(DomainRelationship.SELECT_TYPE);\r\n String strRelType = (String) slRelTypes.get(0);\r\n RelationshipType RelType = new RelationshipType(strRelType);\r\n\r\n\r\n if((StringList) htRelData.get(\"from.id\")!=null || ((StringList)htRelData.get(\"fromrel.id\"))!=null ){\r\n\r\n \tStringList slFromSideOfRel = new StringList();\r\n \tif(!((StringList)htRelData.get(\"from.id\")).isEmpty()){\r\n \t\tslFromSideOfRel = (StringList) htRelData.get(\"from.id\");\r\n \t\tstrFromSideOfRel = (String) slFromSideOfRel.get(0);\r\n\r\n \t\tisRelToRel = false;\r\n \t\t//isFrom = false;\r\n \t\tstrObjId = strFromSideOfRel;\r\n\r\n\r\n \t}else if(!((StringList)htRelData.get(\"fromrel.id\")).isEmpty()){\r\n \t\tslFromSideOfRel = (StringList) htRelData.get(\"fromrel.id\");\r\n \t\tstrFromSideOfRel = (String) slFromSideOfRel.get(0);\r\n\r\n \t\tstrRelId = strFromSideOfRel;\r\n \t\tisFrom = false;\r\n \t}\r\n }\r\n\r\n if((StringList) htRelData.get(\"to.id\")!=null || ((StringList)htRelData.get(\"torel.id\"))!=null ){\r\n\r\n \tStringList slToSideOfRel = new StringList();\r\n \tif(!((StringList)htRelData.get(\"to.id\")).isEmpty()){\r\n \t\tslToSideOfRel = (StringList) htRelData.get(\"to.id\");\r\n \t\tstrToSideOfRel = (String) slToSideOfRel.get(0);\r\n\r\n \t\tisRelToRel = false;\r\n \t\tstrObjId = strToSideOfRel;\r\n \t\tisFrom = false;\r\n \t}else if(!((StringList)htRelData.get(\"torel.id\")).isEmpty()){\r\n\r\n \t\tslToSideOfRel = (StringList) htRelData.get(\"torel.id\");\r\n\r\n \t\tstrToSideOfRel = (String) slToSideOfRel.get(0);\r\n \t\tstrRelId =strToSideOfRel;\r\n \t\t//isFrom = false;\r\n \t}\r\n }\r\n\r\n\r\n if(isRelToRel){\r\n\r\n strNewConnId = connectRelationship(context, RelType, strRelId,strNewRelId, isFrom);\r\n\r\n }else{\r\n\r\n \tstrNewConnId = connectObject(context, RelType, strObjId,strNewRelId, isFrom);\r\n }\r\n\r\n\t\t\t StringList relDataSelects = new StringList();\r\n\t\t\t relDataSelects.addElement(\"frommid.id\");\r\n\t\t\t relDataSelects.addElement(\"tomid.id\");\r\n\r\n\t\t\t Map gbomRelData = domRel.getRelationshipData(context,relDataSelects);\r\n\t\t\t StringList sLFrommid = new StringList();\r\n\t\t\t StringList sLTomid = new StringList();\r\n\r\n\t\t\t sLFrommid = (StringList) gbomRelData.get(\"frommid.id\");\r\n\t\t\t if(!sLFrommid.isEmpty()){\r\n\t\t\t\tfor(int i=0;i<sLFrommid.size();i++){\r\n\r\n\t\t\t\t\tString strFromMid = (String)sLFrommid.get(i);\r\n\t\t\t\t\tsetToRelationship(context,strFromMid,strNewConnId,true);\r\n\t\t\t }\r\n\t\t\t }\r\n\r\n\r\n\t\t\t sLTomid = (StringList) gbomRelData.get(\"tomid.id\");\r\n\t\t\t if(!sLTomid.isEmpty()){\r\n\t\t\t\tfor(int i=0;i<sLTomid.size();i++){\r\n\r\n\t\t\t\t\tString strToMid = (String)sLTomid.get(i);\r\n\t\t\t\t\tsetToRelationship(context,strToMid,strNewConnId,false);\r\n\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\tDomainRelationship domNewConnId = new DomainRelationship(strNewConnId);\r\n\t\t\tmqlLogRequiredInformationWriter(\"Rel id :: \"+ strNewConnId +\"\\n\");\r\n\t\t mqlLogRequiredInformationWriter(\"Attribute value Map set for this rel id :: \"+ attributeMap +\"\\n\\n\");\r\n\t domNewConnId.setAttributeValues(context, attributeMap);\r\n\r\n\r\n\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn strNewConnId;\r\n\t}", "public String relationshipStyle(String rel_str) {\n StringTokenizer st = new StringTokenizer(rel_str, BundlesDT.DELIM);\n String fm_hdr = Utils.decFmURL(st.nextToken()), fm_ico = Utils.decFmURL(st.nextToken()); boolean fm_typed = st.nextToken().toLowerCase().equals(\"true\");\n String to_hdr = Utils.decFmURL(st.nextToken()), to_ico = Utils.decFmURL(st.nextToken()); boolean to_typed = st.nextToken().toLowerCase().equals(\"true\");\n String style = Utils.decFmURL(st.nextToken()); return style; }", "public String relationshipToIcon(String rel_str) {\n StringTokenizer st = new StringTokenizer(rel_str, BundlesDT.DELIM);\n String fm_hdr = Utils.decFmURL(st.nextToken()), fm_ico = Utils.decFmURL(st.nextToken()); boolean fm_typed = st.nextToken().toLowerCase().equals(\"true\");\n String to_hdr = Utils.decFmURL(st.nextToken()), to_ico = Utils.decFmURL(st.nextToken()); boolean to_typed = st.nextToken().toLowerCase().equals(\"true\");\n String style = Utils.decFmURL(st.nextToken()); return to_ico; }", "public String toStringPrologFormatListRelationship()\r\n\t{\n\t\t\r\n\t\tString output = \"[\";\r\n\r\n\t\tfor (Relationship Re : this.listRelationship)\r\n\t\t{\r\n\t\t\toutput += Re.toStringPrologFormat();\r\n\t\t\toutput += \",\";\r\n\t\t}\r\n\t\toutput = output.substring(0, output.length()-1);\r\n\t\toutput += \"]\";\r\n\t\treturn output;\t\r\n\t}", "public void addRelationship(String fm_field, String fm_symbol_str, boolean fm_typed,\n String to_field, String to_symbol_str, boolean to_typed, \n String style_str, boolean ignore_ns, boolean built_in, Bundles to_add) {\n String fm_pre = \"\", to_pre = \"\";\n\n // DEBUG\n // System.err.println(\"fm_field =\\\"\" + fm_field + \"\\\"\"); System.err.println(\"fm_symbol=\\\"\" + fm_symbol_str + \"\\\"\"); System.err.println(\"fm_typed =\\\"\" + fm_typed + \"\\\"\");\n // System.err.println(\"to_field =\\\"\" + to_field + \"\\\"\"); System.err.println(\"to_symbol=\\\"\" + to_symbol_str + \"\\\"\"); System.err.println(\"to_typed =\\\"\" + to_typed + \"\\\"\");\n\n if (fm_typed) fm_pre = fm_field + BundlesDT.DELIM;\n if (to_typed) to_pre = to_field + BundlesDT.DELIM;\n\n Utils.Symbol fm_symbol = Utils.parseSymbol(fm_symbol_str),\n to_symbol = Utils.parseSymbol(to_symbol_str);\n\n // Keep track of existing relationships, update the longer term ones\n String encoded_relationship_str = Utils.encToURL(fm_field) + BundlesDT.DELIM + Utils.encToURL(fm_symbol_str) + BundlesDT.DELIM + Utils.encToURL(\"\" + fm_typed) + BundlesDT.DELIM +\n\t\t\t\t Utils.encToURL(to_field) + BundlesDT.DELIM + Utils.encToURL(to_symbol_str) + BundlesDT.DELIM + Utils.encToURL(\"\" + to_typed) + BundlesDT.DELIM +\n\t\t\t\t Utils.encToURL(style_str) + BundlesDT.DELIM + Utils.encToURL(\"\" + ignore_ns);\n if (active_relationships.contains(encoded_relationship_str) == false) active_relationships.add(encoded_relationship_str);\n if (built_in == false) updateRecentRelationships(encoded_relationship_str);\n // Is this an addition or from scratch?\n Bundles bundles; if (to_add == null) bundles = getRTParent().getRootBundles(); else bundles = to_add;\n BundlesG globals = bundles.getGlobals();\n // Go through the tablets\n Iterator<Tablet> it_tablet = bundles.tabletIterator();\n while (it_tablet.hasNext()) {\n Tablet tablet = it_tablet.next();\n\t// Check to see if this table will complete both blanks, if so, go through the bundles adding the edges to the graphs\n\tif (KeyMaker.tabletCompletesBlank(tablet,fm_field) && KeyMaker.tabletCompletesBlank(tablet,to_field)) {\n\t // Create the key makers\n\t KeyMaker fm_km = new KeyMaker(tablet,fm_field), to_km = new KeyMaker(tablet,to_field);\n\t // Go through the bundles\n\t Iterator<Bundle> it_bundle = tablet.bundleIterator();\n\t while (it_bundle.hasNext()) {\n\t Bundle bundle = it_bundle.next();\n\t // Create the combinator for the from and to keys\n\t String fm_keys[], to_keys[];\n // Transform the bundle to keys\n\t fm_keys = fm_km.stringKeys(bundle);\n\t to_keys = to_km.stringKeys(bundle);\n\t // Make the relationships\n if (fm_keys != null && fm_keys.length > 0 && to_keys != null && to_keys.length > 0) {\n for (int i=0;i<fm_keys.length;i++) for (int j=0;j<to_keys.length;j++) {\n\t // Check for not sets if the flag is specified\n if (ignore_ns && (fm_keys[i].equals(BundlesDT.NOTSET) || to_keys[j].equals(BundlesDT.NOTSET))) continue;\n\t\t// The key will be a combination of the header and the entity\n String fm_fin = fm_pre + fm_keys[i], to_fin = to_pre + to_keys[j];\n\t\t// If we're in retain mode only, make sure both nodes exist in the set\n\t\tif (retained_nodes != null && retained_nodes.size() > 0 && (retained_nodes.contains(fm_fin) == false || retained_nodes.contains(to_fin) == false)) continue;\n // Set the shape\n if (entity_to_shape.containsKey(fm_fin) == false) entity_to_shape.put(fm_fin, fm_symbol);\n\t\tif (entity_to_shape.containsKey(to_fin) == false) entity_to_shape.put(to_fin, to_symbol);\n // Create the initial world coordinate and transform as appropriate \n\t\tif (entity_to_wxy.containsKey(fm_fin) == false) { \n\t\t entity_to_wxy.put(fm_fin, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1));\n transform(fm_fin); }\n\t\tif (entity_to_wxy.containsKey(to_fin) == false) { \n\t\t entity_to_wxy.put(to_fin, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1));\n\t\t transform(to_fin); }\n // Add the reference back to this object\n graph.addNode(fm_fin); graph.addNode(to_fin);\n digraph.addNode(fm_fin); digraph.addNode(to_fin);\n // Set the weights equal to the number of bundles on the edge\n double previous_weight = graph.getConnectionWeight( graph.getEntityIndex(fm_fin), graph.getEntityIndex(to_fin)),\n di_previous_weight = digraph.getConnectionWeight(digraph.getEntityIndex(fm_fin), digraph.getEntityIndex(to_fin));\n // Check for infinite because the graph class returns infinite if two nodes are not connected\n if (Double.isInfinite( previous_weight)) previous_weight = 0.0;\n if (Double.isInfinite(di_previous_weight)) di_previous_weight = 0.0;\n // Finally, add them to both forms of the graphs\n\t \t graph.addNeighbor(fm_fin, to_fin, previous_weight + 1.0);\n graph.addNeighbor(to_fin, fm_fin, previous_weight + 1.0);\n\t\tdigraph.addNeighbor(fm_fin, to_fin, di_previous_weight + 1.0);\n // System.err.println(\"RTGraphPanel.addRelationship() : \\\"\" + fm_fin + \"\\\" => \\\"\" + to_fin + \"\\\": w=\" + (previous_weight+1.0) + \" | di_w=\" + (di_previous_weight+1.0));\n\t\t graph.addLinkReference( graph.getEntityIndex(fm_fin), graph.getEntityIndex(to_fin), bundle);\n\t\t graph.addLinkReference( graph.getEntityIndex(to_fin), graph.getEntityIndex(fm_fin), bundle);\n\t\tdigraph.addLinkReference(digraph.getEntityIndex(fm_fin), digraph.getEntityIndex(to_fin), bundle);\n // Keep track of the link style\n digraph.addLinkStyle(digraph.getEntityIndex(fm_fin), digraph.getEntityIndex(to_fin), style_str);\n\t }\n\t }\n }\n\t}\n }\n // Nullify the biconnected components\n graph_bcc = null;\n graph2p_bcc = null;\n cluster_cos = null;\n conductance = null;\n // Re-render\n getRTComponent().render();\n }", "@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();", "public String relationshipToHeader(String rel_str) {\n StringTokenizer st = new StringTokenizer(rel_str, BundlesDT.DELIM);\n String fm_hdr = Utils.decFmURL(st.nextToken()), fm_ico = Utils.decFmURL(st.nextToken()); boolean fm_typed = st.nextToken().toLowerCase().equals(\"true\");\n String to_hdr = Utils.decFmURL(st.nextToken()), to_ico = Utils.decFmURL(st.nextToken()); boolean to_typed = st.nextToken().toLowerCase().equals(\"true\");\n String style = Utils.decFmURL(st.nextToken()); return to_hdr; }", "public String relationshipFromIcon(String rel_str) {\n StringTokenizer st = new StringTokenizer(rel_str, BundlesDT.DELIM);\n String fm_hdr = Utils.decFmURL(st.nextToken()), fm_ico = Utils.decFmURL(st.nextToken()); boolean fm_typed = st.nextToken().toLowerCase().equals(\"true\");\n String to_hdr = Utils.decFmURL(st.nextToken()), to_ico = Utils.decFmURL(st.nextToken()); boolean to_typed = st.nextToken().toLowerCase().equals(\"true\");\n String style = Utils.decFmURL(st.nextToken()); return fm_ico; }", "public String relationshipFromHeader(String rel_str) {\n StringTokenizer st = new StringTokenizer(rel_str, BundlesDT.DELIM);\n String fm_hdr = Utils.decFmURL(st.nextToken()), fm_ico = Utils.decFmURL(st.nextToken()); boolean fm_typed = st.nextToken().toLowerCase().equals(\"true\");\n String to_hdr = Utils.decFmURL(st.nextToken()), to_ico = Utils.decFmURL(st.nextToken()); boolean to_typed = st.nextToken().toLowerCase().equals(\"true\");\n String style = Utils.decFmURL(st.nextToken()); return fm_hdr; }", "@Override\n public void setRelationships(com.gensym.util.Sequence relationships) throws G2AccessException {\n setAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_, relationships);\n }", "public String getInverseRelationshipName ();", "protected AssociationList reverseAssoc(LexBIGService lbsvc, LexBIGServiceConvenienceMethods lbscm, String scheme,\r\n CodingSchemeVersionOrTag csvt, Association assoc, AssociationList addTo,\r\n Map<String, EntityDescription> codeToEntityDescriptionMap) throws LBException {\r\n\r\n ConceptReference acRef = assoc.getAssociationReference();\r\n AssociatedConcept acFromRef = new AssociatedConcept();\r\n acFromRef.setCodingScheme(acRef.getCodingScheme());\r\n acFromRef.setConceptCode(acRef.getConceptCode());\r\n AssociationList acSources = new AssociationList();\r\n acFromRef.setIsNavigable(Boolean.TRUE);\r\n acFromRef.setSourceOf(acSources);\r\n\r\n // Use cached description if available (should be cached\r\n // for all but original root) ...\r\n if (codeToEntityDescriptionMap.containsKey(acRef.getConceptCode()))\r\n acFromRef.setEntityDescription(codeToEntityDescriptionMap.get(acRef.getConceptCode()));\r\n // Otherwise retrieve on demand ...\r\n else\r\n acFromRef.setEntityDescription(Constructors.createEntityDescription(getCodeDescription(lbsvc, scheme, csvt,\r\n acRef.getConceptCode())));\r\n\r\n AssociatedConceptList acl = assoc.getAssociatedConcepts();\r\n for (AssociatedConcept ac : acl.getAssociatedConcept()) {\r\n // Create reverse association (same non-directional name)\r\n Association rAssoc = new Association();\r\n rAssoc.setAssociationName(assoc.getAssociationName());\r\n\r\n // On reverse, old associated concept is new reference point.\r\n ConceptReference ref = new ConceptReference();\r\n ref.setCodingScheme(ac.getCodingScheme());\r\n ref.setConceptCode(ac.getConceptCode());\r\n rAssoc.setAssociationReference(ref);\r\n\r\n // And old reference is new associated concept.\r\n AssociatedConceptList rAcl = new AssociatedConceptList();\r\n rAcl.addAssociatedConcept(acFromRef);\r\n rAssoc.setAssociatedConcepts(rAcl);\r\n\r\n // Set reverse directional name, if available.\r\n String dirName = assoc.getDirectionalName();\r\n if (dirName != null)\r\n try {\r\n rAssoc.setDirectionalName(lbscm.isForwardName(scheme, csvt, dirName) ? lbscm\r\n .getAssociationReverseName(assoc.getAssociationName(), scheme, csvt) : lbscm\r\n .getAssociationReverseName(assoc.getAssociationName(), scheme, csvt));\r\n } catch (LBException e) {\r\n }\r\n\r\n // Save code desc for future reference when setting up\r\n // concept references in recursive calls ...\r\n codeToEntityDescriptionMap.put(ac.getConceptCode(), ac.getEntityDescription());\r\n\r\n AssociationList sourceOf = ac.getSourceOf();\r\n if (sourceOf != null)\r\n for (Association sourceAssoc : sourceOf.getAssociation()) {\r\n AssociationList pos = reverseAssoc(lbsvc, lbscm, scheme, csvt, sourceAssoc, addTo,\r\n codeToEntityDescriptionMap);\r\n pos.addAssociation(rAssoc);\r\n }\r\n else\r\n addTo.addAssociation(rAssoc);\r\n }\r\n return acSources;\r\n }", "private String getNewRelForConfigFeatType(Context context,Map flMap,Map htChildObjData,String strParentFeatureId,String strParentFeatureType)\r\n throws Exception{\r\n\r\n \tString newReltoConnect=\"\";\r\n \ttry{\r\n\r\n \t\tString strInherited = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INHERITED+\"]\");\r\n \t\tString strMandatory = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\");\r\n\r\n \t\t//Need to check \"Inactive Varies By\" relationship\r\n \t\t/*if(strInherited!=null && strInherited.equalsIgnoreCase(\"True\")\r\n \t\t && strMandatory!=null && strMandatory.equalsIgnoreCase(\"No\")){*/\r\n \t\t/*This means CF is added to the Product due to add DV.. it is rolled up\r\n \t\t * Need to decide it should be \"Varies By\" or \"Inactive Varies By\" rel\r\n \t\t * Also simultaneously check for new \"Valid Context\" & \"Invalid Context\" relationship\r\n \t\t */\r\n \t\t//Get the Product Id.. compute whether DV is Active /Inactive under this Product context\r\n \t\tif(strParentFeatureType!=null\r\n \t\t\t\t&& strParentFeatureType.equals(ConfigurationConstants.TYPE_PRODUCT_VARIANT)){\r\n\r\n \t\t\t//Get the PFL Id from PV Id for connection\r\n \t\t\tDomainObject domPVId = new DomainObject(strParentFeatureId);\r\n\r\n \t\t\tStringBuffer sbRelPattern = new StringBuffer(50);\r\n \t\t\tsbRelPattern.append(ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST);\r\n\r\n \t\t\tStringList sLRelSelects = new StringList();\r\n \t\t\tsLRelSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].id\");\r\n \t\t\tsLRelSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].to.id\");\r\n \t\t\tsLRelSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].to.id\");\r\n \t\t\tsLRelSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].to.name\");\r\n\r\n\r\n\r\n \t\t\tsLRelSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].torel.to.from[\"+ ConfigurationConstants.RELATIONSHIP_VARIES_BY+ \"].to.type\");\r\n \t\t\tsLRelSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_VARIES_BY+ \"].to.type\");\r\n\r\n \t\t\tsLRelSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].torel.id\");\r\n \t\t\tsLRelSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].frommid.type\");\r\n \t\t\tsLRelSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].frommid[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY+ \"].id\");\r\n\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].torel.to.from[\"+ ConfigurationConstants.RELATIONSHIP_VARIES_BY+ \"].to.type\");\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_VARIES_BY+ \"].to.type\");\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].id\");\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].frommid[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY+ \"].id\");\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].to.id\");\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].to.name\");\r\n\r\n \t\t\tMap featureListMapList = domPVId.getInfo(context,sLRelSelects);\r\n\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].torel.to.from[\"+ ConfigurationConstants.RELATIONSHIP_VARIES_BY+ \"].to.type\");\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_VARIES_BY+ \"].to.type\");\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].id\");\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].frommid[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY+ \"].id\");\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].to.id\");\r\n \t\t\tDomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].to.from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].to.name\");\r\n\r\n\r\n \t\t\tStringList sLInactiveVBy = new StringList();\r\n \t\t\tsLInactiveVBy = (StringList)featureListMapList.get(\"from[\"+ ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+ \"].frommid[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY+ \"].id\");\r\n\r\n\r\n \t\t\t//Check the PV id is present in \"Invalid Contexts\" attribute value\r\n\r\n \t\t\tif(sLInactiveVBy!=null && !sLInactiveVBy.isEmpty()){\r\n\r\n \t\t\t\tfor(int j=0;j<sLInactiveVBy.size();j++){\r\n\r\n \t\t\t\t\tString strRelInaVaBy = (String)sLInactiveVBy.get(j);\r\n \t\t\t\t\tDomainRelationship.setType(context, strRelInaVaBy, ConfigurationConstants.RELATIONSHIP_INVALID_CONTEXT);\r\n\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif(strInherited!=null && strInherited.equalsIgnoreCase(\"True\")\r\n \t\t\t\t\t&& strMandatory!=null && strMandatory.equalsIgnoreCase(\"No\")){\r\n\r\n \t\t\t\t//Varies by/ Inactive Varies By\r\n \t\t\t\tif(flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].id\")!=null){\r\n \t\t\t\t\t//DV is Inactive\r\n \t\t\t\t\tnewReltoConnect = ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY;\r\n \t\t\t\t}else{\r\n \t\t\t\t\t//DV is Active\r\n \t\t\t\t\tnewReltoConnect = ConfigurationConstants.RELATIONSHIP_VARIES_BY;\r\n \t\t\t\t}\r\n \t\t\t}else if(strInherited!=null && strMandatory.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_YES)){\r\n\r\n \t\t\t\t\t\t //MCF2: If Parent type is not eaqual to Product or Product Line , then change rel to \"Configuration Feature\"\r\n\t\t\t\t\t\t if(!mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_PRODUCTS) &&\r\n\t\t\t\t\t\t\t !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_PRODUCT_LINE)){\r\n\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES;\r\n\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t \tnewReltoConnect = ConfigurationConstants.RELATIONSHIP_MANDATORY_CONFIGURATION_FEATURES;\r\n\t\t\t\t\t\t }\r\n\r\n }else{\r\n \t\t\t\tnewReltoConnect = ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES;\r\n \t\t\t}\r\n \t\t}else{\r\n \t\t\tif(strInherited!=null && strInherited.equalsIgnoreCase(\"True\")\r\n \t\t\t\t\t&& strMandatory!=null && strMandatory.equalsIgnoreCase(\"No\")){\r\n \t\t\t\t//Varies by/Inactive Varies By\r\n \t\t\t\tif(flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].id\")!=null){\r\n \t\t\t\t\t//DV is Inactive\r\n \t\t\t\t\tnewReltoConnect = ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY;\r\n\r\n \t\t\t\t}else{\r\n \t\t\t\t\t//DV is Active\r\n \t\t\t\t\tnewReltoConnect = ConfigurationConstants.RELATIONSHIP_VARIES_BY;\r\n \t\t\t\t}\r\n \t\t\t}else{\r\n\r\n \t\t\t\t//To check it should be \"Varies by\"/\"Inactive Varies By\"/\"Configuration Feaures\" rel\r\n \t\t\t\tString attrActCount = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n \t\t\t\tString attrIncActCount = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\r\n \t\t\t\tint iattrActCount = 0;\r\n \t\t\t\tiattrActCount = Integer.parseInt(attrActCount);\r\n\r\n \t\t\t\tint iattrIncActCount = 0;\r\n \t\t\t\tiattrIncActCount = Integer.parseInt(attrIncActCount);\r\n\r\n \t\t\t\tif(iattrActCount > 0){\r\n \t\t\t\t\tnewReltoConnect = ConfigurationConstants.RELATIONSHIP_VARIES_BY;\r\n \t\t\t\t}else if(iattrIncActCount>0){\r\n \t\t\t\t\tnewReltoConnect = ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY;\r\n \t\t\t\t}else{\r\n if(strInherited!=null && strMandatory.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_YES)){\r\n\r\n \t\t\t\t\t//MCF3: If Parent type is not eaqual to Product or Product Line , then change rel to \"Configuration Feature\"\r\n \t\t\t\t\t\t if(!mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_PRODUCTS) &&\r\n \t\t\t\t\t\t\t\t !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_PRODUCT_LINE)){\r\n\r\n \t\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES;\r\n\r\n \t\t\t\t\t\t\t }else{\r\n \t\t\t\t\t\t\t\t \tnewReltoConnect = ConfigurationConstants.RELATIONSHIP_MANDATORY_CONFIGURATION_FEATURES;\r\n \t\t\t\t\t\t\t }\r\n }else{\r\n newReltoConnect = ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES;\r\n }\r\n }\r\n \t\t\t\t}\r\n \t\t}\r\n \t}catch (Exception e) {\r\n \t\te.printStackTrace();\r\n \t}\r\n \treturn newReltoConnect;\r\n }", "String partnerTopicFriendlyDescription();", "public boolean relationshipToTyped(String rel_str) {\n StringTokenizer st = new StringTokenizer(rel_str, BundlesDT.DELIM);\n String fm_hdr = Utils.decFmURL(st.nextToken()), fm_ico = Utils.decFmURL(st.nextToken()); boolean fm_typed = st.nextToken().toLowerCase().equals(\"true\");\n String to_hdr = Utils.decFmURL(st.nextToken()), to_ico = Utils.decFmURL(st.nextToken()); boolean to_typed = st.nextToken().toLowerCase().equals(\"true\");\n String style = Utils.decFmURL(st.nextToken()); return to_typed; }", "public void updateRecentRelationships(String encoded) {\n String strs[] = RTPrefs.retrieveStrings(RECENT_RELATIONSHIPS_PREF_STR);\n String new_strs[];\n if (strs == null || strs.length == 0) {\n // Make a default one\n new_strs = new String[1]; new_strs[0] = Utils.encToURL(encoded) + BundlesDT.DELIM + System.currentTimeMillis();\n } else {\n // Transfer existing to a map for recency/set update\n Map<String,Long> map = new HashMap<String,Long>();\n long earliest = 0L;\n for (int i=0;i<strs.length;i++) { StringTokenizer st = new StringTokenizer(strs[i], BundlesDT.DELIM);\n String str = st.nextToken(); long ts = Long.parseLong(st.nextToken());\n\t\t\t\t\tif (earliest == 0L) earliest = ts; else if (ts < earliest) earliest = ts;\n\t\t\t\t\tmap.put(str,ts); }\n // Add the new one\n map.put(Utils.encToURL(encoded),System.currentTimeMillis());\n // Only keep 20 or less based on recency\n if (map.keySet().size() > 20) {\n Iterator<String> it = map.keySet().iterator();\n\twhile (it.hasNext()) {\n\t String str = it.next(); if (earliest == map.get(str)) it.remove();\n\t}\n }\n // Transfer to a set of strings\n new_strs = new String[map.keySet().size()];\n Iterator<String> it = map.keySet().iterator();\n for (int i=0;i<new_strs.length;i++) {\n String str = it.next(); long ts = map.get(str);\n\tnew_strs[i] = str + BundlesDT.DELIM + ts;\n }\n }\n // Store it off and update the menu // Note that this won't go across other RTGraphPanel windows -- will need a restart\n RTPrefs.store(RECENT_RELATIONSHIPS_PREF_STR, new_strs);\n fillCommonRelationshipsMenu();\n }", "public void drawEdgeTemplates(Graphics2D g2d) {\n Iterator<String> it = active_relationships.iterator();\n\tint y = getRCHeight() - 2 * Utils.txtH(g2d, \"0\");\n\twhile (it.hasNext()) {\n\t String str = it.next();\n String fm_hdr = relationshipFromHeader(str),\n\t to_hdr = relationshipToHeader(str);\n g2d.setColor(RTColorManager.getColor(\"label\", \"default\"));\n\t g2d.drawString(fm_hdr + \" => \" + to_hdr, 5, y);\n\t y -= Utils.txtH(g2d, \"0\");\n }\n }", "public void traverseRelationships(org.docx4j.openpackaging.packages.OpcPackage wordMLPackage,\n\t\t\t\t\t\t\t\t\t RelationshipsPart rp,\n\t\t\t\t\t\t\t\t\t StringBuilder sb, String indent) throws Docx4JException {\n\t\tfor (Relationship r : rp.getRelationships().getRelationship()) {\n\t\t\tif (r.getTargetMode() != null\n\t\t\t&& r.getTargetMode().equals(\"External\")) {\n\t\t\t\tsb.append(\"\\n\" + indent + \"external resource \" + r.getTarget()\n\t\t\t\t+ \" of type \" + r.getType());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tPart part = rp.getPart(r);\n\t\t\tprintInfo(part, sb, indent);\n\t\t\tif (handled.get(part) != null) {\n\t\t\t\tsb.append(\" [additional reference] \");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\thandled.put(part, part);\n\t\t\tif (part.getRelationshipsPart() != null) {\n\t\t\t\ttraverseRelationships(wordMLPackage, part.getRelationshipsPart(), sb, indent + \" \");\n\t\t\t}\n\t\t}\n\t}", "public String toStringWithRelation();", "protected void createUML2MappingAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/UML2Mapping\";\t\n\t\taddAnnotation\n\t\t (blockArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"clientDependency\",\n\t\t\t \"featureOwner\", \"NamedElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"interfaceRealization\",\n\t\t\t \"featureOwner\", \"BehavioredClassifier\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractActorEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Property\",\n\t\t\t \"stereotype\", \"eng.PhysicalPart\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_ParticipationsInCapabilityRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"supplier\",\n\t\t\t \"umlOppositeReferenceOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Package\",\n\t\t\t \"stereotype\", \"eng.InterfacePkg\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Interface\",\n\t\t\t \"stereotype\", \"eng.Interface\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Mechanism(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"mechanism\",\n\t\t\t \"featureOwner\", \"eng.Interface\",\n\t\t\t \"fromStereotype\", \"true\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"contract\",\n\t\t\t \"umlOppositeReferenceOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"supplier\",\n\t\t\t \"umlOppositeReferenceOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"InterfaceRealization\",\n\t\t\t \"stereotype\", \"eng.InterfaceImplementation\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_InterfaceImplementor(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"implementingClassifier\",\n\t\t\t \"featureOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_ImplementedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"contract\",\n\t\t\t \"featureOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Usage\",\n\t\t\t \"stereotype\", \"eng.InterfaceUse\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_InterfaceUser(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"client\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_UsedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"supplier\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"InterfaceRealization\",\n\t\t\t \"stereotype\", \"eng.ProvidedInterfaceLink\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getProvidedInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"contract\",\n\t\t\t \"featureOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Usage\",\n\t\t\t \"stereotype\", \"eng.RequiredInterfaceLink\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getRequiredInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"supplier\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\",\n\t\t\t \"stereotype\", \"eng.InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\",\n\t\t\t \"stereotype\", \"eng.ActorCapabilityRealizationInvolvement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\",\n\t\t\t \"stereotype\", \"eng.SystemComponentCapabilityRealizationInvolvement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deployableElementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"NamedElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeployableElement_DeployingLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"supplier\",\n\t\t\t \"umlOppositeReferenceOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deploymentTargetEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Namespace\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeploymentTarget_DeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"clientDependency\",\n\t\t\t \"featureOwner\", \"NamedElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractDeploymentLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"supplier\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"client\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"role\",\n\t\t\t \"featureOwner\", \"ConnectorEnd\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"partWithPort\",\n\t\t\t \"featureOwner\", \"ConnectorEnd\"\n\t\t });\n\t}", "public void addRelationship(String fm_field, String fm_symbol_str, boolean fm_typed,\n String to_field, String to_symbol_str, boolean to_typed, \n String style_str, boolean ignore_ns, boolean built_in) {\n addRelationship(fm_field, fm_symbol_str, fm_typed, to_field, to_symbol_str, to_typed, style_str, ignore_ns, built_in, null); }", "public void addRelationship(String encoded_str, boolean built_in, Bundles to_add) {\n StringTokenizer st = new StringTokenizer(encoded_str, BundlesDT.DELIM);\n String fm_hdr = Utils.decFmURL(st.nextToken()),\n fm_ico = Utils.decFmURL(st.nextToken());\n boolean fm_typed = st.nextToken().toLowerCase().equals(\"true\");\n String to_hdr = Utils.decFmURL(st.nextToken()),\n to_ico = Utils.decFmURL(st.nextToken());\n boolean to_typed = st.nextToken().toLowerCase().equals(\"true\");\n String style = Utils.decFmURL(st.nextToken());\n boolean ignore_ns = st.nextToken().toLowerCase().equals(\"true\");\n // Determine if relationship is possible with the current data set... if not return\n String blanks[] = KeyMaker.blanks(getRTParent().getRootBundles().getGlobals());\n boolean to_found = false, fm_found = false;\n for (int i=0;i<blanks.length;i++) {\n if (blanks[i].equals(fm_hdr)) fm_found = true;\n if (blanks[i].equals(to_hdr)) to_found = true;\n }\n if (fm_found && to_found) addRelationship(fm_hdr, fm_ico, fm_typed, to_hdr, to_ico, to_typed, style, ignore_ns, false, to_add);\n }", "public abstract String edgeToStringWithNoProb(int nodeSrc, int nodeDst, Set<String> relations);", "@DISPID(1611005964) //= 0x6006000c. The runtime will prefer the VTID if present\n @VTID(39)\n short relationsUpdateInPartContextSynchronousRelations();", "public String convertWordOrPhoneme(String wordToConvert, String wordType,\n String legacyPhoneme) {\n String wordCurrentPhonemes = \"\";\n WordType type = WordType.getWordType(wordType);\n\n if (type == WordType.URL) {\n wordCurrentPhonemes = processAsUrl(wordToConvert);\n } else if (type == WordType.PRONUNCIATION) {\n wordCurrentPhonemes = processAsPronunciation(legacyPhoneme);\n } else if (type == WordType.DYNAMIC) {\n wordCurrentPhonemes = processAsDynamic(legacyPhoneme);\n } else {\n // A SUBSTITUTION/DYNAMIC/UNKNOWN\n wordCurrentPhonemes = wordToConvert;\n }\n\n return wordCurrentPhonemes;\n }", "public String getRelationType()\n {\n String relationType = \"PSX\";\n Iterator i = m_keyNames.iterator();\n while (i.hasNext())\n {\n relationType += i.next().toString();\n }\n relationType += \"Relation\";\n\n return relationType;\n }", "@Test\n public void test11RelationshipConfigIdName() throws Exception\n {\n Collection<PSConfig> configs = ms_cms.findAllConfigs();\n assertTrue(configs.size() == 2);\n \n List<PSRelationshipConfigName> aaList = \n ms_cms.findRelationshipConfigNames(\"%Assembly%\");\n for (PSRelationshipConfigName cfg : aaList)\n {\n assertTrue(cfg.getName().contains(\"Assembly\"));\n }\n \n PSConfig cfg = ms_cms.findConfig(\n PSConfigurationFactory.RELATIONSHIPS_CFG);\n assertNotNull(cfg);\n \n PSRelationshipConfigSet relConfigSet = loadRelationshipConfigSet();\n\n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n // Negative testing various operations on SYSTEM relationship configs\n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n \n // modify an id of a system relationship config\n PSRelationshipConfig sysConfig = relConfigSet\n .getConfig(PSRelationshipConfig.TYPE_FOLDER_CONTENT);\n try\n {\n sysConfig.setId(100);\n // above line should fail, cannot set id to an object which already\n // has an assigned id.\n assertTrue(false); \n }\n catch (Exception e) {}\n sysConfig.resetId();\n sysConfig.setId(100); \n try\n {\n saveRelationshipConfigSet(relConfigSet, cfg);\n // above line should fail, id of a system config cannot be modified.\n assertTrue(false); \n }\n catch (Exception e) {}\n\n try\n {\n relConfigSet.deleteConfig(sysConfig.getName());\n // above line should fail, cannot delete a system config.\n assertTrue(false); \n }\n catch (Exception e) {}\n \n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n // Negative testing various operations on USER relationship configs\n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n \n relConfigSet = loadRelationshipConfigSet();\n PSRelationshipConfig userConfig = (PSRelationshipConfig) relConfigSet\n .getConfig(PSRelationshipConfig.TYPE_FOLDER_CONTENT).clone();\n userConfig.setType(PSRelationshipConfig.RS_TYPE_USER);\n userConfig.resetId();\n relConfigSet.add(userConfig);\n try\n {\n saveRelationshipConfigSet(relConfigSet, cfg);\n // above line should fail, cannot save with a user config with DUP-NAME.\n assertTrue(false); \n }\n catch (Exception e) {}\n\n userConfig.setName(\"myFolderContent\");\n userConfig.resetId();\n userConfig.setId(\n PSRelationshipConfig.SysConfigEnum.FOLDER_CONTENT.getId());\n try\n {\n saveRelationshipConfigSet(relConfigSet, cfg);\n // above line should fail, cannot save with a user config with DUP-ID.\n assertTrue(false); \n }\n catch (Exception e) {}\n \n }", "@Override\n public String toString() {\n return \"RelatedOrg {\"\n + \"}\";\n }", "public abstract String edgeToStringWithProb(int nodeSrc, int nodeDst, double prob, Set<String> relations);", "private String relationGenerator(ArrayList<Verb> candidateRelation){\n String relation = candidateRelation.get(0).token;\n if(candidateRelation.size()>=3){\n if(isBe(candidateRelation.get(0).token) && isAdv(candidateRelation.get(1).type)\n && isVerb(candidateRelation.get(2).type)){\n relation += \" \" + candidateRelation.get(1).token + \" \" + candidateRelation.get(2).token;\n }else if(isBe(candidateRelation.get(0).token) && isPast(candidateRelation.get(1).type)){\n relation += \" \" + candidateRelation.get(1).token;\n }else if(isHave(candidateRelation.get(0).token) && isPast(candidateRelation.get(1).type)){\n relation += \" \" + candidateRelation.get(1).token;\n }\n }\n return relation;\n }", "public abstract String edgeToStringWithTraceId(int nodeSrc, int nodeDst, int traceId, Set<String> relations);", "ch.crif_online.www.webservices.crifsoapservice.v1_00.FurtherRelations getFurtherRelations();", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "public CWE getPsl22_RelatedProductServiceCodeIndicator() { \r\n\t\tCWE retVal = this.getTypedField(22, 0);\r\n\t\treturn retVal;\r\n }", "public final native String getRelationship() /*-{\n return this.getRelationship();\n }-*/;", "@Override\n public com.gensym.util.Sequence getRelationships() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_);\n return (com.gensym.util.Sequence)retnValue;\n }", "private void readEntityRelationships() {\n List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck = new ArrayList<>();\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n checkMappedBy(info, primaryKeyJoinCheck);\n }\n for (DeployBeanPropertyAssocOne<?> prop : primaryKeyJoinCheck) {\n checkUniDirectionalPrimaryKeyJoin(prop);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n secondaryPropsJoins(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n setInheritanceInfo(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n if (!info.isEmbedded()) {\n registerDescriptor(info);\n }\n }\n }", "public void setRelationship( String relationship ) {\n this.relationship = relationship;\n }", "public int getRelationship(int otherASN) {\n\n for (AS tAS : this.providers) {\n if (tAS.getASN() == otherASN) {\n return AS.CUSTOMER_CODE;\n }\n }\n for (AS tAS : this.peers) {\n if (tAS.getASN() == otherASN) {\n return AS.PEER_CODE;\n }\n }\n for (AS tAS : this.customers) {\n if (tAS.getASN() == otherASN) {\n return AS.PROVIDER_CODE;\n }\n }\n\n if (otherASN == this.asn) {\n return 2;\n }\n\n throw new IllegalArgumentException(\"asked for relation on non-adj/non-self asn, depending on sim \"\n + \"this might be expected, if you're not, you should prob restart this sim...!\");\n }", "public final native void setRelationship(String relationship) /*-{\n this.setRelationship(relationship);\n }-*/;", "public boolean relationshipFromTyped(String rel_str) {\n StringTokenizer st = new StringTokenizer(rel_str, BundlesDT.DELIM);\n String fm_hdr = Utils.decFmURL(st.nextToken()), fm_ico = Utils.decFmURL(st.nextToken()); boolean fm_typed = st.nextToken().toLowerCase().equals(\"true\");\n String to_hdr = Utils.decFmURL(st.nextToken()), to_ico = Utils.decFmURL(st.nextToken()); boolean to_typed = st.nextToken().toLowerCase().equals(\"true\");\n String style = Utils.decFmURL(st.nextToken()); return fm_typed; }", "private static void normalizePropositions(Set<ExternalizedStateComponent> componentSet) {\n\t\tfor(ExternalizedStateComponent component : componentSet) {\n\t\t\tif(component instanceof ExternalizedStateProposition) {\n\t\t\t\tExternalizedStateProposition p = (ExternalizedStateProposition) component;\n\t\t\t\tGdlSentence sentence = p.getName();\n\t\t\t\tif(sentence instanceof GdlRelation) {\n\t\t\t\t\tGdlRelation relation = (GdlRelation) sentence;\n\t\t\t\t\tif(relation.getName().equals(NEXT)) {\n\t\t\t\t\t\tp.setName(GdlPool.getProposition(GdlPool.getConstant(\"anon\")));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setPromotionRelationshipDescriptor(\n\t\t\tString pPromotionRelationshipDescriptor) {\n\t\tmPromotionRelationshipDescriptor = pPromotionRelationshipDescriptor;\n\t}", "private void changeRelationshipListApi(List<EntityRelationshipType> relationList, LosConfigDetails owner,\n\t\t\tLosConfigDetails owned, LosConfigDetails subsidary, EntityRelationshipType changingRelation) {\n\t\tLong relationTypeId = getRelationTypeId(changingRelation);\n\t\tif (changingRelation.getEntityId1().endsWith(LOSEntityConstants.COMMERCIAL_SUFFIX_CODE)\n\t\t\t\t&& changingRelation.getEntityId1().endsWith(LOSEntityConstants.COMMERCIAL_SUFFIX_CODE)\n\t\t\t\t&& relationTypeId.equals(LOSEntityConstants.OWNER)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(subsidary);\n\t\t} else if (relationTypeId.equals(LOSEntityConstants.OWNER)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(owned);\n\t\t} else if (relationTypeId.equals(LOSEntityConstants.OWNED)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(owner);\n\t\t} else if (relationTypeId.equals(LOSEntityConstants.SUBSIDIARY)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(owner);\n\t\t}\n\t\trelationList.add(changingRelation);\n\t}", "private void drawRelation ( \r\n\t TwoDDisplayContin discon,\r\n\t Graphics2D g2\r\n\t )\r\n\t{\n\t\thorizontalLocationOfRelation =\r\n\t\t\tgetHorizontalLocation ( discon.getSectionNumber ( ) );\r\n\r\n\t\t//g2.drawLine(horizontalLocationOfRelation, vertLocationOfLine-(WORM_LINE_THICKNESS+1)/2, horizontalLocationOfRelation, vertLocationOfLine-(WORM_LINE_THICKNESS+1)/2 - SYMBOL_LINE_LENGTH);\r\n\t\tString type = discon.getType ( );\r\n\r\n\t\tif ( \r\n\t\t type.equals ( GlobalStrings.PRESYNAPTIC )\r\n\t\t\t || type.equals ( GlobalStrings.MULTIPLE_PRESYNAPTIC )\r\n\t\t )\r\n\t\t{\r\n\t\t\tdrawPresynaptic ( \r\n\t\t\t new Point( \r\n\t\t\t horizontalLocationOfRelation,\r\n\t\t\t vertLocationOfLine - ( ( WORM_LINE_THICKNESS + 1 ) / 2 )\r\n\t\t\t ),\r\n\t\t\t new Point( \r\n\t\t\t horizontalLocationOfRelation,\r\n\t\t\t vertLocationOfLine - ( ( WORM_LINE_THICKNESS + 1 ) / 2 )\r\n\t\t\t - SYMBOL_LINE_LENGTH\r\n\t\t\t ),\r\n\t\t\t g2\r\n\t\t\t );\r\n\t\t}\r\n\t\telse if ( \r\n\t\t type.equals ( GlobalStrings.POSTSYNAPTIC )\r\n\t\t\t || type.equals ( GlobalStrings.MULTIPLE_POSTSYNAPTIC )\r\n\t\t )\r\n\t\t{\r\n\t\t\tdrawPresynaptic ( \r\n\t\t\t new Point( \r\n\t\t\t horizontalLocationOfRelation,\r\n\t\t\t vertLocationOfLine - ( ( WORM_LINE_THICKNESS + 1 ) / 2 )\r\n\t\t\t - SYMBOL_LINE_LENGTH\r\n\t\t\t ),\r\n\t\t\t new Point( \r\n\t\t\t horizontalLocationOfRelation,\r\n\t\t\t vertLocationOfLine - ( ( WORM_LINE_THICKNESS + 1 ) / 2 )\r\n\t\t\t ),\r\n\t\t\t g2\r\n\t\t\t );\r\n\t\t}\r\n\t\telse if ( type.equals ( GlobalStrings.GAP_JUNCTION ) )\r\n\t\t{\r\n\t\t\tdrawGap ( \r\n\t\t\t new Point( \r\n\t\t\t horizontalLocationOfRelation,\r\n\t\t\t vertLocationOfLine - ( ( WORM_LINE_THICKNESS + 1 ) / 2 )\r\n\t\t\t ),\r\n\t\t\t new Point( \r\n\t\t\t horizontalLocationOfRelation,\r\n\t\t\t vertLocationOfLine - ( ( WORM_LINE_THICKNESS + 1 ) / 2 )\r\n\t\t\t - SYMBOL_LINE_LENGTH\r\n\t\t\t ),\r\n\t\t\t g2\r\n\t\t\t );\r\n\t\t}\r\n\r\n\t\t//g2.drawLine(horizontalLocationOfRelation, vertLocationOfLine-WORM_LINE_THICKNESS-1, horizontalLocationOfRelation, vertLocationOfLine-WORM_LINE_THICKNESS-1- SYMBOL_LINE_LENGTH);\r\n\t\tint textSize = ( int ) drawText ( discon.getDisplayableContinName ( ), g2 );\r\n\r\n\t\t//Util.info(\"textsize = \" + textSize);\r\n\t\t//Util.info(\"drewline from \" + horizontalLocationOfRelation + \", \" + (vertLocationOfLine+(WORM_LINE_THICKNESS+1)/2) + \" to \" + horizontalLocationOfRelation + \", \" + (vertLocationOfLine+(WORM_LINE_THICKNESS+1)/2 + SYMBOL_LINE_LENGTH));\r\n\t\t//String name = discon.getContinName().equals(\"\") ? \"\" + discon.getContinNumber() : discon.getContinName();\r\n\t\tcurrentVertLocationOfSymbol =\r\n\t\t\tvertLocationOfLine - WORM_LINE_THICKNESS - 1 - SYMBOL_LINE_LENGTH - textSize\r\n\t\t\t- ( 2 * BORDER );\r\n\r\n\t\t//Util.info(\"currentVertLocationOfSymbol = \" + currentVertLocationOfSymbol);\r\n\t}", "public void makePreferredOTTOLRelationshipsConflicts(){\n \t\tTransaction tx;\n \t\tString name = \"life\";\n \t\tIndexHits<Node> foundNodes = findTaxNodeByName(name);\n Node firstNode = null;\n if (foundNodes.size() < 1){\n System.out.println(\"name '\" + name + \"' not found. quitting.\");\n return;\n } else if (foundNodes.size() > 1) {\n System.out.println(\"more than one node found for name '\" + name + \"'not sure how to deal with this. quitting\");\n } else {\n for (Node n : foundNodes)\n firstNode = n;\n }\n \t\tTraversalDescription CHILDOF_TRAVERSAL = Traversal.description()\n \t\t\t\t.relationships( RelTypes.TAXCHILDOF,Direction.INCOMING );\n \t\tSystem.out.println(firstNode.getProperty(\"name\"));\n \t\tint count = 0;\n \t\ttx = graphDb.beginTx();\n \t\ttry{\n \t\t\tfor(Node friendnode : CHILDOF_TRAVERSAL.traverse(firstNode).nodes()){\n \t\t\t\tboolean conflict = false;\n \t\t\t\tString endNode = \"\";\n \t\t\t\tRelationship ncbirel = null;\n \t\t\t\tRelationship ottolrel = null;\n \t\t\t\tfor(Relationship rel : friendnode.getRelationships(Direction.OUTGOING)){\n \t\t\t\t\tif (rel.getEndNode() == rel.getStartNode()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}else{\n \t\t\t\t\t\tif (endNode == \"\")\n \t\t\t\t\t\t\tendNode = (String) rel.getEndNode().getProperty(\"name\");\n \t\t\t\t\t\tif ((String)rel.getEndNode().getProperty(\"name\") != endNode){\n \t\t\t\t\t\t\tconflict = true;\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif(((String)rel.getProperty(\"source\")).compareTo(\"ncbi\")==0)\n \t\t\t\t\t\t\tncbirel = rel;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (conflict && ncbirel != null){\n \t\t\t\t\tcount += 1;\n //\t\t\t\t\tSystem.out.println(\"would make one from \"+ncbirel.getStartNode().getProperty(\"name\")+\" \"+ncbirel.getEndNode().getProperty(\"name\"));\n \t\t\t\t\tif(ncbirel.getStartNode()!=ncbirel.getEndNode()){\n \t\t\t\t\t\tncbirel.getStartNode().createRelationshipTo(ncbirel.getEndNode(), RelTypes.PREFTAXCHILDOF);\n \t\t\t\t\t\tRelationship newrel2 = ncbirel.getStartNode().createRelationshipTo(ncbirel.getEndNode(), RelTypes.TAXCHILDOF);\n \t\t\t\t\t\tnewrel2.setProperty(\"source\", \"ottol\");\n \t\t\t\t\t}else{\n \t\t\t\t\t\tSystem.out.println(\"would make cycle from \"+ncbirel.getEndNode().getProperty(\"name\"));\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\tif(count % transaction_iter == 0)\n \t\t\t\t\tSystem.out.println(count);\n \t\t\t}\n \t\t\ttx.success();\n \t\t}finally{\n \t\t\ttx.finish();\n \t\t}\n \t}", "private static synchronized String translateGuid(String anonimizedPatientId, String oldGuid) {\r\n \r\n String newGuid = guidHistory.get(new Guid(anonimizedPatientId, oldGuid));\r\n if (newGuid == null) {\r\n try {\r\n newGuid = UMROGUID.getUID();\r\n // This should always be true\r\n if (newGuid.startsWith(UMROGUID.UMRO_ROOT_GUID)) {\r\n newGuid = rootGuid + newGuid.substring(UMROGUID.UMRO_ROOT_GUID.length());\r\n }\r\n \r\n guidHistory.put(new Guid(anonimizedPatientId, oldGuid), newGuid);\r\n } catch (UnknownHostException e) {\r\n Log.get().logrb(Level.SEVERE, Anonymize.class.getCanonicalName(),\r\n \"translateGuid\", null, \"UnknownHostException Unable to generate new GUID\", e);\r\n }\r\n }\r\n return newGuid;\r\n }", "public String[] getRelations() {\n/* 270 */ return getStringArray(\"relation\");\n/* */ }", "private void indirectAssociations_DeriveIndirectInheritance() {\n try{\n \tList<FamixAssociation> indirectInheritanceAssociations = new ArrayList<FamixAssociation>();\n\t for (FamixAssociation directAssociation : theModel.associations) {\n if (directAssociation.to == null || directAssociation.from == null || directAssociation.to.equals(\"\") || directAssociation.from.equals(\"\")){ \n \tnumberOfNotConnectedWaitingAssociations ++;\n }\n else if (directAssociation instanceof FamixInheritanceDefinition){ \n \t\t\t\tindirectInheritanceAssociations.addAll(indirectAssociations_AddIndirectInheritanceAssociation(directAssociation.from, directAssociation.to, directAssociation.lineNumber));\n\t\t\t\t}\n\t\t\t}\n\t for (FamixAssociation indirectInheritanceAssociation : indirectInheritanceAssociations) {\n\t \taddToModel(indirectInheritanceAssociation);\n\t }\n } catch (Exception e) {\n\t this.logger.debug(new Date().toString() + \" \" + e);\n\t e.printStackTrace();\n }\n }", "@DISPID(1611005964) //= 0x6006000c. The runtime will prefer the VTID if present\n @VTID(40)\n void relationsUpdateInPartContextSynchronousRelations(\n short oRelationsUpdateInPartContextSynchronousRelations);", "private String processAsDynamic(String legacy) {\n return legacy.replaceAll(\"@\", \"#\");\n }", "public static void convertToAsciiDirected() {\n\t\tObjectArrayList<File> list = Utilities.getDirectedGraphList(LoadMethods.WEBGRAPH);\n\t\tUtilities.outputLine(\"Converting \" + list.size() + \" directed graphs...\", 1);\n\t\tint k = 0;\n\t\tfor (File f : list) {\n\t\t\tgraph.Dir g = Dir.load(f.getPath().substring(0, f.getPath().lastIndexOf('.')), GraphTypes.WEBGRAPH);\n\t\t\tString output = \"Directed/\" + f.getName().substring(0, f.getName().lastIndexOf('.')) + \".txt\";\n\t\t\tUtilities.output(++k + \" - \" + f.getPath(), 1);\n\t\t\tg.exportAsAscii(output);\n\t\t\tUtilities.outputLine(\" => \" + Utilities.adjGraphPath + output, 1);\n\t\t}\n\t}", "@Override\n public void updateBys() { updateLabelLists(getRTParent().getEntityTagTypes()); fillCommonRelationshipsMenu(); }", "public static String CheckRelation(String profilename1, String profilename2) {\n\n\t\t\tif(profiles.get(index.indexOf(profilename1)).searchFriends(profilename2)) {\n\t\t\t\treturn \t\"Friend\";\n\t\t\t}else if(profiles.get(index.indexOf(profilename1)).searchClassMate(profilename2)) {\n\t\t\t\treturn \"Classmate\";\n\t\t\t}else if(profiles.get(index.indexOf(profilename1)).searchColleagues(profilename2)) {\n\t\t\t\treturn \"Colleague\";\t\n\t\t\t}else if( profiles.get(index.indexOf(profilename1)).checkParent(profiles.get(index.indexOf(profilename2))) ) {\n\t\t\t\treturn profiles.get(index.indexOf(profilename1)).getName() + \" is a Child of \" + profiles.get(index.indexOf(profilename2)).getName();\t\n\t\t\t}else if( profiles.get(index.indexOf(profilename1)).checkChildrenof(profiles.get(index.indexOf(profilename2))) ) {\n\t\t\t\treturn profiles.get(index.indexOf(profilename1)).getName() + \" is a parent of \" + profiles.get(index.indexOf(profilename2)).getName();\t\n\t\t\t} else if( profiles.get(index.indexOf(profilename1)).checkPartnerOf(profiles.get(index.indexOf(profilename2)))){\n\t\t\t\t\t\t\treturn profiles.get(index.indexOf(profilename1)).getUName() + \" and \" + profiles.get(index.indexOf(profilename2)).getUName() + \" are a Couple\";\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn \" They are not related in anyway\" ;\n\t\t\t}\n\t\t\t\n\t\n\t}", "private static void process_relation(GraphDatabaseService db, CSVRecord record){\n\t\tString item_dwid_str = record.get(\"ITEM_DWID\").trim();\n\t\tString rxcui_norm_str = record.get(\"RXCUI_NORM\").trim();\n\t\tif(item_dwid_str.isEmpty()) return;\n\t\tif(rxcui_norm_str.isEmpty()) return;\n\t\tint item_dwid = Integer.parseInt(item_dwid_str);\n\t\tint rxcui_norm = Integer.parseInt(rxcui_norm_str);\n\t\tNode n1 = db.findNode(Labels.ITEM, \"dwid\", item_dwid);\n\t\t//if(n1==null) throw new AssertionError(\"Item missing: \"+item_dwid_str);\n\t\tif(n1==null) return;\n\t\tNode n2 = db.findNode(Labels.Concept, \"cui\", rxcui_norm);\n\t\t//if(n2==null) throw new AssertionError(\"Concept missing: \"+rxcui_norm_str);\n\t\tif(n2==null) return;\n\t\tn1.createRelationshipTo(n2, RelTypes.is_a);\n\t}", "public static void main(String args[]) {\n Model model = ModelFactory.createDefaultModel(); \n\n//set namespace\n Resource NAMESPACE = model.createResource( relationshipUri );\n \tmodel.setNsPrefix( \"rela\", relationshipUri);\n \n// Create the types of Property we need to describe relationships in the model\n Property childOf = model.createProperty(relationshipUri,\"childOf\"); \n Property siblingOf = model.createProperty(relationshipUri,\"siblingOf\");\n Property spouseOf = model.createProperty(relationshipUri,\"spouseOf\");\n Property parentOf = model.createProperty(relationshipUri,\"parentOf\"); \n \n \n// Create resources representing the people in our model\n Resource Siddharth = model.createResource(familyUri+\"Siddharth\");\n Resource Dhvanit = model.createResource(familyUri+\"Dhvanit\");\n Resource Rekha = model.createResource(familyUri+\"Rekha\");\n Resource Sandeep = model.createResource(familyUri+\"Sandeep\");\n Resource Kanchan = model.createResource(familyUri+\"Kanchan\");\n Resource Pihu = model.createResource(familyUri+\"Pihu\");\n Resource DwarkaPrasad = model.createResource(familyUri+\"Dwarkesh\");\n Resource Shakuntala = model.createResource(familyUri+\"Shakuntala\");\n Resource Santosh = model.createResource(familyUri+\"Santosh\");\n Resource Usha = model.createResource(familyUri+\"Usha\");\n Resource Priyadarshan = model.createResource(familyUri+\"Priyadarshan\");\n Resource Sudarshan = model.createResource(familyUri+\"Sudarshan\");\n Resource Pragya = model.createResource(familyUri+\"Pragya\");\n Resource Shailendra = model.createResource(familyUri+\"Shailendra\");\n Resource Rajni = model.createResource(familyUri+\"Rajni\");\n Resource Harsh = model.createResource(familyUri+\"Harsh\");\n Resource Satendra = model.createResource(familyUri+\"Satendra\");\n Resource Vandana = model.createResource(familyUri+\"Vandana\");\n Resource Priyam = model.createResource(familyUri+\"Priyam\");\n Resource Darshan = model.createResource(familyUri+\"Darshan\");\n Resource Vardhan = model.createResource(familyUri+\"Vardhan\");\n \n List<Statement> list = new ArrayList(); \n list.add(model.createStatement(Dhvanit,spouseOf,Kanchan)); \n list.add(model.createStatement(Sandeep,spouseOf,Rekha)); \n list.add(model.createStatement(DwarkaPrasad,spouseOf,Shakuntala)); \n list.add(model.createStatement(Santosh,spouseOf,Usha)); \n list.add(model.createStatement(Shailendra,spouseOf,Rajni)); \n list.add(model.createStatement(Satendra,spouseOf,Vandana)); \n list.add(model.createStatement(Sandeep,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Sandeep,childOf,Shakuntala)); \n list.add(model.createStatement(Santosh,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Santosh,childOf,Shakuntala)); \n list.add(model.createStatement(Shailendra,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Shailendra,childOf,Shakuntala)); \n list.add(model.createStatement(Satendra,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Satendra,childOf,Shakuntala)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Sandeep)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Santosh)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Shailendra)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Satendra)); \n list.add(model.createStatement(Shakuntala,parentOf,Sandeep)); \n list.add(model.createStatement(Shakuntala,parentOf,Santosh)); \n list.add(model.createStatement(Shakuntala,parentOf,Shailendra)); \n list.add(model.createStatement(Shakuntala,parentOf,Satendra)); \n list.add(model.createStatement(Sandeep,parentOf,Siddharth)); \n list.add(model.createStatement(Sandeep,parentOf,Dhvanit)); \n list.add(model.createStatement(Rekha,parentOf,Siddharth)); \n list.add(model.createStatement(Rekha,parentOf,Dhvanit)); \n list.add(model.createStatement(Siddharth,childOf,Rekha)); \n list.add(model.createStatement(Dhvanit,childOf,Rekha)); \n list.add(model.createStatement(Siddharth,childOf,Sandeep)); \n list.add(model.createStatement(Dhvanit,childOf,Sandeep)); \n list.add(model.createStatement(Harsh,childOf,Shailendra)); \n list.add(model.createStatement(Harsh,childOf,Rajni)); \n list.add(model.createStatement(Shailendra,parentOf,Harsh)); \n list.add(model.createStatement(Rajni,parentOf,Harsh)); \n list.add(model.createStatement(Santosh,parentOf,Priyadarshan)); \n list.add(model.createStatement(Santosh,parentOf,Sudarshan));\n list.add(model.createStatement(Santosh,parentOf,Pragya));\n list.add(model.createStatement(Usha,parentOf,Priyadarshan)); \n list.add(model.createStatement(Usha,parentOf,Sudarshan));\n list.add(model.createStatement(Usha,parentOf,Pragya));\n list.add(model.createStatement(Priyadarshan,childOf,Santosh));\n list.add(model.createStatement(Pragya,childOf,Santosh));\n list.add(model.createStatement(Sudarshan,childOf,Santosh));\n list.add(model.createStatement(Priyadarshan,childOf,Usha));\n list.add(model.createStatement(Pragya,childOf,Usha));\n list.add(model.createStatement(Sudarshan,childOf,Usha));\n list.add(model.createStatement(Satendra,parentOf,Priyam)); \n list.add(model.createStatement(Satendra,parentOf,Darshan));\n list.add(model.createStatement(Satendra,parentOf,Vardhan));\n list.add(model.createStatement(Vandana,parentOf,Priyam)); \n list.add(model.createStatement(Vandana,parentOf,Darshan));\n list.add(model.createStatement(Vandana,parentOf,Vardhan));\n list.add(model.createStatement(Priyam,childOf,Satendra));\n list.add(model.createStatement(Darshan,childOf,Satendra));\n list.add(model.createStatement(Vardhan,childOf,Satendra));\n list.add(model.createStatement(Priyam,childOf,Vandana));\n list.add(model.createStatement(Darshan,childOf,Vandana));\n list.add(model.createStatement(Vardhan,childOf,Vandana));\n list.add(model.createStatement(Pihu,childOf,Dhvanit));\n list.add(model.createStatement(Pihu,childOf,Kanchan));\n list.add(model.createStatement(Dhvanit,parentOf,Pihu));\n list.add(model.createStatement(Kanchan,parentOf,Pihu));\n list.add(model.createStatement(Siddharth,siblingOf,Dhvanit));\n list.add(model.createStatement(Dhvanit,siblingOf,Siddharth)); \n list.add(model.createStatement(Priyadarshan,siblingOf,Sudarshan));\n list.add(model.createStatement(Priyadarshan,siblingOf,Pragya));\n list.add(model.createStatement(Sudarshan,siblingOf,Priyadarshan));\n list.add(model.createStatement(Sudarshan,siblingOf,Pragya));\n list.add(model.createStatement(Pragya,siblingOf,Priyadarshan));\n list.add(model.createStatement(Pragya,siblingOf,Sudarshan)); \n list.add(model.createStatement(Priyam,siblingOf,Darshan));\n list.add(model.createStatement(Priyam,siblingOf,Vardhan)); \n list.add(model.createStatement(Darshan,siblingOf,Vardhan)); \n list.add(model.createStatement(Darshan,siblingOf,Priyam));\n list.add(model.createStatement(Vardhan,siblingOf,Priyam));\n list.add(model.createStatement(Vardhan,siblingOf,Darshan));\n list.add(model.createStatement(Santosh,siblingOf,Sandeep));\n list.add(model.createStatement(Santosh,siblingOf,Shailendra));\n list.add(model.createStatement(Santosh,siblingOf,Satendra));\n list.add(model.createStatement(Sandeep,siblingOf,Santosh));\n list.add(model.createStatement(Sandeep,siblingOf,Shailendra));\n list.add(model.createStatement(Sandeep,siblingOf,Satendra));\n list.add(model.createStatement(Shailendra,siblingOf,Santosh));\n list.add(model.createStatement(Shailendra,siblingOf,Sandeep));\n list.add(model.createStatement(Shailendra,siblingOf,Satendra));\n list.add(model.createStatement(Satendra,siblingOf,Shailendra));\n list.add(model.createStatement(Satendra,siblingOf,Santosh));\n list.add(model.createStatement(Satendra,siblingOf,Sandeep));\n \n model.add(list);\n try{\n \t File file=new File(\"/Users/siddharthgupta/Documents/workspace/FamilyModel/src/family/family.rdf\");\n \t \tFileOutputStream f1=new FileOutputStream(file);\n \t \tRDFWriter d = model.getWriter(\"RDF/XML-ABBREV\");\n \t \t\t\td.write(model,f1,null);\n \t\t}catch(Exception e) {}\n }", "@DataProvider(name = \"data\")\n public Object[][] getRelationships()\n {\n return this.prepareData(\"relationships\",\n new Object[]{\n \"relationship without anything (to test required fields)\",\n new RelationshipData(this, \"TestRelationship\")},\n new Object[]{\n \"relationship without anything (to test escaped characters)\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")},\n new Object[]{\n \"relationship without defined preventduplicates flag (to test default value)\",\n new RelationshipData(this, \"TestRelationship \\\" 1\"),\n new RelationshipData(this, \"TestRelationship \\\" 1\").setFlag(\"preventduplicates\", false)},\n new Object[]{\n \"relationship with triggers (to test escaped triggers)\",\n new RelationshipData(this, \"TestRelationship \\\" 1\").addTrigger(new AbstractDataWithTrigger.TriggerAction(\"modify\", new MQLProgramData(this, \"Test Program\")))},\n new Object[]{\n \"relationship with one rule (multiple are not working!)\",\n new RelationshipData(this, \"TestRelationship\").setRule(new RuleData(this, \"Rule\"))},\n new Object[]{\n \"relationship abstract true\",\n new RelationshipData(this, \"TestRelationship\").setFlag(\"abstract\", true, Create.ViaValue).defNotSupported(Version.V6R2011x, Version.V6R2012x)},\n new Object[]{\n \"relationship abstract false\",\n new RelationshipData(this, \"TestRelationship\").setFlag(\"abstract\", false, Create.ViaValue).defNotSupported(Version.V6R2011x, Version.V6R2012x),\n new RelationshipData(this, \"TestRelationship\")},\n // from side\n new Object[]{\n \"relationship without from propagate connection\",\n new RelationshipData(this, \"TestRelationship\"),\n new RelationshipData(this, \"TestRelationship\")\n .from().defFlag(\"propagateconnection\", true)},\n new Object[]{\n \"relationship with from propagate connection true\",\n new RelationshipData(this, \"TestRelationship\")\n .from().defFlag(\"propagateconnection\", true)},\n new Object[]{\n \"relationship with from propagate connection false\",\n new RelationshipData(this, \"TestRelationship\")\n .from().defFlag(\"propagateconnection\", false)},\n new Object[]{\n \"relationship without from propagate modify\",\n new RelationshipData(this, \"TestRelationship\"),\n new RelationshipData(this, \"TestRelationship\")\n .from().defFlag(\"propagatemodify\", false)},\n new Object[]{\n \"relationship with from propagate modify true\",\n new RelationshipData(this, \"TestRelationship\").from().defFlag(\"propagatemodify\", true)},\n new Object[]{\n \"relationship with from propagate modify false\",\n new RelationshipData(this, \"TestRelationship\").from().defFlag(\"propagatemodify\", false)},\n\n new Object[]{\n \"relationship with escaped from meaning\",\n new RelationshipData(this, \"TestRelationship\").from().defString(\"meaning\", \"this is a \\\"test\\\"\")},\n\n new Object[]{\n \"relationship without from cardinality\",\n new RelationshipData(this, \"TestRelationship\"),\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"cardinality\", \"many\")},\n new Object[]{\n \"relationship with from cardinality one\",\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"cardinality\", \"one\")},\n new Object[]{\n \"relationship with from cardinality many\",\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"cardinality\", \"many\")},\n\n new Object[]{\n \"relationship without from clone behavior\",\n new RelationshipData(this, \"TestRelationship\"),\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"clone\", \"none\")},\n new Object[]{\n \"relationship with from clone behavior none\",\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"clone\", \"none\")},\n new Object[]{\n \"relationship with from clone behavior float\",\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"clone\", \"float\")},\n new Object[]{\n \"relationship with from clone behavior replicate\",\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"clone\", \"replicate\")},\n\n new Object[]{\n \"relationship without from revision behavior\",\n new RelationshipData(this, \"TestRelationship\"),\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"revision\", \"none\")},\n new Object[]{\n \"relationship with from revision behavior none\",\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"revision\", \"none\")},\n new Object[]{\n \"relationship with from revision behavior float\",\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"revision\", \"float\")},\n new Object[]{\n \"relationship with from revision behavior replicate\",\n new RelationshipData(this, \"TestRelationship\").from().defSingle(\"revision\", \"replicate\")},\n\n new Object[]{\n \"relationship with one from type\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .from().defData(\"type\", new TypeData(this, \"Test Type\"))},\n new Object[]{\n \"relationship with two escaped from types\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .from().defData(\"type\", new TypeData(this, \"Test Type \\\" 1\"))\n .from().defData(\"type\", new TypeData(this, \"Test Type \\\" 2\"))},\n new Object[]{\n \"relationship with all from types\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .from().defDataAll(\"type\")},\n new Object[]{\n \"relationship with one from relationship\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .from().defData(\"relationship\", new RelationshipData(this, \"Test Relationship\"))},\n new Object[]{\n \"relationship with two escaped from relationships\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .from().defData(\"relationship\", new RelationshipData(this, \"Test Relationship \\\" 1\"))\n .from().defData(\"relationship\", new RelationshipData(this, \"Test Relationship \\\" 2\"))},\n new Object[]{\n \"relationship with all from relationships\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .from().defDataAll(\"relationship\")},\n new Object[]{\n \"relationship with two escaped from types and relationships\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .from().defData(\"relationship\", new RelationshipData(this, \"Test Relationship \\\" 1\"))\n .from().defData(\"relationship\", new RelationshipData(this, \"Test Relationship \\\" 2\"))\n .from().defData(\"type\", new TypeData(this, \"Test Type \\\" 1\"))\n .from().defData(\"type\", new TypeData(this, \"Test Type \\\" 2\"))},\n // to side\n new Object[]{\n \"relationship without to propagate connection\",\n new RelationshipData(this, \"TestRelationship\"),\n new RelationshipData(this, \"TestRelationship\").to().defFlag(\"propagateconnection\", true)},\n new Object[]{\n \"relationship with to propagate connection true\",\n new RelationshipData(this, \"TestRelationship\").to().defFlag(\"propagateconnection\", true)},\n new Object[]{\n \"relationship with to propagate connection false\",\n new RelationshipData(this, \"TestRelationship\").to().defFlag(\"propagateconnection\", false)},\n new Object[]{\n \"relationship without to propagate modify\",\n new RelationshipData(this, \"TestRelationship\"),\n new RelationshipData(this, \"TestRelationship\").to().defFlag(\"propagatemodify\", false)},\n new Object[]{\n \"relationship with to propagate modify true\",\n new RelationshipData(this, \"TestRelationship\").to().defFlag(\"propagatemodify\", true)},\n new Object[]{\n \"relationship with to propagate modify false\",\n new RelationshipData(this, \"TestRelationship\").to().defFlag(\"propagatemodify\", false)},\n\n new Object[]{\n \"relationship with escaped meaning\",\n new RelationshipData(this, \"TestRelationship\").to().defString(\"meaning\", \"this is a \\\"test\\\"\")},\n\n new Object[]{\n \"relationship without cardinality\",\n new RelationshipData(this, \"TestRelationship\"),\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"cardinality\", \"many\")},\n new Object[]{\n \"relationship with cardinality one\",\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"cardinality\", \"one\")},\n new Object[]{\n \"relationship with cardinality many\",\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"cardinality\", \"many\")},\n\n new Object[]{\n \"relationship without clone behavior\",\n new RelationshipData(this, \"TestRelationship\"),\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"clone\", \"none\")},\n new Object[]{\n \"relationship with clone behavior none\",\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"clone\", \"none\")},\n new Object[]{\n \"relationship with clone behavior float\",\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"clone\", \"float\")},\n new Object[]{\n \"relationship with clone behavior replicate\",\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"clone\", \"replicate\")},\n\n new Object[]{\n \"relationship without to revision behavior\",\n new RelationshipData(this, \"TestRelationship\"),\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"revision\", \"none\")},\n new Object[]{\n \"relationship with to revision behavior none\",\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"revision\", \"none\")},\n new Object[]{\n \"relationship with to revision behavior float\",\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"revision\", \"float\")},\n new Object[]{\n \"relationship with to revision behavior replicate\",\n new RelationshipData(this, \"TestRelationship\").to().defSingle(\"revision\", \"replicate\")},\n\n new Object[]{\n \"relationship with one to type\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .to().defData(\"type\", new TypeData(this, \"Test Type\"))},\n new Object[]{\n \"relationship with two escaped to types\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .to().defData(\"type\", new TypeData(this, \"Test Type \\\" 1\"))\n .to().defData(\"type\", new TypeData(this, \"Test Type \\\" 2\"))},\n new Object[]{\n \"relationship with all to types\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .to().defDataAll(\"type\")},\n new Object[]{\n \"relationship with one to relationship\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .to().defData(\"relationship\", new RelationshipData(this, \"Test Relationship\"))},\n new Object[]{\n \"relationship with two escaped to relationships\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .to().defData(\"relationship\", new RelationshipData(this, \"Test Relationship \\\" 1\"))\n .to().defData(\"relationship\", new RelationshipData(this, \"Test Relationship \\\" 2\"))},\n new Object[]{\n \"relationship with all to relationships\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .to().defDataAll(\"relationship\")},\n new Object[]{\n \"relationship with two escaped to types and relationships\",\n new RelationshipData(this, \"TestRelationship \\\" 1\")\n .to().defData(\"relationship\", new RelationshipData(this, \"Test Relationship \\\" 1\"))\n .to().defData(\"relationship\", new RelationshipData(this, \"Test Relationship \\\" 2\"))\n .to().defData(\"type\", new TypeData(this, \"Test Type \\\" 1\"))\n .to().defData(\"type\", new TypeData(this, \"Test Type \\\" 2\"))}\n );\n }", "public String getPromotionRelationshipDescriptor() {\n\t\treturn mPromotionRelationshipDescriptor;\n\t}", "public String revealRelationshipsInW() {\n\t\tString w = \"\";\n\t\tif (this.numWVertices > 0) {\n\t\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\t\t// find w_i and print it with all its neighbors\n\t\t\t\tw += \"w\" + i + \": \" + this.vertices.get(i).getWNeighbors() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn \"Expected Relationships between targeted vertices (W): \\n\" + w;\n\t}", "protected abstract SqlToRelConverter getSqlToRelConverter( SqlValidator validator, CatalogReader catalogReader, SqlToRelConverter.Config config );", "java.lang.String getSemanticLangidModelName();", "public String toClassicRepresentation(){\n try {\n return LegacyMarshaller.getInstance().marshal(getComponents()).toString();\n } catch (ServiceException exception) {\n throw new RuntimeServiceException(exception);\n }\n }", "private void fillSemanticRelations(String summaryFilePath) {\n\t\t\n\t\tArrayList<String> lines = FileManager.readFileLineByLine(summaryFilePath);\n\t\tfor(int i = 0; i < lines.size(); ++i) {\n\t\t\tString[] parts = lines.get(i).split(\",\");\n\t\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\tfor(int j = 1; j < parts.length; ++j) {\n\t\t\t\tlist.add(parts[j]);\n\t\t\t}\n\t\t\tsemanticRelationsMap.put(parts[0], list);\n\t\t}\n\t\t\n\t}", "public String composeCfdiRelated() {\n String message = \"\";\n \n if (AreCfdiRelatedApplicable) {\n if (CfdiRelatedList.isEmpty()) {\n message = \"Sin CFDI relacionados.\";\n }\n else {\n message = \"Con \" + CfdiRelatedList.size() + \" CFDI \" + (CfdiRelatedList.size() == 1 ? \"relacionado\" : \"relacionados\") + \":\";\n for (CfdiRelated cfdiRelated : CfdiRelatedList) {\n message += \"\\n- \" + cfdiRelated.composeMessage();\n }\n }\n \n if (!msLastCfdiRelatedError.isEmpty()) {\n message += (!message.isEmpty() ? \"\\n\" : \"\") + msLastCfdiRelatedError;\n }\n }\n \n return message;\n }", "@DISPID(1611005968) //= 0x60060010. The runtime will prefer the VTID if present\n @VTID(43)\n short relationsUpdateInPartContextEvaluateDuringUpdate();", "public String getRelationship(Person currPerson, String personID) {\n String relationship = new String();\n\n if(currPerson.getFatherID() != null) {\n if(currPerson.getFatherID().equals(personID)) {\n relationship = \"Father\";\n }\n }\n\n if(currPerson.getMotherID() != null) {\n if(currPerson.getMotherID().equals(personID)) {\n relationship = \"Mother\";\n }\n }\n\n if(currPerson.getSpouseID() != null) {\n if(currPerson.getSpouseID().equals(personID)) {\n relationship = \"Spouse\";\n }\n }\n\n// if(getChildrenMap().containsKey(personID)) {\n// if(getChildrenMap().get(personID).getPersonID().equals(personID)) {\n// relationship = \"Child\";\n// }\n// }\n\n if (relationship.length() > 0) {\n return relationship;\n } else {\n return \"Child\";\n }\n }", "private String doDrTranslate(String pDrCode) {\n\n byte[] aCode = pDrCode.getBytes();\n String aDrCode = pDrCode;\n\n if (aCode.length == 5 && !mFacility.matches(\"BHH|PJC|MAR|ANG\")) {\n int i;\n for (i = 1; i < aCode.length; i++) {\n if ((i == 1 || i == 2) && (aCode[i] < 'A' || aCode[i] > 'Z')) { // Check for \"aa\" part of format\n aDrCode = k.NULL ;\n } else if ((i == 3 || i == 4 || i==5) && (aCode[i] < '0' || aCode[i] > '9')) { // Check for \"nnn\" part of format\n aDrCode = k.NULL ;\n }\n }\n return pDrCode;\n\n } else {\n if (mFacility.equalsIgnoreCase(\"SDMH\")) {\n CodeLookUp aSDMHDrTranslate = new CodeLookUp(\"Dr_Translation.table\", \"SDMH\", mEnvironment);\n aDrCode = aSDMHDrTranslate.getValue(pDrCode);\n\n if (aDrCode.length() == 5 ) {\n aDrCode = k.NULL;\n }\n } else if (mFacility.equalsIgnoreCase(\"CGMC\")) {\n if (! pDrCode.equalsIgnoreCase(\"UNK\")) {\n aDrCode = k.NULL ;\n }\n } else if (mFacility.equalsIgnoreCase(\"ALF\")) {\n aDrCode = k.NULL ;\n } else {\n //covers eastern health systems\n aDrCode = pDrCode;\n }\n }\n return aDrCode;\n\n }", "public static void convertToAsciiUndirected() {\n\t\tObjectArrayList<File> list = Utilities.getUndirectedGraphList(LoadMethods.WEBGRAPH);\n\t\tUtilities.outputLine(\"Converting \" + list.size() + \" undirected graphs...\", 1);\n\n\t\tint k = 0;\n\t\tfor (File f : list) {\n\t\t\tgraph.Undir g = Undir.load(f.getPath().substring(0, f.getPath().lastIndexOf('.')), GraphTypes.WEBGRAPH);\n\t\t\tString output = \"Undirected/\" + f.getName().substring(0, f.getName().lastIndexOf('.')) + \".txt\";\n\t\t\tUtilities.output(++k + \" - \" + f.getPath(), 1);\n\t\t\tg.exportAsAscii(output);\n\t\t\tUtilities.outputLine(\" => \" + Utilities.adjGraphPath + output, 1);\n\t\t}\n\t}", "String getRefPartnerSideB();", "private RelationMapping createRelationMapping(RoleSchema role, EJB ejb, Table table, Table relatedTable) throws DeploymentException {\n Map columnNameMapping = role.getPkMapping();\n LinkedHashMap ejbFieldMappings = new LinkedHashMap();\n LinkedHashMap columnMappings = new LinkedHashMap();\n for (Iterator iterator = table.getPrimaryKeyFields().iterator(); iterator.hasNext();) {\n Column column = (Column) iterator.next();\n \n // -- column names\n String columnName = column.getPhysicalName();\n String relatedColumnName = (String) columnNameMapping.get(columnName);\n if (null == relatedColumnName) {\n throw new DeploymentException(\"Role \" + role + \" is misconfigured: primary key column [\" +\n columnName + \"] is not mapped to a foreign key.\");\n }\n \n // -- field Names\n String ejbFieldName = column.getName();\n String relatedEjbFieldName = relatedColumnName;\n for (Iterator iter = relatedTable.getAttributes().iterator(); iter.hasNext();) {\n Column relatedTableColumn = (Column) iter.next();\n if (relatedTableColumn.getPhysicalName().equals(relatedColumnName)) {\n relatedEjbFieldName = relatedTableColumn.getName();\n break;\n }\n }\n \n // -- create related ejb field\n FKField relatedEjbField = new FKField(relatedEjbFieldName, relatedColumnName, column.getType());\n ejbFieldMappings.put(ejb.getAttribute(ejbFieldName), relatedEjbField);\n \n \n // -- create related column\n FKColumn relatedcolumn = new FKColumn(relatedEjbFieldName, relatedColumnName, column.getType());\n if (column.isSQLTypeSet()) {\n relatedcolumn.setSQLType(column.getSQLType());\n }\n if (column.isTypeConverterSet()) {\n relatedcolumn.setTypeConverter(column.getTypeConverter());\n }\n columnMappings.put(column, relatedcolumn);\n }\n return new RelationMapping(ejbFieldMappings, columnMappings);\n }", "public abstract String edgeToStringWithDaikonInvs(int nodeSrc, int nodeDst, DaikonInvariants daikonInvs,\n Set<String> relations);", "public java.lang.String getStudent_contactRelationship() {\n\t\treturn _primarySchoolStudent.getStudent_contactRelationship();\n\t}", "public static String tenantIdRemapping(String oldTenantId) {\n\t\tif (oldTenantId.equalsIgnoreCase(\"bukalapak\")) {\n\t\t\treturn \"bukalapak\";\n\t\t}\n\t\tif (oldTenantId.equalsIgnoreCase(\"familynara2014\")) {\n\t\t\treturn \"FAMILYNARA2014\";\n\t\t}\n\t\treturn oldTenantId;\n\t}", "private boolean migratePartFamilyData(Context context) throws Exception {\n boolean migrationStatus = false;\n try {\n matrix.db.Policy cPolicy = new matrix.db.Policy(POLICY_CLASSIFICATION);\n\n // Get a MapList of Part Family, Part Issuer objects in the database\n // that need to be migrated\n\n StringList objectSelects = new StringList(8);\n objectSelects.addElement(\"id\");\n objectSelects.addElement(\"type\");\n objectSelects.addElement(\"name\");\n objectSelects.addElement(\"revision\");\n objectSelects.addElement(\"vault\");\n objectSelects.addElement(\"current\");\n objectSelects.addElement(\"policy\");\n objectSelects.addElement(SELECT_PART_FAMILY_MEMBER_RELATIONSHIP_NAME);\n\n // query for all Part Family objects, this will include Part Issuer objects\n // since it is sub-type of Part Family\n matrix.db.Query query = new matrix.db.Query(\"\");\n\n query.open(context);\n query.setBusinessObjectType(TYPE_PART_FAMILY);\n query.setBusinessObjectName(\"*\");\n query.setBusinessObjectRevision(\"*\");\n query.setOwnerPattern(\"*\");\n query.setVaultPattern(\"*\");\n query.setWhereExpression(\"\");\n query.setExpandType(true);\n\n BusinessObjectWithSelectList list = new BusinessObjectWithSelectList(1);\n QueryIterator qItr = null;\n try {\n ContextUtil.startTransaction(context, false);\n qItr = query.getIterator(context, objectSelects, (short) 1000);\n while (qItr.hasNext())\n list.addElement(qItr.next());\n\n ContextUtil.commitTransaction(context);\n } catch (Exception ex) {\n ContextUtil.abortTransaction(context);\n throw new Exception(ex.toString());\n } finally {\n qItr.close();\n }\n ArrayList partFamilyList = null;\n\n if (list != null && list.size() > 0) {\n partFamilyList = toMapList(list);\n }\n\n query.close(context);\n\n String command = null;\n\n // loop thru the list, change the policy to 'Classification'\n // if the type is \"Part Issuer'\n // i.e. this change is not required for 'Part Family'\n //\n // For each of these objects, get the connected \"Part Family Member\"\n // relationships, change them to \"Classified Item\"\n\n if (partFamilyList != null && partFamilyList.size() > 0) {\n Iterator partFamilyItr = partFamilyList.iterator();\n String objectId = null;\n String objectType = null;\n String objectName = null;\n String objectRev = null;\n String objectVault = null;\n String objectState = null;\n String objectPolicy = null;\n StringList partFamiltMemberRelList = null;\n Iterator partFamiltMemberRelItr = null;\n BusinessObject busObject = null;\n String initialRev = cPolicy.getFirstInSequence(context);\n emxInstallUtil_mxJPO.println(context, \">initialRev \" + initialRev + \"\\n\");\n\n while (partFamilyItr.hasNext()) {\n Map map = (Map) partFamilyItr.next();\n\n objectId = (String) map.get(\"id\");\n objectType = (String) map.get(\"type\");\n objectName = (String) map.get(\"name\");\n objectRev = (String) map.get(\"revision\");\n objectVault = (String) map.get(\"vault\");\n objectState = (String) map.get(\"current\");\n objectPolicy = (String) map.get(\"policy\");\n\n busObject = new BusinessObject(objectId);\n busObject.open(context);\n\n // change the type, policy for 'Part Issuer' objects\n // this forces to change the revision of the object to comply with Classification policy\n if (isTypePartIssuerExists && objectType.equals(TYPE_PART_ISSUER)) {\n try {\n if (objectRev != initialRev) {\n // core requires name to be changed if revision is changed\n // so fool it by first changing, and then change it back to its original name\n String fakeName = objectName + \"Conversion~\";\n busObject.change(context, TYPE_PART_FAMILY, fakeName, initialRev, objectVault, POLICY_CLASSIFICATION);\n busObject.update(context);\n\n busObject.change(context, TYPE_PART_FAMILY, objectName, initialRev, objectVault, POLICY_CLASSIFICATION);\n busObject.update(context);\n } else {\n busObject.change(context, TYPE_PART_FAMILY, objectName, objectRev, objectVault, POLICY_CLASSIFICATION);\n busObject.update(context);\n }\n\n // In case, if customer renamed state \"Exists\" to \"Active\"\n // then do not promote, bacause core will adjust the state automatically\n if (POLICY_PART_ISSUER_STATE_EXISTS.equals(objectState) && !POLICY_PART_ISSUER_STATE_EXISTS.equals(STATE_ACTIVE)) {\n busObject.promote(context);\n }\n\n } catch (MatrixException e) {\n duplicatePartIssuerExists = true;\n emxInstallUtil_mxJPO.println(context, \">WARNING: Duplicate name found for Part Issuer object: id\" + objectId + \" :name :\" + objectName + \"\\n\");\n }\n\n }\n\n // change the policy for 'Part Family' objects\n // It is assumed here that \"Part Family\" type objects used \"Part Family\" policy\n if (POLICY_PART_FAMILY.equals(objectPolicy)) {\n busObject.setPolicy(context, cPolicy);\n busObject.update(context);\n\n // In case, if customer renamed state \"Exists\" to \"Active\"\n // then do not promote, bacause core will adjust the state automatically\n if (STATE_EXISTS.equals(objectState) && !STATE_EXISTS.equals(STATE_ACTIVE)) {\n busObject.promote(context);\n }\n }\n\n busObject.update(context);\n busObject.close(context);\n\n // if the \"Part Family\", \"Part Issuer\" does not have associated Parts\n // map will not contain the key, this is also applicable if the conversion routine\n // is run multiple times\n if (map.containsKey(SELECT_PART_FAMILY_MEMBER_RELATIONSHIP_NAME)) {\n partFamiltMemberRelList = (StringList) map.get(SELECT_PART_FAMILY_MEMBER_RELATIONSHIP_NAME);\n if (partFamiltMemberRelList != null && partFamiltMemberRelList.size() > 0) {\n partFamiltMemberRelItr = partFamiltMemberRelList.iterator();\n\n while (partFamiltMemberRelItr.hasNext()) {\n command = \"modify connection \" + (String) partFamiltMemberRelItr.next() + \" type \\\"\" + RELATIONSHIP_CLASSIFIED_ITEM + \"\\\"\";\n emxInstallUtil_mxJPO.executeMQLCommand(context, command);\n }\n command = \"modify businessobject \" + objectId + \" \\\"\" + ATTRIBUTE_COUNT + \"\\\" \" + partFamiltMemberRelList.size();\n emxInstallUtil_mxJPO.executeMQLCommand(context, command);\n }\n }\n }\n } else {\n emxInstallUtil_mxJPO.println(context, \"No Part Family/Part Issuer objects found in the database\\n\");\n }\n migrationStatus = true;\n\n // delete the Part Issuer type, policy from the database\n if (isTypePartIssuerExists && !duplicatePartIssuerExists) {\n command = \"delete type \\\"\" + TYPE_PART_ISSUER + \"\\\"\";\n emxInstallUtil_mxJPO.executeMQLCommand(context, command);\n\n command = \"delete policy \\\"\" + POLICY_PART_ISSUER + \"\\\"\";\n emxInstallUtil_mxJPO.executeMQLCommand(context, command);\n }\n\n return migrationStatus;\n } catch (Exception ex) {\n emxInstallUtil_mxJPO.println(context, \">ERROR:in migratePartFamilyData method Exception :\" + ex.getMessage() + \"\\n\");\n throw ex;\n }\n }", "private void trataEntity(String tagEleEntOuAtt, HashMap<String, ArrayList<Atributo>> arrEntityAtt, HashMap<String, ArrayList<String>> arrEntity) {\r\n\t\tboolean printOut = false;\r\n\t\tboolean isAtt = false;\r\n\t\tint i;\r\n\t\t/*\r\n\t\t * Divide a tag pelos espaços\r\n\t\t */\r\n\t\tString att[] = tagEleEntOuAtt.split(\" \");\r\n\r\n\t\tString entityName = att[2];\r\n\t\tif (printOut)\r\n\t\t\t//System.out.print(\"\\nEntity '\" + entityName + \"':\\n\");\r\n\t\tif (entityName.equals(\"i18n\")) {\r\n\t\t\tisAtt = false;\r\n\t\t}\r\n\r\n\t\tString entreAspas = getEntreAspas(tagEleEntOuAtt);\r\n\t\tif (entreAspas.indexOf(\"#\") != -1) {\r\n\t\t\tif (entreAspas.indexOf(\"#PCDATA\") != entreAspas.indexOf(\"#\")) {\r\n\t\t\t\t// é um atributo\r\n\t\t\t\tisAtt = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tString valores[] = entreAspas.split(\" \");\r\n\t\tfor (i = 0; i < valores.length; i++) {\r\n\t\t\tString vKey = valores[i].replace(\";\", \"\").replace(\"%\", \"\");\r\n\t\t\tif (arrEntityAtt.containsKey(vKey)) {\r\n\t\t\t\t/*\r\n\t\t\t\t * é um atributo resgatar or valores e colocá-los no array de\r\n\t\t\t\t * atributos deste entity\r\n\t\t\t\t */\r\n\t\t\t\tif (!arrEntityAtt.containsKey(entityName)) {\r\n\t\t\t\t\tarrEntityAtt.put(entityName, new ArrayList<Atributo>());\r\n\t\t\t\t}\r\n\t\t\t\tarrEntityAtt.get(entityName).addAll(arrEntityAtt.get(vKey));\r\n\t\t\t\tisAtt = true;\r\n\t\t\t} else {\r\n\t\t\t\tif (isAtt) {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Verificar se já existe uma lista com estes atributos\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (!arrEntityAtt.containsKey(entityName)) {\r\n\t\t\t\t\t\tarrEntityAtt.put(entityName, new ArrayList<Atributo>());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tAtributo atributo = new Atributo(valores[i]);\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Verificar se possui parenteses\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (valores[i + 1].indexOf(\"(\") == 0) {\r\n\t\t\t\t\t\t// possui parenteses, concatenar até o fecha\r\n\t\t\t\t\t\t// parenteses\r\n\t\t\t\t\t\tint parentesesCount = 0;\r\n\t\t\t\t\t\tString strParenteses = \"\";\r\n\t\t\t\t\t\tfor (int j = i + 1; j < valores.length; j++) {\r\n\t\t\t\t\t\t\tstrParenteses += valores[j];\r\n\t\t\t\t\t\t\tif (strParenteses.indexOf(\"(\") != -1) {\r\n\t\t\t\t\t\t\t\tparentesesCount++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (strParenteses.indexOf(\")\") != -1) {\r\n\t\t\t\t\t\t\t\tparentesesCount--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (parentesesCount == 0) {\r\n\t\t\t\t\t\t\t\ti = j - 1;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tstrParenteses = strParenteses.replaceAll(\"(\\\\)|\\\\()\", \"\");\r\n\t\t\t\t\t\tString arrV[] = strParenteses.split(\"\\\\|\");\r\n\t\t\t\t\t\tfor (int j = 0; j < arrV.length; j++) {\r\n\t\t\t\t\t\t\tatributo.getValoresPermitidos().add(arrV[j]);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tString valor = valores[i + 1];\r\n\t\t\t\t\t\tif (valor.startsWith(\"%\")) {\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * Procurar nos entities\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tString vEntKey = valor.replace(\"%\", \"\").replace(\";\", \"\");\r\n\t\t\t\t\t\t\tif (arrEntity.containsKey(vEntKey)) {\r\n\t\t\t\t\t\t\t\tatributo.getValoresPermitidos().addAll(arrEntity.get(vEntKey));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tatributo.getValoresPermitidos().add(valor);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Verificar se é required ou não\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (valores[i + 2].equals(\"#REQUIRED\")) {\r\n\t\t\t\t\t\tatributo.setRequired(true);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tatributo.setRequired(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti = i + 2;\r\n\t\t\t\t\tarrEntityAtt.get(entityName).add(atributo);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Lista de valores\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString valor = valores[i];\r\n\t\t\t\t\tif (printOut)\r\n\t\t\t\t\t\t//System.out.print(valor + \"\\n\");\r\n\t\t\t\t\tif (!arrEntity.containsKey(entityName)) {\r\n\t\t\t\t\t\tarrEntity.put(entityName, new ArrayList<String>());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvalor = valor.replaceAll(\"(\\\\(|\\\\))\", \"\");\r\n\t\t\t\t\tString valval[] = valor.split(\"\\\\|\");\r\n\t\t\t\t\tfor (int k = 0; k < valval.length; k++) {\r\n\t\t\t\t\t\tarrEntity.get(entityName).add(valval[k].trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (printOut){\r\n\t\t\t//System.out.print(\"isAtt=\" + isAtt + \"\\n\");\r\n\t\t}\r\n\t}", "@DISPID(1611005968) //= 0x60060010. The runtime will prefer the VTID if present\n @VTID(44)\n void relationsUpdateInPartContextEvaluateDuringUpdate(\n short oRelationsUpdateInPartContextEvaluateDuringUpdate);", "private void readTableToDescriptor() {\n for (BeanDescriptor<?> desc : descMap.values()) {\n String baseTable = desc.baseTable();\n if (baseTable != null) {\n baseTable = baseTable.toLowerCase();\n List<BeanDescriptor<?>> list = tableToDescMap.computeIfAbsent(baseTable, k -> new ArrayList<>(1));\n list.add(desc);\n }\n if (desc.entityType() == EntityType.VIEW && desc.isQueryCaching()) {\n // build map of tables to view entities dependent on those tables\n // for the purpose of invalidating appropriate query caches\n String[] dependentTables = desc.dependentTables();\n if (dependentTables != null && dependentTables.length > 0) {\n for (String depTable : dependentTables) {\n depTable = depTable.toLowerCase();\n List<BeanDescriptor<?>> list = tableToViewDescMap.computeIfAbsent(depTable, k -> new ArrayList<>(1));\n list.add(desc);\n }\n }\n }\n }\n }", "private static String getFixContactPhone(String field13Old) {\n\t\tString[] field13NewArray = new String[NUMBER_PID_SEQ];\n\t\tint i = 0;\n\t\tString[] field13OldTokenizer = field13Old.split(\"\\\\\" + COMPONENT_SEPARATOR);\n\t\tfor (String component : field13OldTokenizer) {\n\t\t\tfield13NewArray[i] = component;\n\t\t\ti++;\n\t\t}\n\t\tif (!StringUtils.isEmpty(field13NewArray[7 - 1])) {\n\t\t\tfield13NewArray[12 - 1] = field13NewArray[7 - 1];\n\t\t\tfield13NewArray[7 - 1] = StringUtils.EMPTY;\n\t\t}\n\t\tStringBuilder field13New = new StringBuilder();\n\t\tfor (String field : field13NewArray) {\n\t\t\tfield13New.append(field == null ? StringUtils.EMPTY : field);\n\t\t\tfield13New.append(COMPONENT_SEPARATOR);\n\t\t}\n\t\treturn field13New.toString().replaceAll(\"\\\\^{2,}$\", \"\");\n\t}", "public T caseAssocRelationshipDefinition(AssocRelationshipDefinition object) {\n\t\treturn null;\n\t}", "ImmutableList<SchemaOrgType> getIsFamilyFriendlyList();", "public String toStringWithRelation() {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(toString());\r\n String l = \"\\n \";\r\n if (_member != null)\r\n { sb.append(l).append(xbRDS(_member, \"member\")); }\r\n if (_region != null)\r\n { sb.append(l).append(xbRDS(_region, \"region\")); }\r\n return sb.toString();\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getRelatedTo();", "protected String toAfk() {\n return cfg.getString(\"Messages.+afk\");\n }", "public void refrescarForeignKeysDescripcionesCostoGastoImpor() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tCostoGastoImporConstantesFunciones.refrescarForeignKeysDescripcionesCostoGastoImpor(this.costogastoimporLogic.getCostoGastoImpors());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tCostoGastoImporConstantesFunciones.refrescarForeignKeysDescripcionesCostoGastoImpor(this.costogastoimpors);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\tclasses.add(new Classe(Sucursal.class));\r\n\t\tclasses.add(new Classe(TipoCostoGastoImpor.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//costogastoimporLogic.setCostoGastoImpors(this.costogastoimpors);\r\n\t\t\tcostogastoimporLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "public String toString ()\n {\n return \"RefDocTypePair(\" + this.fromDocType + \",\" + this.toDocType + \")\";\n }", "private void atualizar_tbl_pro_profs() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n//To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic PersonRelation createRelationshipBetween(Person person,\n\t\t\tPerson relatedPerson, int relationship) {\n\t\treturn null;\n\t}", "public java.lang.String getOldProperty_description(){\n return localOldProperty_description;\n }", "public void makePreferredOTTOLRelationshipsNOConflicts() {\n \n // TraversalDescription CHILDOF_TRAVERSAL = Traversal.description()\n // .relationships(RelType.TAXCHILDOF, Direction.INCOMING);\n \n // get the start point\n Node life = getLifeNode();\n System.out.println(life.getProperty(\"name\"));\n \n Transaction tx = beginTx();\n addToPreferredIndexes(life, ALLTAXA);\n HashSet<Long> traveled = new HashSet<Long>();\n int nNewRels = 0;\n try {\n // walk out to the tips from the base of the tree\n for (Node n : TAXCHILDOF_TRAVERSAL.traverse(life).nodes()) {\n if (n.hasRelationship(Direction.INCOMING, RelType.TAXCHILDOF) == false) {\n \n // when we hit a tip, start walking back\n Node curNode = n;\n while (curNode.hasRelationship(Direction.OUTGOING, RelType.TAXCHILDOF)) {\n Node startNode = curNode;\n if (traveled.contains((Long)startNode.getId())){\n \tbreak;\n }else{\n \ttraveled.add((Long)startNode.getId());\n }\n Node endNode = null;\n \n // if the current node already has a preferred relationship, we will just follow it\n if (startNode.hasRelationship(Direction.OUTGOING, RelType.PREFTAXCHILDOF)) {\n Relationship prefRel = startNode.getSingleRelationship(RelType.PREFTAXCHILDOF, Direction.OUTGOING);\n \n // make sure we don't get stuck in an infinite loop (should not happen, could do weird things to the graph)\n if (prefRel.getStartNode().getId() == prefRel.getEndNode().getId()) {\n System.out.println(\"pointing to itself \" + prefRel + \" \" + prefRel.getStartNode().getId() + \" \" + prefRel.getEndNode().getId());\n break;\n }\n \n // prepare to move on\n endNode = prefRel.getEndNode();\n \n } else {\n \n // if there is no preferred rel then they all point to the same end node; just follow the first non-looping relationship\n for (Relationship rel : curNode.getRelationships(RelType.TAXCHILDOF, Direction.OUTGOING)) {\n if (rel.getStartNode().getId() == rel.getEndNode().getId()) {\n System.out.println(\"pointing to itself \" + rel + \" \" + rel.getStartNode().getId() + \" \" + rel.getEndNode().getId());\n break;\n } else {\n endNode = rel.getEndNode();\n break;\n }\n }\n \n // if we found a dead-end, die\n if (endNode == null) {\n System.out.println(curNode.getProperty(\"name\"));\n System.out.println(\"Strange, this relationship seems to be pointing at a nonexistent node. Quitting.\");\n System.exit(0);\n }\n \n // create preferred relationships\n curNode.createRelationshipTo(endNode, RelType.PREFTAXCHILDOF);\n curNode.createRelationshipTo(endNode, RelType.TAXCHILDOF).setProperty(\"source\", \"ottol\");\n nNewRels += 1;\n }\n \n if (startNode == endNode) {\n System.out.println(startNode);\n System.out.println(\"The node seems to be pointing at itself. This is a problem. Quitting.\");\n System.exit(0);\n \n // prepare for next iteration\n } else {\n curNode = endNode;\n addToPreferredIndexes(startNode, ALLTAXA);\n }\n }\n }\n \n if (nNewRels % transaction_iter == 0) {\n System.out.println(nNewRels);\n // tx.success();\n // tx.finish();\n // tx = beginTx();\n }\n }\n tx.success();\n } finally {\n tx.finish();\n }\n }", "public static String getProvenanceRDF(Configuration c){\n String provURI = c.getThisVersion();\n if(provURI==null || provURI.equals(\"\")){\n provURI = \"..\\\\index.html\";\n }\n String provrdf = \"@prefix prov: <http://www.w3.org/ns/prov#> .\\n\"\n + \"@prefix dc: <http://purl.org/dc/terms/> .\\n\"\n + \"@prefix foaf: <http://xmlns.com/foaf/0.1/> .\\n\";\n provrdf+=\"<\"+provURI+\"> a prov:Entity;\\n\";\n if(c.getTitle()!=null &&!\"\".equals(c.getTitle())){\n provrdf+= \"\\t dc:title \\\"\"+c.getTitle()+\"\\\";\\n\";\n }\n if(!c.getCreators().isEmpty()){\n Iterator<Agent> creators = c.getCreators().iterator();\n while(creators.hasNext()){\n //me quedo aqui. Hay que cambiar todo. Quizas la responsabilidad puedo pasar, o asumir que todos los agentes itenen uris. Si no es un rollo\n Agent currCreator = creators.next();\n if(currCreator.getURL()!=null && !\"\".equals(currCreator.getURL())){\n provrdf+= \"\\t prov:wasAttributedTo <\"+currCreator.getURL()+\">;\\n\";\n provrdf+= \"\\t dc:creator <\"+currCreator.getURL()+\">;\\n\";\n }else{\n provrdf+= \"\\t prov:wasAttributedTo [ a prov:Agent; foaf:name \\\"\"+currCreator.getName()+\"\\\".];\\n\";\n }\n }\n }\n if(!c.getContributors().isEmpty()){\n Iterator<Agent> contrib = c.getContributors().iterator();\n while(contrib.hasNext()){\n Agent currContrib = contrib.next();\n if(currContrib.getURL()!=null && !\"\".equals(currContrib.getURL())){\n provrdf+= \"\\t prov:wasAttributedTo <\"+currContrib.getURL()+\">;\\n\";\n provrdf+= \"\\t dc:contributor <\"+currContrib.getURL()+\">;\\n\";\n }else{\n provrdf+= \"\\t prov:wasAttributedTo [ a prov:Agent; foaf:name \\\"\"+currContrib.getName()+\"\\\".];\\n\";\n }\n }\n }\n provrdf+= \"\\t prov:wasAttributedTo <https://github.com/dgarijo/Widoco/>,<http://www.essepuntato.it/lode/>;\\n\";\n if(c.getLatestVersion()!=null &&!\"\".equals(c.getLatestVersion())){\n provrdf+=\"\\t prov:specializationOf <\"+c.getLatestVersion()+\">;\\n\";\n }\n if(c.getPreviousVersion()!=null &&!\"\".equals(c.getPreviousVersion())){\n provrdf+=\"\\t prov:wasRevisionOf <\"+c.getPreviousVersion()+\">;\\n\";\n } \n if(c.getReleaseDate()!=null &&!\"\".equals(c.getReleaseDate())){\n provrdf+=\"\\t prov:wasGeneratedAt \\\"\"+c.getReleaseDate()+\"\\\".\\n\";\n }\n return provrdf;\n }", "public abstract String edgeToStringWithCnt(int nodeSrc, int nodeDst, int cnt, Set<String> relations);", "public String connectRelationship(Context context,\r\n \t\tRelationshipType relationshipType,\r\n \t\tjava.lang.String relId, String strNewRelId,\r\n \t\tboolean isFrom)throws Exception\r\n {\r\n \tString fromRelId = null;\r\n \tString toRelId = null;\r\n \tString connId = null;\r\n \tStringBuffer sbCmd = new StringBuffer();\r\n \tStringBuffer sbCmd2 = new StringBuffer();\r\n try\r\n {\r\n \tif(isFrom)\r\n \t{\r\n \t\tfromRelId = strNewRelId;\r\n \t\ttoRelId = relId;\r\n \t}else\r\n \t{\r\n \t\tfromRelId = relId;\r\n \t\ttoRelId = strNewRelId;\r\n \t}\r\n\r\n \tsbCmd.append(\"add connection \\\"\");\r\n \tsbCmd.append(relationshipType);\r\n \tsbCmd.append(\"\\\" fromrel \\\"\");\r\n \tsbCmd.append(fromRelId);\r\n \tsbCmd.append(\"\\\" torel \\\"\");\r\n \tsbCmd.append(toRelId);\r\n \tsbCmd.append(\"\\\" select id dump;\");\r\n \t\r\n \tsbCmd2.append(\"add connection \");\r\n \tsbCmd2.append(\"$1\");\r\n \tsbCmd2.append(\" fromrel \");\r\n \tsbCmd2.append(\"$2\");\r\n \tsbCmd2.append(\" torel \");\r\n \tsbCmd2.append(\"$3\");\r\n \tsbCmd2.append(\" select $4 dump\");\r\n\r\n \tmqlLogRequiredInformationWriter(\"MQL command to be executed ::\" + \"\\n\" + sbCmd.toString()+ \"\\n\");\r\n \tconnId = MqlUtil.mqlCommand(context, sbCmd2.toString(), true,relationshipType.getName(),fromRelId,toRelId,\"id\");\r\n\r\n }\r\n catch (Exception e)\r\n {\r\n \tmqlLogRequiredInformationWriter(\"MQL command execution failed in 'connectRelationship' API ::\" + sbCmd.toString()+ \"\\n\");\r\n \te.printStackTrace();\r\n throw new FrameworkException(e);\r\n }\r\n\t\treturn connId;\r\n }", "java.lang.String getFkocs();", "public static void providePOJOsEverythingForAOneRelation(\n final FileWriterWrapper writer,\n final String entityCodeName)\n throws IOException {\n char[] workingName = entityCodeName.toCharArray();\n workingName[0] = Character.toLowerCase(workingName[0]);\n String lowcaseName = new String(workingName);\n\n writer.write(\" private Integer \" + lowcaseName + \"Id = null;\\n\\n\");\n\n writer.write(\" public Integer get\" + entityCodeName + \"Id() {\\n\");\n writer.write(\" return \" + lowcaseName + \"Id;\\n\");\n writer.write(\" }\\n\\n\");\n\n writer.write(\" public void set\" + entityCodeName + \"Id(Integer new\"\n + entityCodeName + \") {\\n\");\n writer.write(\" \" + lowcaseName + \"Id = new\" + entityCodeName\n + \";\\n\");\n writer.write(\" }\\n\\n\");\n }", "private String convertToID(String originalTree) {\n\tString result = new String(originalTree);\n\tfor (int i = 0; i < noTax; i++) {\n\t int indx = result.indexOf(taxa[i] + \")\");\n\t if (indx == -1) {\n\t\tindx = result.indexOf(taxa[i] + \",\");\n\t }\n\t try{\n\t\tresult = result.substring(0, indx) + i + \n\t\t result.substring(indx + taxa[i].length(), result.length());\n\t } catch (Exception e) {\n\t\tSystem.out.println(\"Error in replacing\\n\" + taxa[i] +\n\t\t\t\t \"\\n in \" + result);\n\t\tSystem.exit(-1);\n\t }\n\t}\n\treturn result;\n }", "private static Map<String, Map<String, String>> getEventRelationships(Document doc,\n\t\t\tMap<String, String> eiidMappings) {\n\t\tMap<String, Map<String, String>> result = new HashMap<String, Map<String, String>>();\n\n\t\t// Get TLINKs\n\t\tElement root = doc.getDocumentElement();\n\t\tElement[] tlinkElems = \n\t\t\t\tXMLParser.getElementsByTagNameNR(root, \"TLINK\");\n\t\tfor (Element e : tlinkElems) {\n\t\t\tString eventInstanceID = e.getAttribute(\"eventInstanceID\");\n\t\t\tString relatedToEventInstance = e.getAttribute(\"relatedToEventInstance\");\n\t\t\tString relType = e.getAttribute(\"relType\");\n\n\t\t\tif (eventInstanceID.length() > 0 && relatedToEventInstance.length() > 0\n\t\t\t\t\t&& relType.length() > 0) {\n\t\t\t\t\n\t\t\t\tif (eiidMappings != null) {\n\t\t\t\t\teventInstanceID = eiidMappings.get(eventInstanceID);\n\t\t\t\t\trelatedToEventInstance = eiidMappings.get(relatedToEventInstance);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMapUtils.doublePut(result, eventInstanceID, relatedToEventInstance, relType);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Get SLINKs\n\t\tElement[] slinkElems =\n\t\t\t\tXMLParser.getElementsByTagNameNR(root, \"SLINK\");\n\t\tfor (Element e : slinkElems) {\n\t\t\tString eventInstanceID = e.getAttribute(\"eventInstanceID\");\n\t\t\tString subordinatedEventInstance = e.getAttribute(\"subordinatedEventInstance\");\n\t\t\tString relType = e.getAttribute(\"relType\");\n\t\t\t\n\t\t\tif (eventInstanceID.length() > 0 && subordinatedEventInstance.length() > 0\n\t\t\t\t\t&& relType.length() > 0) {\n\t\t\t\t\n\t\t\t\tif (eiidMappings != null) {\n\t\t\t\t\teventInstanceID = eiidMappings.get(eventInstanceID);\n\t\t\t\t\tsubordinatedEventInstance = eiidMappings.get(subordinatedEventInstance);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMapUtils.doublePut(result, eventInstanceID, subordinatedEventInstance, relType);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "private int fixTextDescriptorFont(int descriptor1)\n \t{\n \t\tint fontNumber = (descriptor1 & ELIBConstants.VTFACE) >> ELIBConstants.VTFACESH;\n if (fontNumber == 0) return descriptor1;\n descriptor1 &= ~ELIBConstants.VTFACE;\n \t\tif (fontNames != null && fontNumber <= fontNames.length)\n {\n \t\t\tString fontName = fontNames[fontNumber-1];\n \t\t\tTextDescriptor.ActiveFont af = TextDescriptor.ActiveFont.findActiveFont(fontName);\n if (af != null) {\n fontNumber = af.getIndex();\n if (fontNumber <= (ELIBConstants.VTFACE >> ELIBConstants.VTFACESH))\n descriptor1 |= fontNumber << ELIBConstants.VTFACESH;\n }\n \t\t}\n return descriptor1;\n \t}", "@ApiModelProperty(required = true, value = \"Type of the product relationship, such as [bundled] if the product is a bundle and you want to describe the bundled products inside this bundle; [reliesOn] if the product needs another already owned product to rely on (e.g. an option on an already owned mobile access product) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful\")\n @NotNull\n\n\n public String getRelationshipType() {\n return relationshipType;\n }", "public String getSupEntCorporate() {\n return supEntCorporate;\n }", "private static org.opencds.vmr.v1_0.schema.ENXP eNXPInternal2ENXP(ENXP pENXP) \n\t\t\tthrows DataFormatException, InvalidDataException {\n\n\t\tString _METHODNAME = \"eNXPInternal2ENXP(): \";\n\t\tif (pENXP == null)\n\t\t\treturn null;\n\n\t\torg.opencds.vmr.v1_0.schema.ENXP lENXPExt = new org.opencds.vmr.v1_0.schema.ENXP();\n\n\t\t// set external XP.value \n\t\tlENXPExt.setValue(pENXP.getValue());\n\n\t\t// Now translate the internal EntityNamePartType to external EntityNamePartType\n\t\tEntityNamePartType lEntityNamePartTypeInt = pENXP.getType();\n\t\tif (lEntityNamePartTypeInt == null) {\n\t\t\tString errStr = _METHODNAME + \"EntityPartType of external ENXP datatype not populated; required by vmr spec\";\n\t\t\tthrow new DataFormatException(errStr);\n\t\t}\n\t\tString lEntityNamePartTypeStrInt = lEntityNamePartTypeInt.toString();\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"Internal EntityNamePartType value: \" + lEntityNamePartTypeStrInt);\n\t\t}\n\n\t\torg.opencds.vmr.v1_0.schema.EntityNamePartType lEntityNamePartTypeExt = null;\n\t\ttry {\n\t\t\tlEntityNamePartTypeExt = org.opencds.vmr.v1_0.schema.EntityNamePartType.valueOf(lEntityNamePartTypeStrInt);\n\t\t}\n\t\tcatch (IllegalArgumentException iae) {\n\t\t\tString errStr = _METHODNAME + \"there was no direct value mapping from the internal to external enumeration\";\n\t\t\tthrow new InvalidDataException(errStr);\n\t\t}\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"External EntityNamePartType value: \" + lEntityNamePartTypeExt);\n\t\t}\n\t\tlENXPExt.setType(lEntityNamePartTypeExt);\n\n\t\t// Finally create the list of external EntityNamePartQualifiers (optional in spec)\n\t\tList<EntityNamePartQualifier> lPartQualifierListInt = pENXP.getQualifier();\n\t\tif (lPartQualifierListInt != null) {\n\t\t\tIterator<EntityNamePartQualifier> lPartQualifierIterInt = lPartQualifierListInt.iterator();\n\t\t\twhile (lPartQualifierIterInt.hasNext()) {\n\t\t\t\t// Take each internal EntityNamePartQualifier and convert to internal EntityNamePartQualifier for addition to internal EN\n\t\t\t\tEntityNamePartQualifier lPartQualifierInt = lPartQualifierIterInt.next();\n\t\t\t\torg.opencds.vmr.v1_0.schema.EntityNamePartQualifier lPartQualifierExt = eNPartQualifierInternal2ENPartQualifier(lPartQualifierInt);\n\t\t\t\tlENXPExt.getQualifier().add(lPartQualifierExt);\n\t\t\t}\n\t\t}\t\t\n\n\t\treturn lENXPExt;\n\t}" ]
[ "0.5441839", "0.5276798", "0.52744883", "0.5207259", "0.5125322", "0.50832695", "0.5068484", "0.49987292", "0.49327505", "0.4856642", "0.47641084", "0.47620124", "0.47469392", "0.46875", "0.46489507", "0.46396762", "0.46357772", "0.46248847", "0.46119407", "0.45852262", "0.45817888", "0.45744428", "0.4572878", "0.4543664", "0.45412663", "0.45292166", "0.45279717", "0.4526527", "0.45215067", "0.44882178", "0.44774276", "0.44641706", "0.44610235", "0.44559148", "0.44552472", "0.44470796", "0.44371322", "0.44308853", "0.44292915", "0.44071835", "0.44013196", "0.43976665", "0.43975952", "0.43802306", "0.43722862", "0.43672055", "0.43599328", "0.4352238", "0.43454397", "0.43353224", "0.43127987", "0.43117684", "0.43113595", "0.43113554", "0.42965654", "0.42814854", "0.42804813", "0.42787763", "0.42775697", "0.42751533", "0.42749545", "0.42736185", "0.42686868", "0.4266723", "0.4264436", "0.4263131", "0.42551714", "0.42545095", "0.42504594", "0.42456314", "0.42378685", "0.42372832", "0.4234987", "0.42272472", "0.421555", "0.42119145", "0.42034087", "0.420315", "0.41949955", "0.4193889", "0.41934523", "0.4187936", "0.41813976", "0.4177455", "0.41769958", "0.41695103", "0.4169469", "0.41652864", "0.41642663", "0.4161684", "0.4161595", "0.41592428", "0.41573966", "0.4153945", "0.41537902", "0.41535652", "0.41525513", "0.41479254", "0.41473103", "0.41396782" ]
0.56031007
0
Construct Sources. Needs to be public for DefaultPacketExtensionProvider to work.
public Sources() { super(NAMESPACE, ELEMENT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Sources(Builder b)\n {\n super(NAMESPACE, ELEMENT);\n\n for (MediaSource ms: b.mediaSources)\n {\n addChildExtension(ms);\n }\n }", "public static PacketSource makePacketSource() {\n\treturn makePacketSource(Env.getenv(\"MOTECOM\"));\n }", "public NetworkSource() {\n }", "public static PacketSource makePacketSource(String name) {\n\tif (name == null)\n\t name = \"sf@localhost:9001\"; // default source\n\n\tParseArgs parser = new ParseArgs(name, \"@\");\n\tString source = parser.next();\n\tString args = parser.next();\n\tPacketSource retVal = null;\n\t\n\n\tif (source.equals(\"sf\"))\n\t retVal = makeArgsSF(args);\n\tif (source.equals(\"old-sf\"))\n\t retVal = makeArgsOldSF(args);\n\tif (source.equals(\"dummy\"))\n\t retVal = makeDummy();\n\tif (source.equals(\"old-serial\"))\n\t retVal = makeArgsOldSerial(args);\n\tif (source.equals(\"old-network\"))\n\t retVal = makeArgsOldNetwork(args);\n\tif (source.equals(\"serial\"))\n\t retVal = makeArgsSerial(args);\n\tif (source.equals(\"network\"))\n\t retVal = makeArgsNetwork(args);\n\tif (source.equals(\"tossim-serial\"))\n\t retVal = makeArgsTossimSerial(args);\n\tif (source.equals(\"tossim-radio\"))\n\t retVal = makeArgsTossimRadio(args);\n\t//System.err.println(\"Built a Packet source for \"+Platform.getPlatformName(retVal.getPlatform()));\n\treturn retVal;\n }", "public List<MessageSource> createMessageSources(){\n\n List<MessageSource> messageSourceList = new ArrayList<>();\n\n String messageSourceConfig = Configurations.map.getProperty(\"messageSourceChannels\");\n String[] sourceConfigArray = messageSourceConfig.split(\",\");\n\n for(String sourceConfig : sourceConfigArray) {\n MessageSource messageSource = null;\n\n // there is only file message source option for instance, but it's extendable\n if(sourceConfig.equals(\"file\")){\n messageSource = new FileSource();\n }\n\n if(messageSource != null){\n messageSourceList.add(messageSource);\n }\n }\n\n if(messageSourceList.size() == 0){\n return null;\n }\n\n return messageSourceList;\n }", "private SourceRconPacketFactory() {\n }", "private DOMImplementationRegistry(Vector srcs) {\n _sources = srcs;\n }", "private void addSources() {\n FeatureCollection emptyFeature = FeatureCollection.fromFeatures(new Feature[] {});\n\n if (mapboxMap.getSourceAs(LocationLayerConstants.LOCATION_SOURCE) == null) {\n mapboxMap.addSource(new GeoJsonSource(\n LocationLayerConstants.LOCATION_SOURCE,\n emptyFeature,\n new GeoJsonOptions().withMaxZoom(16))\n );\n }\n\n if (mapboxMap.getSourceAs(LocationLayerConstants.LOCATION_ACCURACY_SOURCE) == null) {\n mapboxMap.addSource(new GeoJsonSource(\n LocationLayerConstants.LOCATION_ACCURACY_SOURCE,\n emptyFeature,\n new GeoJsonOptions().withMaxZoom(16))\n );\n }\n }", "@Override\n public Collection<Source> getSources() {\n\n Map<String, Source> sources = new HashMap<String, Source>();\n\n out: for (Map.Entry<String, Container> path : containers.entrySet()) {\n String sourceId = path.getKey();\n Container container = path.getValue();\n\n for (String map : categoryMaps.keySet()) {\n if (map.endsWith(\"/\")) {\n map = map.substring(0, map.lastIndexOf(\"/\"));\n }\n if (map.endsWith(sourceId)) {\n continue out;\n }\n }\n\n System.err.println(\"Doing source \" + sourceId);\n\n sourceId = applyCategoryMaps(sourceId);\n\n if (sourceId.isEmpty()) {\n continue;\n }\n\n if (sourceId.indexOf(\"/\") == -1 && !sourceId.isEmpty()) {\n if (sources.get(sourceId) == null) {\n String sourceIdShort = sourceId;\n sourceId = \"Catchup/Sources/\" + sourceIdShort;\n String sourceName = container.getTitle();\n Source source = new Source();\n source.setSourceId(sourceIdShort);\n source.setId(sourceId);\n source.setShortName(sourceName);\n source.setLongName(sourceName);\n source.setServiceUrl(\"/category?sourceId=\" + sourceId + \";type=html\");\n URI iconUri = container.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class);\n URL iconUrl = normaliseURI(iconUri);\n final String iconUrlString = iconUrl == null ? null : iconUrl.toString();\n source.setIconUrl(iconUrlString);\n sources.put(sourceId, source);\n }\n }\n\n\n\n\n }\n\n\n return sources.values();\n }", "public SourceLister() {\n this(defaultSrcDirs);\n }", "public static PacketSource makeDummy() {\n\treturn new DummySource();\n }", "public static List<Pair<String, SourceBuilder>> getSourceBuilders() {\n List<Pair<String, SourceBuilder>> builders =\n new ArrayList<Pair<String, SourceBuilder>>();\n builders.add(new Pair<String, SourceBuilder>(\"helloWorldSource\", builder()));\n return builders;\n }", "public void preparePlayer() {\n uriParse();\n dataSourceFactory = buildDataSourceFactory(bandwidthMeter);\n\n switch (tipoVideo) {\n case 0:\n videoSource = new DashMediaSource(uri, dataSourceFactory, new DefaultDashChunkSource.Factory(dataSourceFactory), null, null);\n break;\n case 1:\n videoSource = new HlsMediaSource(uri, dataSourceFactory, null, null);\n break;\n case 2:\n videoSource = new ExtractorMediaSource(uri, dataSourceFactory, new DefaultExtractorsFactory(), null, null);\n break;\n }\n\n player.prepare(videoSource);\n\n }", "private void setupSource() {\n source = new GeoJsonSource( geojsonSourceId, featureCollection );\n map.addSource( source );\n }", "private CanonizeSource() {}", "public AudioSource(boolean loop) {\n\t\tid = AL10.alGenSources();\n\t\tthis.loop = loop;\n\t}", "public LSPSource[] getSources () {\r\n return sources;\r\n }", "public MobilitySourceCollection(MobilitySource[] mobilitySources) {\n\t\tthis.mobilitySources = mobilitySources;\n\t\taddressMobilitySourceMap = new HashMap();\n\t\taddressAddressMap = new HashMap();\n\t\tcurrentEnterIndex = 0;\n\t\tcurrentAddress = 0;\n\t\trectangle = null;\n\t\tshape = new ShapeCollection();\n\t\ttotalDeviceCount = 0;\n\t\tfor(int i=0; i<mobilitySources.length; i++) {\n\t\t\trectangle = rectangle == null ? mobilitySources[i].getRectangle() : rectangle.union(mobilitySources[i].getRectangle());\n\t\t\tshape.addShape(mobilitySources[i].getShape(), Position.NULL_POSITION);\n\t\t\ttotalDeviceCount += mobilitySources[i].getTotalDeviceCount();\n\t\t}\n\t}", "public LdapImportSource() {\n\t}", "private DatagramPacket injectSourceAndDestinationData(DatagramPacket packet)\n\t{\n\t\t\n\t\tbyte[] ipxBuffer = Arrays.copyOf(packet.getData(), packet.getLength());\n\t\tint bufferLength = ipxBuffer.length + 9;\n\t\t\n\t\tbyte[] wrappedBuffer = Arrays.copyOf(ipxBuffer, bufferLength);\n\t\twrappedBuffer[bufferLength - 9] = 0x01;\n\t\twrappedBuffer[bufferLength - 8] = (byte) (packet.getAddress().getAddress()[0]);\n\t\twrappedBuffer[bufferLength - 7] = (byte) (packet.getAddress().getAddress()[1]);\n\t\twrappedBuffer[bufferLength - 6] = (byte) (packet.getAddress().getAddress()[2]);\n\t\twrappedBuffer[bufferLength - 5] = (byte) (packet.getAddress().getAddress()[3]);\n\t\twrappedBuffer[bufferLength - 4] = (byte) (packet.getPort() >> 8);\n\t\twrappedBuffer[bufferLength - 3] = (byte) packet.getPort();\n\t\twrappedBuffer[bufferLength - 2] = (byte) (ipxSocket.getLocalPort() >> 8);\n\t\twrappedBuffer[bufferLength - 1] = (byte) ipxSocket.getLocalPort();\n\t\t\n\t\treturn new DatagramPacket(wrappedBuffer, bufferLength);\n\t}", "public ArchillectSource() {\n super(SOURCE_NAME);\n }", "public void initChips() {\n\t\tfor(Player p:players) {\n\t\t\tfor(int i=0; i<7; i++) {\n\t\t\t\tp.addChip(new Chip(p));\n\t\t\t}\n\t\t}\n\t}", "public SourceFieldMapper() {\n\t\tthis(Defaults.NAME, Defaults.ENABLED, Defaults.FORMAT, null, -1, Defaults.INCLUDES, Defaults.EXCLUDES);\n\t}", "public void setSources (LSPSource[] sources) {\r\n this.sources = sources;\r\n }", "public SourceRecord() {\n super(Source.SOURCE);\n }", "public void loadSources( int messageId )\n {\n for (Source src : srcs) {\n src.fetchData(bklist, messageId );\n }\n }", "public Source(String name, String description, String story, double mass, \n String itemtype, String itemname, String itemdescription, String itemstory, \n double itemmass, double itemnutrition) \n {\n super(name, description, story, mass);\n this.itemtype = itemtype;\n \n this.itemname = itemname;\n this.itemdescription = itemdescription;\n this.itemstory = itemstory; \n this.itemmass = itemmass;\n this.itemnutrition = itemnutrition;\n \n //creates item of the type itemtype, which is specified upon creation of the source\n if(itemtype.equals(\"Drink\")) {new Drink(itemname, itemdescription, itemstory, itemmass, itemnutrition);}\n else if(itemtype.equals(\"Food\")) {new Food (itemname, itemdescription, itemstory, itemmass, itemnutrition);}\n else if(itemtype.equals(\"Item\")) {item = new Item (itemname, itemdescription, itemstory, itemmass);} \n }", "private void constructSourceMetadata() throws Exception {\n final String masterTag = \"ifg\";\n final String slaveTag = \"dummy\";\n\n // get sourceMaster & sourceSlave MetadataElement\n final MetadataElement masterMeta = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n final String slaveMetadataRoot = AbstractMetadata.SLAVE_METADATA_ROOT;\n\n /* organize metadata */\n\n // put sourceMaster metadata into the masterMap\n metaMapPut(masterTag, masterMeta, sourceProduct, masterMap);\n\n // pug sourceSlave metadata into slaveMap\n MetadataElement[] slaveRoot = sourceProduct.getMetadataRoot().getElement(slaveMetadataRoot).getElements();\n for (MetadataElement meta : slaveRoot) {\n metaMapPut(slaveTag, meta, sourceProduct, slaveMap);\n }\n\n }", "private static DataSources toDataSources(OutputGenerator outputGenerator, List<DataSource> sharedDataSources) {\n final List<DataSource> dataSources = outputGenerator.getDataSources();\n final SeedType seedType = outputGenerator.getSeedType();\n\n if (seedType == SeedType.TEMPLATE) {\n return new DataSources(ListUtils.concatenate(dataSources, sharedDataSources));\n } else if (seedType == SeedType.DATASOURCE) {\n // Since every data source shall generate an output there can be only 1 datasource supplied.\n Validate.isTrue(dataSources.size() == 1, \"One data source expected for generation driven by data sources\");\n return new DataSources(dataSources);\n } else {\n throw new IllegalArgumentException(\"Don't know how to handle the seed type: \" + seedType);\n }\n }", "public void initialize(String source);", "private void buildMediaSource(Uri uri){\n DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();\n //Produces DataSource instances through which media data is loaded\n DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(this,\n Util.getUserAgent(this, getString(R.string.app_name)), bandwidthMeter);\n // This is the MediaSource representing the media to be played.\n MediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)\n .createMediaSource(uri);\n //Prepare the player with the source\n mPlayer.prepare(videoSource);\n mPlayer.setPlayWhenReady(true);\n mPlayer.addListener(this);\n }", "public SourceLister(String []srcDirs) {\n this.srcDirs = srcDirs;\n }", "private byte[] obtainPackets4Source(Packet packet){\n\t\t//filter IPV6\n\t\tif(packet.contains(IpPacket.class)){\n\t\t\t\n\t\t\tIpPacket ipPkt = packet.get(IpPacket.class);\n\t\t\tIpHeader ipHeader = ipPkt.getHeader();\n\t\t\n\t\t\tbyte[] src=ipHeader.getSrcAddr().getAddress();\n\t\t\tbyte[] dest = ipHeader.getDstAddr().getAddress();\n\t\t\t//source\n\t\tif(LogicController.headerChoice==1){\n\t\t\treturn src;\n\t\t\t\n\t\t\t\n\t\t}else if(LogicController.headerChoice==2){\n\t\t//source dest\n\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t\n\t\t}else if(LogicController.headerChoice==3){\n\t\t//3: source source port\n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\tbyte[] port = theader.getSrcPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(src,port);\n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\tUdpPacket udpPacket = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader uh = udpPacket.getHeader();\n\t\t\t\tbyte[] port = uh.getSrcPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(src,port);\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t}else if(LogicController.headerChoice==4){\n\t\t\t//4: dest dest port\t\n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\tbyte[] port = ByteArrays.toByteArray(theader.getDstPort().valueAsInt());\n\t\t\t\treturn ByteArrays.concatenate(dest,port);\n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\tUdpPacket udpPacket = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader uh = udpPacket.getHeader();\n\t\t\t\tbyte[] port = uh.getDstPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(dest,port);\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t}\n\t\t}else if(LogicController.headerChoice==5){\n\t\t\t \n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\t\t\t\t\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\t\n\t\t\t\tbyte[] a = ByteArrays.concatenate(src,dest);\n\t\t\t\t //byte[] ipHeaderBytes = ByteArrays.concatenate(a,new byte[]{ipHeader.getProtocol().value().byteValue()});\n\t\t\t\t \n\t\t\t\t byte[] tVal =ByteArrays.concatenate(theader.getSrcPort().valueAsString().getBytes(),theader.getDstPort().valueAsString().getBytes());\n\t\t\t\t \n\t\t\t\t//src,dst,protocol,\n\t\t\t\t\t//Key key = new Key(ByteArrays.concatenate(ipHeaderBytes,tVal));\n\t\t\t\t\t\n\t\t\t\t\t//source\n\t\t\t\t\t//return new byte[](key,1);\n\t\t\t\t return ByteArrays.concatenate(a,tVal);\n\t\t\t\t \n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\t\t\n\t\t\t\tUdpPacket tcpPkt = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader theader = tcpPkt.getHeader();\n\t\n\tbyte[] a = ByteArrays.concatenate(src,dest);\n\t //byte[] ipHeaderBytes = ByteArrays.concatenate(a,new byte[]{ipHeader.getProtocol().value().byteValue()});\n\t \n\t byte[] tVal =ByteArrays.concatenate(theader.getSrcPort().valueAsString().getBytes(),theader.getDstPort().valueAsString().getBytes());\n\t \n\t//src,dst,protocol,\n\t\t//Key key = new Key(ByteArrays.concatenate(ipHeaderBytes,tVal));\n\t\t\n\t\t//source\n\t\t//return new byte[](key,1);\n\t return ByteArrays.concatenate(a,tVal);\t \n}\n\t\t\t\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src,dest);\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\treturn ByteArrays.concatenate(src,dest);\n\t\t}\n\t}else{\n\t\treturn null;}\n\t}", "public CombinedSource(FileManager fm, AuthMap am, Resource ep) {\n constructs = ep.listProperties(EXTRAS.construct).mapWith(toString).toList();\n matches = ep.listProperties(EXTRAS.match).mapWith(toString).toList();\n sources = ep.listProperties(EXTRAS.element).mapWith(toSource(fm, am)).toList();\n }", "public SourceTypeConfiguration() {\n\n\t}", "public void setCardDataSources(Vector<DataSource> sources) {\n cardDataSources = sources;\n }", "public interface Source {\n /** NewTextSource creates a new Source from the input text string. */\n static Source newTextSource(String text) {\n return newStringSource(text, \"<input>\");\n }\n\n /** NewStringSource creates a new Source from the given contents and description. */\n static Source newStringSource(String contents, String description) {\n // Compute line offsets up front as they are referred to frequently.\n IntArrayList offsets = new IntArrayList();\n for (int i = 0; i <= contents.length(); ) {\n if (i > 0) {\n // don't add '0' for the first line, it's implicit\n offsets.add(i);\n }\n int nl = contents.indexOf('\\n', i);\n if (nl == -1) {\n offsets.add(contents.length() + 1);\n break;\n } else {\n i = nl + 1;\n }\n }\n\n return new SourceImpl(contents, description, offsets);\n }\n\n /** NewInfoSource creates a new Source from a SourceInfo. */\n static Source newInfoSource(SourceInfo info) {\n return new SourceImpl(\n \"\", info.getLocation(), info.getLineOffsetsList(), info.getPositionsMap());\n }\n\n /**\n * Content returns the source content represented as a string. Examples contents are the single\n * file contents, textbox field, or url parameter.\n */\n String content();\n\n /**\n * Description gives a brief description of the source. Example descriptions are a file name or ui\n * element.\n */\n String description();\n\n /**\n * LineOffsets gives the character offsets at which lines occur. The zero-th entry should refer to\n * the break between the first and second line, or EOF if there is only one line of source.\n */\n List<Integer> lineOffsets();\n\n /**\n * LocationOffset translates a Location to an offset. Given the line and column of the Location\n * returns the Location's character offset in the Source, and a bool indicating whether the\n * Location was found.\n */\n int locationOffset(Location location);\n\n /**\n * OffsetLocation translates a character offset to a Location, or false if the conversion was not\n * feasible.\n */\n Location offsetLocation(int offset);\n\n /**\n * NewLocation takes an input line and column and produces a Location. The default behavior is to\n * treat the line and column as absolute, but concrete derivations may use this method to convert\n * a relative line and column position into an absolute location.\n */\n Location newLocation(int line, int col);\n\n /** Snippet returns a line of content and whether the line was found. */\n String snippet(int line);\n}", "public String[] getAllSources() {\n return this.sourceList.toArray(new String[0]);\n }", "private void createSource(String sourceName, String content) {\n\t\t\n\t}", "@Override\n\tpublic void init () {\n\t\tframeBuffers = new FrameBuffer[getPassQuantity()];\n\t\tpassShaderProviders = new ShaderProvider[getPassQuantity()];\n\n\t\tfor (int i = 0; i < getPassQuantity(); i++) {\n\t\t\tinit(i);\n\t\t}\n\t}", "private void createSourceCollection() throws Exception {\n List<String> nodeNames = this.startServers(shardCount * replicationFactor);\n this.collectionToNodeNames.put(SOURCE_COLLECTION, nodeNames);\n this.createCollection(SOURCE_COLLECTION);\n this.waitForRecoveriesToFinish(SOURCE_COLLECTION, true);\n this.updateMappingsFromZk(SOURCE_COLLECTION);\n }", "private <K, V> Source newIsmSource(IsmRecordCoder<WindowedValue<V>> coder, String tmpFilePath) {\n Source source = new Source();\n source.setCodec(\n CloudObjects.asCloudObject(\n WindowedValue.getFullCoder(coder, GLOBAL_WINDOW_CODER), /*sdkComponents=*/ null));\n source.setSpec(new HashMap<String, Object>());\n source.getSpec().put(PropertyNames.OBJECT_TYPE_NAME, \"IsmSource\");\n source.getSpec().put(WorkerPropertyNames.FILENAME, tmpFilePath);\n return source;\n }", "public java.util.List<org.landxml.schema.landXML11.SourceDataDocument.SourceData> getSourceDataList()\r\n {\r\n final class SourceDataList extends java.util.AbstractList<org.landxml.schema.landXML11.SourceDataDocument.SourceData>\r\n {\r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData get(int i)\r\n { return SurfaceImpl.this.getSourceDataArray(i); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData set(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.setSourceDataArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n { SurfaceImpl.this.insertNewSourceData(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData remove(int i)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.removeSourceData(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfSourceDataArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new SourceDataList();\r\n }\r\n }", "public static PacketSource makeSF(String host, int port) {\n\treturn new SFSource(host, port);\n }", "public static PacketSource makeArgsNetwork(String args) {\n\tif (args == null)\n\t return null;\n\n\tParseArgs parser = new ParseArgs(args, \":,\");\n\tString host = parser.next();\n\tString portS = parser.next();\n\tString platformS = parser.next();\n\tif (portS == null)\n\t return null;\n\tint port = Integer.parseInt(portS);\n\tint platform;\n\tif (platformS == null) \n\t platform = Platform.defaultPlatform;\n\telse\n\t platform = Platform.decodePlatform(platformS);\n\n\treturn makeNetwork(host, port, platform);\n }", "static DataSource[] _getDataSources () throws Exception {\n SearchOptions opts = new SearchOptions (null, 1, 0, 1000); \n TextIndexer.SearchResult results = _textIndexer.search(opts, null);\n Set<String> labels = new TreeSet<String>();\n for (TextIndexer.Facet f : results.getFacets()) {\n if (f.getName().equals(SOURCE)) {\n for (TextIndexer.FV fv : f.getValues())\n labels.add(fv.getLabel());\n }\n }\n\n Class[] entities = new Class[]{\n Disease.class, Target.class, Ligand.class\n };\n\n List<DataSource> sources = new ArrayList<DataSource>();\n for (String la : labels ) {\n DataSource ds = new DataSource (la);\n for (Class cls : entities) {\n opts = new SearchOptions (cls, 1, 0, 100);\n results = _textIndexer.search(opts, null);\n for (TextIndexer.Facet f : results.getFacets()) {\n if (f.getName().equals(SOURCE)) {\n for (TextIndexer.FV fv : f.getValues())\n if (la.equals(fv.getLabel())) {\n if (cls == Target.class)\n ds.targets = fv.getCount();\n else if (cls == Disease.class)\n ds.diseases = fv.getCount();\n else\n ds.ligands = fv.getCount();\n }\n }\n }\n }\n Logger.debug(\"DataSource: \"+la);\n Logger.debug(\" + targets: \"+ds.targets);\n Logger.debug(\" + ligands: \"+ds.ligands);\n Logger.debug(\" + diseases: \"+ds.diseases);\n \n sources.add(ds);\n }\n\n return sources.toArray(new DataSource[0]);\n }", "public static PoolingDataSource setupDataSource() {\n\t\tPoolingDataSource pds = new PoolingDataSource();\n\t\tpds.setUniqueName(\"jdbc/jbpm-ds\");\n\t\tpds.setClassName(\"bitronix.tm.resource.jdbc.lrc.LrcXADataSource\");\n\t\tpds.setMaxPoolSize(5);\n\t\tpds.setAllowLocalTransactions(true);\n\t\tpds.getDriverProperties().put(\"user\", \"jbpm6_user\");\n\t\tpds.getDriverProperties().put(\"password\", \"jbpm6_pass\");\n\t\tpds.getDriverProperties().put(\"url\", \"jdbc:mysql://localhost:3306/jbpm6\");\n\t\tpds.getDriverProperties().put(\"driverClassName\", \"com.mysql.jdbc.Driver\");\n\t\tpds.init();\n\t\treturn pds;\n\t}", "@com.exedio.cope.instrument.Generated // customize with @WrapperType(genericConstructor=...)\n\t\tprivate Source(final com.exedio.cope.SetValue<?>... setValues){super(setValues);}", "@com.exedio.cope.instrument.Generated\n\t\tprivate Source(final com.exedio.cope.ActivationParameters ap){super(ap);}", "public @NotNull List<MediaSource> getMediaSources()\n {\n return getChildExtensionsOfType(MediaSource.class);\n }", "private void initialize() {\n\n\t\tint totalSets, iSet;\n\t\tInformationSet infoSet = null;\n\t\tTreeNode treeNode = null;\n\n\t\tArrayList informationSetList = efg.getInformationSets(iPlayer);\n\n\t\ttotalSets = informationSetList.size();\n\n\t\tmovesLists = new ArrayList[totalSets];\n\t\tprobsLists = new ArrayList[totalSets];\n\n\t\tfor (iSet = 0; iSet < totalSets; iSet++) {\n\t\t\tmovesLists[iSet] = new ArrayList();\n\t\t\tprobsLists[iSet] = new ArrayList();\n\t\t}\n\n\t\tfor (iSet = 0; iSet < totalSets; iSet++) {\n\t\t\tinfoSet = (InformationSet) informationSetList.get(iSet);\n\t\t\ttreeNode = infoSet.getTreeNode(0);\n\t\t\tmovesLists[iSet] = treeNode.getMovesList();\n\t\t}\n\t}", "public SourceCode() {\n }", "public DataSourceFactory() {}", "<R> Streamlet<R> newSource(IRichSpout spout);", "private void prepare(Source s) {\r\n source = s;\r\n input = source.rawText();\r\n ok = true;\r\n start = in = out = marked = lookahead = 0;\r\n failures = new TreeSet<>();\r\n output = new StringBuffer();\r\n outCount = 0;\r\n }", "Mixer(int probes)\n\t{\n\t\tsuper();\n\t\t//this.probes\n\t\tprobe = new Probe[probes]; \n\n\t\tint i;\n\t\tfor(i=0;i<probes;i++)\n\t\t\tprobe[i] = new Probe(\"Source\"+i);\n\t}", "private DataSource.Factory buildDataSourceFactory(DefaultBandwidthMeter bandwidthMeter) {\n return new DefaultDataSourceFactory(this, bandwidthMeter, buildHttpDataSourceFactory(bandwidthMeter));\n }", "public static PacketSource makeArgsSF(String args) {\n\tif (args == null)\n\t args = \"localhost:9001\";\n\n\tParseArgs parser = new ParseArgs(args, \":\");\n\tString host = parser.next();\n\tString portS = parser.next();\n\tif (portS == null)\n\t return null;\n\tint port = Integer.parseInt(portS);\n\n\treturn makeSF(host, port);\n }", "@Test\n\tpublic void testSingleSourceConstruct() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_singleSource02.rq\", \"/tests/basic/query_singleSource02.ttl\", false);\n\t}", "public PacketAssembler()\n {\n \tthis.theTreeMaps = new TreeMap<Integer, TreeMap<Integer,String>>();\n \tthis.countPerMessage = new TreeMap<Integer,Integer>();\n }", "public LcpPacketFactory(PppParser parent) {\n parent.super(0xc021);\n packetFactories = new LcpPacketMap(this);\n configFactories = new LcpConfigMap(this);\n\n // Register LCP configuration option factories\n new LcpConfigMruFactory(this);\n new LcpConfigAccmFactory(this);\n new LcpConfigAuthFactory(this);\n new LcpConfigQualityFactory(this);\n new LcpConfigMagicNumFactory(this);\n new LcpConfigPfcFactory(this);\n new LcpConfigAcfcFactory(this);\n\n // Register LCP packet parser factories\n new LcpPacketConfigureFactory(this, configFactories, Types.REQ);\n new LcpPacketConfigureFactory(this, configFactories, Types.ACK);\n new LcpPacketConfigureFactory(this, configFactories, Types.NAK);\n new LcpPacketConfigureFactory(this, configFactories, Types.REJ);\n new LcpPacketTerminateFactory(this, LcpPacketTerminateFactory.Types.REQ);\n new LcpPacketTerminateFactory(this, LcpPacketTerminateFactory.Types.ACK);\n \n }", "@Override\n\tprotected PacketManager<ISDSRPacket> initializePacketManager(HashMap<String, String> params) {\n\t\treturn new ISDSRPacketManager();\n\t}", "public abstract void buildStartSource(OutputStream out, SourceObjectDeclared o) throws IOException;", "private MediaSource createMediaSource(){\n DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(mcontainer.getContext(),\n Util.getUserAgent(mcontainer.getContext(), \"MicroMobility\"));\n\n // This is the MediaSource representing the media to be played.\n Uri uri = Uri.fromFile(mediafile);\n MediaSource videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory).createMediaSource(uri);\n // Clip to start at 5 seconds and end at 10 seconds.\n ClippingMediaSource clippingSource =new ClippingMediaSource(videoSource,/* startPositionUs= */ 0_000_000,/* endPositionUs= */ C.TIME_END_OF_SOURCE);\n return videoSource;\n }", "public FilterSource[] getFilterSources();", "public OLWMTSSource(){\n\t\tsuper();\n\t}", "@Inject\n public PluginManager(Set<PluginSource> pluginSources, Injector injector)\n {\n this.sources = ImmutableList.copyOf(pluginSources);\n this.injector = injector;\n }", "private Source() {\n throw new AssertionError(\"This class should not be instantiated.\");\n }", "public PoolNYCH() {\n\t\tinicializarDataSource();\n\t}", "public FileSourceGraphML() {\n\t\tevents = new Stack<XMLEvent>();\n\t\tkeys = new HashMap<String, Key>();\n\t\tdatas = new LinkedList<Data>();\n\t\tgraphId = new Stack<String>();\n\t\tgraphCounter = 0;\n\t\tsourceId = String.format(\"<GraphML stream %x>\", System.nanoTime());\n\t}", "private AdsMediaSource buildMediaSource(Uri uri) {\n /*DataSource.Factory dataSourceFactory =\n new DefaultDataSourceFactory(this, Util.getUserAgent(this, \"playlist\"));*/\n hlsMediaSource = new HlsMediaSource.Factory(dataSourceFactory).setPlaylistParserFactory(\n new DefaultHlsPlaylistParserFactory(getOfflineStreamKeys(uri)))\n .createMediaSource(uri);\n ;\n return new AdsMediaSource(hlsMediaSource,\n dataSourceFactory,\n adsLoader,\n simpleExoPlayerView.getOverlayFrameLayout());\n }", "private void buildSourceTable()\n {\n // validate\n Util.argCheckNull(_dt);\n\n // get entities\n try\n {\n DataSourceDobj ds = _dt.getSourceDataSource();\n Util.argCheckNull(ds);\n Vector entities = ds.getEntities();\n\n // iterate entities\n EntityDobj ent;\n for(int i = 0; entities != null && i < entities.size(); i++)\n {\n // get the entity\n ent = (EntityDobj)entities.elementAt(i);\n\n // add to source table if not in target table\n if(ent != null)\n {\n // search target list\n boolean inTarget = false;\n TransferEntity te;\n for(int j = 0; !inTarget && j < _lstTarget.getDefaultModel().getSize(); j++)\n {\n te = (TransferEntity)_lstTarget.getDefaultModel().getElementAt(j);\n if(te != null && te.getSourceEntityName().equalsIgnoreCase(ent.getName()))\n inTarget = true;\n }\n\n // if !inTarget add to source\n if(!inTarget)\n _lstSource.addItem(ent);\n }\n }\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"TransferEntitiesPanel.buildSourceTable: \" + e.toString());\n }\n }", "public void init(){\n\t\tmultiplexingClientServer = new MultiplexingClientServer(selectorCreator);\n\t}", "public PluginChain(AudioSource source) {\n\t\tthis.source = source;\n\n\t\tplugins = new Vector<AudioPlugin>();\n\n\t}", "private void createCameraSource() {\n\n int facing = CameraSource.CAMERA_FACING_FRONT;\n\n // If there's no existing cameraSource, create one.\n if (cameraSource == null) {\n cameraSource = new CameraSource(this, graphicOverlay);\n }\n\n CameraSource.setFacing(facing);\n cameraSource.setMachineLearningFrameProcessor(\n new FaceDetectorProcessor(this, defaultOptions));\n }", "public static PacketSource makeNetwork(String host, int port, int platform) {\n\treturn new Packetizer(\"network@\" + host + \":\" + port,\n\t\t\t new NetworkByteSource(host, port), platform);\n }", "private <K, V> Source initInputFile(\n Iterable<IsmRecord<WindowedValue<V>>> elements, IsmRecordCoder<WindowedValue<V>> coder)\n throws Exception {\n return initInputFile(elements, coder, tmpFolder.newFile().getPath());\n }", "private SourcecodePackage() {}", "public DataSourceDetail(DataSourceDetail source) {\n if (source.Id != null) {\n this.Id = new String(source.Id);\n }\n if (source.Title != null) {\n this.Title = new String(source.Title);\n }\n if (source.Name != null) {\n this.Name = new String(source.Name);\n }\n if (source.Type != null) {\n this.Type = new String(source.Type);\n }\n if (source.Description != null) {\n this.Description = new String(source.Description);\n }\n if (source.Schema != null) {\n this.Schema = new String(source.Schema);\n }\n if (source.CmsProject != null) {\n this.CmsProject = new String(source.CmsProject);\n }\n if (source.PkgId != null) {\n this.PkgId = new String(source.PkgId);\n }\n if (source.SchemaVersion != null) {\n this.SchemaVersion = new String(source.SchemaVersion);\n }\n if (source.CreatorId != null) {\n this.CreatorId = new String(source.CreatorId);\n }\n if (source.CreatedAt != null) {\n this.CreatedAt = new String(source.CreatedAt);\n }\n if (source.UpdatedAt != null) {\n this.UpdatedAt = new String(source.UpdatedAt);\n }\n if (source.EnvId != null) {\n this.EnvId = new String(source.EnvId);\n }\n if (source.DataSourceVersion != null) {\n this.DataSourceVersion = new String(source.DataSourceVersion);\n }\n if (source.AppUsageList != null) {\n this.AppUsageList = new DataSourceLinkApp[source.AppUsageList.length];\n for (int i = 0; i < source.AppUsageList.length; i++) {\n this.AppUsageList[i] = new DataSourceLinkApp(source.AppUsageList[i]);\n }\n }\n if (source.PublishedAt != null) {\n this.PublishedAt = new String(source.PublishedAt);\n }\n if (source.ChildDataSourceIds != null) {\n this.ChildDataSourceIds = new String[source.ChildDataSourceIds.length];\n for (int i = 0; i < source.ChildDataSourceIds.length; i++) {\n this.ChildDataSourceIds[i] = new String(source.ChildDataSourceIds[i]);\n }\n }\n if (source.Fun != null) {\n this.Fun = new String(source.Fun);\n }\n if (source.ScfStatus != null) {\n this.ScfStatus = new Long(source.ScfStatus);\n }\n if (source.Methods != null) {\n this.Methods = new String(source.Methods);\n }\n if (source.ChildDataSourceNames != null) {\n this.ChildDataSourceNames = new String[source.ChildDataSourceNames.length];\n for (int i = 0; i < source.ChildDataSourceNames.length; i++) {\n this.ChildDataSourceNames[i] = new String(source.ChildDataSourceNames[i]);\n }\n }\n if (source.IsNewDataSource != null) {\n this.IsNewDataSource = new Long(source.IsNewDataSource);\n }\n if (source.ViewId != null) {\n this.ViewId = new String(source.ViewId);\n }\n if (source.Configuration != null) {\n this.Configuration = new String(source.Configuration);\n }\n if (source.TemplateCode != null) {\n this.TemplateCode = new String(source.TemplateCode);\n }\n if (source.Source != null) {\n this.Source = new Long(source.Source);\n }\n if (source.PublishVersion != null) {\n this.PublishVersion = new String(source.PublishVersion);\n }\n if (source.PublishViewId != null) {\n this.PublishViewId = new String(source.PublishViewId);\n }\n if (source.SubType != null) {\n this.SubType = new String(source.SubType);\n }\n if (source.AuthStatus != null) {\n this.AuthStatus = new Long(source.AuthStatus);\n }\n if (source.AuthInfo != null) {\n this.AuthInfo = new TicketAuthInfo(source.AuthInfo);\n }\n }", "public List<String> getSources() {\n\t\treturn this.sources;\n\t}", "public FileBasedConfigSource() {\n // Intentionally empty.\n }", "public AbstractPacketizer()\n {\n addControl(new PSC());\n }", "public void sourceInit(Tap tap, JobConf jobConf) throws IOException {\n }", "public void init() {\n initLayers();\n for (int i = 0; i < indivCount; i++) {\n ArrayList<Layer> iLayers = new ArrayList<>();\n for (Layer l : layers)\n iLayers.add(l.cloneSettings());\n individuals[i] = new Individual(iLayers);\n }\n }", "@Override\n\tpublic List<String> getAllAGBSources() {\n\t\t\n\t\treturn allAGBSources;\n\t}", "public Packet(int source, int dest, int DSCP){\r\n\t\ttry{\r\n\t\t\tthis.source = source;\r\n\t\t\tthis.dest = dest;\r\n\t\t\tthis.DSCP = DSCP;\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public Pool() {\n\t\t// inicializaDataSource();\n\t}", "void generateConnectionSource(JavaConnectionSourceDefinition definition, LogicalProducer producer) throws GenerationException;", "@Override\n protected LoadedSource loadSource(Context context) {\n JpaClassConfig config = context.get(JpaClassConfig.class);\n Connection connection = null;\n try {\n connection = connect(config.getConnection());\n List<JavaType> result = new ArrayList<JavaType>();\n result.addAll(addEntityTypesFromTable(connection, context));\n result.addAll(addEntityTypesFromNamedSql(connection, context));\n LoadedSourceImpl loadedSource = new LoadedSourceImpl();\n loadedSource.setJavaTypes(result);\n if (context.contains(ClassLoader.class)) {\n loadedSource.setClassLoader(context.get(ClassLoader.class));\n }\n return loadedSource;\n } finally {\n\n try {\n if (connection != null) connection.close();\n } catch (SQLException ignore) {\n }\n }\n\n }", "public static PacketSource makeArgsOldSF(String args) {\n\tif (args == null)\n\t args = \"localhost:9000\";\n\n\tParseArgs parser = new ParseArgs(args, \":,\");\n\tString host = parser.next();\n\tString portS = parser.next();\n\tif (portS == null)\n\t return null;\n\tint port = Integer.parseInt(portS);\n\tString packetSizeS = parser.next();\n\n\tif (packetSizeS == null) {\n\t return makeOldSF(host, port);\n\t}\n\telse {\n\t int packetSize = Integer.parseInt(packetSizeS);\n\t return makeOldSF(host, port, packetSize);\n\t}\n }", "public static ArrayList<DigitalNewspapers> getDigitalNewsSources(){\n\n Uri builtUri = Uri.parse(BASE_NEWSAPI_SOURCES_EP).buildUpon()\n .build();\n\n URL url = null;\n\n try {\n url = new URL(builtUri.toString());\n return doCall(url);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public Builder addMediaSource(MediaSource pt)\n {\n mediaSources.add(pt);\n return this;\n }", "protected SourceData createSourceData(final CheckoutComAchPaymentInfoModel achPaymentInfo) {\n final SourceData sourceData = new SourceData();\n sourceData.put(ACCOUNT_HOLDER_NAME_SOURCE_KEY, achPaymentInfo.getAccountHolderName());\n sourceData.put(ACCOUNT_TYPE_SOURCE_KEY, achPaymentInfo.getAccountType() != null ? achPaymentInfo.getAccountType().getCode() : null);\n sourceData.put(ACCOUNT_NUMBER_SOURCE_KEY, achPaymentInfo.getAccountNumber());\n sourceData.put(ROUTING_NUMBER_SOURCE_KEY, achPaymentInfo.getRoutingNumber());\n\n final BillingDescriptor billingDescriptor = checkoutComMerchantConfigurationService.getBillingDescriptor();\n validateParameterNotNull(billingDescriptor, \"BillingDescriptor cannot be null\");\n sourceData.put(BILLING_DESCRIPTOR_SOURCE_KEY, billingDescriptor.getBillingDescriptorName());\n\n if (StringUtils.isNotBlank(achPaymentInfo.getCompanyName())) {\n sourceData.put(COMPANY_NAME_SOURCE_KEY, achPaymentInfo.getCompanyName());\n }\n return sourceData;\n }", "public PacketHandler() {}", "private void initialize()\r\n\t{\r\n\t\tif (!isFilterOn())\r\n\t\t\treturn;\r\n\t\tselectTools = selectApi = selectExtra = selectGeneric = false;\r\n\t\tselectTools = \r\n\t\t\t\tpackageTypeSet.contains(PackageType.build_tools) ||\r\n\t\t\t\tpackageTypeSet.contains(PackageType.platform_tools) ||\r\n\t\t\t\tpackageTypeSet.contains(PackageType.tools);\r\n\t\tselectApi =\r\n\t\t\t\tpackageTypeSet.contains(PackageType.platforms) ||\r\n\t\t\t\tpackageTypeSet.contains(PackageType.add_ons) ||\r\n\t\t\t\tpackageTypeSet.contains(PackageType.system_images) ||\r\n\t\t packageTypeSet.contains(PackageType.sources);\r\n\t\tselectExtra = packageTypeSet.contains(PackageType.extras);\r\n\t\t\r\n\t\tfor (int i = 0; i < GENERIC_PACKAGE_TYPES.length; ++i)\r\n\t\t\tif (packageTypeSet.contains(GENERIC_PACKAGE_TYPES[i])) {\r\n\t\t\t\tselectGeneric = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t}", "public void initsource(int seqnum) {\n if (this.probation <= 0) {\n this.active = true;\n setSender(true);\n }\n this.baseseq = seqnum;\n this.maxseq = seqnum - 1;\n this.lastbadseq = -2;\n this.cycles = 0;\n this.received = 0;\n this.bytesreceived = 0;\n this.lastRTPReceiptTime = 0;\n this.lasttimestamp = 0;\n this.jitter = Pa.LATENCY_UNSPECIFIED;\n this.prevmaxseq = this.maxseq;\n this.prevlost = 0;\n }", "private void initializePlayers()\n\t{\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\t// Distribute personality cards\n\t\t\tplayer.setPersonalityCard(board.getPersonalityCardDeck().pickTopCard());\n\t\t\t\n\t\t\t// Distribute money\n\t\t\tboard.getBankAccount().transfertAmountTo(player, nbGoldStartPerPlayer, false);\n\t\t\t\n\t\t\t// Distribute minions\n\t\t\tfor(int i = 0; i < nbMinionsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addMinion(new Minion());\n\t\t\t}\n\t\t\t\n\t\t\t// Distribute buildings\n\t\t\tfor(int i = 0; i < nbBuildingsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addBuilding(new Building());\n\t\t\t}\n\t\t}\n\n\t\t// Distribute player cards\n\t\tfor(int i = 0; i < nbInitCards; i++)\n\t\t{\n\t\t\tfor(Player player : playerList)\n\t\t\t{\n\t\t\t\tplayer.getPlayerCardDeck().addCard(board.getPlayerCardDeck().pickTopCard());\n\t\t\t}\n\t\t}\n\t}", "public ConnectionMonitorSource() {\n }", "List<TdbPublisherWsSource> createUniverse() {\n final String DEBUG_HEADER = \"createUniverse(): \";\n\n // Get all the title database publishers.\n Collection<TdbPublisher> allTdbPublishers =\n\tTdbUtil.getTdb().getAllTdbPublishers().values();\n if (log.isDebug3()) log.debug3(DEBUG_HEADER + \"allTdbPublishers.size() = \"\n\t+ allTdbPublishers.size());\n\n // Initialize the universe.\n List<TdbPublisherWsSource> universe =\n\tnew ArrayList<TdbPublisherWsSource>(allTdbPublishers.size());\n\n // Loop through all the title database publishers.\n for (TdbPublisher tdbPublisher : allTdbPublishers) {\n // Add the object initialized with this title database publisher to the\n // universe of objects.\n universe.add(new TdbPublisherWsSource(tdbPublisher));\n }\n\n if (log.isDebug2())\n log.debug2(DEBUG_HEADER + \"universe.size() = \" + universe.size());\n return universe;\n }", "private void setupStreams() {\n\t\ttry {\n\t\t\tthis.out = new ObjectOutputStream(this.sock.getOutputStream());\n\t\t\tthis.out.flush();\n\t\t\tthis.in = new ObjectInputStream(this.sock.getInputStream());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.6561342", "0.6203854", "0.5958677", "0.59452176", "0.5943635", "0.5823983", "0.5693971", "0.5546683", "0.5526907", "0.55046123", "0.5487663", "0.5479826", "0.54680026", "0.54579663", "0.5435493", "0.5413052", "0.54106927", "0.5386237", "0.5361024", "0.52975804", "0.52601635", "0.52371085", "0.5236013", "0.5231623", "0.5215858", "0.5201842", "0.5174966", "0.5166241", "0.5151951", "0.51161957", "0.5107987", "0.5094892", "0.50855535", "0.50845873", "0.5072281", "0.5063726", "0.50527877", "0.50118554", "0.50102717", "0.5006726", "0.49931148", "0.49909532", "0.4987408", "0.4985611", "0.49811196", "0.49717024", "0.4964609", "0.49467266", "0.49224085", "0.49019265", "0.48920998", "0.48860407", "0.4885999", "0.48859897", "0.48857784", "0.487564", "0.4874109", "0.4870307", "0.48683226", "0.48671016", "0.4865064", "0.48471323", "0.48300493", "0.48291603", "0.48269498", "0.4822116", "0.48127514", "0.4809166", "0.48076653", "0.47822735", "0.47821578", "0.4774818", "0.4767364", "0.47643036", "0.47601557", "0.47600797", "0.47546378", "0.4753339", "0.47474384", "0.47412857", "0.47395673", "0.4739062", "0.47355032", "0.47320473", "0.47305623", "0.47296277", "0.47275865", "0.4726035", "0.47162452", "0.47083464", "0.46996763", "0.46979532", "0.4685734", "0.46808678", "0.46800315", "0.46695727", "0.46691903", "0.46616822", "0.46555996", "0.46482167" ]
0.6191319
2
Construct sources from a builder used by Builderbuild().
private Sources(Builder b) { super(NAMESPACE, ELEMENT); for (MediaSource ms: b.mediaSources) { addChildExtension(ms); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Pair<String, SourceBuilder>> getSourceBuilders() {\n List<Pair<String, SourceBuilder>> builders =\n new ArrayList<Pair<String, SourceBuilder>>();\n builders.add(new Pair<String, SourceBuilder>(\"helloWorldSource\", builder()));\n return builders;\n }", "public Builder(Object source) {\n this.source = source;\n }", "static Builder builder() {\n return new SourceContextImpl.Builder();\n }", "static Builder builder(SourceContext source) {\n return new SourceContextImpl.Builder((SourceContextImpl) source);\n }", "public interface Builder {\n static Builder newBuilder() {\n return new BuilderImpl();\n }\n\n /**\n * All sources of the computation should register using addSource.\n * @param supplier The supplier function that is used to create the streamlet\n */\n <R> Streamlet<R> newSource(SerializableSupplier<R> supplier);\n\n /**\n * Creates a new Streamlet using the underlying generator\n * @param generator The generator that generates the tuples of the streamlet\n * @param <R>\n * @return the new streamlet\n */\n <R> Streamlet<R> newSource(Source<R> generator);\n\n /**\n * Creates a new Streamlet using the provided spout\n * @param spout The spout that emits the tuples of the streamlet\n * @param <R>\n * @return the new streamlet\n */\n <R> Streamlet<R> newSource(IRichSpout spout);\n}", "public static SourceBuilder builder() {\n return new SourceBuilder() {\n @Override\n public EventSource build(Context ctx,String... argv) {\n if (argv.length == 1) {\n return new HelloWorldSource(argv[0]);\n } else{\n return new HelloWorldSource();\n } \n }\n };\n }", "SourceBuilder createRepository();", "private void constructSourceMetadata() throws Exception {\n final String masterTag = \"ifg\";\n final String slaveTag = \"dummy\";\n\n // get sourceMaster & sourceSlave MetadataElement\n final MetadataElement masterMeta = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n final String slaveMetadataRoot = AbstractMetadata.SLAVE_METADATA_ROOT;\n\n /* organize metadata */\n\n // put sourceMaster metadata into the masterMap\n metaMapPut(masterTag, masterMeta, sourceProduct, masterMap);\n\n // pug sourceSlave metadata into slaveMap\n MetadataElement[] slaveRoot = sourceProduct.getMetadataRoot().getElement(slaveMetadataRoot).getElements();\n for (MetadataElement meta : slaveRoot) {\n metaMapPut(slaveTag, meta, sourceProduct, slaveMap);\n }\n\n }", "SourceBuilder createService();", "private SecretManagerSource(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Builder() {}", "private SubmitConfigSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private DerivedFeatureSource(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SearchSourceBuilder buildBaseSearchSource() {\n long histogramSearchStartTime = Math.max(0, context.start - ExtractorUtils.getHistogramIntervalMillis(context.aggs));\n\n SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder()\n .size(0)\n .query(ExtractorUtils.wrapInTimeRangeQuery(context.query, context.timeField, histogramSearchStartTime, context.end));\n\n context.aggs.getAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n context.aggs.getPipelineAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n return searchSourceBuilder;\n }", "private Construct(Builder builder) {\n super(builder);\n }", "public static Builder builder(){ return new Builder(); }", "public Vendor(VendorBuilder builder){\r\n this.owner = builder.owner;\r\n this.address = builder.address;\r\n this.firstBrand = builder.firstBrand;\r\n this.secondBrand = builder.secondBrand;\r\n }", "private Report(Builder builder) {\n this.inputFileDir = builder.inputFileDir();\n this.inputFileName = builder.inputFileName();\n\n this.outputFileDir = builder.outputFileDir();\n this.outputFileName = builder.outputFileName();\n\n this.moduleList = builder.moduleList();\n\n this.outputHandler = builder.outputHandler();\n }", "private Builder() {\n\t\t}", "private BuilderUtils() {}", "public Builder() {}", "public Builder() {}", "public Builder() {}", "Lighter build();", "public com.google.api.servicemanagement.v1.ConfigSource.Builder getConfigSourceBuilder() {\n \n onChanged();\n return getConfigSourceFieldBuilder().getBuilder();\n }", "public void construct(){\n\t\tbuilder.buildPart1();\n\t\tbuilder.buildPart2();\n\t\tbuilder.retrieveResult();\n\t}", "PackageBuilder() {\n\t\tweightMap = new HashMap<>();\n\t\tcostMap = new HashMap<>();\n\t\tcombinations = new ArrayList<>();\n\t}", "protected void buildBootstrap() {\n String command = \"-prod -mac -o2 rom -strip:d j2me imp\";\n if (includeDebugger) {\n command += \" debugger\";\n }\n command += \" -- translator\";\n builder(command);\n }", "Object build();", "private void constructFrom(CriteriaBuilderImpl cb, AbstractQuery<?> q, Tree froms) {\n \t\tfor (int i = 0; i < froms.getChildCount(); i++) {\n \t\t\tfinal Tree from = froms.getChild(i);\n \t\t\t// root query from\n \t\t\tif (from.getType() == JpqlParser.ST_FROM) {\n \t\t\t\tfinal Aliased fromDef = new Aliased(from.getChild(0));\n \n \t\t\t\tfinal EntityTypeImpl<Object> entity = this.getEntity(fromDef.getQualified().toString());\n \n \t\t\t\tfinal RootImpl<Object> r = (RootImpl<Object>) q.from(entity);\n \t\t\t\tr.alias(fromDef.getAlias());\n \n \t\t\t\tthis.putAlias((BaseQueryImpl<?>) q, from, fromDef, r);\n \n \t\t\t\tthis.constructJoins(cb, (AbstractCriteriaQueryImpl<?>) q, r, from.getChild(1));\n \n \t\t\t\tif (from.getChild(from.getChildCount() - 1).getType() == JpqlParser.LALL_PROPERTIES) {\n \t\t\t\t\tfor (final AssociationMapping<?, ?, ?> association : entity.getAssociations()) {\n \t\t\t\t\t\tif (!association.isEager()) {\n \t\t\t\t\t\t\tfinal Iterator<String> pathIterator = Splitter.on(\".\").split(association.getPath()).iterator();\n \n \t\t\t\t\t\t\t// Drop the root part\n \t\t\t\t\t\t\tpathIterator.next();\n \n \t\t\t\t\t\t\tFetch<?, ?> fetch = null;\n \t\t\t\t\t\t\twhile (pathIterator.hasNext()) {\n \t\t\t\t\t\t\t\tfetch = fetch == null ? r.fetch(pathIterator.next()) : fetch.fetch(pathIterator.next());\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// in collection form\n \t\t\telse if (from.getType() == JpqlParser.ST_COLL) {\n \t\t\t\tfinal Aliased aliased = new Aliased(from.getChild(1));\n \n \t\t\t\tAbstractFrom<?, ?> parent = this.getAliased(q, from.getChild(0).getText());\n \n \t\t\t\tint depth = 0;\n \t\t\t\tfor (final String segment : aliased.getQualified().getSegments()) {\n \t\t\t\t\tif ((depth > 0) && (parent instanceof PluralJoin)) {\n \t\t\t\t\t\tthrow new PersistenceException(\"Cannot qualify, only embeddable joins within the path allowed, \" + \"line \" + from.getLine() + \":\"\n \t\t\t\t\t\t\t+ from.getCharPositionInLine());\n \t\t\t\t\t}\n \n \t\t\t\t\tparent = parent.join(segment, JoinType.LEFT);\n \n \t\t\t\t\tdepth++;\n \t\t\t\t}\n \n \t\t\t\tparent.alias(aliased.getAlias());\n \n \t\t\t\tthis.putAlias((BaseQueryImpl<?>) q, from.getChild(1), aliased, parent);\n \t\t\t}\n \n \t\t\t// sub query from\n \t\t\telse {\n \t\t\t\tfinal Aliased fromDef = new Aliased(from);\n \t\t\t\tfinal EntityTypeImpl<Object> entity = this.getEntity(fromDef.getQualified().toString());\n \n \t\t\t\tfinal RootImpl<Object> r = (RootImpl<Object>) q.from(entity);\n \t\t\t\tr.alias(fromDef.getAlias());\n \n \t\t\t\tthis.putAlias((BaseQuery<?>) q, from, fromDef, r);\n \t\t\t}\n \t\t}\n \t}", "public Path.Builder getSourcePathBuilder(\n int index) {\n return getSourcePathFieldBuilder().getBuilder(index);\n }", "private Compilation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "static Builder builder() {\n return new Builder();\n }", "private Builder(Gel_BioInf_Models.VirtualPanel.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.specificDiseaseTitle)) {\n this.specificDiseaseTitle = data().deepCopy(fields()[0].schema(), other.specificDiseaseTitle);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.panelVersion)) {\n this.panelVersion = data().deepCopy(fields()[1].schema(), other.panelVersion);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.ensemblVersion)) {\n this.ensemblVersion = data().deepCopy(fields()[2].schema(), other.ensemblVersion);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.dataModelCatalogueVersion)) {\n this.dataModelCatalogueVersion = data().deepCopy(fields()[3].schema(), other.dataModelCatalogueVersion);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.geneIds)) {\n this.geneIds = data().deepCopy(fields()[4].schema(), other.geneIds);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.Transcripts)) {\n this.Transcripts = data().deepCopy(fields()[5].schema(), other.Transcripts);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.relevantRegions)) {\n this.relevantRegions = data().deepCopy(fields()[6].schema(), other.relevantRegions);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.clinicalRelevantVariants)) {\n this.clinicalRelevantVariants = data().deepCopy(fields()[7].schema(), other.clinicalRelevantVariants);\n fieldSetFlags()[7] = true;\n }\n }", "public abstract Builder produces(String... paramVarArgs);", "public Source(final Aeron aeron, final Long2ObjectHashMap<TermBufferNotifier> notifierMap, final Builder builder)\n {\n this.aeron = aeron;\n this.notifierMap = notifierMap;\n this.destination = builder.destination;\n this.sessionId = builder.sessionId;\n this.mediaDriver = builder.mediaDriver;\n }", "private DataObject(Builder builder) {\n super(builder);\n }", "public Builder(final String preamble, final String epilogue)\n {\n ArgumentUtil.notNull(preamble, \"preamble\");\n ArgumentUtil.notNull(epilogue, \"epilogue\");\n _preamble = preamble;\n _epilogue = epilogue;\n //Append data source for preamble\n if (!_preamble.equalsIgnoreCase(\"\"))\n {\n final Writer preambleWriter =\n new ByteStringWriter(ByteString.copyString(_preamble, Charset.forName(\"US-ASCII\")));\n _allDataSources.add(preambleWriter);\n }\n }", "private ReducedCFGBuilder() {\n\t}", "@com.exedio.cope.instrument.Generated // customize with @WrapperType(genericConstructor=...)\n\t\tprivate Source(final com.exedio.cope.SetValue<?>... setValues){super(setValues);}", "public Builder() { }", "SourceBuilder createRestServiceLayers();", "protected void addBuildFunction(S source) {\n Function build =\n FunctionBuilder.of(source, \"build\", Purpose.build())\n .setReturnValue(new DataObject(new ObjectName(\"Widget\"), new PackageName(\"com.dummy\")))\n .addArgument(\n new DataObject(\n new ObjectName(\"BuildContext\"),\n new PackageName(\"com.dummy\"),\n new VariableName(\"context\")))\n .build();\n\n source.addFunction(build);\n }", "static Builder newBuilder() {\n return new Builder();\n }", "public abstract void buildStartSource(OutputStream out, SourceObjectDeclared o) throws IOException;", "public static abstract interface Builder\n/* */ {\n/* */ public abstract Builder paths(String... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder methods(RequestMethod... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder params(String... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder headers(String... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder consumes(String... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder produces(String... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder mappingName(String paramString);\n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder customCondition(RequestCondition<?> paramRequestCondition);\n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder options(RequestMappingInfo.BuilderConfiguration paramBuilderConfiguration);\n/* */ \n/* */ \n/* */ \n/* */ public abstract RequestMappingInfo build();\n/* */ }", "T2 build();", "public Builder setSourceBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n source_ = value;\n onChanged();\n return this;\n }", "abstract Object build();", "private ENFAutomaton build() {\n final Set<State> states = new HashSet<State>(this.states.values());\n final Set<State> acceptStates = new HashSet<State>(this.acceptStates.values());\n\n final Set<Input> alphabet = alphabetBuilder.build();\n\n final ENFAutomatonTransferFunction transferFunction = transferFunctionBuilder.build(this.states);\n\n return new ENFAutomaton(states, acceptStates, alphabet, transferFunction, initial);\n }", "private Builder() {\n }", "private Builder() {\n }", "private Builder(org.ga4gh.models.CallSet.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.id)) {\n this.id = data().deepCopy(fields()[0].schema(), other.id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.name)) {\n this.name = data().deepCopy(fields()[1].schema(), other.name);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.sampleId)) {\n this.sampleId = data().deepCopy(fields()[2].schema(), other.sampleId);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.variantSetIds)) {\n this.variantSetIds = data().deepCopy(fields()[3].schema(), other.variantSetIds);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.created)) {\n this.created = data().deepCopy(fields()[4].schema(), other.created);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.updated)) {\n this.updated = data().deepCopy(fields()[5].schema(), other.updated);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.info)) {\n this.info = data().deepCopy(fields()[6].schema(), other.info);\n fieldSetFlags()[6] = true;\n }\n }", "public LibraryBuilder() {\n\t\tthis.addToLibrary = new MyMusicLibrary();\n\t\tthis.addToArtiLibrary = new MyArtistLibrary();\n\t}", "public Builder() {\n\t\t}", "private Reader (Builder builder) {\n\t\tsuper(builder);\n\t}", "protected void generateInner(boolean verbose, SourceBuilder builder) {\n for (int i = 0; i < m_inners.size(); i++) {\n ((ClassHolder)m_inners.get(i)).generate(verbose, builder);\n }\n }", "private DataSource.Factory buildDataSourceFactory() {\n return ((DemoApplication) getApplication()).buildDataSourceFactory();\n }", "public Builder(){\n }", "private SupplierInfoBuilder() {\n }", "private Builder(com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.name)) {\n this.name = data().deepCopy(fields()[0].schema(), other.name);\n fieldSetFlags()[0] = other.fieldSetFlags()[0];\n }\n if (isValidValue(fields()[1], other.lastName)) {\n this.lastName = data().deepCopy(fields()[1].schema(), other.lastName);\n fieldSetFlags()[1] = other.fieldSetFlags()[1];\n }\n if (isValidValue(fields()[2], other.country)) {\n this.country = data().deepCopy(fields()[2].schema(), other.country);\n fieldSetFlags()[2] = other.fieldSetFlags()[2];\n }\n if (isValidValue(fields()[3], other.state)) {\n this.state = data().deepCopy(fields()[3].schema(), other.state);\n fieldSetFlags()[3] = other.fieldSetFlags()[3];\n }\n if (isValidValue(fields()[4], other.gender)) {\n this.gender = data().deepCopy(fields()[4].schema(), other.gender);\n fieldSetFlags()[4] = other.fieldSetFlags()[4];\n }\n if (isValidValue(fields()[5], other.date)) {\n this.date = data().deepCopy(fields()[5].schema(), other.date);\n fieldSetFlags()[5] = other.fieldSetFlags()[5];\n }\n if (isValidValue(fields()[6], other.height)) {\n this.height = data().deepCopy(fields()[6].schema(), other.height);\n fieldSetFlags()[6] = other.fieldSetFlags()[6];\n }\n if (isValidValue(fields()[7], other.weight)) {\n this.weight = data().deepCopy(fields()[7].schema(), other.weight);\n fieldSetFlags()[7] = other.fieldSetFlags()[7];\n }\n }", "public void buildFromCollection(List<? extends T> source) {\r\n\t\tsource.stream()\r\n\t\t\t\t.forEach(item -> addElement(item));\r\n\t}", "StatePac build();", "private SCTeamPrepare(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "protected abstract Builder<T> valid();", "T from(Source source);", "public Builder() {\n }", "@FunctionalInterface\n public interface Builder {\n BuildingModel build(int x, int y, int angle, int floor);\n }", "public void build() {\r\n // TODO\r\n }", "public abstract Object build();", "default Set<T> from(Set<Source> sources){\n return sources.stream()\n .map(this::from)\n .collect(Collectors.toSet());\n }", "public Builder withSource(File source) {\n this.source = checkNotNull(source);\n return this;\n }", "private Configuration createSourceElements(RoleBasedConfigurationContainerInternal configurations, ProviderFactory providerFactory, ObjectFactory objectFactory, SourceSet sourceSet) {\n String variantName = sourceSet.getName() + SOURCE_ELEMENTS_VARIANT_NAME_SUFFIX;\n\n @SuppressWarnings(\"deprecation\") Configuration variant = configurations.createWithRole(variantName, ConfigurationRolesForMigration.INTENDED_CONSUMABLE_BUCKET_TO_INTENDED_CONSUMABLE);\n variant.setDescription(\"List of source directories contained in the Main SourceSet.\");\n variant.setVisible(false);\n variant.extendsFrom(implementation);\n\n variant.attributes(attributes -> {\n attributes.attribute(Bundling.BUNDLING_ATTRIBUTE, objectFactory.named(Bundling.class, Bundling.EXTERNAL));\n attributes.attribute(Category.CATEGORY_ATTRIBUTE, objectFactory.named(Category.class, Category.VERIFICATION));\n attributes.attribute(VerificationType.VERIFICATION_TYPE_ATTRIBUTE, objectFactory.named(VerificationType.class, VerificationType.MAIN_SOURCES));\n });\n\n variant.getOutgoing().artifacts(\n sourceSet.getAllSource().getSourceDirectories().getElements().flatMap(e -> providerFactory.provider(() -> e)),\n artifact -> artifact.setType(ArtifactTypeDefinition.DIRECTORY_TYPE)\n );\n\n return variant;\n }", "private Builder(Value.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.kd_kelas)) {\n this.kd_kelas = data().deepCopy(fields()[0].schema(), other.kd_kelas);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.hari_ke)) {\n this.hari_ke = data().deepCopy(fields()[1].schema(), other.hari_ke);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.jam_mulai)) {\n this.jam_mulai = data().deepCopy(fields()[2].schema(), other.jam_mulai);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.jam_selesai)) {\n this.jam_selesai = data().deepCopy(fields()[3].schema(), other.jam_selesai);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.tgl_mulai_otomatis_buat_jadwal)) {\n this.tgl_mulai_otomatis_buat_jadwal = data().deepCopy(fields()[4].schema(), other.tgl_mulai_otomatis_buat_jadwal);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.tgl_berakhir_otomatis_buat_jadwal)) {\n this.tgl_berakhir_otomatis_buat_jadwal = data().deepCopy(fields()[5].schema(), other.tgl_berakhir_otomatis_buat_jadwal);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.aktif)) {\n this.aktif = data().deepCopy(fields()[6].schema(), other.aktif);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.kd_mk)) {\n this.kd_mk = data().deepCopy(fields()[7].schema(), other.kd_mk);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.nama_mk)) {\n this.nama_mk = data().deepCopy(fields()[8].schema(), other.nama_mk);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.nama_kelas)) {\n this.nama_kelas = data().deepCopy(fields()[9].schema(), other.nama_kelas);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.nama_hari)) {\n this.nama_hari = data().deepCopy(fields()[10].schema(), other.nama_hari);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.ts_update)) {\n this.ts_update = data().deepCopy(fields()[11].schema(), other.ts_update);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.kd_org)) {\n this.kd_org = data().deepCopy(fields()[12].schema(), other.kd_org);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.thn)) {\n this.thn = data().deepCopy(fields()[13].schema(), other.thn);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.term)) {\n this.term = data().deepCopy(fields()[14].schema(), other.term);\n fieldSetFlags()[14] = true;\n }\n }", "private NameBuilderAll(List<NameBuilder> nameBuilders) {\r\n\t\t\tthis.nameBuilders = new ArrayList<>(nameBuilders);\r\n\t\t}", "private Builder()\n {\n }", "public Builder clearSource() {\n \n source_ = getDefaultInstance().getSource();\n onChanged();\n return this;\n }", "public Builder clearSource() {\n \n source_ = getDefaultInstance().getSource();\n onChanged();\n return this;\n }", "public void build() {\r\n\tfDoingBatchBuild = true;\r\n\tfNotifier = new BuildNotifier(fDC, true);\r\n\tgetBuilderEnvironment().setNotifier(fNotifier);\r\n\tfNotifier.begin();\r\n\ttry {\r\n\t\tfNewState.readClassPath();\r\n\t\tfNotifier.subTask(Util.bind(\"build.scrubbingOutput\"/*nonNLS*/));\r\n\t\tfNewState.getBinaryOutput().scrubOutput();\r\n\t\tfNotifier.updateProgressDelta(0.05f);\r\n\t\tfNotifier.subTask(Util.bind(\"build.analyzingPackages\"/*nonNLS*/));\r\n\t\tfNewState.buildInitialPackageMap();\r\n\t\tfNotifier.updateProgressDelta(0.05f);\r\n\r\n\t\t/* Force build all in build context */\r\n\t\tfNotifier.subTask(Util.bind(\"build.analyzingSources\"/*nonNLS*/));\r\n\t\tIPackage[] pkgs = fNewState.getPackageMap().getAllPackagesAsArray();\r\n\t\tfor (int i = 0; i < pkgs.length; ++i) {\r\n\t\t\tfNotifier.checkCancel();\r\n\t\t\tSourceEntry[] entries = fNewState.getSourceEntries(pkgs[i]);\r\n\t\t\tif (entries != null) {\r\n\t\t\t\tfor (int j = 0; j < entries.length; ++j) {\r\n\t\t\t\t\tSourceEntry sEntry = entries[j];\r\n\t\t\t\t\tif (sEntry.isSource()) {\r\n\t\t\t\t\t\tPackageElement element = fNewState.packageElementFromSourceEntry(sEntry);\r\n\t\t\t\t\t\tfWorkQueue.add(element);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfNotifier.updateProgressDelta(0.05f);\r\n\t\tVector vToCompile = fWorkQueue.getElementsToCompile();\r\n\t\tif (vToCompile.size() > 0) {\r\n\t\t\tfNotifier.setProgressPerCompilationUnit(0.75f / vToCompile.size());\r\n\t\t\tcompile(vToCompile);\r\n\t\t}\r\n\t\t/* Copy resources to binary output */\r\n\t\tnew ProjectResourceCopier(fNewState.getJavaProject(), fDC, fNotifier, 0.10f).copyAllResourcesOnClasspath();\r\n\t\t\r\n\t\tfNotifier.done();\r\n\t} finally {\r\n\t\tcleanUp();\r\n\t}\r\n}", "private Builder(com.opentext.bn.converters.avro.entity.DocumentEvent.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.businessDocumentId)) {\n this.businessDocumentId = data().deepCopy(fields()[0].schema(), other.businessDocumentId);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.containingParentId)) {\n this.containingParentId = data().deepCopy(fields()[1].schema(), other.containingParentId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.containingParentType)) {\n this.containingParentType = data().deepCopy(fields()[2].schema(), other.containingParentType);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.containingParentLevel)) {\n this.containingParentLevel = data().deepCopy(fields()[3].schema(), other.containingParentLevel);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.controlNumber)) {\n this.controlNumber = data().deepCopy(fields()[4].schema(), other.controlNumber);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.controlNumberLevel1)) {\n this.controlNumberLevel1 = data().deepCopy(fields()[5].schema(), other.controlNumberLevel1);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.controlNumberLevel2)) {\n this.controlNumberLevel2 = data().deepCopy(fields()[6].schema(), other.controlNumberLevel2);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.contentKeys)) {\n this.contentKeys = data().deepCopy(fields()[7].schema(), other.contentKeys);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.documentId)) {\n this.documentId = data().deepCopy(fields()[8].schema(), other.documentId);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.documentStandard)) {\n this.documentStandard = data().deepCopy(fields()[9].schema(), other.documentStandard);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.documentStandardVersion)) {\n this.documentStandardVersion = data().deepCopy(fields()[10].schema(), other.documentStandardVersion);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.documentType)) {\n this.documentType = data().deepCopy(fields()[11].schema(), other.documentType);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.envelopeVersion)) {\n this.envelopeVersion = data().deepCopy(fields()[12].schema(), other.envelopeVersion);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.eventId)) {\n this.eventId = data().deepCopy(fields()[13].schema(), other.eventId);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.eventTimestamp)) {\n this.eventTimestamp = data().deepCopy(fields()[14].schema(), other.eventTimestamp);\n fieldSetFlags()[14] = true;\n }\n if (isValidValue(fields()[15], other.fileInfo)) {\n this.fileInfo = data().deepCopy(fields()[15].schema(), other.fileInfo);\n fieldSetFlags()[15] = true;\n }\n if (other.hasFileInfoBuilder()) {\n this.fileInfoBuilder = com.opentext.bn.converters.avro.entity.PayloadRef.newBuilder(other.getFileInfoBuilder());\n }\n if (isValidValue(fields()[16], other.introspectionSource)) {\n this.introspectionSource = data().deepCopy(fields()[16].schema(), other.introspectionSource);\n fieldSetFlags()[16] = true;\n }\n if (isValidValue(fields()[17], other.introspectionType)) {\n this.introspectionType = data().deepCopy(fields()[17].schema(), other.introspectionType);\n fieldSetFlags()[17] = true;\n }\n if (isValidValue(fields()[18], other.processId)) {\n this.processId = data().deepCopy(fields()[18].schema(), other.processId);\n fieldSetFlags()[18] = true;\n }\n if (isValidValue(fields()[19], other.receiverAddress)) {\n this.receiverAddress = data().deepCopy(fields()[19].schema(), other.receiverAddress);\n fieldSetFlags()[19] = true;\n }\n if (isValidValue(fields()[20], other.senderAddress)) {\n this.senderAddress = data().deepCopy(fields()[20].schema(), other.senderAddress);\n fieldSetFlags()[20] = true;\n }\n if (isValidValue(fields()[21], other.sentDate)) {\n this.sentDate = data().deepCopy(fields()[21].schema(), other.sentDate);\n fieldSetFlags()[21] = true;\n }\n if (isValidValue(fields()[22], other.sentTime)) {\n this.sentTime = data().deepCopy(fields()[22].schema(), other.sentTime);\n fieldSetFlags()[22] = true;\n }\n if (isValidValue(fields()[23], other.taskId)) {\n this.taskId = data().deepCopy(fields()[23].schema(), other.taskId);\n fieldSetFlags()[23] = true;\n }\n if (isValidValue(fields()[24], other.transactionId)) {\n this.transactionId = data().deepCopy(fields()[24].schema(), other.transactionId);\n fieldSetFlags()[24] = true;\n }\n if (isValidValue(fields()[25], other.senderAddressEnvelopeLevel1)) {\n this.senderAddressEnvelopeLevel1 = data().deepCopy(fields()[25].schema(), other.senderAddressEnvelopeLevel1);\n fieldSetFlags()[25] = true;\n }\n if (isValidValue(fields()[26], other.receiverAddressEnvelopeLevel1)) {\n this.receiverAddressEnvelopeLevel1 = data().deepCopy(fields()[26].schema(), other.receiverAddressEnvelopeLevel1);\n fieldSetFlags()[26] = true;\n }\n if (isValidValue(fields()[27], other.functionalCodeEnvelopeLevel1)) {\n this.functionalCodeEnvelopeLevel1 = data().deepCopy(fields()[27].schema(), other.functionalCodeEnvelopeLevel1);\n fieldSetFlags()[27] = true;\n }\n if (isValidValue(fields()[28], other.senderAddressEnvelopeLevel2)) {\n this.senderAddressEnvelopeLevel2 = data().deepCopy(fields()[28].schema(), other.senderAddressEnvelopeLevel2);\n fieldSetFlags()[28] = true;\n }\n if (isValidValue(fields()[29], other.receiverAddressEnvelopeLevel2)) {\n this.receiverAddressEnvelopeLevel2 = data().deepCopy(fields()[29].schema(), other.receiverAddressEnvelopeLevel2);\n fieldSetFlags()[29] = true;\n }\n if (isValidValue(fields()[30], other.functionalCodeEnvelopeLevel2)) {\n this.functionalCodeEnvelopeLevel2 = data().deepCopy(fields()[30].schema(), other.functionalCodeEnvelopeLevel2);\n fieldSetFlags()[30] = true;\n }\n }", "public DynamicModelPart buildUsingSeeds() {\n return this.rotateModelPart(this.rotation).addCuboidsUsingSeeds();\n }", "private Builder(baconhep.TTau.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.pt)) {\n this.pt = data().deepCopy(fields()[0].schema(), other.pt);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.eta)) {\n this.eta = data().deepCopy(fields()[1].schema(), other.eta);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.phi)) {\n this.phi = data().deepCopy(fields()[2].schema(), other.phi);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.m)) {\n this.m = data().deepCopy(fields()[3].schema(), other.m);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.e)) {\n this.e = data().deepCopy(fields()[4].schema(), other.e);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.q)) {\n this.q = data().deepCopy(fields()[5].schema(), other.q);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.dzLeadChHad)) {\n this.dzLeadChHad = data().deepCopy(fields()[6].schema(), other.dzLeadChHad);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.nSignalChHad)) {\n this.nSignalChHad = data().deepCopy(fields()[7].schema(), other.nSignalChHad);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.nSignalGamma)) {\n this.nSignalGamma = data().deepCopy(fields()[8].schema(), other.nSignalGamma);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.antiEleMVA5)) {\n this.antiEleMVA5 = data().deepCopy(fields()[9].schema(), other.antiEleMVA5);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.antiEleMVA5Cat)) {\n this.antiEleMVA5Cat = data().deepCopy(fields()[10].schema(), other.antiEleMVA5Cat);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.rawMuonRejection)) {\n this.rawMuonRejection = data().deepCopy(fields()[11].schema(), other.rawMuonRejection);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.rawIso3Hits)) {\n this.rawIso3Hits = data().deepCopy(fields()[12].schema(), other.rawIso3Hits);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.rawIsoMVA3oldDMwoLT)) {\n this.rawIsoMVA3oldDMwoLT = data().deepCopy(fields()[13].schema(), other.rawIsoMVA3oldDMwoLT);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.rawIsoMVA3oldDMwLT)) {\n this.rawIsoMVA3oldDMwLT = data().deepCopy(fields()[14].schema(), other.rawIsoMVA3oldDMwLT);\n fieldSetFlags()[14] = true;\n }\n if (isValidValue(fields()[15], other.rawIsoMVA3newDMwoLT)) {\n this.rawIsoMVA3newDMwoLT = data().deepCopy(fields()[15].schema(), other.rawIsoMVA3newDMwoLT);\n fieldSetFlags()[15] = true;\n }\n if (isValidValue(fields()[16], other.rawIsoMVA3newDMwLT)) {\n this.rawIsoMVA3newDMwLT = data().deepCopy(fields()[16].schema(), other.rawIsoMVA3newDMwLT);\n fieldSetFlags()[16] = true;\n }\n if (isValidValue(fields()[17], other.puppiChHadIso)) {\n this.puppiChHadIso = data().deepCopy(fields()[17].schema(), other.puppiChHadIso);\n fieldSetFlags()[17] = true;\n }\n if (isValidValue(fields()[18], other.puppiGammaIso)) {\n this.puppiGammaIso = data().deepCopy(fields()[18].schema(), other.puppiGammaIso);\n fieldSetFlags()[18] = true;\n }\n if (isValidValue(fields()[19], other.puppiNeuHadIso)) {\n this.puppiNeuHadIso = data().deepCopy(fields()[19].schema(), other.puppiNeuHadIso);\n fieldSetFlags()[19] = true;\n }\n if (isValidValue(fields()[20], other.puppiChHadIsoNoLep)) {\n this.puppiChHadIsoNoLep = data().deepCopy(fields()[20].schema(), other.puppiChHadIsoNoLep);\n fieldSetFlags()[20] = true;\n }\n if (isValidValue(fields()[21], other.puppiGammaIsoNoLep)) {\n this.puppiGammaIsoNoLep = data().deepCopy(fields()[21].schema(), other.puppiGammaIsoNoLep);\n fieldSetFlags()[21] = true;\n }\n if (isValidValue(fields()[22], other.puppiNeuHadIsoNoLep)) {\n this.puppiNeuHadIsoNoLep = data().deepCopy(fields()[22].schema(), other.puppiNeuHadIsoNoLep);\n fieldSetFlags()[22] = true;\n }\n if (isValidValue(fields()[23], other.hpsDisc)) {\n this.hpsDisc = data().deepCopy(fields()[23].schema(), other.hpsDisc);\n fieldSetFlags()[23] = true;\n }\n }", "@Inject\n public Builder() {\n }", "private DataSource.Factory buildDataSourceFactory(DefaultBandwidthMeter bandwidthMeter) {\n return new DefaultDataSourceFactory(this, bandwidthMeter, buildHttpDataSourceFactory(bandwidthMeter));\n }", "private Builder(com.babbler.ws.io.avro.model.BabbleValue.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.author)) {\n this.author = data().deepCopy(fields()[0].schema(), other.author);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.content)) {\n this.content = data().deepCopy(fields()[1].schema(), other.content);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.timestamp)) {\n this.timestamp = data().deepCopy(fields()[2].schema(), other.timestamp);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.location)) {\n this.location = data().deepCopy(fields()[3].schema(), other.location);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.tags)) {\n this.tags = data().deepCopy(fields()[4].schema(), other.tags);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.mentions)) {\n this.mentions = data().deepCopy(fields()[5].schema(), other.mentions);\n fieldSetFlags()[5] = true;\n }\n }", "@Test\n public void testBuilderFrom_1()\n throws Exception {\n Project p = new Project();\n\n Project.Builder result = Project.builderFrom(p);\n\n assertNotNull(result);\n }", "private DOMImplementationRegistry(Vector srcs) {\n _sources = srcs;\n }", "public Builder fromFilePath(String filePath) {\n if (StringUtil.isNullOrEmpty(filePath)) {\n throw new IllegalArgumentException(\"Illegal filePath: \" + filePath);\n }\n this.sourceFilePath = filePath;\n return this;\n }", "public BroadcastReaderSource(FreeClientPool clientPool, int rootBranchCount, int treeBranchCount, BroadcastRequestCreator creator)\n\t{\n\t\tsuper(clientPool, rootBranchCount, treeBranchCount, creator);\n\t}", "private ProcessBuilder prepareBuilder(\n ProcessBuilder builder, SubProcessCommandLineArgs commands, SubProcessConfiguration configuration)\n throws IllegalStateException {\n builder.environment().put(\"LD_LIBRARY_PATH\", configuration.getWorkerPath());\n\n // Check we are not over the max size of command line parameters\n if (getTotalCommandBytesAnemo(commands) > MAX_SIZE_COMMAND_LINE_ARGS) {\n throw new IllegalStateException(\"Command is over 2MB in size\");\n }\n\n appendExecutablePath(builder);\n\n\n // adding command line arguments require by nautical_processBoatLogs\n // from index 1, 0 is reserve for the binary itself\n for (SubProcessCommandLineArgs.Command s : commands.getParameters()) {\n\n String[] cmdArr = s.getValueArr();\n\n for (int i = 0; i < cmdArr.length; i++) {\n\n builder.command().add(i + 1, cmdArr[i]);\n }\n }\n\n return builder;\n }", "public Object build();", "public static FilterBuilder build() {\n return new FilterBuilder();\n }", "private static Handler buildChain() {\n Handler ForAbroad = new ForAbroad();\n\n //chain.XmlHandler is the successor of chain.Mp3Handler.\n Handler ForCountry = new ForCountry(ForAbroad);\n\n return new ForCity(ForCountry);\n }", "public interface CutAndChooseSelectionBuilder {\n\t\n\t/**\n\t * Selects the circuits to be checked or evaluated.\n\t * @param numCircuits The total circuits number.\n\t * @return The selection.\n\t */\n\tpublic CutAndChooseSelection build(int numCircuits);\n}", "protected void build() {\n // Make sure we have a fresh build of everything needed to run a JAM session\n // - bootstrap, translator and agent suites\n builder(\"clean\");\n builder(\"\");\n buildBootstrap();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static FXMLLoaderBuilder builder() {\n return new FXMLLoaderBuilder();\n }", "private Builder(com.example.DNSLog.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.uid)) {\n this.uid = data().deepCopy(fields()[0].schema(), other.uid);\n fieldSetFlags()[0] = other.fieldSetFlags()[0];\n }\n if (isValidValue(fields()[1], other.originh)) {\n this.originh = data().deepCopy(fields()[1].schema(), other.originh);\n fieldSetFlags()[1] = other.fieldSetFlags()[1];\n }\n if (isValidValue(fields()[2], other.originp)) {\n this.originp = data().deepCopy(fields()[2].schema(), other.originp);\n fieldSetFlags()[2] = other.fieldSetFlags()[2];\n }\n if (isValidValue(fields()[3], other.resph)) {\n this.resph = data().deepCopy(fields()[3].schema(), other.resph);\n fieldSetFlags()[3] = other.fieldSetFlags()[3];\n }\n if (isValidValue(fields()[4], other.respp)) {\n this.respp = data().deepCopy(fields()[4].schema(), other.respp);\n fieldSetFlags()[4] = other.fieldSetFlags()[4];\n }\n if (isValidValue(fields()[5], other.proto)) {\n this.proto = data().deepCopy(fields()[5].schema(), other.proto);\n fieldSetFlags()[5] = other.fieldSetFlags()[5];\n }\n if (isValidValue(fields()[6], other.port)) {\n this.port = data().deepCopy(fields()[6].schema(), other.port);\n fieldSetFlags()[6] = other.fieldSetFlags()[6];\n }\n if (isValidValue(fields()[7], other.ts)) {\n this.ts = data().deepCopy(fields()[7].schema(), other.ts);\n fieldSetFlags()[7] = other.fieldSetFlags()[7];\n }\n if (isValidValue(fields()[8], other.query)) {\n this.query = data().deepCopy(fields()[8].schema(), other.query);\n fieldSetFlags()[8] = other.fieldSetFlags()[8];\n }\n if (isValidValue(fields()[9], other.qclass)) {\n this.qclass = data().deepCopy(fields()[9].schema(), other.qclass);\n fieldSetFlags()[9] = other.fieldSetFlags()[9];\n }\n if (isValidValue(fields()[10], other.qclassname)) {\n this.qclassname = data().deepCopy(fields()[10].schema(), other.qclassname);\n fieldSetFlags()[10] = other.fieldSetFlags()[10];\n }\n if (isValidValue(fields()[11], other.qtype)) {\n this.qtype = data().deepCopy(fields()[11].schema(), other.qtype);\n fieldSetFlags()[11] = other.fieldSetFlags()[11];\n }\n if (isValidValue(fields()[12], other.qtypename)) {\n this.qtypename = data().deepCopy(fields()[12].schema(), other.qtypename);\n fieldSetFlags()[12] = other.fieldSetFlags()[12];\n }\n if (isValidValue(fields()[13], other.rcode)) {\n this.rcode = data().deepCopy(fields()[13].schema(), other.rcode);\n fieldSetFlags()[13] = other.fieldSetFlags()[13];\n }\n if (isValidValue(fields()[14], other.rcodename)) {\n this.rcodename = data().deepCopy(fields()[14].schema(), other.rcodename);\n fieldSetFlags()[14] = other.fieldSetFlags()[14];\n }\n if (isValidValue(fields()[15], other.Z)) {\n this.Z = data().deepCopy(fields()[15].schema(), other.Z);\n fieldSetFlags()[15] = other.fieldSetFlags()[15];\n }\n if (isValidValue(fields()[16], other.OR)) {\n this.OR = data().deepCopy(fields()[16].schema(), other.OR);\n fieldSetFlags()[16] = other.fieldSetFlags()[16];\n }\n if (isValidValue(fields()[17], other.AA)) {\n this.AA = data().deepCopy(fields()[17].schema(), other.AA);\n fieldSetFlags()[17] = other.fieldSetFlags()[17];\n }\n if (isValidValue(fields()[18], other.TC)) {\n this.TC = data().deepCopy(fields()[18].schema(), other.TC);\n fieldSetFlags()[18] = other.fieldSetFlags()[18];\n }\n if (isValidValue(fields()[19], other.rejected)) {\n this.rejected = data().deepCopy(fields()[19].schema(), other.rejected);\n fieldSetFlags()[19] = other.fieldSetFlags()[19];\n }\n if (isValidValue(fields()[20], other.Answers)) {\n this.Answers = data().deepCopy(fields()[20].schema(), other.Answers);\n fieldSetFlags()[20] = other.fieldSetFlags()[20];\n }\n if (isValidValue(fields()[21], other.TLLs)) {\n this.TLLs = data().deepCopy(fields()[21].schema(), other.TLLs);\n fieldSetFlags()[21] = other.fieldSetFlags()[21];\n }\n }", "public CombinedSource(FileManager fm, AuthMap am, Resource ep) {\n constructs = ep.listProperties(EXTRAS.construct).mapWith(toString).toList();\n matches = ep.listProperties(EXTRAS.match).mapWith(toString).toList();\n sources = ep.listProperties(EXTRAS.element).mapWith(toSource(fm, am)).toList();\n }", "private CSTeamPrepare(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }" ]
[ "0.67959094", "0.64067215", "0.6302726", "0.6037068", "0.60147536", "0.5976573", "0.5651023", "0.5586848", "0.5561957", "0.5532498", "0.552098", "0.5457222", "0.5437585", "0.5435264", "0.53773", "0.52933156", "0.5268885", "0.52455163", "0.5234628", "0.5220535", "0.52178055", "0.52178055", "0.52178055", "0.5212006", "0.52089375", "0.52015346", "0.5197797", "0.5160591", "0.5127983", "0.51089567", "0.51031315", "0.5083107", "0.50437593", "0.5039569", "0.5035796", "0.5028386", "0.5009456", "0.5002686", "0.50025684", "0.4994353", "0.49864146", "0.49745762", "0.49614534", "0.49588108", "0.49583653", "0.49553242", "0.49519137", "0.4943933", "0.4941032", "0.49354059", "0.49353588", "0.49353588", "0.49325937", "0.49324074", "0.49202415", "0.49173447", "0.4913551", "0.4912895", "0.49104965", "0.48927304", "0.48794967", "0.4878547", "0.48644456", "0.48541525", "0.48534098", "0.48533466", "0.48473656", "0.48431772", "0.48430774", "0.48426712", "0.48410922", "0.48295933", "0.48120254", "0.48033264", "0.480082", "0.47996876", "0.47990584", "0.47990584", "0.47983572", "0.47976238", "0.47975117", "0.4794231", "0.47923592", "0.47915128", "0.47859508", "0.47837773", "0.4770721", "0.47702256", "0.47681162", "0.47650594", "0.47636583", "0.47631392", "0.47625145", "0.47580078", "0.4751824", "0.47509938", "0.47491375", "0.47486582", "0.47453013", "0.47449574" ]
0.63061774
2
Get the media sources.
public @NotNull List<MediaSource> getMediaSources() { return getChildExtensionsOfType(MediaSource.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LSPSource[] getSources () {\r\n return sources;\r\n }", "public List<String> getSources() {\n\t\treturn this.sources;\n\t}", "public List getAudioFileSources()\n {\n return Collections.unmodifiableList(this.m_audioFileSources);\n }", "public ArrayList<Media> getMediaList(){\r\n LocalUser user = LocalUser.getInstance();\r\n return user.getMediaList();\r\n }", "public List<Pair<URL, URL>> getMediaList() {\n\t\tList<Pair<URL, URL>> result = new ArrayList<Pair<URL, URL>>();\n\t\tif (entities == null) {\n\t\t\treturn result;\n\t\t}\n\t\tif (entities.media == null) {\n\t\t\treturn result;\n\t\t}\n\t\tfor (Media media : entities.media) {\n\t\t\ttry {\n\t\t\t\tPair<URL, URL> urls = new Pair<URL, URL>(new URL(\n\t\t\t\t\t\tmedia.media_url + \":thumb\"), new URL(media.media_url));\n\t\t\t\tresult.add(urls);\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (entities.urls == null) {\n\t\t\treturn result;\n\t\t}\n\t\tfor (Url url : entities.urls) {\n\t\t\tPictureService hoster = Utils.getPictureService(url);\n\t\t\tswitch (hoster) {\n\t\t\tcase TWITPIC:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(TwitpicApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase YFROG:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(YfrogApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase YOUTUBE:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(YoutubeApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase IMGUR:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(ImgurApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase IMGLY:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(ImglyApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INSTAGRAM:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(InstagramApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PLIXI:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(PlixiApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LOCKERZ:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(LockerzApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MOBYTO:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(MobytoApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OWLY:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(OwlyApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase NONE:\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public MediaList getMediaList() {\n \n MediaList mediaList = mediaPlayerFactory.newMediaList();\n for (int i = 0; i < this.moviesByGenre.size(); i++) {\n mediaList.addMedia(this.moviesByGenre.get(i).path, \n formatRtspStream(this.genre),\n \":no-sout-rtp-sap\",\n \":no-sout-standard-sap\",\n \":sout-all\",\n \":sout-keep\",\n \":ttl=128\");\n }\n\n return mediaList;\n }", "public String[] getAllSources() {\n return this.sourceList.toArray(new String[0]);\n }", "@Override\n public Collection<Source> getSources() {\n\n Map<String, Source> sources = new HashMap<String, Source>();\n\n out: for (Map.Entry<String, Container> path : containers.entrySet()) {\n String sourceId = path.getKey();\n Container container = path.getValue();\n\n for (String map : categoryMaps.keySet()) {\n if (map.endsWith(\"/\")) {\n map = map.substring(0, map.lastIndexOf(\"/\"));\n }\n if (map.endsWith(sourceId)) {\n continue out;\n }\n }\n\n System.err.println(\"Doing source \" + sourceId);\n\n sourceId = applyCategoryMaps(sourceId);\n\n if (sourceId.isEmpty()) {\n continue;\n }\n\n if (sourceId.indexOf(\"/\") == -1 && !sourceId.isEmpty()) {\n if (sources.get(sourceId) == null) {\n String sourceIdShort = sourceId;\n sourceId = \"Catchup/Sources/\" + sourceIdShort;\n String sourceName = container.getTitle();\n Source source = new Source();\n source.setSourceId(sourceIdShort);\n source.setId(sourceId);\n source.setShortName(sourceName);\n source.setLongName(sourceName);\n source.setServiceUrl(\"/category?sourceId=\" + sourceId + \";type=html\");\n URI iconUri = container.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class);\n URL iconUrl = normaliseURI(iconUri);\n final String iconUrlString = iconUrl == null ? null : iconUrl.toString();\n source.setIconUrl(iconUrlString);\n sources.put(sourceId, source);\n }\n }\n\n\n\n\n }\n\n\n return sources.values();\n }", "public ArrayList getDataSources() {\n return dataSources;\n }", "public List<MediaFile> list() {\n\t\treturn (doc != null ? listFeed() : listHtml());\n\t}", "public List<Media> getMedias()\n\t\t{\n\t\t\treturn mediasList;\n\t\t}", "@MetadataValueMatcher(metadataValue=56)\n\tpublic List<String> getSourceUris() {\n\t\treturn sourceUris;\n\t}", "String getMedia();", "public List<JRMediaObject> getMedia() {\n return mMedia;\n }", "final RenderedImage[] getSourceArray() {\n return sources.clone();\n }", "public List<MessageSource> createMessageSources(){\n\n List<MessageSource> messageSourceList = new ArrayList<>();\n\n String messageSourceConfig = Configurations.map.getProperty(\"messageSourceChannels\");\n String[] sourceConfigArray = messageSourceConfig.split(\",\");\n\n for(String sourceConfig : sourceConfigArray) {\n MessageSource messageSource = null;\n\n // there is only file message source option for instance, but it's extendable\n if(sourceConfig.equals(\"file\")){\n messageSource = new FileSource();\n }\n\n if(messageSource != null){\n messageSourceList.add(messageSource);\n }\n }\n\n if(messageSourceList.size() == 0){\n return null;\n }\n\n return messageSourceList;\n }", "public FilterSource[] getFilterSources();", "URI getMediaURI();", "@Nonnull\r\n List<DataSource> getDataSources();", "List<MediaMetadata> getAll();", "public List<CMMedia> getPicturesUnfiltered() {\n return super.getMedia();\n }", "public List getRequestedDataSources() {\r\n\t\treturn requestedDataSources;\r\n\t}", "@Override\n public List<Media> getMediaListByManager(int managerId) {\n try {\n return mediaDao.getMediaListByManager(managerId);\n } catch (FailedOperationException e) {\n throw new RuntimeException(e.getMessage());\n }\n }", "@JsonGetter(\"media\")\r\n public List<String> getMedia() {\r\n return media;\r\n }", "public List<Stream> getStreams() {\n return streams;\n }", "public List<String> streams() {\n return this.streams;\n }", "public Collection<String> getSourceSites() {\n return mSourceMap.keySet();\n }", "public List<ProductMedia> getProductMediaList() {\n\t\treturn productMediaDao.getProductMediaList();\n\t}", "public java.util.List<AttachmentsSource> getAttachments() {\n if (attachments == null) {\n attachments = new com.amazonaws.internal.SdkInternalList<AttachmentsSource>();\n }\n return attachments;\n }", "public String getMediaUrl() {\n return this.MediaUrl;\n }", "public @NonNull List<MediaSize> getMediaSizes() {\n return Collections.unmodifiableList(mMediaSizes);\n }", "public List<MediaDevice> getMediaDevices() {\n\n List<MediaDevice> mediaDevices = new ArrayList<>();\n\n for (MediaDevice d : this.devices) {\n if (d.hasMediaInterface() && d.hasInstance()) {\n mediaDevices.add(d);\n }\n }\n\n return mediaDevices;\n }", "public Set<FileRef> getSourceFiles() {\r\n return sourceFiles;\r\n }", "public Map<MediaFileType, String> getArtworkUrls() {\n return artworkUrlMap;\n }", "public List<Medium> getAllMedia() throws ContestManagementException {\n return null;\r\n }", "public List<Medium> getAllMedia() throws ContestManagementException {\n return null;\r\n }", "Source getSrc();", "public java.util.List<Integer>\n getSrcIdList() {\n return srcId_;\n }", "@Override\n\tpublic List<String> getAllAGBSources() {\n\t\t\n\t\treturn allAGBSources;\n\t}", "public static Map<Integer, DataSource> getAvailableDataSources() {\n\t\tLoadRessources lr;\n\t\ttry {\n\t\t\tlr = new LoadRessources();\n\t\t} catch (JDOMException e1) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"The configuration file dataSource.xml is corrupted. Please check that this file is a valid XML file!\");\n\t\t\treturn null;\n\t\t} catch (IOException e1) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"Unable to open the configuration file dataSources.xml\");\n\t\t\treturn null;\n\t\t}\n\t\tMap<Integer, DataSource> dataSources = lr.extractData();\n\t\treturn dataSources;\n\t}", "public List<String> getUris()\r\n/* 125: */ {\r\n/* 126:129 */ return this.uris;\r\n/* 127: */ }", "public List<String> getConceptSources(){\n \treturn conceptSources;\n }", "public DataSourcesImpl dataSources() {\n return this.dataSources;\n }", "public ArrayList<DataSource> getDatasources() {\n return datasources;\n }", "public List<ReplicaCatalogEntry> getSourceURLs(String site) {\n return (mSourceMap.containsKey(site)) ? mSourceMap.get(site) : new ArrayList();\n }", "public List<MediaRelation> loadMediaRelations();", "public java.util.List<Integer>\n getSrcIdList() {\n return java.util.Collections.unmodifiableList(\n instance.getSrcIdList());\n }", "List<ScoresMessagesGameSource> getGameSources() {\n return gameSources;\n }", "public String[] getNoiseSources() {\n if (NOISE_SOURCES == null) {\n SpInstObsComp instrument = SpTreeMan.findInstrument(this);\n\n if (instrument instanceof SpInstSCUBA2) {\n NOISE_SOURCES = SCUBA2_NOISE_SOURCES;\n\n } else if (instrument instanceof SpInstHeterodyne) {\n NOISE_SOURCES = HETERODYNE_NOISE_SOURCES;\n }\n }\n\n return NOISE_SOURCES;\n }", "@Override\n\tpublic List<URL> getPhotos() {\n\t\timages.clear(); //vide la liste des images\n\t\t\n\t\t\n\t\tList<URL> allImagesURL = new ArrayList<URL>();\n\t\t\n\t\t/* On initialise la liste de toutes les images */\n\t\tList<String> filelocations = null;\n\t\t\n\t\t/*Nous allons retrouver les fichiers images présent dans le répertoire et tous ses sous-répertoires*/\n\t\tPath start = Paths.get(path); //détermine le point de départ \n\t\ttry (Stream<Path> stream = Files.walk(start, Integer.MAX_VALUE)) {\n\t\t filelocations = stream\n\t\t .map(String::valueOf) //transforme les Path en string\n\t\t .filter(filename -> filename.contains(\".jpg\") || filename.contains(\".png\")) //ne prend que les images jpg et png\n\t\t .collect(Collectors.toList());\n\t\t \n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t/* Pour chaque fichier retrouvé, on essaie de retrouver son chemin absolu pour le stocker dans le allImagesURL */\n\t\tfor (String filelocation : filelocations) {\n\t\t\tString relativeLocation = filelocation.replace(path+\"/\", \"\"); // Pour ne pas partir de src mais de la classe courante\n\t\t\trelativeLocation = relativeLocation.replace(windowspath+\"\\\\\", \"\");\n\t\t\tallImagesURL.add(this.getClass().getResource(relativeLocation)); //on ajoute le chemin absolu dans la liste\n\t\t}\n\t\t\n\t\t\n\t\treturn allImagesURL; //on retourne la liste\n\t}", "String getSrc();", "public static List<InputStream> getAllImages(){\n\t\treturn IOHandler.getResourcesIn(IMAGES_DIR);\n\t}", "Set<ConnectPoint> sourcesFor(McastRoute route);", "public org.LexGrid.commonTypes.Source[] getSource() {\n return source;\n }", "public static ArrayList<DigitalNewspapers> getDigitalNewsSources(){\n\n Uri builtUri = Uri.parse(BASE_NEWSAPI_SOURCES_EP).buildUpon()\n .build();\n\n URL url = null;\n\n try {\n url = new URL(builtUri.toString());\n return doCall(url);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public Set<ExperienceType> getExperienceSources()\r\n\t{\treturn Collections.unmodifiableSet(this.experienceSources);\t}", "public java.lang.String getMedia() {\n return media;\n }", "public List getSourceConnections() {\n return new ArrayList(sourceConnections);\n }", "public Single<Media> getMedia(String titles, boolean useGenerator) {\n HttpUrl.Builder urlBuilder = HttpUrl\n .parse(commonsBaseUrl)\n .newBuilder()\n .addQueryParameter(\"action\", \"query\")\n .addQueryParameter(\"format\", \"json\")\n .addQueryParameter(\"formatversion\", \"2\")\n .addQueryParameter(\"titles\", titles);\n\n if (useGenerator) {\n urlBuilder.addQueryParameter(\"generator\", \"images\");\n }\n\n Request request = new Request.Builder()\n .url(appendMediaProperties(urlBuilder).build())\n .build();\n\n return Single.fromCallable(() -> {\n Response response = okHttpClient.newCall(request).execute();\n if (response.body() != null && response.isSuccessful()) {\n String json = response.body().string();\n MwQueryResponse mwQueryPage = gson.fromJson(json, MwQueryResponse.class);\n if (mwQueryPage.success() && mwQueryPage.query().firstPage() != null) {\n return Media.from(mwQueryPage.query().firstPage());\n }\n }\n return null;\n });\n }", "public List<MediaFile> getMediaFiles(MediaFileType... types) {\n List<MediaFile> mf = new ArrayList<>();\n readWriteLock.readLock().lock();\n for (MediaFile mediaFile : mediaFiles) {\n boolean match = false;\n for (MediaFileType type : types) {\n if (mediaFile.getType().equals(type)) {\n match = true;\n }\n }\n if (match) {\n mf.add(mediaFile);\n }\n }\n readWriteLock.readLock().unlock();\n return mf;\n }", "public URI getMediaLink() {\n return this.mediaLink;\n }", "public URI getMediaLink() {\n return this.mediaLink;\n }", "Set<ConnectPoint> sourcesFor(McastRoute route, HostId hostId);", "java.lang.String getSrc();", "public static java.util.Iterator<org.semanticwb.opensocial.model.data.MediaItem> listMediaItems()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.opensocial.model.data.MediaItem>(it, true);\r\n }", "public java.util.List<org.landxml.schema.landXML11.SourceDataDocument.SourceData> getSourceDataList()\r\n {\r\n final class SourceDataList extends java.util.AbstractList<org.landxml.schema.landXML11.SourceDataDocument.SourceData>\r\n {\r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData get(int i)\r\n { return SurfaceImpl.this.getSourceDataArray(i); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData set(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.setSourceDataArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n { SurfaceImpl.this.insertNewSourceData(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData remove(int i)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.removeSourceData(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfSourceDataArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new SourceDataList();\r\n }\r\n }", "public ListEventSourcesResult listEventSources() throws AmazonServiceException, AmazonClientException {\n return listEventSources(new ListEventSourcesRequest());\n }", "public File[] getUsedAudioFiles(){\n \tArrayList<File> afList=new ArrayList<File>();\n \tif(source instanceof FileAudioSource){\n \t\tafList.add(((FileAudioSource)source).getFile());\n \t}\n \tfor (AudioPlugin ap : plugins) {\n\t\t\tif (ap instanceof SourcePlugin) {\n\t\t\t\tAudioSource as = ((SourcePlugin) ap).getAudioSource();\n\t\t\t\tif (as instanceof FileAudioSource) {\n\t\t\t\t\tafList.add(((FileAudioSource) source).getFile());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \treturn afList.toArray(new File[0]);\n }", "public ArrayList<OfflineSong> getPlayList() {\n System.out.println(MEDIA_PATH);\n if (MEDIA_PATH != null) {\n File home = new File(MEDIA_PATH);\n File[] listFiles = home.listFiles();\n if (listFiles != null && listFiles.length > 0) {\n for (File file : listFiles) {\n System.out.println(file.getAbsolutePath());\n if (file.isDirectory()) {\n scanDirectory(file);\n } else {\n addSongToList(file);\n }\n }\n }\n }\n // return songs list array\n return songsList;\n }", "public List<String> getRawSourceFilenames() {\n return Collections.unmodifiableList(rawSourceFilenames);\n }", "public MXMediaCache getMediaCache() {\n checkIfAlive();\n return mMediaCache;\n }", "String getMinifiedMedia();", "public List<WebResource> getImages() {\r\n\t\tList<WebResource> result = new Vector<WebResource>();\r\n\t\tList<WebComponent> images = wcDao.getImages();\r\n\t\t// settare l'href corretto...\r\n\t\tfor (Iterator<WebComponent> iter = images.iterator(); iter.hasNext();) {\r\n\t\t\tresult.add((WebResource) iter.next());\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static ArrayList<String> getPlayList(){\n\t\tFile home = new File(MEDIA_PATH);\n\t\tif(home.listFiles(new FileExtensionFilter()).length > 0){\n\t\t\tfor(File file : home.listFiles(new FileExtensionFilter())){\n\t\t\t\tString song = new String();\n\t\t\t\tsong = file.getName().substring(0, (file.getName().length() - 4 )); // - \".mp3\"\t\t\t\t\n\t\t\t\t// Add song\n\t\t\t\tsongsList.add(song);\n\t\t\t}\n\t\t}\n\t\treturn songsList;\n\t}", "public Set<String> getStreamPaths() {\n\t\t// todo: instead of returning a set here, perhaps\n\t\t// we can return Iterator<String>\n\t\tSet<String> streamSet = new HashSet<String>();\n\t\tif (streams != null) {\n\t\t\tfor (ChildData child : streams.getCurrentData()) {\n\t\t\t\tstreamSet.add(child.getPath());\n\t\t\t}\n\t\t}\n\t\treturn Collections.unmodifiableSet(streamSet);\n\t}", "java.util.List<java.lang.String>\n getSourcepathList();", "public List<String> getSourceList() {\n return this.sourceList; \n }", "@Override\n public java.util.List<Path> getSourcePathList() {\n return sourcePath_;\n }", "public List<String> getImagesUrl() {\n\t\tif (imagesUrl == null) {\n\t\t\timagesUrl = new ArrayList<String>();\n\t\t}\n\t\treturn imagesUrl;\n\t}", "public List<String> getSource() {\n return this.source;\n }", "public Cursor querySources(){\n String sql = \"SELECT \" + ArticleContract.ArticleEntry.COLUMN_SOURCE + \", \"\n + ArticleContract.ArticleEntry.COLUMN_CATEGORY + \" FROM \"\n + ArticleContract.ArticleEntry.TOP_ARTICLE_TABLE + \" GROUP BY \"\n + ArticleContract.ArticleEntry.COLUMN_SOURCE + \" UNION \"\n + \"SELECT \" + ArticleContract.ArticleEntry.COLUMN_SOURCE + \", \"\n + ArticleContract.ArticleEntry.COLUMN_CATEGORY + \" FROM \"\n + ArticleContract.ArticleEntry.LATEST_ARTICLE_TABLE + \" GROUP BY \"\n + ArticleContract.ArticleEntry.COLUMN_SOURCE;\n return db.rawQuery(sql, null);\n }", "final RenderedImage getSource() {\n return sources[0];\n }", "public abstract String[] getSupportedMediaTypes();", "public List<String> getPhotoUrls() {\n return photoUrls;\n }", "ImmutableList<SchemaOrgType> getAssociatedMediaList();", "public void getMedia() {\n\tif (sound != null && soundData == null) {\n\t soundData = parent.getAudioClip(sound);\n\t}\n\tif (soundData == null) {\n\t System.out.println(\"SoundArea: Unable to load data \"+sound);\n\t}\n\tisReady = true;\n }", "public String sourceUri() {\n return this.sourceUri;\n }", "private Uri getMedia(String mediaName) {\n if (URLUtil.isValidUrl(mediaName)) {\n // Media name is an external URL.\n return Uri.parse(mediaName);\n } else {\n\n // you can also put a video file in raw package and get file from there as shown below\n\n return Uri.parse(\"android.resource://\" + getPackageName() +\n \"/raw/\" + mediaName);\n\n\n }\n }", "java.util.List<java.lang.String>\n getSourcepathList();", "public List getMappingSources() throws MappingException {\r\n return Collections.unmodifiableList(_mappings);\r\n }", "public ArrayList<DeviceMediaItem> getAllImages(Context contx) {\n ArrayList<DeviceMediaItem> images = new ArrayList<>();\n Uri allImagesuri = android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI;\n String[] projection = {MediaStore.Images.ImageColumns.DATA, MediaStore.Images.Media.DISPLAY_NAME,\n MediaStore.Images.Media.SIZE, MediaStore.Images.Media.DATE_ADDED};\n Cursor cursor = contx.getContentResolver().query(allImagesuri, projection, null, null, null);\n try {\n cursor.moveToFirst();\n do {\n DeviceMediaItem pic = new DeviceMediaItem();\n\n pic.setName(cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DISPLAY_NAME)));\n pic.setPath(cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA)));\n String date = getDate(cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATE_ADDED)));\n pic.setDate(date);\n\n images.add(pic);\n } while (cursor.moveToNext());\n cursor.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n Uri allVideosuri = android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI;\n String[] vidProjection = {MediaStore.Video.VideoColumns.DATA, MediaStore.Video.Media.DISPLAY_NAME,\n MediaStore.Video.Media.SIZE, MediaStore.Video.Media.DATE_ADDED};\n Cursor vidCursor = contx.getContentResolver().query(allVideosuri, vidProjection, null, null, null);\n try {\n vidCursor.moveToFirst();\n do {\n DeviceMediaItem pic = new DeviceMediaItem();\n\n pic.setName(vidCursor.getString(vidCursor.getColumnIndexOrThrow(MediaStore.Video.Media.DISPLAY_NAME)));\n pic.setPath(vidCursor.getString(vidCursor.getColumnIndexOrThrow(MediaStore.Video.Media.DATA)));\n String date = getDate(vidCursor.getLong(vidCursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATE_ADDED)));\n pic.setDate(date);\n\n images.add(pic);\n } while (vidCursor.moveToNext());\n vidCursor.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return images;\n }", "java.util.List<Integer> getSrcIdList();", "public Iterable<Origin> origins() {\n return backendServices.stream()\n .map(BackendService::origins)\n .flatMap(Collection::stream)\n .collect(toList());\n }", "Media getMedia(long mediaId);", "public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Media getMedia() {\r\n return media;\r\n }", "@Override\n\tpublic List<MyMedia> getMediadetails(String username) {\n\t\treturn userDAO.getMediadetails(username);\n\t}", "@Override\n public List<Media> getMediaListByTournament(int tournamentId) {\n try {\n return mediaDao.getMediaListByTournament(tournamentId);\n } catch (FailedOperationException e) {\n throw new RuntimeException(e.getMessage());\n }\n }", "public File getMediaDir() {\r\n return mediaDir;\r\n }", "private void buildMediaSource(Uri uri){\n DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();\n //Produces DataSource instances through which media data is loaded\n DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(this,\n Util.getUserAgent(this, getString(R.string.app_name)), bandwidthMeter);\n // This is the MediaSource representing the media to be played.\n MediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)\n .createMediaSource(uri);\n //Prepare the player with the source\n mPlayer.prepare(videoSource);\n mPlayer.setPlayWhenReady(true);\n mPlayer.addListener(this);\n }", "public java.util.List<DataLakeSource> getDataLakeSources() {\n return dataLakeSources;\n }" ]
[ "0.71737176", "0.70519024", "0.6981579", "0.6824773", "0.6775194", "0.66857815", "0.66387767", "0.65069693", "0.64013153", "0.63397634", "0.63089985", "0.61836207", "0.6144435", "0.6134047", "0.6116459", "0.60558057", "0.60246086", "0.601375", "0.60091144", "0.59944177", "0.5963876", "0.5930133", "0.5924537", "0.58828926", "0.58769506", "0.5876488", "0.58264273", "0.5756151", "0.5754286", "0.573016", "0.57210475", "0.57065463", "0.5687739", "0.5675953", "0.5673637", "0.5673637", "0.5659251", "0.56541705", "0.5653087", "0.5648124", "0.56455576", "0.5641478", "0.56300724", "0.56135345", "0.56043386", "0.5594644", "0.5589497", "0.55879354", "0.5583654", "0.5579006", "0.55747235", "0.5555011", "0.5546815", "0.5542706", "0.55305547", "0.5520293", "0.55121785", "0.5511655", "0.550792", "0.550245", "0.54967374", "0.54967374", "0.5496227", "0.547686", "0.5473947", "0.5454978", "0.5451941", "0.54329175", "0.5432773", "0.5429588", "0.5424444", "0.5421657", "0.54186094", "0.5404598", "0.5398322", "0.53855443", "0.53748816", "0.53577894", "0.53488886", "0.53447765", "0.53419614", "0.53419566", "0.5340581", "0.53342634", "0.5328649", "0.53262526", "0.53195685", "0.5315586", "0.52897924", "0.5287122", "0.52863675", "0.5281851", "0.5266916", "0.52576256", "0.5257015", "0.5253475", "0.5244231", "0.52436864", "0.5241064", "0.5240804" ]
0.8266224
0
Get a builder for Sources objects.
@Contract(" -> new") public static @NotNull Builder getBuilder() { return new Builder(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Pair<String, SourceBuilder>> getSourceBuilders() {\n List<Pair<String, SourceBuilder>> builders =\n new ArrayList<Pair<String, SourceBuilder>>();\n builders.add(new Pair<String, SourceBuilder>(\"helloWorldSource\", builder()));\n return builders;\n }", "static Builder builder() {\n return new SourceContextImpl.Builder();\n }", "public com.google.api.servicemanagement.v1.ConfigSource.Builder getConfigSourceBuilder() {\n \n onChanged();\n return getConfigSourceFieldBuilder().getBuilder();\n }", "public Builder(Object source) {\n this.source = source;\n }", "static Builder builder(SourceContext source) {\n return new SourceContextImpl.Builder((SourceContextImpl) source);\n }", "public interface Builder {\n static Builder newBuilder() {\n return new BuilderImpl();\n }\n\n /**\n * All sources of the computation should register using addSource.\n * @param supplier The supplier function that is used to create the streamlet\n */\n <R> Streamlet<R> newSource(SerializableSupplier<R> supplier);\n\n /**\n * Creates a new Streamlet using the underlying generator\n * @param generator The generator that generates the tuples of the streamlet\n * @param <R>\n * @return the new streamlet\n */\n <R> Streamlet<R> newSource(Source<R> generator);\n\n /**\n * Creates a new Streamlet using the provided spout\n * @param spout The spout that emits the tuples of the streamlet\n * @param <R>\n * @return the new streamlet\n */\n <R> Streamlet<R> newSource(IRichSpout spout);\n}", "public static SourceBuilder builder() {\n return new SourceBuilder() {\n @Override\n public EventSource build(Context ctx,String... argv) {\n if (argv.length == 1) {\n return new HelloWorldSource(argv[0]);\n } else{\n return new HelloWorldSource();\n } \n }\n };\n }", "private Sources(Builder b)\n {\n super(NAMESPACE, ELEMENT);\n\n for (MediaSource ms: b.mediaSources)\n {\n addChildExtension(ms);\n }\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.api.servicemanagement.v1.ConfigSource, com.google.api.servicemanagement.v1.ConfigSource.Builder, com.google.api.servicemanagement.v1.ConfigSourceOrBuilder> \n getConfigSourceFieldBuilder() {\n if (configSourceBuilder_ == null) {\n configSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n com.google.api.servicemanagement.v1.ConfigSource, com.google.api.servicemanagement.v1.ConfigSource.Builder, com.google.api.servicemanagement.v1.ConfigSourceOrBuilder>(\n getConfigSource(),\n getParentForChildren(),\n isClean());\n configSource_ = null;\n }\n return configSourceBuilder_;\n }", "public Path.Builder getSourcePathBuilder(\n int index) {\n return getSourcePathFieldBuilder().getBuilder(index);\n }", "SourceBuilder createRepository();", "public Path createSourcespath()\n {\n if( m_sourcesPath == null )\n {\n m_sourcesPath = new Path();\n }\n Path path1 = m_sourcesPath;\n final Path path = new Path();\n path1.addPath( path );\n return path;\n }", "public java.util.List<Path.Builder>\n getSourcePathBuilderList() {\n return getSourcePathFieldBuilder().getBuilderList();\n }", "public Path.Builder addSourcePathBuilder() {\n return getSourcePathFieldBuilder().addBuilder(\n Path.getDefaultInstance());\n }", "SourceBuilder createService();", "private SearchSourceBuilder buildBaseSearchSource() {\n long histogramSearchStartTime = Math.max(0, context.start - ExtractorUtils.getHistogramIntervalMillis(context.aggs));\n\n SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder()\n .size(0)\n .query(ExtractorUtils.wrapInTimeRangeQuery(context.query, context.timeField, histogramSearchStartTime, context.end));\n\n context.aggs.getAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n context.aggs.getPipelineAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n return searchSourceBuilder;\n }", "@Provides\r\n @Named(\"source\")\r\n public BackendInstanceWrapper provideSourceWrapper() {\r\n return backendInstanceWrapper(sourceDB);\r\n }", "public static Builder builder(){ return new Builder(); }", "private Configuration createSourceElements(RoleBasedConfigurationContainerInternal configurations, ProviderFactory providerFactory, ObjectFactory objectFactory, SourceSet sourceSet) {\n String variantName = sourceSet.getName() + SOURCE_ELEMENTS_VARIANT_NAME_SUFFIX;\n\n @SuppressWarnings(\"deprecation\") Configuration variant = configurations.createWithRole(variantName, ConfigurationRolesForMigration.INTENDED_CONSUMABLE_BUCKET_TO_INTENDED_CONSUMABLE);\n variant.setDescription(\"List of source directories contained in the Main SourceSet.\");\n variant.setVisible(false);\n variant.extendsFrom(implementation);\n\n variant.attributes(attributes -> {\n attributes.attribute(Bundling.BUNDLING_ATTRIBUTE, objectFactory.named(Bundling.class, Bundling.EXTERNAL));\n attributes.attribute(Category.CATEGORY_ATTRIBUTE, objectFactory.named(Category.class, Category.VERIFICATION));\n attributes.attribute(VerificationType.VERIFICATION_TYPE_ATTRIBUTE, objectFactory.named(VerificationType.class, VerificationType.MAIN_SOURCES));\n });\n\n variant.getOutgoing().artifacts(\n sourceSet.getAllSource().getSourceDirectories().getElements().flatMap(e -> providerFactory.provider(() -> e)),\n artifact -> artifact.setType(ArtifactTypeDefinition.DIRECTORY_TYPE)\n );\n\n return variant;\n }", "java.lang.String getBuilder();", "public SourceFieldMapper() {\n\t\tthis(Defaults.NAME, Defaults.ENABLED, Defaults.FORMAT, null, -1, Defaults.INCLUDES, Defaults.EXCLUDES);\n\t}", "public proto.SocialMetricSource.Builder getSocialMetricSourceBuilder() {\n \n onChanged();\n return getSocialMetricSourceFieldBuilder().getBuilder();\n }", "public Sources()\n {\n super(NAMESPACE, ELEMENT);\n }", "static Builder builder() {\n return new Builder();\n }", "public SourceLister() {\n this(defaultSrcDirs);\n }", "@Override\n public Collection<Source> getSources() {\n\n Map<String, Source> sources = new HashMap<String, Source>();\n\n out: for (Map.Entry<String, Container> path : containers.entrySet()) {\n String sourceId = path.getKey();\n Container container = path.getValue();\n\n for (String map : categoryMaps.keySet()) {\n if (map.endsWith(\"/\")) {\n map = map.substring(0, map.lastIndexOf(\"/\"));\n }\n if (map.endsWith(sourceId)) {\n continue out;\n }\n }\n\n System.err.println(\"Doing source \" + sourceId);\n\n sourceId = applyCategoryMaps(sourceId);\n\n if (sourceId.isEmpty()) {\n continue;\n }\n\n if (sourceId.indexOf(\"/\") == -1 && !sourceId.isEmpty()) {\n if (sources.get(sourceId) == null) {\n String sourceIdShort = sourceId;\n sourceId = \"Catchup/Sources/\" + sourceIdShort;\n String sourceName = container.getTitle();\n Source source = new Source();\n source.setSourceId(sourceIdShort);\n source.setId(sourceId);\n source.setShortName(sourceName);\n source.setLongName(sourceName);\n source.setServiceUrl(\"/category?sourceId=\" + sourceId + \";type=html\");\n URI iconUri = container.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class);\n URL iconUrl = normaliseURI(iconUri);\n final String iconUrlString = iconUrl == null ? null : iconUrl.toString();\n source.setIconUrl(iconUrlString);\n sources.put(sourceId, source);\n }\n }\n\n\n\n\n }\n\n\n return sources.values();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public Builder setSource(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n source_ = value;\n onChanged();\n return this;\n }", "public Builder clearSource() {\n \n source_ = getDefaultInstance().getSource();\n onChanged();\n return this;\n }", "public Builder clearSource() {\n \n source_ = getDefaultInstance().getSource();\n onChanged();\n return this;\n }", "default Set<T> from(Set<Source> sources){\n return sources.stream()\n .map(this::from)\n .collect(Collectors.toSet());\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "private void buildSourceTable()\n {\n // validate\n Util.argCheckNull(_dt);\n\n // get entities\n try\n {\n DataSourceDobj ds = _dt.getSourceDataSource();\n Util.argCheckNull(ds);\n Vector entities = ds.getEntities();\n\n // iterate entities\n EntityDobj ent;\n for(int i = 0; entities != null && i < entities.size(); i++)\n {\n // get the entity\n ent = (EntityDobj)entities.elementAt(i);\n\n // add to source table if not in target table\n if(ent != null)\n {\n // search target list\n boolean inTarget = false;\n TransferEntity te;\n for(int j = 0; !inTarget && j < _lstTarget.getDefaultModel().getSize(); j++)\n {\n te = (TransferEntity)_lstTarget.getDefaultModel().getElementAt(j);\n if(te != null && te.getSourceEntityName().equalsIgnoreCase(ent.getName()))\n inTarget = true;\n }\n\n // if !inTarget add to source\n if(!inTarget)\n _lstSource.addItem(ent);\n }\n }\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"TransferEntitiesPanel.buildSourceTable: \" + e.toString());\n }\n }", "public static LinkBuilder builder() {\n return new LinkBuilder();\n }", "private SearchRequestBuilder createSearchBuilder(StoreURL storeURL, EsQuery esQuery) {\n SearchRequestBuilder searchBuilder = this.getClient(storeURL)\n .prepareSearch(esQuery.getGraph())\n .setQuery(RootBuilder.get(esQuery))\n .setFetchSource(true)\n .setFrom(esQuery.getPageNo())\n .setSize(esQuery.getPageSize());\n if(CollectionUtils.isNotEmpty(esQuery.getSchemas())){\n searchBuilder.setTypes(esQuery.getSchemas().toArray(new String[]{}));\n }\n this.addAggregations(esQuery, searchBuilder); // aggregation\n this.addSortFields(esQuery, searchBuilder); // sort\n this.addHighlightFields(esQuery, searchBuilder); // highlight\n return searchBuilder;\n }", "public Builder clearSource() {\n bitField0_ = (bitField0_ & ~0x00000001);\n source_ = getDefaultInstance().getSource();\n onChanged();\n return this;\n }", "public static Object builder() {\n\t\treturn null;\r\n\t}", "public static Object builder() {\n\t\treturn null;\n\t}", "public Source source(Class<? extends JsonConvertible> clazz) {\n Key key = Key.from(clazz);\n return new Source(this, key);\n }", "public Builder setSource(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n source_ = value;\n onChanged();\n return this;\n }", "public Builder setSource(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n source_ = value;\n onChanged();\n return this;\n }", "public static Builder builder ()\n {\n\n return new Builder ();\n\n }", "public static GoldenCopy.Builder builder() {\n return new GoldenCopy.Builder();\n }", "public com.google.protobuf2.Any.Builder getObjectBuilder() {\n \n onChanged();\n return getObjectFieldBuilder().getBuilder();\n }", "public OMCollection getSource() {\r\n return IServer.associationHasSource().dr(this).range();\r\n }", "public static ProxyBuilder getBuilder() {\r\n\t\tClassProxyBuilder builder = new ClassProxyBuilder();\r\n\t\treturn builder;\r\n\t}", "public LSPSource[] getSources () {\r\n return sources;\r\n }", "static Builder newBuilder() {\n return new Builder();\n }", "public noNamespace.SourceType addNewSource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.SourceType target = null;\r\n target = (noNamespace.SourceType)get_store().add_element_user(SOURCE$0);\r\n return target;\r\n }\r\n }", "public static ProductBuilder builder() {\n return ProductBuilder.of();\n }", "public static FXMLLoaderBuilder builder() {\n return new FXMLLoaderBuilder();\n }", "SourceBuilder createRestServiceLayers();", "public Pokemon.Request.Builder getRequestsBuilder(\n int index) {\n return getRequestsFieldBuilder().getBuilder(index);\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public List<String> getSources() {\n\t\treturn this.sources;\n\t}", "public static Builder newBuilder() {\n return new Builder();\n }", "public com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.Builder\n getSecretManagerKeySourceBuilder() {\n return getSecretManagerKeySourceFieldBuilder().getBuilder();\n }", "public static ApiRequest.ApiRequestBuilder builder() {\n final ApiRequest.ApiRequestBuilder builder = new ApiRequestBuilderCustom();\n return builder\n .requestStartTime(Instant.now().toEpochMilli())\n .requestId(UUID.randomUUID().toString());\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public GetBulkStateRequest build() {\n GetBulkStateRequest request = new GetBulkStateRequest();\n request.setStoreName(this.storeName);\n request.setKeys(this.keys);\n request.setMetadata(this.metadata);\n request.setParallelism(this.parallelism);\n return request;\n }", "public GetBuilder get() {\n return new GetBuilder(this);\n }", "@NotNull\n EntityIterable getSource();", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public Builder withSource(File source) {\n this.source = checkNotNull(source);\n return this;\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource,\n com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.Builder,\n com.google.cloud.video.livestream.v1.Encryption.SecretManagerSourceOrBuilder>\n getSecretManagerKeySourceFieldBuilder() {\n if (secretManagerKeySourceBuilder_ == null) {\n if (!(secretSourceCase_ == 7)) {\n secretSource_ =\n com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource\n .getDefaultInstance();\n }\n secretManagerKeySourceBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource,\n com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.Builder,\n com.google.cloud.video.livestream.v1.Encryption.SecretManagerSourceOrBuilder>(\n (com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource) secretSource_,\n getParentForChildren(),\n isClean());\n secretSource_ = null;\n }\n secretSourceCase_ = 7;\n onChanged();\n return secretManagerKeySourceBuilder_;\n }", "Type getSource();", "public static Builder newBuilder() {\n return Builder.createDefault();\n }", "public static Builder newBuilder() {\n return Builder.createDefault();\n }", "public Builder() {}", "public Builder() {}" ]
[ "0.70794827", "0.66036296", "0.62898254", "0.62452745", "0.6086396", "0.6051807", "0.60114676", "0.5904729", "0.5794105", "0.5786602", "0.56847215", "0.5618108", "0.5570705", "0.55344075", "0.5499739", "0.53471154", "0.5315381", "0.52949256", "0.5237974", "0.52228063", "0.52221197", "0.5217523", "0.5213118", "0.51929814", "0.5189343", "0.51701295", "0.5118783", "0.5118783", "0.5118783", "0.5118783", "0.50948757", "0.5089811", "0.5089811", "0.5085736", "0.50847685", "0.50847685", "0.50847685", "0.50847685", "0.50847685", "0.50847685", "0.50847685", "0.50847685", "0.50847685", "0.50847685", "0.50847685", "0.508099", "0.508099", "0.508099", "0.5079255", "0.5074968", "0.5072893", "0.50688624", "0.504976", "0.5048485", "0.5046817", "0.50316346", "0.50316346", "0.5024464", "0.49974343", "0.4972074", "0.4971546", "0.4941566", "0.49197966", "0.49192902", "0.49164107", "0.49141148", "0.49103245", "0.49082658", "0.49041563", "0.48995242", "0.48995242", "0.48995242", "0.4895735", "0.4894026", "0.48934782", "0.48933813", "0.48918366", "0.4888919", "0.4888919", "0.4888919", "0.4888919", "0.4888919", "0.4888919", "0.4888919", "0.48854032", "0.48839438", "0.48796007", "0.48792574", "0.48792574", "0.48792574", "0.48792574", "0.48538002", "0.48538002", "0.4852412", "0.48477003", "0.4846746", "0.48410368", "0.48410368", "0.48376334", "0.48376334" ]
0.4951559
61
Add a payload type to the media being built.
public Builder addMediaSource(MediaSource pt) { mediaSources.add(pt); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Builder addAdditionalType(String value);", "void addMediaContent(String name, byte[] payload);", "public void addMediaType(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), MEDIATYPE, value);\r\n\t}", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type addNewType();", "public void addMediaType( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), MEDIATYPE, value);\r\n\t}", "public void addType(TypeData type) { types.add(type); }", "public static void addMediaType(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.add(model, instanceResource, MEDIATYPE, value);\r\n\t}", "Builder addAdditionalType(URL value);", "public static void addMediaType( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, MEDIATYPE, value);\r\n\t}", "public int getPayloadType() {\n return this.payloadType;\n }", "public int getPayloadType() {\n return _payload;\n }", "public void addContentType( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), CONTENTTYPE, value);\r\n\t}", "public void addContentType(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), CONTENTTYPE, value);\r\n\t}", "public void setAudioPayloadTypes(PayloadType[] payloadTypes);", "@Override\n\tpublic void addInstrumentType(String type) {\n\t\t\n\t}", "public com.vodafone.global.er.decoupling.binding.request.PayloadType createPayloadType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PayloadTypeImpl();\n }", "public ThreeDSecureRequest addType(String type) {\n this.type = type;\n return this;\n }", "public void setType(String type)\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\tif (type == null || type.equals(\"\")) {\n\t\t\t\tif (typeElement != null)\n\t\t\t\t\tmediaElement.removeChild(typeElement);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (typeElement == null) {\n\t\t\t\t\ttypeElement = document.createElement(TYPE_ELEMENT_NAME);\n\t\t\t\t\tmediaElement.appendChild(typeElement);\n\t\t\t\t}\n\t\t\t\ttypeElement.setTextContent(type);\n\t\t\t}\n\t\t}", "Builder addAssociatedMedia(String value);", "public void setPayload(String payload);", "public static void addContentType(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.add(model, instanceResource, CONTENTTYPE, value);\r\n\t}", "public static void addContentType( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, CONTENTTYPE, value);\r\n\t}", "@NotNull public Builder additionalType(@NotNull String additionalType) {\n putValue(\"additionalType\", additionalType);\n return this;\n }", "@NotNull public Builder additionalType(@NotNull String additionalType) {\n putValue(\"additionalType\", additionalType);\n return this;\n }", "@NotNull public Builder additionalType(@NotNull String additionalType) {\n putValue(\"additionalType\", additionalType);\n return this;\n }", "public abstract void addValue(String str, Type type);", "public void setVideoPayloadTypes(PayloadType[] payloadTypes);", "public void add(Type t);", "public void addType(ValueType type) {\n\t\ttypes.add(type);\n\t}", "Builder addAssociatedMedia(MediaObject value);", "public void addMediaMessageListener(String type, MediaMessageListener listener) {\n MediaMessageDispatcher.getInstance(media).addMessageListener(type, listener);\n }", "Builder addAssociatedMedia(MediaObject.Builder value);", "public void addFileType(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), FILETYPE, value);\r\n\t}", "private TextMessage setJson (String type, String payload){\n Message ret = new Message();\n ret.setType(type);\n ret.setPayload(payload);\n\n // build message to json\n return new TextMessage(new Gson().toJson(ret));\n }", "public void postCreate(MavenProject project, ArtifactHandlerManager artifactHandlerManager) {\n if (types.isEmpty()) {\n Type t = new Type();\n ArtifactHandler h = artifactHandlerManager.getArtifactHandler(project.getPackaging());\n if (h!=null)\n t.type = h.getExtension();\n else\n t.type = h.getPackaging();\n types.add(t);\n }\n }", "public void addType(String value) {\n/* 380 */ addStringToBag(\"type\", value);\n/* */ }", "public void setTextPayloadTypes(PayloadType[] payloadTypes);", "Builder addInteractivityType(String value);", "public PayloadType getPayloadType(String type, int rate, int channels);", "public void addFileType( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), FILETYPE, value);\r\n\t}", "public void addInludedTransportType(Integer includedTransportType);", "public Type addType() {\n\t\tType newType = new Type();\n\t\tgetType().add(newType);\n\t\treturn newType; \n\t}", "public void setPayload(String payload) {\n this.payload = payload;\n }", "public void addType(String name, Type type) {\n addTypeImpl(name, type, false);\n }", "public void addAnnotationType(Object annotationType) {\n \t\taddAnnotationType(annotationType, SQUIGGLES);\n \t}", "public boolean addType(ElementType type) {\r\n\t\treturn types.add( type );\r\n\t}", "public void setPayload(Payload payload) {\n this.payload = payload;\n }", "public void setMime_type(String value)\r\n {\r\n getSemanticObject().setProperty(data_mime_type, value);\r\n }", "public Integer addPaymentType(PaymentTypeObject paymentTypeObject) throws AppException;", "public void setPayload(String payload) {\n this.payload = payload;\n }", "void addTariffType(String tariffType) throws ServiceException;", "public static void addToMOTD(String item, String type, Player target) {\n boolean worked;\n switch (type) {\n case \"priority\": {\n if (!motd.has(\"priority\")) {\n motd.put(\"priority\", new JSONArray());\n }\n motd.getJSONArray(\"priority\").put(item);\n worked = saveMOTD();\n if (worked) target.sendMessage(ChatColor.GREEN + \" > Message added to the MOTD Priority list.\");\n else target.sendMessage(ChatColor.RED + \" > Error: Unable to save the modified motd! Check with your server administrator!\");\n break;\n }\n case \"normal\": {\n if (!motd.has(\"normal\")) {\n motd.put(\"normal\", new JSONArray());\n }\n motd.getJSONArray(\"normal\").put(item);\n worked = saveMOTD();\n if (worked) target.sendMessage(ChatColor.GREEN + \" > Message added to the MOTD Normal list.\");\n else target.sendMessage(ChatColor.RED + \" > Error: Unable to save the modified motd! Check with your server administrator!\");\n break;\n }\n case \"title\": {\n motd.put(\"title\", item);\n worked = saveMOTD();\n if (worked) target.sendMessage(ChatColor.GREEN + \" > Message added the title to the MOTD.\");\n else target.sendMessage(ChatColor.RED + \" > Error: Unable to save the modified motd! Check with your server administrator!\");\n break;\n }\n }\n }", "public MediaTypeBuilder () {\n this.parameters = new HashMap<String, String>();\n this.type = \"application\";\n this.subtype = \"octet-stream\";\n }", "public abstract void Enqueue (Type item);", "public void setMediaType(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), MEDIATYPE, value);\r\n\t}", "public MediaTypeBuilder (String type, String subtype) {\n this.parameters = new HashMap<String, String>();\n this.SetTopLevelType(type);\n this.SetSubType(subtype);\n }", "public boolean add(Type item);", "public void xsetMediaType(org.apache.xmlbeans.XmlString mediaType)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(MEDIATYPE$18);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(MEDIATYPE$18);\n }\n target.set(mediaType);\n }\n }", "public void setPayload(Source payload);", "public Builder addPayload(Pokemon.Payload value) {\n if (payloadBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensurePayloadIsMutable();\n payload_.add(value);\n onChanged();\n } else {\n payloadBuilder_.addMessage(value);\n }\n return this;\n }", "void addVariant(PushApplication pushApp, Variant variant);", "public void registerMedia(String mediaTypeId,String period,String sendTo) {\r\n\t\tmediaUser.put(\"active\", 0);\r\n\t\tmediaUser.put(\"mediatypeid\", mediaTypeId);\r\n\t\tmediaUser.put(\"period\", period);\r\n\t\tmediaUser.put(\"sendto\", sendTo);\r\n\t\t//mediaUser.put(\"userid\", userId);\r\n\t\tmediaUser.put(\"severity\", 0);\r\n\t}", "@Override\n public void embedding(String mineType, byte[] bytes) {\n latestStepResult.getEmbeddingList().add(new Embedding(bytes, mineType));\n }", "public void assignMediaType(Shape shape, Graph graph) {\r\n\t\tString mediaTypeName = mediaTypeNamer.baseMediaTypeName(shape);\r\n\t\tLiteral literal = new KonigLiteral(mediaTypeName);\r\n\t\tgraph.edge(shape.getId(), Konig.mediaTypeBaseName, literal);\r\n\t}", "Builder addInteractivityType(Text value);", "MediaType createMediaType();", "void add(MediaItem... items);", "public void setMetaType(ARecordType metaType);", "@Override\n\tpublic int addMediaRecord(MediaRecord record) {\n\t\treturn mediaRecordMapper.insertSelective(record);\n\t}", "@Override\n\tpublic void setType(String type) {\n\t}", "public edu.umich.icpsr.ddi.FileTypeType addNewFileType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileTypeType target = null;\n target = (edu.umich.icpsr.ddi.FileTypeType)get_store().add_element_user(FILETYPE$8);\n return target;\n }\n }", "public static void addFileType(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.add(model, instanceResource, FILETYPE, value);\r\n\t}", "void setType(String type) {\n this.type = type;\n }", "public void addType(TypeDeclaration type) {\n m_classBuilder.addType(type);\n }", "public void setMediaType(java.lang.String mediaType)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MEDIATYPE$18);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MEDIATYPE$18);\n }\n target.setStringValue(mediaType);\n }\n }", "public void setContentType(MediaType mediaType)\r\n/* 186: */ {\r\n/* 187:278 */ Assert.isTrue(!mediaType.isWildcardType(), \"'Content-Type' cannot contain wildcard type '*'\");\r\n/* 188:279 */ Assert.isTrue(!mediaType.isWildcardSubtype(), \"'Content-Type' cannot contain wildcard subtype '*'\");\r\n/* 189:280 */ set(\"Content-Type\", mediaType.toString());\r\n/* 190: */ }", "public Media addNewMedia(String id)\n\t\t{\n\t\t\tElement mediaElement = document.createElement(MEDIA_ELEMENT_NAME);\n\t\t\tMedia media = new Media(mediaElement);\n\t\t\tmedia.setId(id);\n\n\t\t\tendpointElement.appendChild(mediaElement);\n\t\t\tmediasList.add(media);\n\n\t\t\treturn media;\n\t\t}", "void enqueue(BasePayload payload, EnqueueCallback callback);", "public int getPayloadType() {\n return (buffer.get(1) & 0xff & 0x7f);\n }", "MediaTypesLibrary createMediaTypesLibrary();", "@Override\n public void setType(String type) {\n this.type = type;\n }", "<T extends ListenableEvent> ActionItem addAction(ActionType<T> type, Action<T> action);", "public void addMedia(Media media)\n\t\t{\n\t\t\tMedia newMedia = addNewMedia(media.getId());\n\t\t\tnewMedia.setSrcId(media.getSrcId());\n\t\t\tnewMedia.setType(media.getType());\n\t\t\tnewMedia.setStatus(media.getStatus());\n\t\t}", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public static void addFileType( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, FILETYPE, value);\r\n\t}", "public void setType(String type) \n {\n this.type = type;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setContentType(String contentType);", "protected void addInventoryItemType() {\n\t\tProperties props = new Properties();\n\n\t\t/* DEBUG\n\t\t\n\t\tSystem.out.println(typeNameTF.getText());\n\t\tSystem.out.println(unitsTF.getText());\n\t\tSystem.out.println(unitMeasureTF.getText());\n\t\tSystem.out.println(validityDaysTF.getText());\n\t\tSystem.out.println(reorderPointTF.getText());\n\t\tSystem.out.println(notesTF.getText());\n\t\tSystem.out.println(statusCB.getValue());\n\t\n\t\t*/ \n\n\t\t// Set the values.\n\t\tprops.setProperty(\"ItemTypeName\", typeNameTF.getText());\n\t\tprops.setProperty(\"Units\", unitsTF.getText());\n\t\tprops.setProperty(\"UnitMeasure\", unitMeasureTF.getText());\n\t\tprops.setProperty(\"ValidityDays\", validityDaysTF.getText());\n\t\tprops.setProperty(\"ReorderPoint\", reorderPointTF.getText());\n\t\tprops.setProperty(\"Notes\", notesTF.getText());\n\t\tprops.setProperty(\"Status\", (String) statusCB.getValue());\n\n\t\t// Create the inventory item type.\n\t\tInventoryItemType iit = new InventoryItemType(props);\n\n\t\t// Save it into the database.\n\t\tiit.update();\n\n\t\tpopulateFields();\n\t\t\n\t\t// Display message on GUI.\n\t\t//submitBTN.setVisible(false);\n\t\tcancelBTN.setText(\"Back\");\n\t\tmessageLBL.setText(\"Inventory Item Type added.\");\n\t}", "public void addActionType(ActionTypeDescriptor actionType) {\r\n this.actionTypes.add(actionType);\r\n }", "public interface ICalendarEntryPayloadType\n{\n\t\n\t/**\n\t * Returns the unique ID of this payload type.\n\t * @return\n\t */\n\tpublic int getTypeId();\n\t\n\t/**\n\t * Deserialize payload from XML.\n\t * @param element\n\t * @return\n\t * @throws ParseException \n\t */\n\tpublic ICalendarEntryPayload parsePayload( Element element ) throws ParseException ;\n\t\n\t/**\n\t * Serialize payload to XML.\n\t * \n\t * @param parent\n\t * @param entry\n\t */\n\tpublic void storePayload( Document document , Element parent , ICalendarEntry entry );\n\t\n}", "public void setPayload(Object payload, JAXBContext context);", "public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }", "public void setType(String type);", "public void setType(String type);", "public void setType(String type);", "public void addParam(String type) {\n String[] origParams = getParamNames();\n String[] params = new String[origParams.length + 1];\n for (int i = 0; i < origParams.length; i++)\n params[i] = origParams[i];\n params[origParams.length] = type;\n setParams(params);\n }", "public Payload add(String key, String value) {\n getData().put(key, value);\n return this;\n }", "@Override\n public JsonElement serialize(AbstractPacketPayload src, Type typeOfSrc, JsonSerializationContext context) {\n JsonObject result = new JsonObject();\n\n result.add(\"type\", new JsonPrimitive(src.getClass().getName()));\n result.add(\"payload\", context.serialize(src, src.getClass()));\n\n return result;\n }" ]
[ "0.65769374", "0.6367739", "0.6231634", "0.61973405", "0.60946137", "0.6008866", "0.5833741", "0.5805591", "0.57342416", "0.56859267", "0.5621534", "0.55690247", "0.5560575", "0.55592835", "0.5531719", "0.54904264", "0.54849464", "0.5465012", "0.54183924", "0.5403887", "0.5383421", "0.5364485", "0.5355271", "0.5355271", "0.5355271", "0.531767", "0.5317572", "0.5316876", "0.531218", "0.52743983", "0.5226007", "0.5181633", "0.5148655", "0.51421154", "0.51225185", "0.51178485", "0.5113632", "0.5111635", "0.5098486", "0.5090982", "0.50711393", "0.5068556", "0.5065819", "0.5057009", "0.5049484", "0.5029147", "0.5016984", "0.50143373", "0.49917033", "0.49900597", "0.49848577", "0.49420637", "0.49277863", "0.48965967", "0.48304245", "0.48041254", "0.48018104", "0.47914794", "0.478862", "0.47821406", "0.4779077", "0.47721705", "0.47672513", "0.47634965", "0.47410268", "0.4729256", "0.47259548", "0.47227368", "0.47212347", "0.47205257", "0.47173128", "0.4716991", "0.47152388", "0.4712345", "0.47041687", "0.46954188", "0.4683987", "0.46827635", "0.46720132", "0.46698424", "0.46638194", "0.46608278", "0.4658406", "0.46457475", "0.46457475", "0.46440756", "0.46387136", "0.4628264", "0.46265703", "0.46244186", "0.46236014", "0.46175113", "0.46140823", "0.46140236", "0.46132183", "0.46120092", "0.46120092", "0.46120092", "0.46117008", "0.4607958", "0.46071044" ]
0.0
-1
/ TODO: add something to set values from higherlevel Jingle structures.
private Builder() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set(String name, PyObject value) {\n }", "Object setValue(Object value) throws NullPointerException;", "public void setValue(Object value) { this.value = value; }", "public void set(String name, Object value) {\n }", "public void setValue(S s) { value = s; }", "void setValue(Object value);", "@Override\n\tpublic void setValue(String arg0, String arg1) {\n\t\t\n\t}", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public native void set(T value);", "public V setValue(V value);", "protected abstract void setValue(V value);", "public void setValue(Object value);", "String setValue();", "protected void setSequnce(ProtocolSequence ps) {\n\n\t\tps.add(\"result\", 0);\n\t\tps.add(\"fightId\", 0);\n\t\t// ps.add(\"landForm\", 0);\n\t\tps.addString(\"fightMapType\", \"flashCode\", 0);\n\t\tps.add(\"fightType\", 0);\n\t\tps.add(\"endTime1\", 0);\n\t\tps.add(\"endTime2\", 0);\n\t\tps.add(\"controlType\", 0);\n\t\tps.add(\"count\", 0);\n\t\tps.addObjectArray(\n\t\t\t\t\"list\",\n\t\t\t\t\"com.snail.webgame.engine.component.scene.protocal.fight.in.RoleInFightArmy\",\n\t\t\t\t\"count\");\n\t\t// ps.add(\"duelEndTime1\", 0);\n\t\t// ps.add(\"maxDeulRound\", 0);\n\t\t// ps.add(\"duelState\", 0);\n\t\t// ps.add(\"duelPhalanxCount\", 0);\n\t\t// ps.addObjectArray(\"duelPhalanxList\",\n\t\t// \"com.snail.webgame.game.protocal.fight.in.DuelPhalanxRe\",\n\t\t// \"duelPhalanxCount\");\n\t}", "@Override\r\n protected void setFieldValues (Object ... fields)\r\n {\n \r\n }", "private void assignment() {\n\n\t\t\t}", "public abstract Object fromProtoValue(Object in);", "public static void setObj(Object holder, Object index, IRubyObject value) {\n\n\t\t// rubyobject and string name?\n\t\tif (holder instanceof RubyObject && index instanceof String) {\n\t\t\t// get vars\n\t\t\tRubyObject rb = (RubyObject) holder;\n\t\t\tString var = (String) index;\n\n\t\t\t// set it\n\t\t\trb.setInstanceVariable(var, value);\n\n\t\t\treturn;\n\t\t}\n\n\t\t// arraylisr and index id?\n\t\tif (holder instanceof ArrayList && index instanceof Integer) {\n\t\t\t// get vars\n\t\t\tArrayList<IRubyObject> ary = (ArrayList<IRubyObject>) holder;\n\t\t\tint id = (Integer) index;\n\n\t\t\t// remove\n\t\t\tary.remove(id);\n\n\t\t\t// set\n\t\t\tary.add(id, value);\n\n\t\t\treturn;\n\t\t}\n\n\t\t// RubyArray and index id?\n\t\tif (holder instanceof RubyArray && index instanceof Integer) {\n\t\t\t// get vars\n\t\t\tRubyArray ary = (RubyArray) holder;\n\t\t\tint id = (Integer) index;\n\n\t\t\t// remove\n\t\t\tary.remove(id);\n\n\t\t\t// set\n\t\t\tary.add(id, value);\n\n\t\t\treturn;\n\t\t}\n\n\t\t// nothing?\n\t\tYEx.info(\"Can not set Ruby obj for holder \" + holder.getClass() + \" and index \" + index.getClass(), new IllegalArgumentException(\n\t\t\t\t\"holder \" + holder.getClass() + \" and index \" + index.getClass()));\n\t}", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "public void setObjet(Object messageObject) throws UtilsException;", "public void setValue(Object val);", "void setValue(V value);", "public void setJ(byte[] value) {\n this.j = ((byte[]) value);\n }", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "private void setValues(PreparedStatement ps, int type, String key, Object value) throws SQLException, PropertyException {\n String driverName;\n\n try {\n driverName = ps.getConnection().getMetaData().getDriverName().toUpperCase();\n } catch (Exception e) {\n driverName = \"\";\n }\n\n ps.setNull(1, Types.VARCHAR);\n ps.setNull(2, Types.TIMESTAMP);\n\n // Patched by Edson Richter for MS SQL Server JDBC Support!\n // Oracle support suggestion also Michael G. Slack\n if ((driverName.indexOf(\"SQLSERVER\") >= 0) || (driverName.indexOf(\"ORACLE\") >= 0)) {\n ps.setNull(3, Types.BINARY);\n } else {\n ps.setNull(3, Types.BLOB);\n }\n\n ps.setNull(4, Types.FLOAT);\n ps.setNull(5, Types.NUMERIC);\n ps.setInt(6, type);\n ps.setString(7, globalKey);\n ps.setString(8, key);\n\n switch (type) {\n case PropertySet.BOOLEAN:\n\n Boolean boolVal = (Boolean) value;\n ps.setInt(5, boolVal.booleanValue() ? 1 : 0);\n\n break;\n\n case PropertySet.DATA:\n\n Data data = (Data) value;\n ps.setBytes(3, data.getBytes());\n\n break;\n\n case PropertySet.DATE:\n\n Date date = (Date) value;\n ps.setTimestamp(2, new Timestamp(date.getTime()));\n\n break;\n\n case PropertySet.DOUBLE:\n\n Double d = (Double) value;\n ps.setDouble(4, d.doubleValue());\n\n break;\n\n case PropertySet.INT:\n\n Integer i = (Integer) value;\n ps.setInt(5, i.intValue());\n\n break;\n\n case PropertySet.LONG:\n\n Long l = (Long) value;\n ps.setLong(5, l.longValue());\n\n break;\n\n case PropertySet.STRING:\n ps.setString(1, (String) value);\n\n break;\n\n default:\n throw new PropertyException(\"This type isn't supported!\");\n }\n }", "@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "protected abstract Set method_1559();", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "@Override\n\tpublic void setValue(Object object) {\n\n\t}", "@Override\n\t\tpublic V setValue(V p1){\n\t\t\treturn p1;\n\t\t}", "public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}", "public void setValue(final Object value) { _value = value; }", "public static native void Set(long lpjFbxDualQuaternion, double pX1, double pY1, double pZ1, double pW1, double pX2, double pY2, double pZ2, double pW2);", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n private void setStringValue(final String valueString) {\n // figure out the type of T and create object based on T=Integer, T=Double, T=Boolean, T=Valuable\n if (value instanceof List<?>) {\n List list = (List) get();\n list.clear();\n // remove start and end spaces\n String valueString2 = valueString.replaceAll(\"^\\\\s+\", \"\");\n valueString2 = valueString2.replaceAll(\"\\\\s+$\", \"\");\n // split into space-separated bits\n String[] valuesString = valueString2.split(\"\\\\s+\");\n for (int i = 0; i < valuesString.length; i++) {\n if (theClass.equals(Integer.class)) {\n list.add(new Integer(valuesString[i % valuesString.length]));\n } else if (theClass.equals(Double.class)) {\n list.add(new Double(valuesString[i % valuesString.length]));\n } else if (theClass.equals(Boolean.class)) {\n String str = valuesString[i % valuesString.length].toLowerCase();\n list.add(str.equals(\"1\") || str.equals(\"true\") || str.equals(\"yes\"));\n } else if (theClass.equals(String.class)) {\n list.add(new String(valuesString[i % valuesString.length]));\n }\n }\n return;\n }\n\n if (theClass.equals(Integer.class)) {\n setValue(new Integer(valueString));\n return;\n }\n if (theClass.equals(Double.class)) {\n \tsetValue(new Double(valueString));\n return;\n }\n if (theClass.equals(Boolean.class)) {\n final String valueString2 = valueString.toLowerCase();\n if (valueString2.equals(\"yes\") || valueString2.equals(\"true\")) {\n \tsetValue(Boolean.TRUE);\n return;\n } else if (valueString2.equals(\"no\") || valueString2.equals(\"false\")) {\n \tsetValue(Boolean.FALSE);\n return;\n }\n }\n if (theClass.equals(Function.class)) {\n \tfinal Function.Constant param = new Function.Constant(valueString);\n \tsetValue(param);\n param.getOutputs().add(BEASTObjectStore.INSTANCE.getBEASTObject(beastObject));\n return;\n }\n\n if (theClass.isEnum()) {\n \tif (possibleValues == null) {\n \t\tpossibleValues = (T[]) theClass.getDeclaringClass().getEnumConstants();\n \t}\n for (final T t : possibleValues) {\n if (valueString.equals(t.toString())) {\n \tsetValue(t);\n return;\n }\n }\n throw new IllegalArgumentException(\"Input 104: value \" + valueString + \" not found. Select one of \" + Arrays.toString(possibleValues));\n }\n\n // call a string constructor of theClass\n try {\n Constructor ctor;\n Object v = valueString;\n try {\n \tctor = theClass.getDeclaredConstructor(String.class);\n } catch (NoSuchMethodException e) {\n \t// we get here if there is not String constructor\n \t// try integer constructor instead\n \ttry {\n \t\tif (valueString.startsWith(\"0x\")) {\n \t\t\tv = Integer.parseInt(valueString.substring(2), 16);\n \t\t} else {\n \t\t\tv = Integer.parseInt(valueString);\n \t\t}\n \tctor = theClass.getDeclaredConstructor(int.class);\n \t\n \t} catch (NumberFormatException e2) {\n \t// could not parse as integer, try double instead\n \t\tv = Double.parseDouble(valueString);\n \tctor = theClass.getDeclaredConstructor(double.class);\n \t}\n }\n ctor.setAccessible(true);\n final Object o = ctor.newInstance(v);\n setValue(o);\n if (o instanceof BEASTInterface) {\n ((BEASTInterface) o).getOutputs().add(BEASTObjectStore.INSTANCE.getBEASTObject(beastObject));\n }\n } catch (Exception e) {\n throw new IllegalArgumentException(\"Input 103: type mismatch, cannot initialize input '\" + getName() +\n \"' with value '\" + valueString + \"'.\\nExpected something of type \" + getType().getName() +\n \".\\n\" + (e.getMessage() != null ? e.getMessage() : \"\"));\n }\n }", "public void setC_Conversion_UOM_ID (int C_Conversion_UOM_ID)\n{\nset_Value (\"C_Conversion_UOM_ID\", new Integer(C_Conversion_UOM_ID));\n}", "void setValue(Object object, Object value);", "void set( couple ch)\r\n { \r\n \r\n //couple ch = itr.next();\r\n ch.g1.sethappy(ch.bucket);\r\n ch.b1.sethappy(ch.bucket);\r\n ch.happiness = ch.b1.happy + ch.g1.happy;\r\n ch.compatibility = (ch.b1.budget - ch.g1.getmaint()) + Math.abs(ch.b1.getintg() - ch.g1.getiq()) + Math.abs(ch.b1.getattr() - ch.g1.getb());\r\n // this sets the happiness n compatibility of the co \r\n \r\n }", "public abstract void set(T v, String context);", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public abstract void set(DataType x, DataType y, DataType z);", "void setParameters() {\n\t\t\n\t}", "godot.wire.Wire.ValueOrBuilder getDataOrBuilder();", "public abstract void setValue(T value);", "protected static void setParam(Object o, Field f, CommandSetting s, String key) throws ReflectiveOperationException,\r\n\t\t\tNameNotFoundException, IllegalArgumentException, notFoundException, CannotConvertException {\n\t\tf.setAccessible(true);\r\n\t\tClass<?> cls = f.getType();\r\n\t\tif (cls == int.class) {\r\n\t\t\tf.set(o, s.getAsInt(key));\r\n\t\t} else if (cls == double.class) {\r\n\t\t\tf.set(o, s.getAsDouble(key));\r\n\t\t} else if (cls == boolean.class) {\r\n\t\t\tf.set(o, s.getAsBool(key));\r\n\t\t} else if (Sequence.class.isAssignableFrom(cls)) {\r\n\t\t\tassert false;\r\n\r\n\t\t\t// f.set(o, Sequence.getSequence(s.getAsStr(key)));\r\n\t\t} else {\r\n\t\t\tf.set(o, s.get(key));\r\n\t\t}\r\n\t}", "void setElementValue(SetElementValue cmd);", "protected Value() {\n flags = 0;\n num = null;\n str = null;\n object_labels = getters = setters = null;\n excluded_strings = included_strings = null;\n functionPartitions = null;\n functionTypeSignatures = null;\n var = null;\n hashcode = 0;\n }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public interface MpiSetter {\n public static final String MPI_LIB_BIND_PATH = null;\n public static final String MPI_EXAMPLE_BIND_PATH = null;\n public static final String MPI_HOSTFILE_EXAMPLE_PATH = \"/mnt/lustre/app/hostfile/:/hostfile_example\";\n public static final String MPI_EXE_BIND_PATH = \"/mnt/lustre/scratch/%s/exe:/root/exe\";\n public static final String MPI_OUTPUT_PATH = \"/mnt/lustre/scratch/%s/output:/root/output\";\n\n public abstract List<String> setMpiBind(JobMessage jobMessage);\n public abstract void startMpi(DockerClient dc, List<ContainerInfo> infoList, JobMessage jobMessage);\n public abstract void createHostfile(DockerClient dc, List<ContainerInfo> infoList);\n}", "final void set(int param1, Scriptable param2, Object param3) {\n }", "protected void setUp() {\n multiplicity = new MultiplicityImpl();\n owner = new StereotypeImpl();\n typedValue = new TaggedValueImpl();\n instance = new TagDefinitionImpl();\n }", "public void setValues(){\r\n int k=0;\r\n String[] var;\r\n String evar;\r\n \r\n //Set Values \r\n for (int i=0; i<linkVector.size(); i++){\r\n var= (String[]) linkVector.elementAt(i);\r\n evar=var[1];\r\n try { \r\n varContextField= varContextFields[linkIndex[k]]; \r\n switch (linkType[k++]){\r\n case DOUBLE: setValue(evar,varContextField.getDouble(varContextObject)); break;\r\n case ARRAYDOUBLE: setValue(evar,(double[])varContextField.get(varContextObject)); break;\r\n case ARRAYDOUBLE2D: setValue(evar,(double[][])varContextField.get(varContextObject)); break;\r\n case STRING: setValue(evar,(String)varContextField.get(varContextObject)); break; \r\n }\r\n \r\n } catch (java.lang.IllegalAccessException e) {\r\n System.out.println(\"Error Step: setting a value \" + e);\r\n } \r\n } \r\n }", "@Override\n\tpublic void initializeValues() {\n\n\t}", "public abstract T set(T message, String fieldName, Object value)\n throws DatabaseSchemaException, DatabaseRequestException;", "void setParameter(String name, Object value);", "void setTechStuff(com.hps.july.persistence.Worker aTechStuff) throws java.rmi.RemoteException;", "@Test\n\tpublic void testSetAvroField() {\n\t}", "public void setValue (String Value);", "@Override\n public void setValue(Value[] values) throws ValueFormatException,\n VersionException, LockException, ConstraintViolationException,\n RepositoryException {\n \n }", "public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}", "protected void setValues(PreparedStatement ps, LobCreator lobCreator) \r\n\t\t throws SQLException {\n\t\t lobCreator.setBlobAsBinaryStream(ps, 1, blobIs, (int)blobIn.length()); \r\n\t\t ps.setString(2, str_D_NUMBER);\r\n\t\t ps.setString(3, str_flag);\r\n\t\t \r\n\t\t }", "public void setEntity(String parName, Object parVal) throws HibException;", "private void setRoomObject(String address, UByte[] value, boolean state) {\r\n //create a packet and address it to the ARNE module\r\n MbPacket p = new MbPacket();\r\n p.setDestination(new MbLocation(\"self\", \"ARNE\"));\r\n //ARNE packet in XML-format\r\n String contentValueData = \"\";\r\n for (int i = 0; i < value.length; i++) \r\n {\r\n \tcontentValueData = contentValueData + \"<byte id=\\\"\" + (i+2) + \"\\\" value=\\\"\" + Integer.toString(value[i].shortValue()) + \"\\\"/>\";\r\n } \r\n int arneBytes = value.length+1;\r\n p.setContents(\"<arnepacket bytes=\\\"\" + arneBytes + \"\\\" destnode=\\\"\" + address + \"\\\">\" +\r\n \"<byte id=\\\"1\\\" value=\\\"\" + (state==true ? \"01\" : \"02\") + \"\\\"/>\" +\r\n contentValueData +\r\n \"</arnepacket>\");\r\n sendPacket(p);\r\n }", "public void setValue(A value) {this.value = value; }", "@Override\n public void setValue(Node value) throws ValueFormatException,\n VersionException, LockException, ConstraintViolationException,\n RepositoryException {\n \n }", "@Before\r\n\tpublic void set()\r\n\t{\n\t\tif (!Message.configure(\"wordsweeper.xsd\")) {\r\n\t\t\tfail (\"unable to configure protocol\");\r\n\t\t}\r\n\t\tModel.serverAccess = mockServer;\r\n\t\tModel.gameLayout = gameLayout;\r\n\t\tModel.GAME = game;\r\n\t\tModel.PLAYER = player;\r\n\t\tModel.BOARD = board;\r\n\t\tModel.gameLayout.setLayout();\r\n\t\tModel.gameLayout.addListener();\r\n\t}", "public void setValue(Object value) {\n setValue(value.toString());\n }", "@Override\n\tprotected void setValue(String name, TipiValue tv) {\n\t}", "public void setValue2(Object value2) { this.value2 = value2; }", "@Before\n public void setUp() {\n System.setProperty(\"java.protocol.handler.pkgs\",\n \"org.jvoicexml.jsapi2.protocols\");\n }", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "public abstract void setValue(Context c, Object v) throws PropertyException;", "void set(ByteModule byteModule);", "public void setObject(XSerial obj);", "@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}", "@Override\n\tpublic void builder(String name, Object value)\n\t{\n\t\tthis._data.put( name, this.preprocessObject(value));\n\t}", "public void setValue(Object param1, Object param2) {\n }", "ISlot set(IStrongSlot target, LuaValue value);", "public abstract void set(M newValue);", "public void setSubtype(typekey.LocationNamedInsured value);", "@Override\n public void setJoke(String aJoke) {\n }", "public abstract void setInternal(int head, int ct, int t, int arm, int leg);", "public interface Value {\n Word asWord();\n\n int toSInt();\n\n BigInteger toBInt();\n\n short toHInt();\n\n byte toByte();\n\n double toDFlo();\n\n float toSFlo();\n\n Object toArray();\n\n Record toRecord();\n\n Clos toClos();\n\n MultiRecord toMulti();\n\n boolean toBool();\n\n char toChar();\n\n Object toPtr();\n\n Env toEnv();\n\n <T> T toJavaObj();\n\n public class U {\n static public Record toRecord(Value value) {\n if (value == null)\n return null;\n else\n return value.toRecord();\n }\n\n public static Value fromBool(boolean b) {\n return new Bool(b);\n }\n\n public static Value fromSInt(int x) {\n return new SInt(x);\n }\n\n public static Value fromArray(Object x) {\n return new Array(x);\n }\n\n public static Value fromBInt(BigInteger x) {\n return new BInt(x);\n }\n\n public static Value fromPtr(Object o) {\n return new Ptr(o);\n }\n\n public static Value fromSFlo(float o) {\n return new SFlo(o);\n }\n\n public static Value fromDFlo(double o) {\n return new DFlo(o);\n }\n\n public static Value fromChar(char o) {\n return new Char(o);\n }\n\n public static Value fromByte(byte o) {\n return new Byte(o);\n }\n\n public static Value fromHInt(short o) {\n return new HInt(o);\n }\n\n\tpublic static <T> Value fromJavaObj(T obj) {\n\t return new JavaObj<T>(obj);\n\t}\n }\n}", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "@Override\n public void setValue(Binary value) throws ValueFormatException,\n VersionException, LockException, ConstraintViolationException,\n RepositoryException {\n \n }", "public\tvoid setobject(object obj) {\r\n\t\t oop.value=obj.value;\r\n\t\t oop.size=obj.size;\r\n\t\t \r\n\t}", "void setValue(T value) throws YangException;", "abstract void set(ByteModule byteModule);", "@Override\n public void setValue(String[] values) throws ValueFormatException,\n VersionException, LockException, ConstraintViolationException,\n RepositoryException {\n \n }", "@Test @DisplayName(\"Injector - setting (direct)\")\n void injectorSetters() throws Exception {\n val injector = injector(inj -> {\n inj.set(\"text\", \"some text\");\n inj.set(\"label\", \"a label\");\n inj.set(\"attrs\", Map.of(\"alpha\", \"one\"));\n });\n\n val injected = injector.inject(new OtherObject());\n assertEquals(\"some text\", injected.getText());\n assertEquals(\"a label\", injected.label);\n assertEquals(Map.of(\"alpha\", \"one\"), injected.getAttrs());\n }", "@Test\n\tpublic final void testSetValues() throws MPIException {\n\t\tdouble[] newValues = new double[totalSize];\n\t\tfor (int i=0; i<totalSize; i++) {\n\t\t\tnewValues[i] = 7.8*i;\n\t\t}\n\t\tblock.setValues(newValues);\n\t\tblock.startCommunication();\n\t\tverifyInnerValues(block, newValues);\n\t\tverifyGhostRegionValues(block);\n\t\tblock.finishCommunication();\n\t}", "void setValue(String value);", "void setValue(String value);", "public void setValue(Winevt.EVT_VARIANT_TYPE type, Object value) {\n/* 272 */ allocateMemory();\n/* 273 */ if (type == null) {\n/* 274 */ throw new IllegalArgumentException(\"setValue must not be called with type set to NULL\");\n/* */ }\n/* 276 */ this.holder = null;\n/* 277 */ if (value == null || type == Winevt.EVT_VARIANT_TYPE.EvtVarTypeNull) {\n/* 278 */ this.Type = Winevt.EVT_VARIANT_TYPE.EvtVarTypeNull.ordinal();\n/* 279 */ this.Count = 0;\n/* 280 */ this.field1.writeField(\"pointerValue\", Pointer.NULL);\n/* */ } else {\n/* 282 */ switch (type) {\n/* */ case EvtVarTypeAnsiString:\n/* 284 */ if (value.getClass().isArray() && value.getClass().getComponentType() == String.class) {\n/* 285 */ this.Type = type.ordinal() | 0x80;\n/* 286 */ StringArray sa = new StringArray((String[])value, false);\n/* 287 */ this.holder = sa;\n/* 288 */ this.Count = ((String[])value).length;\n/* 289 */ this.field1.writeField(\"pointerValue\", sa); break;\n/* 290 */ } if (value.getClass() == String.class) {\n/* 291 */ this.Type = type.ordinal();\n/* 292 */ Memory mem = new Memory((((String)value).length() + 1));\n/* 293 */ mem.setString(0L, (String)value);\n/* 294 */ this.holder = mem;\n/* 295 */ this.Count = 0;\n/* 296 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* */ } \n/* 298 */ throw new IllegalArgumentException(type.name() + \" must be set from String/String[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeBoolean:\n/* 302 */ if (value.getClass().isArray() && value.getClass().getComponentType() == WinDef.BOOL.class) {\n/* 303 */ this.Type = type.ordinal() | 0x80;\n/* 304 */ Memory mem = new Memory((((WinDef.BOOL[])value).length * 4));\n/* 305 */ for (int i = 0; i < ((WinDef.BOOL[])value).length; i++) {\n/* 306 */ mem.setInt((i * 4), ((WinDef.BOOL[])value)[i].intValue());\n/* */ }\n/* 308 */ this.holder = mem;\n/* 309 */ this.Count = 0;\n/* 310 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 311 */ } if (value.getClass() == WinDef.BOOL.class) {\n/* 312 */ this.Type = type.ordinal();\n/* 313 */ this.Count = 0;\n/* 314 */ this.field1.writeField(\"intValue\", Integer.valueOf(((WinDef.BOOL)value).intValue())); break;\n/* */ } \n/* 316 */ throw new IllegalArgumentException(type.name() + \" must be set from BOOL/BOOL[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeString:\n/* */ case EvtVarTypeEvtXml:\n/* 321 */ if (value.getClass().isArray() && value.getClass().getComponentType() == String.class) {\n/* 322 */ this.Type = type.ordinal() | 0x80;\n/* 323 */ StringArray sa = new StringArray((String[])value, true);\n/* 324 */ this.holder = sa;\n/* 325 */ this.Count = ((String[])value).length;\n/* 326 */ this.field1.writeField(\"pointerValue\", sa); break;\n/* 327 */ } if (value.getClass() == String.class) {\n/* 328 */ this.Type = type.ordinal();\n/* 329 */ Memory mem = new Memory(((((String)value).length() + 1) * 2));\n/* 330 */ mem.setWideString(0L, (String)value);\n/* 331 */ this.holder = mem;\n/* 332 */ this.Count = 0;\n/* 333 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* */ } \n/* 335 */ throw new IllegalArgumentException(type.name() + \" must be set from String/String[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeSByte:\n/* */ case EvtVarTypeByte:\n/* 340 */ if (value.getClass().isArray() && value.getClass().getComponentType() == byte.class) {\n/* 341 */ this.Type = type.ordinal() | 0x80;\n/* 342 */ Memory mem = new Memory((((byte[])value).length * 1));\n/* 343 */ mem.write(0L, (byte[])value, 0, ((byte[])value).length);\n/* 344 */ this.holder = mem;\n/* 345 */ this.Count = 0;\n/* 346 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 347 */ } if (value.getClass() == byte.class) {\n/* 348 */ this.Type = type.ordinal();\n/* 349 */ this.Count = 0;\n/* 350 */ this.field1.writeField(\"byteValue\", value); break;\n/* */ } \n/* 352 */ throw new IllegalArgumentException(type.name() + \" must be set from byte/byte[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeInt16:\n/* */ case EvtVarTypeUInt16:\n/* 357 */ if (value.getClass().isArray() && value.getClass().getComponentType() == short.class) {\n/* 358 */ this.Type = type.ordinal() | 0x80;\n/* 359 */ Memory mem = new Memory((((short[])value).length * 2));\n/* 360 */ mem.write(0L, (short[])value, 0, ((short[])value).length);\n/* 361 */ this.holder = mem;\n/* 362 */ this.Count = 0;\n/* 363 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 364 */ } if (value.getClass() == short.class) {\n/* 365 */ this.Type = type.ordinal();\n/* 366 */ this.Count = 0;\n/* 367 */ this.field1.writeField(\"shortValue\", value); break;\n/* */ } \n/* 369 */ throw new IllegalArgumentException(type.name() + \" must be set from short/short[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeHexInt32:\n/* */ case EvtVarTypeInt32:\n/* */ case EvtVarTypeUInt32:\n/* 375 */ if (value.getClass().isArray() && value.getClass().getComponentType() == int.class) {\n/* 376 */ this.Type = type.ordinal() | 0x80;\n/* 377 */ Memory mem = new Memory((((int[])value).length * 4));\n/* 378 */ mem.write(0L, (int[])value, 0, ((int[])value).length);\n/* 379 */ this.holder = mem;\n/* 380 */ this.Count = 0;\n/* 381 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 382 */ } if (value.getClass() == int.class) {\n/* 383 */ this.Type = type.ordinal();\n/* 384 */ this.Count = 0;\n/* 385 */ this.field1.writeField(\"intValue\", value); break;\n/* */ } \n/* 387 */ throw new IllegalArgumentException(type.name() + \" must be set from int/int[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeHexInt64:\n/* */ case EvtVarTypeInt64:\n/* */ case EvtVarTypeUInt64:\n/* 393 */ if (value.getClass().isArray() && value.getClass().getComponentType() == long.class) {\n/* 394 */ this.Type = type.ordinal() | 0x80;\n/* 395 */ Memory mem = new Memory((((long[])value).length * 4));\n/* 396 */ mem.write(0L, (long[])value, 0, ((long[])value).length);\n/* 397 */ this.holder = mem;\n/* 398 */ this.Count = 0;\n/* 399 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 400 */ } if (value.getClass() == long.class) {\n/* 401 */ this.Type = type.ordinal();\n/* 402 */ this.Count = 0;\n/* 403 */ this.field1.writeField(\"longValue\", value); break;\n/* */ } \n/* 405 */ throw new IllegalArgumentException(type.name() + \" must be set from long/long[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeSingle:\n/* 409 */ if (value.getClass().isArray() && value.getClass().getComponentType() == float.class) {\n/* 410 */ this.Type = type.ordinal() | 0x80;\n/* 411 */ Memory mem = new Memory((((float[])value).length * 4));\n/* 412 */ mem.write(0L, (float[])value, 0, ((float[])value).length);\n/* 413 */ this.holder = mem;\n/* 414 */ this.Count = 0;\n/* 415 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 416 */ } if (value.getClass() == float.class) {\n/* 417 */ this.Type = type.ordinal();\n/* 418 */ this.Count = 0;\n/* 419 */ this.field1.writeField(\"floatValue\", value); break;\n/* */ } \n/* 421 */ throw new IllegalArgumentException(type.name() + \" must be set from float/float[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeDouble:\n/* 425 */ if (value.getClass().isArray() && value.getClass().getComponentType() == double.class) {\n/* 426 */ this.Type = type.ordinal() | 0x80;\n/* 427 */ Memory mem = new Memory((((double[])value).length * 4));\n/* 428 */ mem.write(0L, (double[])value, 0, ((double[])value).length);\n/* 429 */ this.holder = mem;\n/* 430 */ this.Count = 0;\n/* 431 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 432 */ } if (value.getClass() == double.class) {\n/* 433 */ this.Type = type.ordinal();\n/* 434 */ this.Count = 0;\n/* 435 */ this.field1.writeField(\"doubleVal\", value); break;\n/* */ } \n/* 437 */ throw new IllegalArgumentException(type.name() + \" must be set from double/double[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeBinary:\n/* 441 */ if (value.getClass().isArray() && value.getClass().getComponentType() == byte.class) {\n/* 442 */ this.Type = type.ordinal();\n/* 443 */ Memory mem = new Memory((((byte[])value).length * 1));\n/* 444 */ mem.write(0L, (byte[])value, 0, ((byte[])value).length);\n/* 445 */ this.holder = mem;\n/* 446 */ this.Count = 0;\n/* 447 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* */ } \n/* 449 */ throw new IllegalArgumentException(type.name() + \" must be set from byte[]\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default:\n/* 459 */ throw new IllegalStateException(String.format(\"NOT IMPLEMENTED: getValue(%s) (Array: %b, Count: %d)\", new Object[] { type, Boolean.valueOf(isArray()), Integer.valueOf(this.Count) }));\n/* */ } \n/* */ } \n/* 462 */ write();\n/* */ }", "boolean setValue(String type, String key, String value);", "private void setMessage(JsonElement element) {\n if (element instanceof JsonPrimitive) {\n setMessage(element.getAsString());\n }\n }", "public abstract void setPhone1(String sValue);", "public void set(String[] as);", "private void initValues() {\n \n }", "public void setValue2 (String Value2);" ]
[ "0.57481", "0.55294424", "0.54191816", "0.54018354", "0.5387663", "0.53252035", "0.53173447", "0.5310278", "0.52957594", "0.52943707", "0.5274031", "0.5260965", "0.52567774", "0.52479386", "0.52385104", "0.52277166", "0.5197814", "0.5190532", "0.51797044", "0.5179266", "0.5176786", "0.5168947", "0.51539165", "0.5151904", "0.514033", "0.50998706", "0.5088308", "0.50751954", "0.5049023", "0.50353503", "0.50304115", "0.5026156", "0.5025405", "0.50199467", "0.5008171", "0.5004681", "0.50012624", "0.49981633", "0.49970815", "0.4990998", "0.49858695", "0.49839866", "0.49748188", "0.49616468", "0.4946071", "0.49425617", "0.49392796", "0.49391985", "0.49341443", "0.49258095", "0.49252594", "0.4924341", "0.49239254", "0.4922859", "0.49174273", "0.49138707", "0.49059087", "0.4904346", "0.4903956", "0.49039236", "0.49024162", "0.48948324", "0.48688623", "0.48673964", "0.48663914", "0.4866145", "0.48615736", "0.48607612", "0.4860661", "0.48516396", "0.48501256", "0.48480836", "0.4847116", "0.48443806", "0.48429534", "0.48407343", "0.48305845", "0.4825633", "0.48253334", "0.48250407", "0.48249656", "0.4822545", "0.4817229", "0.481722", "0.48171395", "0.48170406", "0.48168045", "0.48144016", "0.48116985", "0.4807511", "0.48056924", "0.4805236", "0.48031178", "0.48031178", "0.4801045", "0.48006335", "0.47931322", "0.4792763", "0.4791952", "0.47899696", "0.47898102" ]
0.0
-1
Connect to the PostgreSQL database
public Connection connect() { conn = null; try { conn = DriverManager.getConnection(url, user, password); System.out.println("Connected successfully."); } catch (SQLException e) { System.out.println(e.getMessage()); } return conn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void connectToDB() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n this.conn = DriverManager.getConnection(prs.getProperty(\"url\"),\n prs.getProperty(\"user\"), prs.getProperty(\"password\"));\n } catch (SQLException e1) {\n e1.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public static void connect()\n {\n conn = null;\n try {\n Class.forName(\"org.postgresql.Driver\");\n conn = DriverManager.getConnection(url, user, password);\n System.out.println(\"Connected to Server Successfully.\");\n }catch(Exception e) {\n System.out.println(e.getMessage());\n }\n }", "private void connect() {\n\t\t//\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(logInfo, user, pwd);\n\t\t\tsmt = conn.createStatement();\n\t\t\tif (conn != null) {\n\t\t\t\tSystem.out.println(\"[System:] Postgres Connection successful\");\n\t\t\t\tstatus = true;\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"Failed to make connection!\");\n\t\t\t\tstatus = false;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Connection Failed!\");\n\t\t\te.printStackTrace();\n\t\t\tstatus = false;\n\t\t}\n\t\t\n\t}", "public void connect(){\n if (connected) {\n // connection already established\n return;\n }\n // Create connection to Database\n Properties props = new Properties();\n props.setProperty(\"user\", DB_USER);\n props.setProperty(\"password\", DB_PASSWORD);\n //props.setProperty(\"ssl\", \"true\");\n //\"Connecting to database...\"\n try {\n Class.forName(\"org.postgresql.Driver\");\n String connection_string = generateURL();\n dbConnect = DriverManager.getConnection(connection_string, props);\n //\"Connection established\"\n status = \"Connection established\";\n connected = true;\n } catch (SQLException e) {\n //\"Connection failed: SQL error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n } catch (Exception e) {\n //\"Connection failed: unknown error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n }\n }", "public Connection ConnectDB() throws SQLException {\r\n String db=\"jdbc:postgresql://localhost:5432/Employee\";\r\n String user=\"postgres\";\r\n String pass=\"admin\";\r\n\r\n return DriverManager.getConnection(db,user,pass);\r\n\r\n }", "public static Connection establishConnection() {\n\t\tProperties props = new Properties();\n\t\tprops.setProperty(\"gssEncMode\", \"disable\");\n\t\tprops.setProperty(\"user\", \"pi\");\n\t\tprops.setProperty(\"password\", \"Bdw040795\"); // Should probably find a way to not have password in plaintext\n\t\tprops.setProperty(\"sslmode\", \"disable\");\n\t\tConnection WeatherDB;\n\t\ttry {\n\t\tWeatherDB = DriverManager.getConnection(\"jdbc:postgresql://10.0.0.100:5433/weather_app\", props);\n\t\treturn WeatherDB;\n\t\t} catch (SQLException e) {\n\t\te.printStackTrace();\n\t\tWeatherDB = null;\n\t\treturn WeatherDB;\n\t\t}\n\t}", "public void connect() throws NamingException, SQLException {\n if (con != null) disconnect();\n try {\n \tString url = \"jdbc:postgresql://localhost/stocksim\";\n \tProperties props = new Properties();\n props.setProperty(\"user\", \"ubuntu\");\n props.setProperty(\"password\", \"reverse\");\n con = DriverManager.getConnection(url, props);\n \n // Prepare statements:\n for (PreparedStatementID i: PreparedStatementID.values()) {\n PreparedStatement preparedStatement = con.prepareStatement(i.sql);\n _preparedStatements.put(i, preparedStatement);\n }\n } catch (SQLException e) {\n if (con != null) disconnect();\n throw e;\n }\n }", "public Connection getConnection() {\n java.sql.Connection connection = null;\n try {\n connection = DriverManager.getConnection(\n \"jdbc:postgresql://cslvm74.csc.calpoly.edu:5432/bfung\", \"postgres\",\n \"\");\n } catch (SQLException e) {\n System.out.println(\"Connection Failed! Check output console\");\n e.printStackTrace();\n return null;\n }\n return connection;\n }", "public static void openDatabase() {\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\n\t\t\t/* change the name and password here */\n\t\t\tc = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:postgresql://localhost:5432/testdata\", \"postgres\",\n\t\t\t\t\t\" \");\n\n\t\t\tlogger.info(\"Opened database successfully\");\n\t\t\tc.setAutoCommit(false);\n\t\t\tstatus = OPEN_SUCCESS;\n\n\t\t} catch (Exception e) {\n\t\t\tstatus = OPEN_FAILED;\n\t\t\tlogger.warn(e.getClass().getName() + \": \" + e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public static Connection createDBConnection() throws ClassNotFoundException, SQLException\r\n\t{\r\n\t\tString strDbUser = properties.getProperty(\"jdbc.username\"); // database login username\r\n String strDbPassword = properties.getProperty(\"jdbc.password\"); // database login password\r\n String remoteHost = properties.getProperty(\"remote.host\"); // remote host url (ie cloud server url\t\r\n String remotePort = properties.getProperty(\"remote.port\"); // remote post number\r\n String databaseName = properties.getProperty(\"databaseName\");\r\n Connection con;\r\n \r\n System.out.println(\"Trying connection \");\r\n \r\n\t\tClass.forName(\"org.postgresql.Driver\");\r\n// \tClass.forName(\"com.mysql.jdbc.Driver\");\r\n// con = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:\"+tunnelPort+\"/cos420?user=\"+strDbUser+\"&password=\"+strDbPassword);\r\n\t\tString connectString = \"jdbc:postgresql://\" + remoteHost +\":\" + remotePort + \"/\"+databaseName; \r\n\t\tcon = DriverManager.getConnection(connectString , strDbUser,strDbPassword);\r\n\r\n \tif(!con.isClosed())\r\n System.out.println(\"Successfully connected to Postgres server using TCP/IP...\");\r\n\r\n return con;\r\n\t}", "public Connection getConnection() throws SQLException {\n String connectionUrl = \"jdbc:postgresql://\" + url + \":\" + port + \"/\" + database;\n return DriverManager.getConnection(connectionUrl, SISOBProperties.getDataBackendUsername(), SISOBProperties.getDataBackendPassword());\n }", "private void connect(String host, int port) throws ClassNotFoundException, SQLException, PropertyVetoException {\n\n cpds = new ComboPooledDataSource();\n cpds.setDriverClass(\"org.postgresql.Driver\"); //loads the jdbc driver\n String url = \"jdbc:postgresql://\"+ host + \":\" + port + \"/postgres?currentSchema=lectures\";\n cpds.setJdbcUrl(url);\n cpds.setUser(\"postgres\");\n cpds.setPassword(\"filip123\");\n }", "public Connection getConnection() {\n\t\t\tConnection conn = null;\n\t\t\tProperties prop = new Properties();\n\n\t\t\ttry {\n\t\t\t\tString url = \"jdbc:postgresql://java2010rev.cfqzgdfohgof.us-east-2.rds.amazonaws.com:5432/postgres?currentSchema=jensquared\";\n\t\t\t\tString username = \"jenny77\";\n\t\t\t\tString password = \"zeus1418\";\n//\t\t\t\tClassLoader loader = Thread.currentThread().getContextClassLoader();\n//\t prop.load(loader.getResourceAsStream(\"database.properties\"));\n//\t\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"url\"),\n//\t\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));\n\t\t\t\tconn = DriverManager.getConnection(url, username, password);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n//\t\t\t} catch (FileNotFoundException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n//\t\t\t} catch (IOException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn conn;\n\t\t}", "private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }", "public static Connection getConnection(String db_host) {\n Connection c = null;\n try {\n Class.forName(\"org.postgresql.Driver\");\n c = DriverManager\n .getConnection(\"jdbc:postgresql://\"+db_host+\":5432/testdb\",\n \"postgres\", \"123\");\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getClass().getName()+\": \"+e.getMessage());\n System.exit(0);\n }\n return c;\n }", "public void connectToDatabase(){\n\t\ttry{\n\t\t connection = DriverManager.getConnection(dbConfig.getUrl(), dbConfig.getUser(), dbConfig.getPassword());\n\t\t System.out.println(\"Successfully connected to database.\");\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(\"An error occurred while attempting to connect to the database.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public Messenger (String hostname, String dbname, String dbport, String user, String passwd) throws SQLException {\n\n System.out.print(\"Connecting to database...\");\n try{\n // constructs the connection URL\n String url = \"jdbc:postgresql://\" + hostname + \":\" + dbport + \"/\" + dbname\n + \"?user=\" + user;\n \n if(passwd!=\"\") {\n \turl += \"&password=\" + passwd + \"&ssl=false\";\n }\n System.out.println (\"Connection URL: \" + url + \"\\n\");\n\n // obtain a physical connection\n this._connection = DriverManager.getConnection(url);\n \n System.out.println(\"Done\");\n }catch (Exception e){\n System.err.println(\"Error - Unable to Connect to Database: \" + e.getMessage() );\n System.out.println(\"Make sure you started postgres on this machine\");\n System.exit(-1);\n }//end catch\n }", "public static Connection getConnection() throws SQLException {\n\t\tString url = ConnectionCredentials.link;\n\t\tString user = ConnectionCredentials.username;\n\t\tString pass = ConnectionCredentials.password;\n\t\t\n\t\t/*Class.forName(\"org.postgresql.Driver\");\n\t\t//Two lines of recommended code\n\t\tDriver PostgresDriver = new Driver();\n\t\tDriverManager.registerDriver(PostgresDriver);*/\n\t\t\n\t\treturn DriverManager.getConnection(url, user, pass);\n\t}", "public PortalConnection(String db, String user, String pwd) throws SQLException, ClassNotFoundException {\n Class.forName(\"org.postgresql.Driver\");\n Properties props = new Properties();\n props.setProperty(\"user\", user);\n props.setProperty(\"password\", pwd);\n conn = DriverManager.getConnection(db, props);\n }", "public Connection getConnection() throws ClassNotFoundException, SQLException\n\t{\n\t /* Class.forName(\"org.postgresql.Driver\");*/\n\t\tcon=dataSource.getConnection();\n\t\treturn con;\t\n\t}", "public DataBase(String jdbc,String type,String link,String port,String db,String username, String password) throws SQLException{\r\n\t\tcon = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"org.postgresql.Driver\");\r\n\t\t\tcon = DriverManager.getConnection(jdbc+\":\"+type+\"://\"+link+\":\"+port+\"/\"+db,username, password);\r\n\t\t\tcon.setAutoCommit(false);\r\n\t\t\tSystem.out.println(\"Opened database successfully\");\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t}", "public static void main(String args[]) throws Exception{\n\t\t\n\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\n\t\tConnection connection = DriverManager.getConnection(\n\t\t\t\t\"jdbc:postgresql://10.1.3.233:5432/postgres\", \"postgres\",\"123456\");\n\t\t\n\t\t//DatabaseMetaData metaData = connection.getMetaData();\n\t\t//System.out.println(metaData.getDatabaseProductName());\n\n\t\tStatement statement = connection.createStatement();\n\t\tResultSet result = statement.executeQuery(\"select * from table1\");\n\t\twhile(result.next()){\n\t\t\tSystem.out.println(result.getString(1));\n\t\t}\n\t\tconnection.close();\n\t}", "public void connectToDb() {\n try {\n con = DriverManager.getConnection(url, user, password);\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Erro: \" + ex.getMessage(), \"Mensagem de Erro\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "DBConnect() {\n \n }", "private static Connection getConnection() throws SQLException, IOException {\n Properties properties = new Properties();\n properties.setProperty(\"user\", \"root\");\n properties.setProperty(\"password\", \"bulgariavarna\");\n\n return DriverManager.getConnection(CONNECTION_STRING + \"minions_db\", properties);\n }", "private void setupDB(){\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n String url = \"jdbc:oracle:thin:@localhost:1521:orcl\";\n String username = \"sys as sysdba\"; //Provide username for your database\n String password = \"oracle\"; //provide password for your database\n\n con = DriverManager.getConnection(url, username, password);\n }\n catch(Exception e){\n System.out.println(e);\n }\n }", "private Connection connect() {\n // SQLite connection string\n \tString url = \"jdbc:sqlite:DataBase/\" + database;\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "private Connection connect() throws SQLException {\n\t\treturn DriverManager.getConnection(\"jdbc:sqlite:database/scddata.db\");\n\t}", "public void connectDB() {\n\t\tSystem.out.println(\"CONNECTING TO DB\");\n\t\tSystem.out.print(\"Username: \");\n\t\tusername = scan.nextLine();\n\t\tConsole console = System.console(); // Hides password input in console\n\t\tpassword = new String(console.readPassword(\"Password: \"));\n\t\ttry {\n\t\t\tDriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\n\t\t} catch(Exception Ex) {\n\t\t\tSystem.out.println(\"Error connecting to database. Machine Error: \" + Ex.toString());\n\t\t\tEx.printStackTrace();\n\t\t\tSystem.out.println(\"\\nCONNECTION IS REQUIRED: EXITING\");\n\t\t\tSystem.exit(0); // No need to make sure connection is closed since it wasn't made\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tString IP = \"jdbc:postgresql://localhost:5432/textdb\";\n\t\tString Username = \"postgres\";\n\t\tString Password = \"yyggdd1219\";\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not load class\" + \"org.postgresql.Driver\");\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}// try-catch exception\n\t\t//the driver is loaded...\n\t\tSystem.out.println(\"PostgreSQL JDBC Driver found!\");\n\t\t//proceed with a database connection\n\t\tConnection connection = null;\n\t\t//connect to the yacata.dcs.gla.ac.uk:5432\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(IP, Username, Password);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Connection Filed!\");\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}//try-catch exception\n\t\t//connection to the database is done!\n\t\tif (connection != null) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Controlling your database...\");\n\t\t\t\t//do not forget to close the connection to the database!\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}//try-catch exception\n\t\t}else {\n\t\t\tSystem.out.println(\"Failed to establish connection!\");\n\t\t}//if-else\n\t\t\n\t\t}", "public boolean connectDB(String URL, String username, String password){\n\t try{\n\t\t Class.forName(\"org.postgresql.Driver\");\n\t } catch (ClassNotFoundException e) {\n\t\t return false;\n\t }\n\t try{\n\t\t connection = DriverManager.getConnection(URL, username, password); \n\t } catch (SQLException e) {\n\t\t return false;\n\t }\n\t \n\t\t\n\t \n return true;\n }", "private static void connectDatabase(){\n\t\t// register the driver\n\t\ttry{\n\t\t\tClass.forName(DRIVER).newInstance();\n\t\t\tconnection = DriverManager.getConnection(CONNECTION_URL);\n\t\t} catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private static void connect() {\n\t\ttry {\n\t\t\tif (connection == null) {\n\t\t\t\tClass.forName(\"org.mariadb.jdbc.Driver\");\n\t\t\t\tconnection = DriverManager.getConnection(url, user, password);\n\t\t\t\tconnection.setAutoCommit(false);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "private void connect() {\n if (this.connection == null && !this.connected) {\n try {\n this.connection = DriverManager.getConnection(this.dbUrl, this.dbUser, this.dbPassword);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }", "public boolean connectDB(String URL, String username, String password) {\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t}\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(URL, username, password);\n\t\t\t// System.out.println(\"connected\");\n\t\t\treturn true;\n\t\t} catch (SQLException se) {\n\n\t\t}\n\t\treturn false;\n\t}", "private void openConnection () {\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(\n\t\t\t\t\tPasswordProtector.HOST,\n\t\t\t\t\tPasswordProtector.USER,\n\t\t\t\t\tPasswordProtector.PASSWORD);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t}\n\t}", "public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }", "public static Statement getConnection(){\n\t\tConnection jdbc = null;\n\t\tStatement stmt = null;\n\t\ttry {\n\t Class.forName(\"org.postgresql.Driver\");\n\t jdbc = DriverManager\n\t .getConnection(\"jdbc:postgresql://localhost:5432/MA\",\n\t \"postgres\", \"\");\n\t stmt = jdbc.createStatement();\n\t\t}\n\t catch ( Exception e ) {\n\t System.err.println( e.getClass().getName()+\": \"+ e.getMessage() );\n\t System.exit(0);\n\t }\n\t\t\n\t\treturn stmt;\n\t}", "public void connect(){\r\n\t\tSystem.out.println(\"Connecting to Sybase Database...\");\r\n\t}", "public DatabaseConnector() {\n HikariConfig config = new HikariConfig();\n config.setJdbcUrl(\"jdbc:postgresql://localhost:5547/go_it_homework\");\n config.setUsername(\"postgres\");\n config.setPassword(\"Sam@64hd!+4\");\n this.ds = new HikariDataSource(config);\n ds.setMaximumPoolSize(5);\n }", "public Connection connectToDB(String databaseUser, String databasePass) throws SQLException { \r\n\t\tConnection connection;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tClass.forName(\"org.postgresql.Driver\");\r\n\r\n\t\t\tString url = \"jdbc:postgresql://db.ecs.vuw.ac.nz/\"+databaseUser+\"_jdbc\";\r\n\r\n\t\t\tconnection = DriverManager.getConnection(url,databaseUser, databasePass);\r\n\r\n\t\t\treturn connection; //if connection works, return connection object\r\n\r\n\t\t} catch (ClassNotFoundException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null; //if connection does not work\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"-------- PostgreSQL \"\r\n + \"JDBC Connection Testing ------------\");\r\n\r\n try {\r\n\r\n Class.forName(\"org.postgresql.Driver\");\r\n\r\n } catch (ClassNotFoundException e) {\r\n\r\n System.out.println(\"Where is your PostgreSQL JDBC Driver? \"\r\n + \"Include in your library path!\");\r\n e.printStackTrace();\r\n return;\r\n\r\n }\r\n\r\n System.out.println(\"PostgreSQL JDBC Driver Registered!\");\r\n\r\n (new NewClass()).dbConnect();\r\n\r\n }", "public void DBConnect() {\n \tdatabase = new DatabaseAccess();\n \tif (database != null) {\n \t\ttry {\n \t\t\tString config = getServletContext().getInitParameter(\"dbConfig\");\n \t\t\tdatabase.GetConnectionProperties(config);\n \t\t\tdatabase.DatabaseConnect();\n \t\t}\n \t\tcatch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n }", "private void connect() {\n try {\n Class.forName(\"org.sqlite.JDBC\");\n this.conn = DriverManager.getConnection(\"jdbc:sqlite:settings.db\");\n } catch (ClassNotFoundException | SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n }\n }", "private Connection connect() {\n String url = \"jdbc:sqlite:\" + dbPath + dbName;\n Connection con = null;\n try {\n con = DriverManager.getConnection(url);\n }\n catch (SQLException e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n\n return con;\n }", "public void initializeConnection(){\n try{\n dbConnect = DriverManager.getConnection(DBURL, USERNAME, PASSWORD);\n } catch (SQLException ex){\n ex.printStackTrace();\n }\n }", "public static void createConnection() {\n\n try{\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/mydb\", \"tobymac208\", \"Sparta_!3712\");\n // Database how now been successfully connected.\n System.err.println(\"Database was successfully connected.\");\n }catch (ClassNotFoundException e) {\n System.err.println(\"Class not found.\");\n }catch (SQLException e) {\n System.err.println(\"SQL exception thrown.\");\n }\n }", "public static Connection getConnection() throws SQLException {\n\t\t// Create a connection reference var\n\t\tConnection con = null;\n\n\t\t// Int. driver obj from our dependency, connect w/ JDBC\n\t\tDriver postgresDriver = new Driver();\n\t\tDriverManager.registerDriver(postgresDriver);\n\n\t\t// Get database location/credentials from environmental variables\n\t\tString url = System.getenv(\"db_url\");\n\t\tString username = System.getenv(\"db_username\");\n\t\tString password = System.getenv(\"db_password\");\n\t\t\n\t\t// Connect to db and assign to con var.\n\t\tcon = DriverManager.getConnection(url, username, password);\n\n\t\t// Return con, allowing calling class/method etc to use the connection\n\t\treturn con;\n\t}", "public DBConnection(String logIn, String password) \n\t{\n\t\tloadDriver();\n\t\t\n\t\ttry \n\t\t{\n\t\t\t//this connection object is the basis for all interaction with the PostgreSQL database\n\t\t\tdbCon = DriverManager.getConnection(url, \n\t\t\t\t\tlogIn, password);\n\t\t}\n\t\tcatch(SQLException ex)\n\t\t{\n\t\t\tDBErrorHandler.handle(\"Connection\");\n\t\t}\n\t}", "public void connectToDb(){\n\t log.info(\"Fetching the database name and other details ... \");\n\t dbConnect.setDbName(properties.getProperty(\"dbName\"));\n\t dbConnect.setUsrName(properties.getProperty(\"dbUsrname\"));\n\t dbConnect.setPassword(properties.getProperty(\"dbPassword\"));\n\t dbConnect.setSQLType(properties.getProperty(\"sqlServer\").toLowerCase());\n\t log.info(\"Trying to connect to the database \"+dbConnect.getDbName()+\" ...\\n with user name \"+dbConnect.getUsrname()+\" and password ****** \");\n\t dbConnect.connectToDataBase(dbConnect.getSQLType(), dbConnect.getDbName(), dbConnect.getUsrname(), dbConnect.getPswd());\n\t log.info(\"Successfully connected to the database \"+dbConnect.getDbName());\n }", "private void connectDatabase(){\n }", "public Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:c:/Carapaca/server/db/database.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public PostgresConnectionSupplier(Properties jdbcProperties) {\n super(jdbcProperties);\n }", "Connection getConnection() throws SQLException;", "Connection getConnection() throws SQLException;", "public static Connection getConnection() {\n Connection con = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n con = DriverManager.getConnection(\n \"jdbc:hsqldb:mem:avdosdb\", \"sa\", \"\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n return con;\n }", "private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String password = System.getenv(\"DTF_TEST_DB_PASSWORD\");\r\n read_only = true;\r\n if (user != null && password != null) {\r\n read_only = false;\r\n }\r\n if ( user == null || password == null ) {\r\n user = \"guest\";\r\n password = \"\";\r\n }\r\n Class.forName(\"com.mysql.jdbc.Driver\"); // required at run time only for .getConnection(): mysql-connector-java-5.1.35.jar\r\n connect = DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/qa_portal?user=\"+user+\"&password=\"+password);\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: DescribedTemplateCore.openDatabase() could not open database connection, \" + e.getMessage() );\r\n }\r\n }", "public ConectarBD(String pNombreServidor, String pNumeroPuerto, String pNombreBD, String pUsuario, String pPassword) {\n try {\n Class.forName(\"org.postgresql.Driver\").newInstance();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n try {\n String cone = \"jdbc:postgresql://\" + pNombreServidor + \":\" + pNumeroPuerto + \"/\" + pNombreBD;\n dbConecta = DriverManager.getConnection(cone, pUsuario, pPassword);\n } catch (SQLException sqlEx) {\n sqlEx.printStackTrace();\n }\n }", "private void connectToDB() throws Exception\n\t{\n\t\tcloseConnection();\n\t\t\n\t\tcon = Env.getConnectionBradawl();\n\t}", "public void openConnection(){\n\n\t\tString dbIP = getConfig().getString(\"mysql.ip\");\n\t\tString dbDB = getConfig().getString(\"mysql.databaseName\");\n\t\tString dbUN = getConfig().getString(\"mysql.username\");\n\t\tString dbPW = getConfig().getString(\"mysql.password\");\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://\" + dbIP + \"/\" + dbDB, dbUN, dbPW);\n\t\t\tgetLogger().info(\"Connected to databse!\");\n\t\t} catch (SQLException ex) {\n\t\t\t// handle any errors\n\t\t\tgetLogger().info(\"SQLException: \" + ex.getMessage());\n\t\t\tgetLogger().info(\"SQLState: \" + ex.getSQLState());\n\t\t\tgetLogger().info(\"VendorError: \" + ex.getErrorCode());\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tgetLogger().info(\"Gabe, you done goof'd!\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void connect()\n\t{\n\t\t//Database driver required for connection\n\t\tString jdbcDriver = \"com.mysql.jdbc.Driver\";\n\t\t\n\t\ttry\n\t\t{\n\t\t\t//Loading JDBC Driver class at run-time\n\t\t\tClass.forName(jdbcDriver);\n\t\t}\n\t\tcatch (Exception excp)\n\t\t{\n\t\t\tlog.error(\"Unexpected exception occurred while attempting user schema DB connection... \" + excp.getMessage());\n\t\t}\t\t\n\t\t\n\t\tlog.info(\"Initiating connection to user schema database \" + dbUrl + \"...\");\n\t\t\n\t\ttry\n\t\t{\n\t\t\tdbConnection = DriverManager.getConnection(dbUrl, dbUsername, dbPassword);\n\t\t}\n\t\tcatch (SQLException sqle)\n\t\t{\n\t\t\tdbConnection = null;\n\t\t\tlog.error(\"SQLException occurred while connecting to user schema database... \" + sqle.getMessage());\n\t\t}\n\t}", "public Connection connectDB (){\n try{\n Class.forName(\"org.sqlite.JDBC\");\n Connection conn = DriverManager.getConnection(\"jdbc:sqlite:awesomexDB.db\");\n //System.out.println(\"connection estd...\");\n return conn;\n } catch(Exception e){\n System.out.println(\"unable to connect\");\n return null;\n }\n }", "public void getConnection() throws RtpException {\n /* Create the database connection */\n try {\n conn = Connector.connect(cInfo, credentials, null);\n } catch (RtpException rtpe) {\n throw rtpe;\n } catch (Exception e) {\n throw new RtpException(\"Database Connection has failed for:\" + cInfo.toString(), e);\n }\n\n log.info(\"Database Connected Successfully. ID: {}\", conn.toString());\n }", "private Connection connect_db() {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setUser(db_user);\n dataSource.setPassword(db_pass);\n dataSource.setServerName(db_url);\n dataSource.setDatabaseName(db_database);\n\n Connection conn = null;\n try {\n conn = dataSource.getConnection();\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public void dbConnection()\n {\n\t try {\n\t \t\tClass.forName(\"org.sqlite.JDBC\");\n // userName=rpanel.getUserName();\n String dbName=userName+\".db\";\n c = DriverManager.getConnection(\"jdbc:sqlite:database/\"+dbName);\n }\n //catch the exception\n catch ( Exception e ) \n { \n System.err.println( \"error in catch\"+e.getClass().getName() + \": \" + e.getMessage() );\n System.exit(0);\n }\n\t if(c!=null)\n\t {\n System.out.println(\"Opened database successfully\");\n\t System.out.println(c);\n createData();\n\t}\n }", "public void openDB() {\n\n\t\t// Connect to the database\n\t\tString url = \"jdbc:mysql://localhost:2000/X__367_2020?user=X__367&password=X__367\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"using url:\"+url);\n\t\t\tSystem.out.println(\"problem connecting to MariaDB: \"+ e.getMessage());\t\t\t\n\t\t\t//e.printStackTrace();\n\t\t}\n\n\t}", "private Connection connect() {\n\t String url = \"jdbc:sqlite:\" + this.db;\r\n\t Connection conn = null;\r\n\t try {\r\n\t \t// Incercam conexiunea la baza de date\r\n\t conn = DriverManager.getConnection(url);\r\n\t } catch (SQLException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\t return conn; // returnam conexiunea, daca aceasta s-a facut fara erori\r\n\t }", "public static void establishConnection() {\n try {\n PropertiesLoader loader = new PropertiesLoader();\n String sshUser = loader.loadProperty().getProperty(\"sshUser\");\n String sshPassword = loader.loadProperty().getProperty(\"sshPassword\");\n String sshHost = loader.loadProperty().getProperty(\"sshHost\");\n int sshPort = Integer.parseInt(loader.loadProperty().getProperty(\"sshPort\"));\n String remoteHost = loader.loadProperty().getProperty(\"remoteHost\");\n int localPort = Integer.parseInt(loader.loadProperty().getProperty(\"localPort\"));\n int remotePort = Integer.parseInt(loader.loadProperty().getProperty(\"remotePort\"));\n\n String dbUrl = loader.loadProperty().getProperty(\"dbUrl\");\n String dbUser = loader.loadProperty().getProperty(\"dbUser\");\n String dbPassword = loader.loadProperty().getProperty(\"dbPassword\");\n\n DatabaseManager.doSshTunnel(sshUser, sshPassword, sshHost, sshPort, remoteHost, localPort, remotePort);\n connection = DriverManager.getConnection(dbUrl, dbUser, dbPassword);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public static Connection getConnection() {\n Connection conn = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n //conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/bancodb\", \"sa\", \"\");\n conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/paciente2db\", \"sa\", \"\");\n } catch (SQLException e) {\n System.out.println(\"Problemas ao conectar no banco de dados\");\n } catch (ClassNotFoundException e) {\n System.out.println(\"O driver não foi configurado corretamente\");\n }\n\n return conn;\n }", "public Connection connect(){\n try{\n \n Class.forName(\"org.apache.derby.jdbc.ClientDriver\").newInstance();\n conn = DriverManager.getConnection(dbUrl, name, pass);\n System.out.println(\"connected\");\n }\n catch(Exception e){\n System.out.println(\"connection problem\");\n }\n return conn;\n }", "void connect() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\"); // Driver is located in src/mysql-connector...\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n System.out.println(\"Connecting to database...\");\n\n try {\n // Make the connection\n con = DriverManager.getConnection(DB_URL, USER, PASS);\n System.out.println(\"Connection established!\");\n System.out.println(\"Creating statement...\");\n\n // Create a statement (not for output)\n st = con.createStatement();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private Database() throws SQLException {\n con = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:MusicAlbums\", \"c##dba\", \"sql\");\n }", "private void connect() throws SQLException, ClassNotFoundException,\n\t\t\tInstantiationException, IllegalAccessException {\n\t\tClass.forName(driver);\n\n\t\t// Setup the connection with the DB\n\t\tconnection = DriverManager.getConnection(url + dbName, userName,\n\t\t\t\tpassword);\n\t}", "public Connection getConnection() throws PersistenceException {\r\n\t\tConnection connection;\r\n\r\n\t\tString password = null; \r\n\r\n\t\tProperties prop = new Properties();\r\n\t\tInputStream input = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t\r\n\r\n\t\t\tprop.load(getClass().getClassLoader().getResourceAsStream(\"config.properties\"));\r\n\t\t\t// get the property value and print it out\r\n\r\n\t\t\tpassword = prop.getProperty(\"MYSQL_PASSWORD\");\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (input != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\ttry {\r\n\t\t\tClass.forName(driver);\r\n\t\t\t//Class.forName(\"org.postgresql.Driver\");\t\t//driver class loading\r\n\t\t\t/*\r\n\t\t\t * Now the driver is registered at DriverManager (postgreSQL driver automatically\r\n\t\t\t * registers itself at DriverManager once his class is loaded).\r\n\t\t\t * Since driver is loaded and registered, I can obtain a connection to the database \r\n\t\t\t */\r\n\t\t\tconnection = DriverManager.getConnection(dbURI, userName, password);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Where is your MySQL JDBC Driver?\");\r\n\t\t\t//\t\t\tSystem.out.println(\"Where is your postgreSQL JDBC Driver?\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new PersistenceException(e.getMessage());\r\n\t\t} catch(SQLException e) {\r\n\t\t\tthrow new PersistenceException(e.getMessage());\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "public void init() throws ServletException {\n\t\n\tString dbURL2 = \"jdbc:postgresql://10.5.0.45/cs387\";\n String user = \"sgondala\";\n String pass = \"x\";\n\n try {\n\t\tClass.forName(\"org.postgresql.Driver\");\n\t\n\t\tconn1 = DriverManager.getConnection(dbURL2, user, pass);\n\t\tst = conn1.createStatement();\n\t\tSystem.out.println(\"init\"+conn1);\n \t} catch (Exception e) {\n\t\t// TODO Auto-generated catch block\n \t\te.printStackTrace();\n \t}\n }", "private void openConnection() {\n try {\n dbConnection\n = DriverManager.getConnection(url, user, password);\n } catch (SQLException ex) {\n System.err.println(\"Exception in connecting to mysql database\");\n System.err.println(ex.getMessage());\n }\n }", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "@Override\r\n protected void connect() {\r\n try {\r\n this.setDatabase();\r\n } catch (SQLException e) {\r\n Log.w(NoteTraitDataSource.class.getName(), \"Error setting database.\");\r\n }\r\n }", "public void connect() {\n try {\n Class.forName(\"com.mysql.jdbc.Connection\");\n //characterEncoding=latin1&\n //Class.forName(\"org.apache.derby.jdbc.EmbeddedDriver\");\n //Connection conn = new Connection();\n url += \"?characterEncoding=latin1&useConfigs=maxPerformance&useSSL=false\";\n conn = DriverManager.getConnection(url, userName, password);\n if (conn != null) {\n System.out.println(\"Established connection to \"+url+\" Database\");\n }\n }\n catch(SQLException e) {\n throw new IllegalStateException(\"Cannot connect the database \"+url, e);\n }\n catch(ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "public static boolean initDatasource() {\n // first we locate the driver\n String pgDriver = \"org.postgresql.Driver\";\n try {\n ls.debug(\"Looking for Class : \" + pgDriver);\n Class.forName(pgDriver);\n } catch (Exception e) {\n ls.fatal(\"Cannot find postgres driver (\" + pgDriver + \")in class path\", e);\n return false;\n }\n\n try{ \n String url = \"jdbc:postgresql://inuatestdb.cctm7tiltceo.us-west-2.rds.amazonaws.com:5432/inua?user=inua&password=jw8s0F4\";\n dsUnPooled =DataSources.unpooledDataSource(url);\n dsPooled = DataSources.pooledDataSource(dsUnPooled);\n \n poolInit = true;\n }\n catch (Exception e){ \n ls.fatal(\"SQL Exception\",e);\n System.out.println(\"initDataSource\" + e);\n return false;\n }\n \n return true;\n}", "private static Connection baglan() {\n Connection baglanti = null;\n try {\n baglanti = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/SogutucuKontrolCihazi\",\n \"postgres\", \"159753\");\n if (baglanti != null) //bağlantı varsa\n System.out.println(\"Veritabanına bağlandı!\");\n else\n System.out.println(\"Bağlantı girişimi başarısız!\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return baglanti;\n }", "private void initialize() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n } catch (ClassNotFoundException e) {\n LOGGER.error(\"DB: Unable to find sql driver.\", e);\n throw new AppRuntimeException(\"Unable to find sql driver\", e);\n }\n\n DbCred cred = getDbCred();\n this.connection = getConnection(cred);\n this.isInitialized.set(Boolean.TRUE);\n }", "private void getConnection() {\r\n\r\n\t\ttry {\r\n\t\t\tClass.forName(driver);\r\n\t\t\tconn = DriverManager.getConnection(url, id, pw);\r\n\t\t\tSystem.out.println(\"[접속성공]\");\r\n\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"error: 드라이버 로딩 실패 -\" + e);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error:\" + e);\r\n\t\t}\r\n\r\n\t}", "protected static Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:database1.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(\"Connect: \" + e.getMessage());\n }\n return conn;\n }", "public void initConnection() throws DatabaseConnectionException, SQLException {\n\t\t\tString connectionString = DBMS+\"://\" + SERVER + \":\" + PORT + \"/\" + DATABASE;\n\t\t\ttry{\n\t\t\t\tClass.forName(DRIVER_CLASS_NAME).newInstance();\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE TROVARE DRIVER\");\n\t\t\t\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tconn=DriverManager.getConnection(connectionString, USER_ID, PASSWORD);\n\t\t\t\t\n\t\t\t}catch(SQLException e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE STABILIRE CONNESSIONE DATABASE\");\n\t\t\t\t\n\t\t\t}\n\t\t}", "public String getConnectionURL (String dbHost, int dbPort, String dbName,\n\t\tString userName)\n\t{\n\t\treturn \"jdbc:postgresql://\" \n\t\t\t+ dbHost + \":\" + dbPort + \"/\" + dbName;\n\t}", "protected void openConnection() throws SQLException {\n connection = DriverManager.getConnection(\"jdbc:mysql://stusql.dcs.shef.ac.uk/team021\", \"team021\", \"5f4306d9\");\n }", "public boolean connect(){\n \n try{\n \n String url = \"jdbc:sqlite:database_lite/database_sge.db\";\n \n this.connection = DriverManager.getConnection(url);\n \n }catch(SQLException e){\n \n System.out.println(e.getMessage());\n return false;\n \n }\n \n System.out.println(\"Connection success\");\n \n return true;\n }", "private static void dbConnect() {\r\n\t\tif (conn == null)\r\n\t\t\ttry {\r\n\t\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost/sims?user=root&password=12345&useSSL=true\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}", "private Connection openConnection() throws SQLException, ClassNotFoundException {\n DriverManager.registerDriver(new oracle.jdbc.OracleDriver());\n\n String host = \"localhost\";\n String port = \"1521\";\n String dbName = \"xe\"; //\"coen280\";\n String userName = \"temp\";\n String password = \"temp\";\n\n // Construct the JDBC URL \n String dbURL = \"jdbc:oracle:thin:@\" + host + \":\" + port + \":\" + dbName;\n return DriverManager.getConnection(dbURL, userName, password);\n }", "private JDBCConnection() {\n System.out.println(\"Created JDBC Connection Object\");\n \n try {\n // Connect to JDBC data base\n connection = DriverManager.getConnection(DATABASE_URL, DATABASE_USERNAME, DATABASE_PASSWORD);\n } catch (SQLException e) {\n // If there is an error, lets just print the error\n System.err.println(e.getMessage());\n }\n }", "private static Connection connect(String url) throws SQLException {\n\ttry {\r\n\t\tDatabaseUtil.loadDatabaseDriver(url);\r\n\t} catch (ClassNotFoundException e) {\r\n\t\tlog.error(\"Could not find JDBC driver class.\", e);\r\n\t\tthrow (SQLException) e.fillInStackTrace();\r\n\t}\r\n\r\n\t// Step 2: Establish the connection to the database.\r\n\tString username = Context.getRuntimeProperties().getProperty(\r\n\t\"connection.username\");\r\n\tString password = Context.getRuntimeProperties().getProperty(\r\n\t\"connection.password\");\r\n\tlog.debug(\"connecting to DATABASE: \" + OpenmrsConstants.DATABASE_NAME\r\n\t\t\t+ \" USERNAME: \" + username + \" URL: \" + url);\r\n\treturn DriverManager.getConnection(url, username, password);\r\n}", "public static Connection connectDB(){\n Connection conn = null; //initialize the connection\n try {\n //STEP 2: Register JDBC driver\n Class.forName(\"org.apache.derby.jdbc.ClientDriver\");\n\n //STEP 3: Open a connection\n System.out.println(\"Connecting to database...\");\n conn = DriverManager.getConnection(DB_URL);\n } catch (SQLException se) {\n //Handle errors for JDBC\n se.printStackTrace();\n } catch (Exception e) {\n //Handle errors for Class.forName\n e.printStackTrace();\n }\n return conn;\n }", "private Connection database() {\n Connection con = null;\n String db_url = \"jdbc:mysql://localhost:3306/hospitalms\";\n String db_driver = \"com.mysql.jdbc.Driver\";\n String db_username = \"root\";\n String db_password = \"\";\n \n try {\n Class.forName(db_driver);\n con = DriverManager.getConnection(db_url,db_username,db_password);\n } \n catch (SQLException | ClassNotFoundException ex) { JOptionPane.showMessageDialog(null,ex); }\n return con;\n }", "private Connection connect() throws SQLException {\n\n\n\t\t\t//Connection conn = DriverManager.getConnection(\"jdbc:derby:C:/Users/Duncan/Desktop/TBAG.db;create=true\");\t\n\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:derby:/Users/adoyle/Desktop/TBAG.db;create=true\");\n\t\t\t//Connection conn = DriverManager.getConnection(\"jdbc:derby:C:/Users/kille/Desktop/TBAG.db;create=true\");\t\t\n\t\t\t//Connection conn = DriverManager.getConnection(\"jdbc:derby:C:/Users/jlrhi/Desktop/TBAG.db;create=true\");\n\n\t\t\t\n\t\t\t// Set autocommit() to false to allow the execution of\n\t\t\t// multiple queries/statements as part of the same transaction.\n\t\t\tconn.setAutoCommit(false);\n\t\t\t\n\t\t\treturn conn;\n\t\t}", "public abstract Connection getConnection(String user, String password) throws SQLException;", "public Connection getConnection() throws ClassNotFoundException, SQLException {\n logger.info(\"Create DB connection\");\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n return DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/prod\",\"root\",\"rootroot\");\n }", "private void connect() {\n try {\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n cnt = DriverManager.getConnection(hosting, user, pass);\n } catch (Exception e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(this, \"lỗi kết nối\");\n }\n }", "private Connection connect() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\"); //make sure jdbc exists and can be found\n c = DriverManager.getConnection(\"jdbc:sqlite:\" + url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return c;\n }", "public Connection connect() throws SQLException {\n Connection connection = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n String url = \"jdbc:sqlite:\" + dbName;\n connection = DriverManager.getConnection(url);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n return connection;\n }", "protected static Connection connect() throws SQLException, ClassNotFoundException {\r\n String url = \"jdbc:sqlite:\" + databasePath;\r\n Connection conn;\r\n\r\n Class.forName(DRIVER);\r\n SQLiteConfig config = new SQLiteConfig();\r\n config.enforceForeignKeys(true);\r\n conn = DriverManager.getConnection(url, config.toProperties());\r\n\r\n return conn;\r\n }" ]
[ "0.8320477", "0.7946811", "0.782093", "0.7712681", "0.760295", "0.74873275", "0.7345002", "0.7312029", "0.7106391", "0.71052104", "0.7094716", "0.70188916", "0.7000351", "0.6922005", "0.68645644", "0.684264", "0.6814838", "0.68067926", "0.6701506", "0.6681421", "0.6632856", "0.6618085", "0.6594311", "0.6592175", "0.6551665", "0.6545157", "0.6542931", "0.6519921", "0.6496366", "0.6495359", "0.64884317", "0.6482664", "0.6480027", "0.64648706", "0.6462643", "0.6447237", "0.6445855", "0.6395474", "0.6390734", "0.63881093", "0.6385847", "0.63649005", "0.6359273", "0.6345265", "0.6338224", "0.63365346", "0.6331885", "0.63250124", "0.6324237", "0.63143194", "0.63044125", "0.6284332", "0.6267249", "0.6264279", "0.6264279", "0.6262019", "0.6237241", "0.6223159", "0.6219543", "0.62037677", "0.62034976", "0.6198796", "0.6194448", "0.6192485", "0.6182561", "0.6163404", "0.6145501", "0.6138865", "0.6138797", "0.612102", "0.6120413", "0.6119515", "0.6114733", "0.6114408", "0.61083853", "0.6107077", "0.6102908", "0.610173", "0.6100742", "0.60944927", "0.60936284", "0.6088283", "0.6085577", "0.6082341", "0.60744905", "0.6073525", "0.60708743", "0.6062579", "0.60610825", "0.60593957", "0.6052294", "0.60516334", "0.6051327", "0.60492384", "0.6045711", "0.6043717", "0.6039594", "0.6038804", "0.60370636", "0.6029085", "0.6019691" ]
0.0
-1
make sure ptg has single private constructor because map lookups assume singleton keys
private static void put(Map<OperationPtg, Function> m, OperationPtg ptgKey, Function instance) { Constructor[] cc = ptgKey.getClass().getDeclaredConstructors(); if (cc.length > 1 || !Modifier.isPrivate(cc[0].getModifiers())) { throw new RuntimeException("Failed to verify instance (" + ptgKey.getClass().getName() + ") is a singleton."); } m.put(ptgKey, instance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected MapImpl() {\n }", "public OwnMap() {\n super();\n keySet = new OwnSet();\n }", "protected ForwardingMapEntry() {}", "public FactoryMapImpl()\n {\n super();\n }", "protected WumpusMap() {\n\t\t\n\t}", "public MapOther() {\n }", "public Map() {\n\n\t\t}", "protected ForwardingMap() {}", "MAP createMAP();", "public Map() {\n\t\t//intially empty\n\t}", "protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }", "protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }", "private PerksFactory() {\n\n\t}", "private Mapper() {\n\n }", "private SimpleMap(Builder builder) {\n super(builder);\n }", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "public MyHashMap() {\n\n }", "public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }", "protected AusschreibungMapper() {\r\n\t}", "public MyHashMap() {\n\n }", "private DPSingletonLazyLoading(){\r\n\t\tthrow new RuntimeException();//You can still access private constructor by reflection and calling setAccessible(true)\r\n\t}", "public StrStrMap() {\n }", "public MagicDictionary() {\n\n }", "@SuppressWarnings(\"unused\")\n private MyPropertiesMapEntry() {\n this.key = null;\n this.value = null;\n }", "public abstract void createMap();", "public ObservableHashMap()\n {\n super();\n }", "public TimeMap2() {\n map = new HashMap<>();\n }", "protected SafeHashMap.KeySet instantiateKeySet()\n {\n return new KeySet();\n }", "public ScopedMap() {\n\t\tmap = new ArrayList<HashMap<K, V>>();\n\n\t}", "public MyHashMap() {\n map = new HashMap();\n }", "public SsOhMapTest()\n {\n }", "private DependencyManager(Map<TypedKey<?>, Object> inputs)\n\t{\n\t\tmap.putAll(inputs);\n\t}", "public ConnectedMap() {\n }", "public StandardKeySet() {\n super(ForwardingMap.this);\n }", "protected SafeHashMap.EntrySet instantiateEntrySet()\n {\n return new EntrySet();\n }", "public MagicDictionary() {\n this.map = new HashMap<>();\n }", "private ConfigurationKeys() {\n // empty constructor.\n }", "private MappingReader() {\n\t}", "public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }", "private MapTransformer(Map map) {\n super();\n iMap = map;\n }", "private AccessorFactory() {\n\n\t\tCoreConfig cc = CoreConfig.getInstance();\n\t\tString defaultName = cc.getString(\"builder.default\",CoreConstants.BUILDER_HBASE);\n\t\tdefaultBuilder = defaultName;\n\n\t\tfor (int i = 0; i < 20; i++) {\n\n\t\t\tString builderClass = cc.getString(BUILDER_PREFIX + i);\n\t\t\t\n\t\t\tif(StringUtils.isBlank(builderClass))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tClass<?> builderClazz = getClass().getClassLoader().loadClass(builderClass);\n\n\t\t\t\tAccessorBuilder hbaseBuilder = (AccessorBuilder) builderClazz.newInstance();\n\n\t\t\t\tbuilderMap.put(hbaseBuilder.getBuilderName(), hbaseBuilder);\n\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tLOGGER.error(\"class:{} is not found.\", builderClass);\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tLOGGER.error(\"class:{} error in instantiation.\", builderClass);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tLOGGER.error(\"class:{} be illegal accessed.\", builderClass);\n\t\t\t}\n\n\t\t}\n\n\t\tappendMapping(CoreConstants.BUILDER_HBASE, \"com/obal/meta/AccessorMap.hbase.properties\");\n\n\t}", "private Map(Builder builder) {\n super(builder);\n }", "public KeyedEntry() { }", "public TurtleMapDescriptor() {}", "public MapTile() {}", "protected StandardEntrySet() {}", "public MapEntity() {\n\t}", "public Map instantiateBackingMap(String sName);", "public MultiKey() {}", "public AttributeMap()\r\n\t{\r\n\t\tsuper();\r\n\t}", "public MapperBase() {\r\n }", "private SingletonLectorPropiedades() {\n\t}", "@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }", "public QuadGramMap()\n\t{\n\t\tsuper();\n\t}", "private GeoUtil()\n\t{\n\t}", "private static void createTypeMap() {\n\n }", "@Contract(value = \" -> new\", pure = true)\n @Nonnull\n public static <K, V> Map<K, V> createSoftMap() {\n return Maps.newSoftHashMap();\n }", "public OwnMap(int capacity) {\n super(capacity);\n keySet = new OwnSet();\n }", "public MapBuilder() {\r\n map = new Map();\r\n json = new Gson();\r\n }", "@Nonnull\n private static MultimapBuilder.SetMultimapBuilder<Comparable, Object> newMapBuilder()\n {\n return MultimapBuilder.SetMultimapBuilder\n .treeKeys()\n .hashSetValues();\n }", "Reproducible newInstance();", "private SparkeyServiceSingleton(){}", "private Tuples() {\n // prevent instantiation.\n }", "public Mapping() { this(null); }", "public PIEBankPlatinumKey() {\n\tsuper();\n}", "public TreeDictionary() {\n\t\t\n\t}", "public RedisTopicMapSystem() {\r\n\t}", "public TimeMap() {\n timeMap = new HashMap<>();\n }", "protected Singleton(K key, double value, Comparator<? super K> comparator) {\n/* 181 */ super(key, value);\n/* 182 */ this.comparator = comparator;\n/* */ }", "public static MapObject createMapObject(){\n\t\treturn new MapObject();\n\t}", "public DictionaryModuleImpl() {\r\n }", "private Map(int id) {\n\t\tthis.id = Integer.valueOf(id);\n\t\tSystem.out.println(\"Initializing map: \" + this.toString() + \" (\" + this.id + \")\");\n\t}", "private LookupUtil(){}", "public StandardValues() {\n super(ForwardingMap.this);\n }", "private Singleton() {\n\t}", "private Singleton() { }", "public static java.util.Map singletonMap(java.lang.Object arg0, java.lang.Object arg1)\n { return null; }", "public MapNatural() {\n }", "private InstanceUtil() {\n }", "private Singleton()\n\t\t{\n\t\t}", "public FuncTestKey() {\n super();\n }", "public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}", "public static final class <init> extends com.google.android.m4b.maps.ct.<init>\n implements b\n{\n\n private ()\n {\n super(com.google.android.m4b.maps.cy.a.d());\n }", "private TypicalPersons() {}", "private TypicalPersons() {}", "private SingletonObject() {\n\n\t}", "public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}", "private static <K, V> Map<K, V> newHashMap() {\n return new HashMap<K, V>();\n }", "public mapper3c() { super(); }", "public TimeMap() {\n\n }", "private LoadMethodMapper ()\n {}", "XClass getMapKey();", "@SuppressWarnings(\"unused\")\n\tpublic void testNullInConstructor()\n\t{\n\t\ttry\n\t\t{\n\t\t\tnew TripleKeyMap<>(null, HashMap.class, HashMap.class);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException | NullPointerException e)\n\t\t{\n\t\t\t// OK, expected\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tnew TripleKeyMap<>(HashMap.class, null, HashMap.class);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException | NullPointerException e)\n\t\t{\n\t\t\t// OK, expected\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tnew TripleKeyMap<>(HashMap.class, HashMap.class, null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException | NullPointerException e)\n\t\t{\n\t\t\t// OK, expected\n\t\t}\n\t}", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "public Pair() {\n // nothing to do here\n }", "private Instantiation(){}", "public ClassRegistry() {\n this.classMap.putAll(CLASS_MAP);\n this.conversionMap.putAll(CONVERSION_MAP);\n conversionMap.put(\"key->new\",defaultSupplier);\n conversionMap.put(\"new\",typeName->defaultSupplier.apply(typeName));\n }", "public static <K, V> Reference2ObjectMap<K, V> singleton(K key, V value) {\n/* 271 */ return new Singleton<>(key, value);\n/* */ }", "public FMap(String rute) {\n super(rute);\n init(rute);\n }", "protected AbstractLeaseMap(Lease lease, long duration) {\n\tthis(new ConcurrentHashMap(13), lease, duration);\n }" ]
[ "0.71415216", "0.70255345", "0.6853533", "0.6788317", "0.67428595", "0.66733485", "0.6642097", "0.6522865", "0.64729726", "0.64143324", "0.6388101", "0.6382879", "0.6376452", "0.6367326", "0.6344858", "0.6327963", "0.6292278", "0.62789464", "0.6243543", "0.62384576", "0.6220996", "0.6215201", "0.6202548", "0.61961997", "0.61512727", "0.6133065", "0.6105647", "0.61019367", "0.61005163", "0.60974145", "0.6060517", "0.6059372", "0.60477203", "0.6047084", "0.6046881", "0.6039929", "0.60310864", "0.602839", "0.5996798", "0.59882134", "0.59875554", "0.59862775", "0.5985098", "0.5982404", "0.5981581", "0.5968081", "0.59481204", "0.59463805", "0.5943018", "0.5936651", "0.59303534", "0.5919162", "0.5887709", "0.58836573", "0.5882456", "0.5879463", "0.58632696", "0.5860298", "0.5859581", "0.58515644", "0.58475006", "0.58469987", "0.5834904", "0.5819176", "0.58162695", "0.58105063", "0.5809743", "0.5807622", "0.5805594", "0.5804776", "0.58026916", "0.57980204", "0.57954586", "0.57918304", "0.57863176", "0.57850194", "0.57844406", "0.57843024", "0.5784118", "0.5784081", "0.5773667", "0.57727295", "0.5771146", "0.57659763", "0.57659763", "0.5764025", "0.5759681", "0.575879", "0.5755027", "0.57531065", "0.5748105", "0.5738537", "0.5735623", "0.5734659", "0.573389", "0.57301754", "0.5727782", "0.5722338", "0.57193375", "0.5708966" ]
0.7045956
1
returns the OperationEval concrete impl instance corresponding to the supplied operationPtg
public static ValueEval evaluate(OperationPtg ptg, ValueEval[] args, OperationEvaluationContext ec) { if(ptg == null) { throw new IllegalArgumentException("ptg must not be null"); } //ZSS-933 if (ptg instanceof UnionPtg) { return new UnionEval(args); } //ZSS-852 Function result = ptg instanceof MultiplyPtg ? new MultiplyFunc(((MultiplyPtg)ptg).isOperator()): _instancesByPtgClass.get(ptg); if (result != null) { return result.evaluate(args, ec.getRowIndex(), (short) ec.getColumnIndex()); } if (ptg instanceof AbstractFunctionPtg) { AbstractFunctionPtg fptg = (AbstractFunctionPtg)ptg; int functionIndex = fptg.getFunctionIndex(); switch (functionIndex) { case FunctionMetadataRegistry.FUNCTION_INDEX_INDIRECT: return Indirect.instance.evaluate(args, ec); case FunctionMetadataRegistry.FUNCTION_INDEX_EXTERNAL: return UserDefinedFunction.instance.evaluate(args, ec); } return FunctionEval.getBasicFunction(functionIndex).evaluate(args, ec.getRowIndex(), (short) ec.getColumnIndex()); } throw new RuntimeException("Unexpected operation ptg class (" + ptg.getClass().getName() + ")"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Operation getOperation();", "public Operation getOperation();", "Operator.Type getOperation();", "String getOp();", "String getOp();", "String getOp();", "public Operation getOperation() {\n return operation;\n }", "abstract String getOp();", "public final TestOperation getOperation()\n\t{\n\t\treturn operation_;\n\t}", "public Operation getOperation() {\n return this.operation;\n }", "public Operator getOp() {\n return op;\n }", "public org.xmlsoap.schemas.wsdl.http.OperationType getOperation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.http.OperationType target = null;\n target = (org.xmlsoap.schemas.wsdl.http.OperationType)get_store().find_element_user(OPERATION$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public OperationType getOperation() {\r\n return operation;\r\n }", "public OperationType getOperation() {\r\n return operation;\r\n }", "String getOperation();", "String getOperation();", "public RelationalOp getOp() {\n\t\treturn op;\n\t}", "public interface EvaluatorFactory {\n Evaluator createEvaluator(RelationalOperator operator);\n}", "public EvalFunction getEvalFunction() {\n return evalFct;\n }", "public OperationResultInfoBase operation() {\n return this.operation;\n }", "public String getOperation();", "<C, O> OperationCallExp<C, O> createOperationCallExp();", "public Object getOperatorInstance() {\n return operatorInstance;\n }", "Operation createOperation();", "Operation createOperation();", "protected Container2OperationEvaluator(Container2Operation op) {\r\n this.op = op;\r\n }", "public EAdOperation getOperation() {\r\n\t\treturn operation;\r\n\t}", "IOperationable create(String operationType);", "public String getOperation() {return operation;}", "public Operation operation() {\n return Operation.fromSwig(alert.getOp());\n }", "public abstract Operand<T> result();", "OperationCallExp createOperationCallExp();", "public String getOperation() {\n return operation;\n }", "public String getOperation() {\n return operation;\n }", "public Operator operator() {\n\treturn this.op;\n }", "public String getOperation() {\r\n\t\treturn operation;\r\n\t}", "public String getOp() {\n return op;\n }", "public String getOp() {\n return op;\n }", "public String getOperation() {\n return this.operation;\n }", "public interface Operator {\n /**\n * String literal to enter operator\n * @return\n */\n String getKey();\n\n void execute(EvaluatedParameters evaluatedParameters) throws ProcessorException;\n}", "public Class getEvaluationType() {\n return lho.getOperandType();\n }", "public String getOperation() {\n\t\treturn operation;\n\t}", "@java.lang.Override\n public com.clarifai.grpc.api.Operation getOperation() {\n return operation_ == null ? com.clarifai.grpc.api.Operation.getDefaultInstance() : operation_;\n }", "public String getOper() {\n return oper;\n }", "public String getOperation () {\n return operation;\n }", "public String getOperation () {\n return operation;\n }", "public String getOperation() {\n\t\t\treturn operation;\n\t\t}", "public com.clarifai.grpc.api.Operation getOperation() {\n if (operationBuilder_ == null) {\n return operation_ == null ? com.clarifai.grpc.api.Operation.getDefaultInstance() : operation_;\n } else {\n return operationBuilder_.getMessage();\n }\n }", "GlobalEntity getOpGlobCall();", "@Override\n\tpublic String operation() {\n\t\treturn adaptee.specificOperation();\n\t}", "public interface Operation {\n\tdouble evaluate(double x, double y);\n}", "public IMutateExprTree getBaseOp() \r\n\t{\r\n\t\treturn baseOp;\r\n\t}", "public final Operator operator() {\n return operator;\n }", "public java.lang.CharSequence getOperation() {\n return operation;\n }", "public java.lang.CharSequence getOperation() {\n return operation;\n }", "public Operation createOperation(String symbol) throws InstantiationException, IllegalAccessException {\n checkForNull(symbol);\n\n if (map.containsKey(symbol)) {\n return (Operation) map.get(symbol).newInstance();\n } else {\n return null;\n }\n }", "public String getOperateLogic() {\n return this.OperateLogic;\n }", "public com.hps.july.persistence.OperatorAccessBean getOperator() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n instantiateEJB();\n com.hps.july.persistence.Operator localEJBRef = ejbRef().getOperator();\n if ( localEJBRef != null )\n return new com.hps.july.persistence.OperatorAccessBean(localEJBRef);\n else\n return null;\n }", "public Invocation getInvocation() {\n if(getIdentifier().startsWith(\"static\")) {\n return Invocation.STATIC_OPERATION;\n }\n \n if(getOperation().equals(\"new\")) {\n return Invocation.CLASS_CONSTRUCTOR;\n }\n \n return Invocation.INSTANCE_OPERATION;\n }", "public com.sybase.persistence.BigString getCvpOperation()\n {\n \n if(__cvpOperation==null)\n {\n \t__cvpOperation = new com.sybase.persistence.internal.BigStringImpl(this, \"cvpOperation\");\n }\n return __cvpOperation;\n }", "public abstract Object eval();", "public Operator getOperator()\n {\n return operator;\n }", "public void setOperation(String op) {this.operation = op;}", "public interface IOperation {\n /*\n * OperationTypeId:\n * 1 - DEPOSIT\n * 2 - WITHDRAW\n * 3 - TRANSFER\n * 4 - CREATE_TERM_DEPOSIT\n * 5 - END_TERM_DEPOSIT\n * 6 - CREATE_CREDIT\n * 7 - REPAY_CREDIT\n * 8 - INTEREST_CAPITALISATION\n * 9 - INTEREST_MECHANISM_CHANGE\n * 10 - CREATE_DEBIT\n */\n Integer getOperationTypeId();\n LocalDate getExecutionDate();\n String getDescription();\n boolean getWasExecuted();\n\n boolean executeOperation();\n\n void accept(IOperationVisitor visitor);\n}", "public interface IExpressionRuntime\n{\n Object evaluate();\n}", "public String operator( String op);", "public static Executor getExecutor(EvaluatorComponent component) {\n\t\tEvaluatorData data = component.getData();\n\t\tString language = data.getLanguage();\n\t\tExecutor executor = null;\n\t\t// cache here if necessary\n\t\tfor (EvaluatorProvider provider : registry) {\n\t\t\tif (provider.getLanguage().equals(language)) {\n\t\t\t\texecutor = provider.compile(data.getCode());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn executor;\n\t}", "private OperatorParameter getParameter(LauncherOperations oOperation) {\r\n\t\tUtils.debugLog(\"ProcessingResources.OperatorParameter( LauncherOperations )\");\r\n\t\tswitch (oOperation) {\r\n\t\tcase APPLYORBIT:\r\n\t\t\treturn new ApplyOrbitParameter();\r\n\t\tcase CALIBRATE:\r\n\t\t\treturn new CalibratorParameter();\r\n\t\tcase MULTILOOKING:\r\n\t\t\treturn new MultilookingParameter();\r\n\t\tcase TERRAIN:\r\n\t\t\treturn new RangeDopplerGeocodingParameter();\r\n\t\tcase NDVI:\r\n\t\t\treturn new NDVIParameter();\r\n\t\tcase GRAPH:\r\n\t\t\treturn new GraphParameter();\r\n\t\tcase MOSAIC:\r\n\t\t\treturn new MosaicParameter();\r\n\t\tcase SUBSET:\r\n\t\t\treturn new SubsetParameter();\r\n\t\tcase MULTISUBSET:\r\n\t\t\treturn new MultiSubsetParameter();\r\n\t\tcase REGRID:\r\n\t\t\treturn new RegridParameter();\r\n\t\tdefault:\r\n\t\t\treturn null;\r\n\r\n\t\t}\r\n\t}", "public Executor getExecutor() {\n Object o = getReference(\"ant.executor\");\n if (o == null) {\n String classname = getProperty(\"ant.executor.class\");\n if (classname == null) {\n classname = DefaultExecutor.class.getName();\n }\n log(\"Attempting to create object of type \" + classname, MSG_DEBUG);\n try {\n o = Class.forName(classname, true, coreLoader).newInstance();\n } catch (ClassNotFoundException seaEnEfEx) {\n //try the current classloader\n try {\n o = Class.forName(classname).newInstance();\n } catch (Exception ex) {\n log(ex.toString(), MSG_ERR);\n }\n } catch (Exception ex) {\n log(ex.toString(), MSG_ERR);\n }\n if (o == null) {\n throw new BuildException(\n \"Unable to obtain a Target Executor instance.\");\n }\n setExecutor((Executor) o);\n }\n return (Executor) o;\n }", "public OperationStatus execute(T operation) throws AbstractAgentException;", "protected ContainerValueOperationEvaluator(ContainerValueOperation op) {\r\n this.op = op;\r\n }", "public java.lang.Integer getOperator() throws java.rmi.RemoteException;", "public static IEvaluator getEvaluator( WorkflowPackage pkg, ServiceManager svcMgr )\r\n throws RepositoryException\r\n {\r\n\r\n // Determine script type; default is text/xpath.\r\n Script script = pkg.getScript();\r\n String contentType = script == null\r\n ? System.getProperty( \"org.obe.script\", \"text/xpath\" )\r\n : script.getType();\r\n return svcMgr.getEvaluatorRepository().findEvaluator( contentType );\r\n }", "@Override\n @NotNull\n public ConverterType getOperation() {\n return this.operation.getConverter();\n }", "public interface Operation {\n}", "public java.lang.CharSequence getOperation() {\n return Operation;\n }", "org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation getOperation();", "public java.lang.CharSequence getOperation() {\n return Operation;\n }", "public Object getExpression();", "public String getEvalCommand(String str) {\r\n\t\treturn null;\r\n\t}", "Operation getBestOp() {\n\t\t\tPriorityQueue<Operation> pq = new PriorityQueue<Operation>(new Comparator<Operation>() {\n\t\t\t\tpublic int compare(Operation op1, Operation op2) {\n\t\t\t\t\treturn op1.val - op2.val;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpq.add(this.minAddOp);\n\t\t\tpq.add(this.minDeleteOp);\n\t\t\tpq.add(this.minSwapOp);\n\n\t\t\treturn pq.poll();\n\t\t}", "com.learning.learning.grpc.ManagerOperationRequest.Operations getOperation();", "private Object eval(Fact expr) {\n if (expr.getBool() != null) {\n if (\"true\".equals(expr.getBool())) {\n return true;\n } else {\n return false;\n }\n } else if (expr.getString() != null) {\n return expr.getString();\n } else if (expr.getIdent() != null) {\n if (RESULT_TYPE_VARIABLE.equals(resultType)) {\n return expr.getIdent();\n }\n return scope.getVariable(expr.getIdent());\n } else if (expr.getExpr() != null) {\n return eval(expr.getExpr(), resultType);\n } else if (expr.getLocator() != null) {\n return evalLocator(expr.getLocator());\n } else {\n return expr.getNumber();\n }\n }", "public interface Operator {\n\n Map<String, Operator> oprators = Factory.instance();\n\n /**\n * calculate first operator second such as 1 + 2\n * @param first\n * @param second\n * @return\n */\n @NotNull\n BigDecimal calculate(@NotNull BigDecimal first, @NotNull BigDecimal second);\n\n int priority();\n\n\n\n class Factory {\n public static Map<String, Operator> instance() {\n Map<String, Operator> instance = new HashMap();\n\n instance.put(\"+\", new AddOperator());\n instance.put(\"-\", new SubOperator());\n instance.put(\"*\", new MultiOperator());\n instance.put(\"/\", new DiviOperator());\n\n return instance;\n }\n }\n\n}", "OpFunction createOpFunction();", "public com.clarifai.grpc.api.OperationOrBuilder getOperationOrBuilder() {\n if (operationBuilder_ != null) {\n return operationBuilder_.getMessageOrBuilder();\n } else {\n return operation_ == null ?\n com.clarifai.grpc.api.Operation.getDefaultInstance() : operation_;\n }\n }", "public int getOp() {\n\t\treturn op;\n\t}", "private Operator findOperatorToResolve(Predicate predToResolve) throws Exception {\n\t\tfor (Operator op : this.operators) {\n\t\t\tOperator opCopy = op.getClass().newInstance();\n\t\t\tfor (Predicate predCandidate : opCopy.getAdd().toList()) {\n\t\t\t\tif (predCandidate.isCompatibleTo(predToResolve)) {\n\t\t\t\t\t// instantiate opCopy with predToResolve\n\t\t\t\t\tfor (int i = 0; i < predToResolve.getValence(); i++) {\n\t\t\t\t\t\tif (!predCandidate.getArgument(i).isInstantiated()) {\n\t\t\t\t\t\t\tpredCandidate.getArgument(i).instantiate(predToResolve.getArgument(i).getValue());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn opCopy;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tthrow new RuntimeException(\"There was no operator found to resolve a predicate. There is no possible plan.\");\n\t}", "public Evaluator getEvaluator() {\n return evaluator;\n }", "String getOperator();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "public OperationInfo getOperation(String name)\n {\n return (OperationInfo) nameToOperation.get(name);\n }", "public TypeOperation getOperation(int typeOp){\n for (int i=0; i<tabTypeOp.length; i++){\n if (tabTypeOp[i].getType() == typeOp)\n return tabTypeOp[i];\n }\n return null;\n }", "public Operator getOperator() {\n return this.operator;\n }", "@Override\n\tpublic O evaluate(I rTarget, Class<O> rClass)\n\t{\n\t\treturn rClass.cast(rTarget);\n\t}", "@SuppressWarnings(\"unchecked\")\n public <T extends OperationSet> T getOperationSet(Class<T> opsetClass)\n {\n return (T) supportedOperationSets.get(opsetClass.getName());\n }", "assign_op getAssign_op();" ]
[ "0.67192227", "0.6472769", "0.641784", "0.59869015", "0.59869015", "0.59869015", "0.59026253", "0.58524406", "0.5794832", "0.57748055", "0.57446474", "0.57227033", "0.5712513", "0.5712513", "0.562407", "0.562407", "0.55956423", "0.5581586", "0.5565161", "0.5527268", "0.55193186", "0.55032027", "0.54958653", "0.54721373", "0.54721373", "0.5448158", "0.5432211", "0.54314625", "0.54312295", "0.5387326", "0.53832066", "0.5376526", "0.53685313", "0.53685313", "0.5365249", "0.535782", "0.5356908", "0.5356908", "0.53501594", "0.53477", "0.5339609", "0.53388035", "0.53325576", "0.53286165", "0.5312548", "0.5312548", "0.53020716", "0.52951515", "0.52846843", "0.5266356", "0.5254254", "0.5246283", "0.52418447", "0.5236022", "0.52219707", "0.5215425", "0.52135026", "0.5187352", "0.516881", "0.5166259", "0.5160245", "0.5147066", "0.51368093", "0.51334804", "0.51292413", "0.51207864", "0.51150006", "0.511171", "0.5102014", "0.5097579", "0.5086039", "0.5085399", "0.5080161", "0.5074497", "0.50711966", "0.50584656", "0.50547326", "0.50419986", "0.5028099", "0.5009356", "0.49947163", "0.4994044", "0.49918842", "0.49911475", "0.49871495", "0.4983109", "0.4982311", "0.49806774", "0.4977113", "0.497243", "0.49671778", "0.49671778", "0.49671778", "0.49671778", "0.49671242", "0.49582714", "0.49517104", "0.49498382", "0.49473277", "0.49424607" ]
0.61540127
3
/ B D / / A CE \ / \ | S F | \ / | GH
@Test public void dfsRecursiveTest() { Map<String, List<String>> graph = new HashMap<>(); graph.put("A", Lists.newArrayList("B", "S")); graph.put("B", Lists.newArrayList("A")); graph.put("C", Lists.newArrayList("D", "E", "F", "S")); graph.put("D", Lists.newArrayList("C")); graph.put("E", Lists.newArrayList("C", "H")); graph.put("F", Lists.newArrayList("C", "G")); graph.put("G", Lists.newArrayList("F", "H", "S")); graph.put("H", Lists.newArrayList("E", "G")); graph.put("S", Lists.newArrayList("A", "C", "G")); List<String> traversal = new DFSRecursive().runDFS("A", graph); Assert.assertEquals(Lists.newArrayList("A", "B", "S", "C", "D", "E", "H", "G", "F"), traversal); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void dfs(String s, int leftCount, int rightCount, int openCount, int index, StringBuilder sb, Set<String> res) {\n if (index == s.length()) {\n if (leftCount == 0 && rightCount == 0 && openCount == 0) res.add(sb.toString());\n return;\n }\n if (leftCount < 0 || rightCount < 0 || openCount < 0) return;\n int len = sb.length();\n if (s.charAt(index) == '(') {\n dfs(s, leftCount - 1, rightCount, openCount, index + 1, sb, res);\n dfs(s, leftCount, rightCount, openCount + 1, index + 1, sb.append('('), res);\n } else if (s.charAt(index) == ')') {\n dfs(s, leftCount, rightCount - 1, openCount, index + 1, sb, res);\n dfs(s, leftCount, rightCount, openCount - 1, index + 1, sb.append(')'), res);\n } else {\n dfs(s, leftCount, rightCount, openCount, index + 1, sb.append(s.charAt(index)), res);\n }\n sb.setLength(len);\n }", "public void rectifyMisRecogChars2ndRnd() {\n if (mnExprRecogType == EXPRRECOGTYPE_VBLANKCUT) {\n LinkedList<StructExprRecog> listBoundingChars = new LinkedList<StructExprRecog>();\n LinkedList<Integer> listBoundingCharIndices = new LinkedList<Integer>();\n LinkedList<StructExprRecog> listVLnChars = new LinkedList<StructExprRecog>();\n LinkedList<Integer> listVLnCharIndices = new LinkedList<Integer>();\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n StructExprRecog serThisChild = mlistChildren.get(idx).getPrincipleSER(4);\n // now deal with the brackets, square brackets and braces.\n if (serThisChild.isBoundChar()) {\n if (serThisChild.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE) {\n if (idx > 0 && idx < mlistChildren.size() - 1\n && (mlistChildren.get(idx - 1).isNumericChar() || mlistChildren.get(idx - 1).isLetterChar()) // dot is allowed here because it must be decimal point not times (times has been converted to *)\n && (mlistChildren.get(idx + 1).isNumericChar() || mlistChildren.get(idx + 1).isLetterChar() // dot is allowed here.\n || mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE\n || mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE\n || mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES)) {\n // this must be a 1 if the left and right are both letter or numeric char\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE;\n } else if (idx > 0 && !mlistChildren.get(idx - 1).isChildListType() && !mlistChildren.get(idx - 1).isNumberChar() && !mlistChildren.get(idx - 1).isLetterChar()\n && !mlistChildren.get(idx - 1).isPostUnOptChar() && !mlistChildren.get(idx - 1).isBiOptChar() && !mlistChildren.get(idx - 1).isCloseBoundChar()) {\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // left char is not left char of v-line\n } else if (idx < mlistChildren.size() - 1 && !mlistChildren.get(idx + 1).isChildListType() && !mlistChildren.get(idx + 1).isNumberChar()\n && !mlistChildren.get(idx + 1).isLetterChar() && !mlistChildren.get(idx + 1).isPreUnOptChar() && !mlistChildren.get(idx + 1).isBiOptChar()\n && !mlistChildren.get(idx + 1).isBoundChar()) {\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // left char is not left char of v-line\n } else {\n listVLnChars.add(serThisChild);\n listVLnCharIndices.add(idx);\n }\n } else if (serThisChild.mType != UnitProtoType.Type.TYPE_BRACE\n || (serThisChild.mType == UnitProtoType.Type.TYPE_BRACE && idx == mlistChildren.size() - 1)\n || (serThisChild.mType == UnitProtoType.Type.TYPE_BRACE && idx < mlistChildren.size() - 1\n && mlistChildren.getLast().mnExprRecogType != EXPRRECOGTYPE_MULTIEXPRS)) {\n listBoundingChars.add(serThisChild);\n listBoundingCharIndices.add(idx);\n }\n } else if (serThisChild.isCloseBoundChar()) {\n if (serThisChild.mType != UnitProtoType.Type.TYPE_VERTICAL_LINE) {\n boolean bFoundOpenBounding = false;\n for (int idx1 = listBoundingChars.size() - 1; idx1 >= 0; idx1 --) {\n if ((serThisChild.getBottomPlus1() - listBoundingChars.get(idx1).mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serThisChild.mnHeight\n && (listBoundingChars.get(idx1).getBottomPlus1() - serThisChild.mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serThisChild.mnHeight\n && serThisChild.mnHeight > ConstantsMgr.msdOpenCloseBracketHeightRatio * listBoundingChars.get(idx1).mnHeight // must have similar height as the start character\n && serThisChild.mnHeight < 1/ConstantsMgr.msdOpenCloseBracketHeightRatio * listBoundingChars.get(idx1).mnHeight) {\n for (int idx2 = listBoundingChars.size() - 1; idx2 > idx1; idx2 --) {\n // allow to change all the ( or [ between () or [] pairs coz here ( and [ must not have pair and must be misrecognized.\n //StructExprRecog serB4BndChar = listBoundingCharIndices.get(idx2) > 0?mlistChildren.get(listBoundingCharIndices.get(idx2) - 1):null;\n //StructExprRecog serAfterBndChar = listBoundingCharIndices.get(idx2) < mlistChildren.size() - 1?mlistChildren.get(listBoundingCharIndices.get(idx2) + 1):null;\n if (listBoundingChars.get(idx2).mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET\n && (double)listBoundingChars.get(idx2).mnWidth/(double)listBoundingChars.get(idx2).mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) {\n listBoundingChars.get(idx2).mType = UnitProtoType.Type.TYPE_ONE; // change to 1, do not use b4 and after char to adjust because not accurate.\n } else if (listBoundingChars.get(idx2).mType == UnitProtoType.Type.TYPE_ROUND_BRACKET\n && (double)listBoundingChars.get(idx2).mnWidth/(double)listBoundingChars.get(idx2).mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) {\n listBoundingChars.get(idx2).mType = UnitProtoType.Type.TYPE_ONE; // change to 1, do not use b4 and after char to adjust because not accurate.\n } else {\n listBoundingChars.get(idx2).mType = UnitProtoType.Type.TYPE_SMALL_T; // all the no-close-bounding chars are changed to small t.\n }\n listBoundingChars.removeLast();\n listBoundingCharIndices.removeLast();\n }\n listBoundingChars.get(idx1).mType = UnitProtoType.Type.TYPE_ROUND_BRACKET;\n serThisChild.mType = UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET;\n listBoundingChars.remove(idx1);\n listBoundingCharIndices.remove(idx1);\n bFoundOpenBounding = true;\n break;\n }\n }\n if (!bFoundOpenBounding) {\n // cannot find open bounding character, change the close bounding character to 1.\n //StructExprRecog serB4BndChar = idx > 0?mlistChildren.get(idx - 1):null;\n //StructExprRecog serAfterBndChar = idx < mlistChildren.size() - 1?mlistChildren.get(idx + 1):null;\n if (serThisChild.mType == UnitProtoType.Type.TYPE_CLOSE_SQUARE_BRACKET\n && (double)serThisChild.mnWidth/(double)serThisChild.mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) {\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // change to 1. Do not use b4 after char to adjust because not accurate (considering - or [1/2]...)\n } else if (serThisChild.mType == UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET\n && (double)serThisChild.mnWidth/(double)serThisChild.mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) {\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE;\n }\n }\n }\n } else if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (serThisChild.mType == UnitProtoType.Type.TYPE_SMALL_O || serThisChild.mType == UnitProtoType.Type.TYPE_BIG_O)) {\n // now deal with all o or Os. do not put this in the first round because the condition to change o or O to 0 is more relax.\n if (mlistChildren.get(idx).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE\n || mlistChildren.get(idx).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE\n || mlistChildren.get(idx).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES) {\n // if it has upper or lower note.\n serThisChild.mType = UnitProtoType.Type.TYPE_ZERO;\n } else if (idx > 0 && (!mlistChildren.get(idx - 1).isLetterChar() || (mlistChildren.get(idx - 1).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (mlistChildren.get(idx - 1).mType == UnitProtoType.Type.TYPE_SMALL_O || mlistChildren.get(idx - 1).mType == UnitProtoType.Type.TYPE_BIG_O)))) {\n // if left character is not a letter char or is o or O\n serThisChild.mType = UnitProtoType.Type.TYPE_ZERO;\n } else if (idx < (mlistChildren.size() - 1) && (!mlistChildren.get(idx + 1).isLetterChar() || (mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (mlistChildren.get(idx + 1).mType == UnitProtoType.Type.TYPE_SMALL_O || mlistChildren.get(idx + 1).mType == UnitProtoType.Type.TYPE_BIG_O)))) {\n // if right character is not a letter char or is o or O\n serThisChild.mType = UnitProtoType.Type.TYPE_ZERO;\n }\n }\n }\n \n if (listVLnChars.size() == 1) {\n listVLnChars.getFirst().mType = UnitProtoType.Type.TYPE_ONE; // all the no-paired vline chars are changed to 1.\n } else {\n while (listVLnChars.size() > 0) {\n int nIdx1st = listVLnCharIndices.getFirst();\n if (mlistChildren.get(nIdx1st).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE\n || mlistChildren.get(nIdx1st).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE\n || mlistChildren.get(nIdx1st).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES) {\n listVLnChars.getFirst().mType = UnitProtoType.Type.TYPE_ONE; // 1st | cannot have upper note or low note .\n listVLnCharIndices.removeFirst();\n listVLnChars.removeFirst();\n } else {\n break;\n }\n }\n for (int idx = listVLnChars.size() - 1; idx >= 0 ; idx --) {\n StructExprRecog serOneChild = listVLnChars.get(idx);\n int idx1 = listVLnChars.size() - 1;\n for (; idx1 >= 0; idx1 --) {\n if (idx1 == idx) {\n continue;\n }\n StructExprRecog serTheOtherChild = listVLnChars.get(idx1);\n if ((serOneChild.getBottomPlus1() - serTheOtherChild.mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serOneChild.mnHeight\n && (serTheOtherChild.getBottomPlus1() - serOneChild.mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serOneChild.mnHeight\n && serOneChild.mnHeight > ConstantsMgr.msdOpenCloseBracketHeightRatio * serTheOtherChild.mnHeight // must have similar height as the start character\n && serOneChild.mnHeight < 1/ConstantsMgr.msdOpenCloseBracketHeightRatio * serTheOtherChild.mnHeight) {\n // has corresponding v-line.\n break;\n }\n }\n if (idx1 == -1) {\n // doesn't have corresponding v-line..\n serOneChild.mType = UnitProtoType.Type.TYPE_ONE; // all the no-paired vline chars are changed to 1.\n }\n }\n // recheck the new first VLnChars.\n for (int idx = 0; idx < listVLnChars.size(); idx ++) {\n int nIdxInList = listVLnCharIndices.get(idx);\n if (listVLnChars.get(idx).mType == UnitProtoType.Type.TYPE_ONE) {\n continue;\n } else if (mlistChildren.get(nIdxInList).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE\n || mlistChildren.get(nIdxInList).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE\n || mlistChildren.get(nIdxInList).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES) {\n listVLnChars.get(idx).mType = UnitProtoType.Type.TYPE_ONE; // 1st | cannot have upper note or low note .\n } else {\n break;\n }\n }\n }\n \n if (listBoundingChars.size() > 0 && listBoundingChars.getLast() == mlistChildren.getLast()) {\n // change the last unpaired ( or [ to t or 1 if necessary.\n //StructExprRecog serB4BndChar = mlistChildren.size() > 1?mlistChildren.get(mlistChildren.size() - 2):null;\n if (listBoundingChars.getLast().mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET\n && (double)listBoundingChars.getLast().mnWidth/(double)listBoundingChars.getLast().mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) {\n listBoundingChars.getLast().mType = UnitProtoType.Type.TYPE_ONE; // change to 1. Do not use b4 after chars to adjust [ coz not accurate.\n } else if (listBoundingChars.getLast().mType == UnitProtoType.Type.TYPE_ROUND_BRACKET\n && (double)listBoundingChars.getLast().mnWidth/(double)listBoundingChars.getLast().mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) {\n listBoundingChars.getLast().mType = UnitProtoType.Type.TYPE_ONE; // change to 1. Do not use b4 after chars to adjust [ coz not accurate.\n } else {\n listBoundingChars.getLast().mType = UnitProtoType.Type.TYPE_SMALL_T; // if the last unpaired ( or [ is the last char, very likely it is a t.\n }\n }\n for (int idx = 0; idx < listBoundingChars.size(); idx ++) {\n //StructExprRecog serB4BndChar = listBoundingCharIndices.get(idx) > 0?mlistChildren.get(listBoundingCharIndices.get(idx) - 1):null;\n //StructExprRecog serAfterBndChar = listBoundingCharIndices.get(idx) < mlistChildren.size() - 1?mlistChildren.get(listBoundingCharIndices.get(idx) + 1):null;\n if (listBoundingChars.get(idx).mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET\n && (double)listBoundingChars.get(idx).mnWidth/(double)listBoundingChars.get(idx).mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) {\n listBoundingChars.get(idx).mType = UnitProtoType.Type.TYPE_ONE; // change to 1. do not use pre or next char height to adjust coz not accurate.\n }else if (listBoundingChars.get(idx).mType == UnitProtoType.Type.TYPE_ROUND_BRACKET\n && (double)listBoundingChars.get(idx).mnWidth/(double)listBoundingChars.get(idx).mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) {\n listBoundingChars.get(idx).mType = UnitProtoType.Type.TYPE_ONE; // change to 1. do not use pre or next char height to adjust coz not accurate.\n }\n // do not change other unmatched ( or [ to t or 1 because this makes things worse.\n }\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n StructExprRecog serThisChild = mlistChildren.get(idx);\n serThisChild.rectifyMisRecogChars2ndRnd();\n } \n } else if (isChildListType()) {\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n StructExprRecog serThisChild = mlistChildren.get(idx);\n if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE) {\n if (serThisChild.isBoundChar()) {\n if (serThisChild.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE\n && (idx != 0 || mnExprRecogType != EXPRRECOGTYPE_VCUTUPPERNOTE)) {\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // if it is |**(something), it could still be valid for |...|**(something). But shouldn't have foot notes.\n } else if (serThisChild.mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET\n && serThisChild.mnWidth/serThisChild.mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) {\n // if it is [ and it is very thing, very likely it is a 1.\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE;\n } else if (serThisChild.mType == UnitProtoType.Type.TYPE_ROUND_BRACKET\n && serThisChild.mnWidth/serThisChild.mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) {\n // if it is ( and it is very thing, very likely it is a 1.\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE;\n } else if (serThisChild.mType != UnitProtoType.Type.TYPE_VERTICAL_LINE) { // if child is single char, very likely it is not a ( or [ but a t.\n serThisChild.mType = UnitProtoType.Type.TYPE_SMALL_T;\n }\n } else if (serThisChild.isCloseBoundChar() && (idx != 0\n || (mnExprRecogType != EXPRRECOGTYPE_VCUTUPPERNOTE\n && mnExprRecogType != EXPRRECOGTYPE_VCUTLOWERNOTE\n && mnExprRecogType != EXPRRECOGTYPE_VCUTLUNOTES))) {\n // a close bound char can have upper and/or lower notes. but if the upper note or lower note is close bound char, still need to convert it to 1.\n // here still convert to 1 because upper lower note can be mis-recognized.\n serThisChild.mType = UnitProtoType.Type.TYPE_ONE;\n } else if (serThisChild.mType == UnitProtoType.Type.TYPE_SMALL_O || serThisChild.mType == UnitProtoType.Type.TYPE_BIG_O) {\n // still convert to 0 even if it has lower or upper notes.\n serThisChild.mType = UnitProtoType.Type.TYPE_ZERO;\n }\n } else {\n serThisChild.rectifyMisRecogChars2ndRnd(); \n }\n }\n }\n }", "private static String m33066X(String str, String str2, String str3) {\n String str4;\n int i = 1;\n AppMethodBeat.m2504i(135623);\n C5728b c5728b = new C5728b(str);\n if (!c5728b.exists()) {\n c5728b.mkdirs();\n }\n if (C5046bo.isNullOrNil(str2)) {\n str4 = str + \"da_\" + C5046bo.anU();\n if (!C5046bo.isNullOrNil(str3)) {\n str4 = str4 + \".\" + str3;\n }\n } else {\n if (!(C5046bo.isNullOrNil(str3) || str2.endsWith(str3))) {\n str2 = str2 + \".\" + str3;\n }\n str4 = str + str2;\n if (C5730e.m8628ct(str4)) {\n while (i < 20) {\n if (!C5730e.m8628ct(str + i + \"_\" + str2)) {\n str4 = str + i + \"_\" + str2;\n break;\n }\n i++;\n }\n if (i == 20) {\n str4 = str + \"da_\" + C5046bo.anU();\n if (!C5046bo.isNullOrNil(str3)) {\n str4 = str4 + \".\" + str3;\n }\n }\n }\n }\n try {\n if (!C5736j.m8649w(new C5728b(str4).dMC().dMD()).equalsIgnoreCase(C5736j.m8649w(new C5728b(str).dMD()))) {\n str4 = str + \"da_\" + C5046bo.anU();\n C4990ab.m7421w(\"MicroMsg.AppMsgLogic\", \"maybe DirTraversal attach. %s\", str4);\n }\n } catch (Exception e) {\n C4990ab.printErrStackTrace(\"MicroMsg.AppMsgLogic\", e, \"\", new Object[0]);\n str4 = str + \"da_\" + C5046bo.anU();\n if (!C5046bo.isNullOrNil(str3)) {\n str4 = str4 + \".\" + str3;\n }\n }\n AppMethodBeat.m2505o(135623);\n return str4;\n }", "public static void main(String[] args) {\n\t\tint dir = 2;\n\t\tint x = 0, y = 0;\n\t\tString s = \"LRLBRRLFLLRBBRLFRL\";\n\t\t\n\t\tfor(int i = 0; i< s.length(); i++) {\n\t\t\tif(s.charAt(i) == 'L') {\n\t\t\t\tdir = (dir - 1 + 4) % 4;\n\t\t\t} else if(s.charAt(i) == 'R') {\n\t\t\t\tdir = (dir + 1) % 4;\n\t\t\t} else if(s.charAt(i) == 'B') {\n\t\t\t\tdir = (dir + 2) % 4;\n\t\t\t} else if(s.charAt(i) == 'F') {\n\t\t\t\tif(dir == 0) {\n\t\t\t\t\ty++;\n\t\t\t\t} else if(dir == 1) {\n\t\t\t\t\tx++;\n\t\t\t\t} else if(dir == 2) {\n\t\t\t\t\ty--;\n\t\t\t\t} else if(dir == 3) {\n\t\t\t\t\tx--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tif(x == 0 && y == 0){\n\t\t\tsb.append(\"Same position, \");\n\t\t} \n\t\t\n\t\tif(x < 0) {\n\t\t\tsb.append((-1 * x) + \" step(s) right, \");\n\t\t}\n\t\t\n\t\tif(x > 0) {\n\t\t\tsb.append(x + \" step(s) left, \");\n\t\t}\n\t\t\n\t\tif(y < 0) {\n\t\t\tsb.append((-1 * y) + \" step(s) straight, \");\n\t\t}\n\t\t\n\t\tif(y > 0) {\n\t\t\tsb.append(y + \" step(s) back \");\n\t\t}\n\t\t System.out.println(sb);\n\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t\tString BETTEST = \"/+8*62-9*43\";\r\n\r\n\r\n\t\tBinaryExpressionTree<String>listBET = new BinaryExpressionTree<String>();\r\n\r\n\t\tfor (int i = 0; i < BETTEST.length(); i++) {\r\n\t\t\t\r\n\t\t\tlistBET.add(\"\" + BETTEST.charAt(i));\t\t\t\r\n\t\t}\r\n\r\n\r\n\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\tlistBET.PreorderTraversal();\r\n\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\tlistBET.PostorderTraversal();\r\n\r\n\r\n\t\t String BETTEST2 =\"/+84*32\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET2 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST2.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET2.add(\"\" + BETTEST2.charAt(i));\t\r\n\t\t\r\n\t\r\n\t}\r\n\t\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET2.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\tlistBET2.PostorderTraversal();\r\n\t\t\t\r\n String BETTEST3 =\"*-92/31\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET3 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST3.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET3.add(\"\" + BETTEST3.charAt(i));\t\r\n\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t}\r\n\t\t System.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET3.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\t\r\n\t\t\tlistBET3.PostorderTraversal();\r\n \r\n\t\t\tString BETTEST4 =\"-/*8043\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET4 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST4.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET4.add(\"\" + BETTEST4.charAt(i));\t\r\n\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t}\r\n\t\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET4.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\tlistBET4.PostorderTraversal();\r\n}", "private String bfs(){\n String ans=\"\";\n //Base Case\n if (mRoot == null)\n return \"\";\n if (mRoot.mIsLeaf)\n return mRoot.toString();\n //create a queue for nodes and a queue for signs\n Queue<BTNode> q = new QueueAsLinkedList<>();\n Queue<Character> s = new QueueAsLinkedList<>();\n BTNode currNode = mRoot;\n q.enqueue(currNode);\n return getBfsOutput(ans, q, s, currNode);\n }", "private void a(java.lang.String r6, java.lang.StringBuilder r7) {\n /*\n r5 = this;\n r0 = F;\n r1 = J;\n r2 = 35;\n r1 = r1[r2];\n r1 = r6.indexOf(r1);\n if (r1 <= 0) goto L_0x0057;\n L_0x000e:\n r2 = J;\n r3 = 38;\n r2 = r2[r3];\n r2 = r2.length();\n r2 = r2 + r1;\n r3 = r6.charAt(r2);\n r4 = 43;\n if (r3 != r4) goto L_0x0039;\n L_0x0021:\n r3 = 59;\n r3 = r6.indexOf(r3, r2);\n if (r3 <= 0) goto L_0x0032;\n L_0x0029:\n r3 = r6.substring(r2, r3);\t Catch:{ RuntimeException -> 0x0072 }\n r7.append(r3);\t Catch:{ RuntimeException -> 0x0072 }\n if (r0 == 0) goto L_0x0039;\n L_0x0032:\n r2 = r6.substring(r2);\t Catch:{ RuntimeException -> 0x0072 }\n r7.append(r2);\t Catch:{ RuntimeException -> 0x0072 }\n L_0x0039:\n r2 = J;\t Catch:{ RuntimeException -> 0x0074 }\n r3 = 37;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x0074 }\n r2 = r6.indexOf(r2);\t Catch:{ RuntimeException -> 0x0074 }\n r3 = J;\t Catch:{ RuntimeException -> 0x0074 }\n r4 = 36;\n r3 = r3[r4];\t Catch:{ RuntimeException -> 0x0074 }\n r3 = r3.length();\t Catch:{ RuntimeException -> 0x0074 }\n r2 = r2 + r3;\n r1 = r6.substring(r2, r1);\t Catch:{ RuntimeException -> 0x0074 }\n r7.append(r1);\t Catch:{ RuntimeException -> 0x0074 }\n if (r0 == 0) goto L_0x005e;\n L_0x0057:\n r0 = l(r6);\t Catch:{ RuntimeException -> 0x0074 }\n r7.append(r0);\t Catch:{ RuntimeException -> 0x0074 }\n L_0x005e:\n r0 = J;\n r1 = 39;\n r0 = r0[r1];\n r0 = r7.indexOf(r0);\n if (r0 <= 0) goto L_0x0071;\n L_0x006a:\n r1 = r7.length();\t Catch:{ RuntimeException -> 0x0076 }\n r7.delete(r0, r1);\t Catch:{ RuntimeException -> 0x0076 }\n L_0x0071:\n return;\n L_0x0072:\n r0 = move-exception;\n throw r0;\n L_0x0074:\n r0 = move-exception;\n throw r0;\n L_0x0076:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.StringBuilder):void\");\n }", "private static TreeNode<Character> buildTree () {\n // build left half\n TreeNode<Character> s = new TreeNode<Character>('S', \n new TreeNode<Character>('H'),\n new TreeNode<Character>('V'));\n\n TreeNode<Character> u = new TreeNode<Character>('U', \n new TreeNode<Character>('F'),\n null);\n \n TreeNode<Character> i = new TreeNode<Character>('I', s, u);\n\n TreeNode<Character> r = new TreeNode<Character>('R', \n new TreeNode<Character>('L'), \n null);\n\n TreeNode<Character> w = new TreeNode<Character>('W', \n new TreeNode<Character>('P'),\n new TreeNode<Character>('J'));\n\n TreeNode<Character> a = new TreeNode<Character>('A', r, w);\n\n TreeNode<Character> e = new TreeNode<Character>('E', i, a);\n\n // build right half\n TreeNode<Character> d = new TreeNode<Character>('D', \n new TreeNode<Character>('B'),\n new TreeNode<Character>('X'));\n\n TreeNode<Character> k = new TreeNode<Character>('K', \n new TreeNode<Character>('C'),\n new TreeNode<Character>('Y'));\n\n TreeNode<Character> n = new TreeNode<Character>('N', d, k);\n\n\n TreeNode<Character> g = new TreeNode<Character>('G', \n new TreeNode<Character>('Z'),\n new TreeNode<Character>('Q'));\n\n TreeNode<Character> o = new TreeNode<Character>('O');\n\n TreeNode<Character> m = new TreeNode<Character>('M', g, o);\n\n TreeNode<Character> t = new TreeNode<Character>('T', n, m);\n\n // build the root\n TreeNode<Character> root = new TreeNode<Character>(null, e, t);\n return root;\n }", "static byte[] getDirectionCodeArray(char[] chars, byte[] embs) {\n byte sc = ON;\n byte olevel = -1;\n byte[] dirs = new byte[chars.length];\n for (int i = 0; i < chars.length; i++) {\n if (embs[i] != olevel) {\n sc = ON;\n olevel = embs[i];\n }\n char c = chars[i];\n byte dc = getDirectionCode(c);\n switch (dc) {\n case L:\n case R:\n case AR:\n sc = dc;\n break;\n case B:\n sc = ON;\n break;\n case CM:\n dc = sc;\n break;\n case F:\n dc = ON;\n break;\n default:\n break;\n }\n dirs[i] = dc;\n }\n\n return dirs;\n }", "private static void findPart(char[][] a, char[][] b, char[][] sup, int r1, int r2, int c1, int c2)\n\t{\n\t\t\n\t\tif (r2 - r1 > 1)\n\t\t{\n\t\t\tfor (int r = r1+1; r < r2; r++)\n\t\t\t{\n\t\t\t\tboolean part = true;\n\t\t\t\tfor (int c = c1+1; c < c2; c+=2)\n\t\t\t\t{\n\t\t\t\t\tif (a[r][c] == ' ' || b[r][c] == ' ')\n\t\t\t\t\t{\n\t\t\t\t\t\tpart = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (part)\n\t\t\t\t{\n\t\t\t\t\tfor (int c = c1+1; c < c2; c+=2)\n\t\t\t\t\t{\n\t\t\t\t\t\tsup[r][c] = '_';\n\t\t\t\t\t}\n\t\t\t\t\tfindPart(a, b, sup, r1, r, c1, c2);\n\t\t\t\t\tfindPart(a, b, sup, r, r2, c1, c2);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (c2 - c1 > 2)\n\t\t{\n\t\t\tfor (int c = c1+2; c < c2; c+=2)\n\t\t\t{\n\t\t\t\tboolean part = true;\n\t\t\t\tfor (int r = r1+1; r <= r2; r++)\n\t\t\t\t{\n\t\t\t\t\tif (a[r][c] == ' ' || b[r][c] == ' ')\n\t\t\t\t\t{\n\t\t\t\t\t\tpart = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (part)\n\t\t\t\t{\n\t\t\t\t\tfor (int r = r1+1; r <= r2; r++)\n\t\t\t\t\t{\n\t\t\t\t\t\tsup[r][c] = '|';\n\t\t\t\t\t}\n\t\t\t\t\tfindPart(a, b, sup, r1, r2, c1, c);\n\t\t\t\t\tfindPart(a, b, sup, r1, r2, c, c2);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\n\t\tArrayList<Node> N = new ArrayList<Node>();\n\t\t\n\t\t/*\n\t\t * ##### Encoding Model 2 ###### \n\t\t */\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the privilege nodes\n\t\t */\n\t\tfor(int i=1; i<7; i++)\n\t\t{\n\t\t\tN.add(new Node(\"p\"+i, 1));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the exploit nodes\t\t \n\t\t */\n\t\tfor(int i=1; i<8; i++)\n\t\t{\n\t\t\tN.add(new Node(\"e\"+i, 2));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the child nodes\n\t\t */\n\t\tfor(int i=1; i<12; i++)\n\t\t{\n\t\t\tN.add(new Node(\"c\"+i, 0));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Assigning the children and parent(s) for each node according to model 2\n\t\t */\n\t\t\n\t\tArrayList<Node> nil = new ArrayList<Node>();\n\t\t\n\t\tN.get(0).setParents(nil);\n\t\tN.get(0).addChild(N.get(6));\n\t\t\n\t\tN.get(6).addParent(N.get(0));\n\t\tN.get(6).addChild(N.get(1));\n\t\tN.get(6).addChild(N.get(13));\n\t\tN.get(6).addChild(N.get(14));\n\t\t\n\t\tN.get(1).addParent(N.get(6));\n\t\tN.get(1).addChild(N.get(7));\n\t\tN.get(1).addChild(N.get(8));\n\t\t\n\t\tN.get(7).addParent(N.get(1));\n\t\tN.get(7).addChild(N.get(15));\n\t\tN.get(7).addChild(N.get(2));\n\t\t\n\t\tN.get(2).addParent(N.get(7));\n\t\tN.get(2).addChild(N.get(10));\t\t\n\t\t\n\t\tN.get(8).addParent(N.get(1));\n\t\tN.get(8).addChild(N.get(16));\n\t\tN.get(8).addChild(N.get(3));\n\t\t\n\t\tN.get(3).addParent(N.get(8));\n\t\tN.get(3).addChild(N.get(9));\n\t\t\n\t\tN.get(10).addParent(N.get(2));\n\t\tN.get(10).addChild(N.get(5));\n\t\tN.get(10).addChild(N.get(19));\n\t\tN.get(10).addChild(N.get(20));\n\t\t\n\t\tN.get(9).addParent(N.get(3));\n\t\tN.get(9).addChild(N.get(4));\n\t\tN.get(9).addChild(N.get(17));\n\t\tN.get(9).addChild(N.get(18));\n\t\t\n\t\tN.get(4).addParent(N.get(9));\n\t\tN.get(4).addChild(N.get(12));\n\t\t\n\t\tN.get(5).addParent(N.get(10));\n\t\tN.get(5).addChild(N.get(11));\n\t\t\n\t\tN.get(12).addParent(N.get(4));\n\t\tN.get(12).addChild(N.get(22));\n\t\tN.get(12).addChild(N.get(23));\n\t\t\n\t\tN.get(11).addParent(N.get(5));\n\t\tN.get(11).addChild(N.get(21));\n\t\tN.get(11).addChild(N.get(23));\n\t\t\n\t\tN.get(13).addParent(N.get(6));\n\t\tN.get(14).addParent(N.get(6));\n\t\tN.get(15).addParent(N.get(7));\n\t\tN.get(16).addParent(N.get(8));\n\t\tN.get(17).addParent(N.get(9));\n\t\tN.get(18).addParent(N.get(9));\n\t\tN.get(19).addParent(N.get(10));\n\t\tN.get(20).addParent(N.get(10));\n\t\tN.get(21).addParent(N.get(11));\n\t\tN.get(22).addParent(N.get(12));\n\t\tN.get(23).addParent(N.get(11));\n\t\tN.get(23).addParent(N.get(12));\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the C,I,A values for each node\n\t\t */\n\t\t\n\t\tN.get(0).setImpacts(4, 4, 4);\n\t\tN.get(1).setImpacts(1, 2, 3);\n\t\tN.get(2).setImpacts(2, 2, 1);\n\t\tN.get(3).setImpacts(1, 2, 1);\n\t\tN.get(4).setImpacts(1, 1, 1);\n\t\tN.get(5).setImpacts(3, 2, 3);\n\t\tN.get(13).setImpacts(3,3,3);\n\t\tN.get(14).setImpacts(3,3,3);\n\t\tN.get(15).setImpacts(3,3,3);\n\t\tN.get(16).setImpacts(3,3,3);\n\t\tN.get(17).setImpacts(3,3,3);\n\t\tN.get(18).setImpacts(3,3,3);\n\t\tN.get(19).setImpacts(3,3,3);\n\t\tN.get(20).setImpacts(3,3,3);\n\t\tN.get(21).setImpacts(3,3,3);\n\t\tN.get(22).setImpacts(3,3,3);\n\t\tN.get(23).setImpacts(2,2,1);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * This block helps see the setup of the whole tree. \n\t\t * Comment out if not required to see the parent children relationship of each node.\n\t\t */\n\t\t\n\t\tfor(int i=0; i<24; i++)\n\t\t{\n\t\t\tSystem.out.println(\"\\n\\n\" + N.get(i).getName() + \" < C=\" + N.get(i).getImpactC() + \", I=\" + N.get(i).getImpactI() + \", A=\" + N.get(i).getImpactA() + \" >\" );\n\t\t\tSystem.out.println(\"Parents: \");\n\t\t\tfor(int j=0; j<N.get(i).getParents().size(); j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getParents().get(j).getName() + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nChildren: \");\n\t\t\tfor(int k=0; k<N.get(i).getChildren().size(); k++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getChildren().get(k).getName() + \" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * Calling the method which will perform the C,I,A impact analysis \n\t\t */\n\t\t\n\t\t//Node n = new Node(); //Commented out as extended Main to Node and declared impactAnalysis() as static \n\t\t\n\t\tImpactAnalyzer ia = new ImpactAnalyzer();\n\t\tia.analyze(2, 2, 1, N);\n\t\t\n\t\t\n\t\t\n\t}", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }", "public static void main(String[] args) {\n\n\t\tTreeNode<Character> root = new TreeNode<Character>('A');\n\t\troot.left = new TreeNode<Character>('B');\n\t\troot.right = new TreeNode<Character>('C');\n\n\t\troot.left.left = new TreeNode<Character>('D');\n\t\troot.left.right = new TreeNode<Character>('E');\n\n\t\troot.right.right = new TreeNode<Character>('F');\n\t\t\n\t\tSystem.out.println(getLists(root));\n\n\t}", "private static String m11g() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"sh\");\n stringBuilder.append(\"el\");\n stringBuilder.append(\"la\");\n stringBuilder.append(\"_ve\");\n stringBuilder.append(\"rs\");\n stringBuilder.append(\"i\");\n stringBuilder.append(\"on\");\n return stringBuilder.toString();\n }", "String branch();", "@Test\n public void testComplexGraph() {\n CFGCreator<Character> cfgCreator = new CFGCreator<>();\n CharGrammarParser parser = new CharGrammarParser(cfgCreator);\n SLPOp<Character> slpOp = new SLPOp();\n CFGOp<Character> cfgOp = new CFGOp<>();\n\n // L(G) = {(ab)^1 : i >= 1}\n String text =\n \"S -> bAs \\n\" +\n \"A -> iBa \\n\" +\n \"B -> aCi \\n\" +\n \"C -> sd \\n\" +\n \"D -> SSESS \\n\" +\n \"E -> zSSESSr \\n\" +\n \"E -> uu \\n\";\n\n Map<IJezSymbol<Character>, List<IJezSymbol<Character>>> f = new HashMap<>();\n Map<IJezSymbol<Character>, List<IJezSymbol<Character>>> g = new HashMap<>();\n\n IJezSymbol<Character> a = cfgCreator.lookupSymbol('a', true);\n IJezSymbol<Character> b = cfgCreator.lookupSymbol('b', true);\n IJezSymbol<Character> d = cfgCreator.lookupSymbol('d', true);\n IJezSymbol<Character> i = cfgCreator.lookupSymbol('i', true);\n IJezSymbol<Character> s = cfgCreator.lookupSymbol('s', true);\n IJezSymbol<Character> r = cfgCreator.lookupSymbol('r', true);\n IJezSymbol<Character> u = cfgCreator.lookupSymbol('u', true);\n IJezSymbol<Character> z = cfgCreator.lookupSymbol('z', true);\n\n IJezSymbol<Character> one = cfgCreator.lookupSymbol('1', true);\n IJezSymbol<Character> two = cfgCreator.lookupSymbol('2', true);\n IJezSymbol<Character> three = cfgCreator.lookupSymbol('3', true);\n\n f.put(a, Arrays.asList(one, two));\n f.put(b, Arrays.asList(three, two));\n f.put(d, Arrays.asList(one, one, one, two));\n f.put(i, Arrays.asList(two));\n f.put(s, Arrays.asList(one, one, two));\n f.put(r, Arrays.asList(r));\n f.put(u, Arrays.asList(u));\n f.put(z, Arrays.asList(z));\n\n\n g.put(a, Arrays.asList(one, two, one));\n g.put(b, Arrays.asList(three));\n g.put(d, Arrays.asList(one, one, one));\n g.put(i, Arrays.asList(two, two));\n g.put(s, Arrays.asList(one, two));\n g.put(r, Arrays.asList(r));\n g.put(u, Arrays.asList(u));\n g.put(z, Arrays.asList(z));\n\n\n Set<Production<Character>> productions = parser.createProductions(text);\n Set<IJezSymbol<Character>> axiom = new HashSet<>();\n axiom.add(cfgCreator.lookupSymbol('D', false));\n\n\n Set<Production<Character>> wCNFProductions = cfgOp.toWeakCNF(productions, axiom, cfgCreator);\n MorphismEQSolver<Character, Character> morphismEQSolver = new MorphismEQSolver<>(cfgCreator.createCFG(wCNFProductions, axiom), cfgCreator, new CFGCreatorFactory<>(), new CFGCreatorFactory<>());\n\n GenDefaultMorphism<Character> morphism1 = new GenDefaultMorphism<>(f::get);\n GenDefaultMorphism<Character> morphism2 = new GenDefaultMorphism<>(g::get);\n long ms = System.currentTimeMillis();\n assertTrue(morphismEQSolver.equivalentOnMorphisms(morphism1, morphism2));\n logger.info(\"Running time: \" + (System.currentTimeMillis() - ms) + \"[ms]\");\n }", "public static String[] digraphGenerator(String str)\n\t{\n\t\tString plainText = str.replaceAll(\"\\\\s+\",\"\"); // removes spaces\n\t\tint c1 = 0;\n\t\tint c2 = 1;\n\t\twhile( c2 > -6 )\n\t\t{\n\t\t\tif (plainText.charAt(c1) == plainText.charAt(c2))\n\t\t\t{\n\t\t\t\tplainText = plainText.substring(0, c2) + \"q\" + plainText.substring(c2, plainText.length());\n\t\t\t\tc1-=2;\n\t\t\t\tc2-=2;\n\t\t\t}\n\t\t\tc1+=2;\n\t\t\tc2+=2;\n\t\t\tif (c2 >= plainText.length())\n\t\t\t{\n\t\t\t\tif (plainText.length() % 2 == 1)\n\t\t\t\t{\n\t\t\t\t\tplainText += \"q\";\n\t\t\t\t}\n\t\t\t\tString[] blockArray = plainText.split(String.format(\"(?<=\\\\G.{%1$d})\", 2)); // splits the string into groups of 2\n\t\t\t\treturn blockArray;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n \n LinkedBinaryTree expr = new LinkedBinaryTree<String>();\n // a is the root of the tree\n Position a, b, c, d, e, f, g, h, i;\n a = expr.addRoot(\"*\");\n b = expr.addLeft(a, \"+\");\n c = expr.addLeft(b, \"/\");\n d = expr.addLeft(c, \"*\");\n e = expr.addLeft(d, \"+\");\n expr.addLeft(e, \"5\");\n expr.addRight(e, \"2\");\n f = expr.addRight(d, \"-\");\n expr.addLeft(f, \"2\");\n expr.addRight(f, \"1\");\n g = expr.addRight(c, \"+\");\n expr.addLeft(g, \"2\");\n expr.addRight(g, \"9\");\n h = expr.addRight(b, \"-\");\n i = expr.addLeft(h, \"-\");\n expr.addLeft(i, \"7\");\n expr.addRight(i, \"2\");\n expr.addRight(h, \"1\");\n expr.addRight(a, \"8\");\n \n System.out.println(\"The original expression:\");\n System.out.println(\"(((5+2)*(2–1)/(2+9)+((7–2)–1))*8)\\n\");\n \n System.out.println(\"Preorder traversal:\");\n Iterable<Position<String>> preIter = expr.preorder();\n for (Position<String> s : preIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Inorder traversal:\");\n Iterable<Position<String>> inIter = expr.inorder();\n for (Position<String> s : inIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Postorder traversal:\");\n Iterable<Position<String>> postIter = expr.postorder();\n for (Position<String> s : postIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Breadth traversal:\");\n Iterable<Position<String>> breadthIter = expr.breadthfirst();\n for (Position<String> s : breadthIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Parenthesized representation:\"); \n printParenthesize(expr, a);\n System.out.println();\n }", "public void specialMacs(Verbum w){\r\n\t\tint cd = w.cd;\r\n\t\tint variant = w.variant;\r\n\t\tint i = 0;\r\n\t\tint index = 0;\r\n\t\tif(w.pos.equals(\"V\")){\r\n\t\t\t//3rd conjugation have long vowel if the 1st pp stem and 3rd pp stem are one syllable\r\n\t\t\tif(cd==3 && countSyllables(w.form2)<2 && countSyllables(w.form3)<2){\t\t\r\n\t\t\t\tdo {\r\n\t\t\t\t\tchar c = w.form3.charAt(i);\r\n\t\t\t\t\tif(isVowel(c)){\r\n\t\t\t\t\t\tindex = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t} while(i<w.form3.length()-1);\r\n\t\t\t\tw.form3 = new StringBuffer(w.form3).insert(index, \"*\").toString();\r\n\t\t\t}\r\n\t\t\t//First conjugation variant 1 have long a's \r\n\t\t\tif (cd==1 && variant==1){\r\n\t\t\t\tw.form3 = new StringBuffer(w.form3).insert(w.form3.length()-2, \"*\").toString();\r\n\t\t\t\tw.form4 = new StringBuffer(w.form4).insert(w.form4.length()-2, \"*\").toString();\r\n\t\t\t}\r\n\t\t} else if (w.pos.equals(\"N\")){\r\n\t\t\t//Some 3rd declension nouns have short o in nom and long o in all other forms\r\n\t\t\tif (cd == 3 && w.form1.charAt(w.form1.length()-1) == 'r' && w.form2.charAt(w.form2.length()-1) == 'r' && (w.gender.equals(\"M\") || w.gender.equals(\"F\"))){\r\n\t\t\t\tw.form2 = new StringBuffer(w.form2).insert(w.form2.length()-2, \"*\").toString();\r\n\t\t\t} \r\n\t\t\t//Neuter 3rd declension -ar nouns have short a in nom and long a in all others\r\n\t\t\tif (cd == 3 && w.form1.substring(w.form1.length()-2).equals(\"ar\") && w.form2.substring(w.form2.length()-2).equals(\"ar\")){\r\n\t\t\t\tw.form2 = new StringBuffer(w.form2).insert(w.form2.length()-2, \"*\").toString();\r\n\t\t\t} \r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String[] user0 = {\"/start\", \"/pink\", \"/register\", \"/orange\", \"/red\", \"a\"};\n String[] user1 = {\"/start\", \"/green\", \"/blue\", \"/pink\", \"/register\", \"/orange\", \"/one/two\"};\n String[] user2 = {\"a\", \"/one\", \"/two\"};\n String[] user3 = {\"/red\", \"/orange\", \"/yellow\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/amber\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n String[] user4 = {\"/red\", \"/orange\", \"/amber\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/lavender\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n String[] user5 = {\"a\"};\n\n// out.println(rawr(user0, user1));\n// out.println(rawr(user1, user2));\n// out.println(rawr(user2, user0));\n// out.println(rawr(user5, user2));\n out.println(rawr(user3, user4));\n// out.println(rawr(user4, user3));\n\n P1 c=new P1();\n c.findContiguousHistory(user0, user1);\n c.findContiguousHistory(user1, user2);\n c.findContiguousHistory(user2, user0);\n c.findContiguousHistory(user5, user2);\n c.findContiguousHistory(user3, user4);\n\n // below scenaro is tricky because amber match later and user3 string. We have to come back again.\n // String[] user4 = {\"/red\", \"/orange\", \"/amber\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/lavender\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n // String[] user3 = {\"/red\", \"/orange\", \"/yellow\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/amber\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n\n c.findContiguousHistory(user4, user3);\n }", "public static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tR = Integer.parseInt(st.nextToken());\n\t\tC = Integer.parseInt(st.nextToken());\n\t\t\n\t\tlist = new char[R+1][C+1];\n\t\tvisit = new int[R+1][C+1];\n\t\tdist = new int[R+1][C+1];\n\t\t\n\t\tfor(int i = 1; i <= R; i++) {\n\t\t\tString s = br.readLine();\n\t\t\tfor(int j = 1; j <= C; j++) {\n\t\t\t\tlist[i][j] = s.charAt(j-1);\n\t\t\t\tif(list[i][j] == 'S') {\n\t\t\t\t\tS = new Node(i,j);\n\t\t\t\t}\n\t\t\t\tif(list[i][j] == 'D') {\n\t\t\t\t\tD = new Node(i,j);\n\t\t\t\t}\n\t\t\t\tif(list[i][j] == '*'){\n\t\t\t\t\tW.add(new Node(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbfs(S, W);\n\t\t/*\n\t\tfor(int i = 1; i <= R; i++) {\n\t\t\tfor(int j = 1; j <= C; j++) {\n\t\t\t\tSystem.out.print(list[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\t*/\n\t\tint ans = dist[D.y][D.x]; \n\t\tSystem.out.println(ans !=0 ? ans : \"KAKTUS\");\n\t}", "private NFA base() {\n //check parenthesis case for base\n switch (peek()) {\n case '(':\n eat('(');\n NFA reg = regEx();\n eat(')');\n return reg;\n //if not build a base, simple 2 state nfa\n default:\n NFA defNfa = new NFA();\n //fill out the 5 tuple\n NFAState startS = new NFAState(String.valueOf(stateInc++));\n NFAState endS = new NFAState(String.valueOf(stateInc++)); \n char nextChar = next();\n defNfa.addStartState(startS.getName());\n defNfa.addFinalState(endS.getName());\n defNfa.addTransition(startS.getName(), nextChar, endS.getName());\n Set<Character> alphabet = new LinkedHashSet<Character>();\n alphabet.add(nextChar);\n defNfa.addAbc(alphabet);\n return defNfa;\n }\n }", "public static void main(String[] args)\n {\n String text=\"A B C D | E F G | H I J K L M N O P Q R S | A\";\n Occ occ=new Occ();\n OccList list = new OccList();\n for (String tok: text.split( \" \" ) ) {\n if ( tok.equals( \"|\" )) {\n list.reset();\n continue;\n }\n list.add( occ.orth( tok ) );\n System.out.println( list );\n }\n }", "private static void iddfs(State curr, int depth) {\n for(int i = 0; i <= depth; i++) {\r\n\r\n if(curr.isGoalState()) \r\n System.out.println(i+\":\"+curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(i+\":\"+curr.getOrderedPair());//initial\r\n\r\n curr.close.add(curr);\r\n State currState = curr;\r\n while(!currState.isGoalState()) {\r\n if(currState.depth < i)\r\n curr.buildStack(currState.getSuccessors(currState));\r\n System.out.print(i+\":\");\r\n curr.printHelp(currState, 5);\r\n if(!curr.open.isEmpty()) {\r\n currState = curr.open.get(curr.open.size()-1);\r\n curr.close.add(curr.open.remove(curr.open.size()-1));\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n if(currState.isGoalState()) {\r\n System.out.println(i+\":\"+currState.getOrderedPair() + \" Goal\");\r\n curr.printPath(currState);\r\n return;\r\n }\r\n curr.open.clear(); curr.close.clear();\r\n }\r\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tNode[] tree = new Node[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ttree[i] = new Node((char) ('A' + i));\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tString[] sp = br.readLine().split(\" \");\n\t\t\t\tint index = sp[0].charAt(0) - 'A';\n\t\t\t\tNode cur = tree[index];\n\t\t\t\tif (!sp[1].equals(\".\")) {\n\t\t\t\t\tindex = sp[1].charAt(0) - 'A';\n\t\t\t\t\tcur.left = tree[index];\n\t\t\t\t}\n\t\t\t\tif (!sp[2].equals(\".\")) {\n\t\t\t\t\tindex = sp[2].charAt(0) - 'A';\n\t\t\t\t\tcur.right = tree[index];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpreorder(tree[0]);\n\t\t\tSystem.out.println();\n\t\t\tinorder(tree[0]);\n\t\t\tSystem.out.println();\n\t\t\tpostorder(tree[0]);\n\t\t\tSystem.out.println();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "private void setUpCLRSGraph() {\n\t\tvertices = new HashMap<Character, DirectedOrderedDfsVertex>();\n\t\tfor (char i = 'a'; i <= 'h'; i++) {\n\t\t\tvertices.put(i, new DirectedOrderedDfsVertex());\n\t\t}\n\t\tgraph = new DirectedSimpleGraph<DirectedOrderedDfsVertex>(vertices.values());\n\t\tvertices.get('a').addAdjacency(vertices.get('b'));\n\t\tvertices.get('b').addAdjacency(vertices.get('f'));\n\t\tvertices.get('b').addAdjacency(vertices.get('e'));\n\t\tvertices.get('b').addAdjacency(vertices.get('c'));\n\t\tvertices.get('c').addAdjacency(vertices.get('d'));\n\t\tvertices.get('c').addAdjacency(vertices.get('g'));\n\t\tvertices.get('d').addAdjacency(vertices.get('c'));\n\t\tvertices.get('d').addAdjacency(vertices.get('h'));\n\t\tvertices.get('e').addAdjacency(vertices.get('a'));\n\t\tvertices.get('e').addAdjacency(vertices.get('f'));\n\t\tvertices.get('f').addAdjacency(vertices.get('g'));\n\t\tvertices.get('g').addAdjacency(vertices.get('f'));\n\t\tvertices.get('g').addAdjacency(vertices.get('h'));\n\t\tvertices.get('h').addAdjacency(vertices.get('h'));\n\t}", "private String getBfsOutput(String ans, Queue<BTNode> q, Queue<Character> s, BTNode currNode) {\n int nodeCount = 1;\n while (true){\n if (currNode.mIsLeaf) return ans.substring(0,ans.length()-1);\n s.enqueue('#');\n int nextCount = 0;\n //enqueue all the nodes/signs in current high. and add the relevant values for ans\n while (nodeCount > 0){\n currNode = q.dequeue();\n ans+=currNode.toString();\n ans+=s.dequeue();\n nextCount += currNode.mCurrentChildrenNum;\n for (int i = 0; i < currNode.mCurrentChildrenNum && currNode.mChildren[i] != null; i++) {\n q.enqueue(currNode.mChildren[i]);\n if (i < currNode.mCurrentChildrenNum - 1) s.enqueue('|');\n else\n if (nodeCount > 1) s.enqueue('^');\n }\n nodeCount--;\n }\n nodeCount = nextCount;\n }\n }", "private void streamlinedGo(String[] argsList) {\n\t\tstates = alignment.getAminoAcidsAsFitchStates();\n\t\tbaseStates = phylogeny.getFitchStates(states).clone();\n\t\tambiguousAtRoot = 0;\n\t\tancestorAmbiguities = new boolean[baseStates.length];\n\t\t/* Establish how many ancestral states are ambiguous */\n\t\tfor(int i=0;i<baseStates.length;i++){\n\t\t\tHashSet<String> statesSet=baseStates[i];\n\t\t\tif(statesSet.size()>1){\n\t\t\t\tambiguousAtRoot++;\n\t\t\t\tancestorAmbiguities[i] = true;\n\t\t\t}\n\t\t}\n\t\t/* Attempt to resolve the rootnode states */\n\t\tphylogeny.resolveFitchStatesTopnode();\n\t\tphylogeny.resolveFitchStates(phylogeny.states);\n\t\t/* A new PR object used to hold reconstructions */\n\t\tpr = new ParsimonyReconstruction(states, phylogeny);\n\t\t/* Should now be resolved as far as possible.\n\t\t * Compare each taxon to tree root MRCA */\n\t\t//pr.printAncestralComparison();\n\n\t\t/*\n\t\t * Parse the args into lists\n\t\t * Then find the tips and MRCAs of each list. at this point print all branches below\n\t\t * Then walk through the MRCA / lists counting subs\n\t\t */\n\t\tint numberOfClades = argsList.length-2;\t// we'll assume the first two args are alignment and phylogeny respectively, and all the others (we've checked >2) are clades described by tips\n\t\t// Guessed the number of clades, initialise arrays\n\t\tcladeTips = new HashSet[numberOfClades];\n\t\tcladeTipsAsNodes = new HashSet[numberOfClades];\n\t\tMRCAnodes = new TreeNode[numberOfClades];\n\t\tMRCAcladesBranchTotals = new int[numberOfClades];\n\t\tMRCAcladesBranchTotalsTerminal = new int[numberOfClades];\n\t\tMRCAcladesBranchTotalsInternal = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotals = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotalsTerminal = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotalsInternal = new int[numberOfClades];\n\t\tSystem.out.println(\"Assuming \"+numberOfClades+\" separate clades. Parsing clade descriptions...\");\n\t\t// Parse the clade lists\n\t\tfor(int i=2;i<argsList.length;i++){\n\t\t\tString[] taxaTokens = argsList[i].split(\":\");\n\t\t\tcladeTips[i-2] = new HashSet<String>();\n\t\t\tcladeTipsAsNodes[i-2] = new HashSet<TreeNode>();\n\t\t\tfor(String aTaxon:taxaTokens){\n\t\t\t\tcladeTips[i-2].add(aTaxon);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check we've parsed them correctly\n\t\tSystem.out.println(\"Read these taxon lists:\");\n\t\tfor(int i=0;i<cladeTips.length;i++){\n\t\t\tSystem.out.print(\"Clade \"+i);\n\t\t\tfor(String taxon:cladeTips[i]){\n\t\t\t\tSystem.out.print(\" \"+taxon);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t// Find the MRCA node of each clade, and also print all the branches beneath that MRCA node\n\t\tSystem.out.println(\"Searching the tree for the MRCAs of each clade...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\t// Find the tip nodes corresponding to extant taxa\n\t\t\tIterator<String> itr = cladeTips[i].iterator();\n\t\t\twhile(itr.hasNext()){\n\t\t\t\tint nodeIDofTip = phylogeny.getTipNumber(itr.next());\n\t\t\t\tTreeNode tipNode = phylogeny.getNodeByNumberingID(nodeIDofTip);\n\t\t\t\tcladeTipsAsNodes[i].add(tipNode);\n\t\t\t}\n\t\t\t\t\n\t\t\t// Find the ID of the MRCA node\n\t\t\tint nodeIDofMRCA = phylogeny.getNodeNumberingIDContainingTaxa(cladeTips[i]);\n\t\t\tTreeNode cladeNodeMRCA = phylogeny.getNodeByNumberingID(nodeIDofMRCA);\n\t\t\tMRCAnodes[i] = cladeNodeMRCA;\n\n\t\t\t// Print all the branches below MRCA\n\t\t\tSystem.out.println(\"Found the MRCA of clade \"+i+\" (\"+nodeIDofMRCA+\"):\\n\"+cladeNodeMRCA.getContent()+\"\\nPrinting all branches below this node:\");\n\t\t\tMRCAcladesBranchTotals[i] = cladeNodeMRCA.howManyTips();\n\t\t\tfor(TreeBranch branch:cladeNodeMRCA.getBranches()){\n\t\t\t\tSystem.out.println(branch);\n\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(branch.getParentNode().states, branch.getDaughterNode().states, branch.getParentNode().getContent(), branch.getDaughterNode().getContent());\n\t\t\t\tMRCAcladesSubstitutionTotals[i] = substitutions.length;\n\t\t\t\tif(branch.isEndsInTerminalTaxon()){\n\t\t\t\t\tMRCAcladesBranchTotalsTerminal[i]++;\n\t\t\t\t\tMRCAcladesSubstitutionTotalsTerminal[i] = substitutions.length;\n\t\t\t\t}else{\n\t\t\t\t\tMRCAcladesBranchTotalsInternal[i]++;\n\t\t\t\t\tMRCAcladesSubstitutionTotalsInternal[i] = substitutions.length;\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// For each MRCA node and clade tips combination, compare and print substitutions\n\t\tSystem.out.println(\"Comparing ancestral clade MRCA node sequences with extant sequences...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tSystem.out.println(\"Comparing ancestral MRCA sequence for CLADE \"+i+\" against *ALL* clades' terminal taxa...\");\n\t\t\tTreeNode thisMRCA = MRCAnodes[i];\n\t\t\tfor(int j=0;j<cladeTipsAsNodes.length;j++){\n\t\t\t\tSystem.out.println(\"Clade MRCA: \"+i+\" -vs- clade tips: \"+j);\n\t\t\t\tint MRCAtoTipsSubstitutions = 0;\n\t\t\t\tfor(TreeNode someTip:cladeTipsAsNodes[j]){\n\t\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(thisMRCA.states, someTip.states, \"MRCA_clade_\"+i, someTip.getContent());\n\t\t\t\t\tMRCAtoTipsSubstitutions+= substitutions.length;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Substitutions from Clade MRCA: \"+i+\" -vs- clade tips: \"+j+\": \"+MRCAtoTipsSubstitutions);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// All uncorrected pairwise comparisons\n\t\tSystem.out.println(\"Comparing extant sequences directly...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tfor(TreeNode someTip:cladeTipsAsNodes[i]){\n\t\t\t\tfor(int j=0;j<cladeTipsAsNodes.length;j++){\n\t\t\t\t\tSystem.out.println(\"Basis clade: \"+i+\" -vs- clade tips: \"+j);\n\t\t\t\t\tint MRCAtoTipsSubstitutions = 0;\n\t\t\t\t\tfor(TreeNode someOtherTip:cladeTipsAsNodes[j]){\n\t\t\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(someTip.states, someOtherTip.states, someTip.getContent(), someOtherTip.getContent());\n\t\t\t\t\t\tMRCAtoTipsSubstitutions+= substitutions.length;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Substitutions from Clade MRCA: \"+i+\" -vs- clade tips: \"+j+\": \"+MRCAtoTipsSubstitutions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t// Print a summary of each clade\n\t\tSystem.out.println(\"Summary of clade counts...\");\n\t\tSystem.out.println(\"Clade\\tbranches\\texternal\\tinternal\\t\\tsubstitutions\\texternal\\tinternal\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tSystem.out.println(i\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotals[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotalsTerminal[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotalsInternal[i]+\"\\t\"\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotals[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotalsTerminal[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotalsInternal[i]);\n\t\t}\n\t\tSystem.out.println(\"Done.\");\n\t}", "public static void giant() {\n System.out.println(\" --------- \");\n System.out.println(\" | / \\\\| \");\n System.out.println(\" ZZZZZH | O | HZZZZZ \");\n System.out.println(\" H ----------- H \");\n System.out.println(\" ZZZZZHHHHHHHHHHHHHHHHHHHHHZZZZZ \");\n System.out.println(\" H HHHHHHHHHHH H \");\n System.out.println(\" ZZZZZH HHHHHHHHHHH HZZZZZ \");\n System.out.println(\" HHHHHHHHHHH \");\n System.out.println(\" HHH HHH \");\n System.out.println(\" HHH HHH \");\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"v v BBBB DDDD \");\r\n\t\tSystem.out.println(\"v v B B D D\");\r\n\t\tSystem.out.println(\"v v BBBB D D\");\r\n\t\tSystem.out.println(\" v v B B D D\");\r\n\t\tSystem.out.println(\" v BBBB DDDD \");\r\n\t}", "public static void main(String[] arg) {\n leftLeftInsert();\n rightRightInsert();\n leftRightInsert();\n rightLeftInsert();\n leftLeftDelete(); \n rightRightDelete();\n leftRightDelete();\n rightLeftDelete();\n System.out.println(\"\\nEnd\");\n }", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "public static void main(String[] args){\n In in = new In(args[0]);\n Digraph G = new Digraph(in);\n SAP sap = new SAP(G);\n while (!StdIn.isEmpty()) {\n int v = StdIn.readInt();\n int w = StdIn.readInt();\n int length = sap.length(v, w);\n int ancestor = sap.ancestor(v, w);\n StdOut.printf(\"length = %d, ancestor = %d\\n\", length, ancestor);\n }\n \n // horse and zebra\n //[28075, 46599, 46600, 49952, 68015], [82086]\n\n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "private java.lang.String a(java.lang.String r6, com.google.b5 r7, com.google.e5 r8, java.lang.String r9) {\n /*\n r5 = this;\n r2 = F;\n r0 = r7.e();\n r1 = r5.o;\n r3 = r7.i();\n r1 = r1.a(r3);\n r3 = r1.matcher(r6);\n r1 = \"\";\n r1 = com.google.e5.NATIONAL;\t Catch:{ RuntimeException -> 0x0092 }\n if (r8 != r1) goto L_0x004b;\n L_0x001b:\n if (r9 == 0) goto L_0x004b;\n L_0x001d:\n r1 = r9.length();\t Catch:{ RuntimeException -> 0x0096 }\n if (r1 <= 0) goto L_0x004b;\n L_0x0023:\n r1 = r7.d();\t Catch:{ RuntimeException -> 0x0096 }\n r1 = r1.length();\t Catch:{ RuntimeException -> 0x0096 }\n if (r1 <= 0) goto L_0x004b;\n L_0x002d:\n r1 = r7.d();\n r4 = f;\n r1 = r4.matcher(r1);\n r1 = r1.replaceFirst(r9);\n r4 = z;\n r0 = r4.matcher(r0);\n r0 = r0.replaceFirst(r1);\n r1 = r3.replaceAll(r0);\n if (r2 == 0) goto L_0x009c;\n L_0x004b:\n r1 = r7.k();\n r4 = com.google.e5.NATIONAL;\t Catch:{ RuntimeException -> 0x0098 }\n if (r8 != r4) goto L_0x006b;\n L_0x0053:\n if (r1 == 0) goto L_0x006b;\n L_0x0055:\n r4 = r1.length();\t Catch:{ RuntimeException -> 0x009a }\n if (r4 <= 0) goto L_0x006b;\n L_0x005b:\n r4 = z;\n r4 = r4.matcher(r0);\n r1 = r4.replaceFirst(r1);\n r1 = r3.replaceAll(r1);\n if (r2 == 0) goto L_0x009c;\n L_0x006b:\n r0 = r3.replaceAll(r0);\n L_0x006f:\n r1 = com.google.e5.RFC3966;\n if (r8 != r1) goto L_0x0091;\n L_0x0073:\n r1 = p;\n r1 = r1.matcher(r0);\n r2 = r1.lookingAt();\n if (r2 == 0) goto L_0x0086;\n L_0x007f:\n r0 = \"\";\n r0 = r1.replaceFirst(r0);\n L_0x0086:\n r0 = r1.reset(r0);\n r1 = \"-\";\n r0 = r0.replaceAll(r1);\n L_0x0091:\n return r0;\n L_0x0092:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0094 }\n L_0x0094:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0096 }\n L_0x0096:\n r0 = move-exception;\n throw r0;\n L_0x0098:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x009a }\n L_0x009a:\n r0 = move-exception;\n throw r0;\n L_0x009c:\n r0 = r1;\n goto L_0x006f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.b5, com.google.e5, java.lang.String):java.lang.String\");\n }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(73);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"{\");\n Node node0 = simpleNode0.parent;\n simpleNode0.setIdentifier(\"{\");\n StringWriter stringWriter0 = new StringWriter(73);\n simpleNode0.dump(\"{nt@W\\bYpd9U=VG\", stringWriter0);\n simpleNode0.setIdentifier(\"NameList\");\n simpleNode0.setIdentifier(\"^eRGLNy;\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.setIdentifier(\"C\");\n StringReader stringReader0 = new StringReader(\"zp@:cn>UP\");\n simpleNode0.setIdentifier(\"AllocationExpression\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.setIdentifier(\"NameList\");\n SimpleNode simpleNode1 = new SimpleNode(68);\n Node[] nodeArray0 = new Node[0];\n simpleNode1.children = nodeArray0;\n Node[] nodeArray1 = new Node[1];\n nodeArray1[0] = null;\n simpleNode1.children = nodeArray1;\n simpleNode1.toString(\"LT\\\"PgE')tE0cI%&Dl\");\n simpleNode0.setIdentifier(\"AllocationExpression\");\n simpleNode1.dump(\"NameList\", stringWriter0);\n simpleNode0.toString();\n simpleNode0.toString(\">=\");\n simpleNode0.dump(\"<SkoVR *\", stringWriter0);\n assertEquals(\"<Block>\\n</Block>\\n<AllocationExpression></AllocationExpression>\\n<Block>\\n <identifier>NameList</identifier>\\n <identifier>^eRGLNy;</identifier>\\n <identifier>C</identifier>\\n <identifier>AllocationExpression</identifier>\\n <identifier>NameList</identifier>\\n <identifier>AllocationExpression</identifier>\\n</Block>\\n\", stringWriter0.toString());\n }", "public void testAlgorithmSpecific() {\n TestData.chars(\"x y z\", \"xX Zz\")\n ._______Def_(\" - \", \" - - \")\n .____Ignore_(\" - \", \" -------- \")\n .all();\n }", "Node findBaseCases(Dfg dfg, ProcessTree tree, DfgMinerState minerState);", "private void buildBranch(boolean hasRight, String indent, StringBuilder sb) {\n if (right != null) {\n right.buildBranch(true, indent + (hasRight ? \" \" : \" | \"), sb);\n }\n\n sb.append(indent);\n if (hasRight)\n sb.append(\" /\");\n else\n sb.append(\" \\\\\");\n\n sb.append(\"----- \");\n sb.append(data + \"\\n\");\n\n if (left != null) {\n left.buildBranch(false, indent + (hasRight ? \" | \" : \" \"), sb);\n }\n }", "void bellman_ford(int s)\n {\n int dist[]=new int[V]; \n \n //to track the path from s to all\n int parent[]=new int[V] ;\n //useful when a vertex has no parent\n for(int i=0;i<V;i++)\n parent[i]=-2;\n \n for(int i=0;i<V;i++) \n dist[i]=INF;\n \n //start from source vertex\n dist[s]=0;\n parent[s]=-1;\n \n //we have to iterate over all the edges for V-1 times\n //each ith iteration finds atleast ith path length dist\n //worst case each ith will find ith path length \n \n for(int i=1;i<V;i++) \n {\n for(int j=0;j<E;j++)\n {\n //conside for all edges (u,v), wt\n int u=edge[j].src;\n int v=edge[j].dest;\n int wt=edge[j].wt; \n //since dist[u]=INF and adding to it=>overflow, therefore check first\n if( dist[u]!=INF && dist[u]+wt < dist[v])\n {\n dist[v]=dist[u]+wt;\n parent[v]=u;\n } \n }\n }\n \n //iterate for V-1 times, one more iteration necessarily gives a path length of atleast V in W.C=>cycle\n for(int j=0;j<E;j++) \n {\n int u=edge[j].src;\n int v=edge[j].dest;\n int wt=edge[j].wt;\n if( dist[u]!=INF && dist[u]+wt < dist[v])\n {\n System.out.println(\"Graph has cycle\");\n return;\n } \n }\n \n //print the distance to all from s\n System.out.println(\"from source \"+s+\" the dist to all other\");\n print_dist(dist); \n print_path(parent,dist,s); \n \n }", "public static void main(String[] args) throws IOException {\n char A[] = br.readLine().toCharArray();\n String B = br.readLine();\n\n StringBuilder sb = new StringBuilder();\n Stack<Integer> S = new Stack<>();\n S.push(-1);\n for (int i = 0; i < A.length; i++) {\n sb.append(A[i]);\n if (B.charAt(S.peek() + 1) == A[i])\n S.push(S.peek() + 1);\n else\n S.push(A[i] == B.charAt(0) ? 0 : -1);\n if (S.peek() == B.length() - 1)\n for (int j = 0; j < B.length(); j++) {\n S.pop();\n sb.deleteCharAt(sb.length() - 1);\n }\n }\n\n log(sb.length() == 0 ? \"FRULA\" : sb);\n\n // log(\"\\ntime : \" + ((System.nanoTime() - start) / 1000000.) + \" ms\\n\");\n }", "public static void main(String[] args) {\n\t\tString input1=\"AAA/abb/CCC\";\n\t\t\n\t\tArrayList<String> l=new ArrayList<String>();\n\t\tStringTokenizer t=new StringTokenizer(input1,\"/\");\n\t\twhile(t.hasMoreTokens()){\n\t\t\tStringBuffer sb=new StringBuffer(t.nextToken().toLowerCase());\n\t\t\tl.add(sb.reverse().toString());\n\t\t\t}\n\t\tString op[]=new String[l.size()];\n\t\t\tfor(int i=0;i<op.length;i++)\n\t\t\t\top[i]=l.get(i);\n\t\t\t\n\t\t\tfor(String s:op)\n\t\t\t\tSystem.out.println(s);\n\t\t\n\n\n\t\n\t\t\n\t\t\n\t}", "@Override\n public String toString() {\n // | <M,C,B> |\n // | Depth = d |\n // -----------\n return \"\\n ----------- \\n\" + \"| <\" + this.state[0] + \",\" + this.state[1] + \",\" + this.state[2] + \"> |\\n\"\n + \"| Depth = \" + this.depth + \" |\\n\" + \" ----------- \\n\";\n }", "static int chain(char[] beads, int start, char left, char right){\r\n\t\tint chain=0;\r\n\t\tfor(int pos=start-1; pos>=0; pos--){//count left\r\n\t\t\tchar cpos=beads[pos];\r\n\t\t\tif(cpos==left||cpos=='w')\r\n\t\t\t\tchain++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tfor(int pos=start; pos<beads.length; pos++){//count right\r\n\t\t\tchar cpos=beads[pos];\r\n\t\t\tif(cpos==right||cpos=='w')\r\n\t\t\t\tchain++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\treturn chain;\r\n\t}", "public static void main(String[] args)\n throws Exception\n {\n PrintWriter pen = new PrintWriter(System.out, true);\n BST<String, String> dict =\n new BST<String, String>((left, right) -> left.compareTo(right));\n\n String[] values =\n new String[] { \"gorilla\", \"dingo\", \"chimp\", \"emu\", \"elephant\", \"beta\",\n \"aardvark\", \"chinchilla\", \"yeti\", \"gibbon\", \"horse\",\n \"elephant\", \"duck\", \"emu\" };\n String[] moreValues =\n new String[] { \"gnu\", \"dingo\", \"flying squirrel\", \"iguana\", \"squirrel\",\n \"red squirrel\", \"moose\" };\n\n // Add each element and make sure that it's there.\n for (String value : values)\n {\n addString(pen, dict, value);\n } // for\n\n // A quick printout for fun\n pen.println(\"After setting the first set of values\");\n iterate(pen, dict.iterator());\n\n // Another quick printout for fun\n for (String value : values)\n {\n addString(pen, dict, value);\n } // for\n pen.println(\"After setting the second set of values\");\n iterate(pen, dict.iterator());\n\n // Build iterators that traverse in different ways\n Iterable<String> df_pre_lr =\n dict.values(Traversal.DEPTH_FIRST_PREORDER_LEFT_TO_RIGHT);\n Iterable<String> df_in_lr =\n dict.values(Traversal.DEPTH_FIRST_INORDER_LEFT_TO_RIGHT);\n Iterable<String> df_in_rl =\n dict.values(Traversal.DEPTH_FIRST_INORDER_RIGHT_TO_LEFT);\n Iterable<String> bf_pre_rl =\n dict.values(Traversal.BREADTH_FIRST_PREORDER_RIGHT_TO_LEFT);\n\n // Iterate!\n pen.println(\"Iterating depth-first, preorder, left-to-right\");\n pen.print(\" \");\n iterate(pen, df_pre_lr);\n \n pen.println(\"Iterating depth-first, inorder, left-to-right\");\n pen.print(\" \");\n iterate(pen, df_in_lr);\n \n pen.println(\"Iterating depth-first, inorder, right-to-left\");\n pen.print(\" \");\n iterate(pen, df_in_rl);\n \n pen.println(\"Iterating breadth-first, preorder, right-to-left\");\n pen.print(\" \");\n iterate(pen, bf_pre_rl);\n\n // And we're done\n pen.close();\n }", "@Test\n\tpublic void buildDiamond_widestPointCharSetToCharGreaterThanA_returnedValueHasCorrectNumberOfRepetitions() {\n\t\tfor (char widestPointChar = 'B'; widestPointChar <= 'Z'; widestPointChar++) {\n\t\t\t//assume\n\t\t\tint diagonalLength = widestPointChar - Diamond.BASE_CHARACTER + 1;\n\n\t\t\t//act\n\t\t\tString diamondString = Diamond.buildDiamond(widestPointChar);\n\n\t\t\t//assert\n\t\t\tchar[] diagonal = new char[diagonalLength];\n\t\t\tArrays.fill(diagonal, widestPointChar);\n\n\t\t\tassertTrue(diamondString.contains(String.valueOf(diagonal)));\n\t\t\tassertEquals(Math.pow(diagonalLength, 2), diamondString.length());\n\t\t}\n\t}", "private final void step4() { switch (b[k])\n\t {\n\t case 'e': if (ends(\"icate\")) { r(\"ic\"); break; }\n\t if (ends(\"ative\")) { r(\"\"); break; }\n\t if (ends(\"alize\")) { r(\"al\"); break; }\n\t break;\n\t case 'i': if (ends(\"iciti\")) { r(\"ic\"); break; }\n\t break;\n\t case 'l': if (ends(\"ical\")) { r(\"ic\"); break; }\n\t if (ends(\"ful\")) { r(\"\"); break; }\n\t break;\n\t case 's': if (ends(\"ness\")) { r(\"\"); break; }\n\t break;\n\t } }", "public static void main(String[] args) {\n Node a = new Node(50);\n Node b = new Node(20);\n Node c = new Node(60);\n Node d = new Node(10);\n Node e = new Node(25);\n Node f = new Node(70);\n Node g = new Node(5);\n Node h = new Node(15);\n Node i = new Node(65);\n Node j = new Node(80);\n a.left = b;\n a.right = c;\n b.left = d;\n b.right = e;\n c.right = f;\n d.left = g;\n d.right = h;\n f.left = i;\n f.right = j;\n ArrayList<LinkedList<Integer>> lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n\n /*\n * 2 / \\ 1 3\n */\n a = new Node(2);\n b = new Node(1);\n c = new Node(3);\n a.left = b;\n a.right = c;\n lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n }", "private String calculateHardspaces(int depth) {\n\n\t\t\tString hardspaces = \"\";\n\t\t\tfor (int level = 1; level < depth; level++) {\n\t\t\t\thardspaces += \" \";\n\t\t\t}\n\t\t\treturn hardspaces;\n\t\t}", "private void preOrderTraversal(StringBuilder sb) {\n sb.append(data + \" \");\n\n if (left != null) {\n left.preOrderTraversal(sb);\n }\n\n if (right != null) {\n right.preOrderTraversal(sb);\n }\n }", "public static void main(String[] args) {\n TrieNode root = new TrieNode('*');\n insert(\"pqrst\", root);\n //insert(\"pqsst\", root);\n find(\"pqrst\", root);\n update(\"pqsrt\", \"pssrt\", root);\n String s = new StringBuilder().reverse().toString();\n }", "@Test public void testPublic7() {\n Graph<Character> graph= TestGraphs.testGraph3();\n String[] results= {\"O\", \"\", \"\", \"E F\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n \"B K\", \"A N\", \"C G\", \"H K\", \"D\"};\n\n graph.removeEdge('A', 'I');\n graph.removeEdge('K', 'J');\n graph.removeEdge('M', 'L');\n graph.removeEdge('N', 'P');\n\n for (Character ch : graph.getVertices())\n assertEquals(results[ch - 'A'],\n TestGraphs.collToString(graph.getNeighbors(ch)));\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public DLB(){\r\n\t\t//generate the root node with a terminating value\r\n\t\tnodes = new DLBNode('/');\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint tc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t{\n\t\t\tString s=sc.next();\n\t\t\tchar ch[]=s.toCharArray();\n\t\t\tint first=-1;\n\t\t\tint last=-1;\n\t\t\tint crash=0;\n\t\t\tint d=0;\n\t\t\tfor(int i=0,j=ch.length;i<j-1;i++)\n\t\t\t{\n\t\t\t\tif(ch[i]=='r'&&ch[i+1]=='l')\n\t\t\t\t{\n\t\t\t\t\tch[i]='d';\n\t\t\t\t\tch[i+1]='d';\n\t\t\t\t\tcrash+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i=0,j=ch.length;i<j;i++)\n\t\t\t{\n\t\t\t\tif(ch[i]=='d')\n\t\t\t\t{\n\t\t\t\t\td+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d==0)\n\t\t\t{\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else\n\t\t\t{\n\t\t\t\tfor(int i=0,j=ch.length;i<j;i++)\n\t\t\t\t{\n\t\t\t\t\tif(ch[i]=='d')\n\t\t\t\t\t{\n\t\t\t\t\t\tfirst=i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(int i=ch.length-1;i>=0;i--)\n\t\t\t\t{\n\t\t\t\t\tif(ch[i]=='d')\n\t\t\t\t\t{\n\t\t\t\t\t\tlast=i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(first==last)\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0;i<first;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(ch[i]=='r')\n\t\t\t\t\t\t\tcrash+=1;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i=ch.length-1;i>=first;i--)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(ch[i]=='l')\n\t\t\t\t\t\t\tcrash+=1;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(crash);\n\t\t\t\t}else{\n\t\t\t\t\tfor(int i=0;i<first;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(ch[i]=='r')\n\t\t\t\t\t\t\tcrash+=1;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i=ch.length-1;i>=last;i--)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(ch[i]=='l')\n\t\t\t\t\t\t\tcrash+=1;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i=first;i<=last;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(ch[i]!='d')\n\t\t\t\t\t\t\tcrash+=1;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(crash);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void topHalf() {\n \t\n for( int i = 1; i <= SIZE; i++){\n for(int spaces = 1; spaces <= 3*SIZE - 3*i; spaces++) {\n System.out.print(\" \"); \n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"__/\");\n }\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n System.out.print(\"||\");\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"\\\\__\");\n }\n \n System.out.println();\n }\n \n System.out.print(\"|\");\n \n for(int i = 1; i <= 6 * SIZE; i++) {\n System.out.print(\"\\\"\");\n }\n \n System.out.println(\"|\");\n }", "protected Path preparePath() {\n int commandCapacity = 0;\n int dataCapacity = 0;\n\n current = read();\n \n while (current != -1) {\n skipCommaSpaces();\n switch (current) {\n case 'z':\n case 'Z':\n commandCapacity++;\n break;\n case 'm':\n case 'l':\n case 'M':\n case 'L':\n case 'h':\n case 'H':\n case 'v':\n case 'V':\n commandCapacity++;\n dataCapacity += 1;\n break;\n case 'c':\n case 'C':\n case 's':\n case 'S':\n commandCapacity++;\n dataCapacity += 3;\n break;\n case 'q':\n case 'Q':\n case 't':\n case 'T':\n commandCapacity++;\n dataCapacity += 2;\n break;\n default:\n break;\n }\n current = read();\n }\n\n return new Path(commandCapacity, dataCapacity);\n }", "private void fastscan(State state,SuffixNode currNode,int uvLen,int j){ \n \n for(int i=0;i<currNode.children.size();i++){ \n SuffixNode child = currNode.children.get(i); \n \n if(text.charAt(child.start) == text.charAt(j)){ \n int len = child.getLength(); \n if(uvLen==len){ \n //then we find w \n //uvLen = 0; \n //need slow scan after this child \n state.u = child; \n state.w = child; \n state.j = j+len; \n }else if(uvLen<len){ \n //branching and cut child short \n //e.g. child=\"abc\",uvLen = 2 \n // abc ab \n // / \\ ================> / \\ \n // e f suffix part: \"abd^\" c d^ \n // / \\ \n // e f \n \n //insert the new node: ab; child is now c \n int nodepathlen = child.pathlen \n - (child.getLength()-uvLen); \n SuffixNode node = new SuffixNode(text, \n child.start,child.start + uvLen - 1,nodepathlen); \n node.children = new LinkedList<SuffixNode>(); \n \n int tailpathlen = (text.length() - (j + uvLen)) + nodepathlen; \n SuffixNode tail = new SuffixNode(text, \n j+uvLen,text.length()-1,tailpathlen); \n \n //update child node: c \n child.start += uvLen; \n if(text.charAt(j+uvLen)<text.charAt(child.start)){ \n node.children.add(tail); \n node.children.add(child); \n }else{ \n node.children.add(child); \n node.children.add(tail); \n } \n \n //update parent \n currNode.children.set(i, node); \n \n //uvLen = 0; \n //state.u = currNode; //currNode is already registered as state.u, so commented out \n state.w = node; \n state.finished = true; \n state.v = node; \n \n }else{//uvLen>len \n //e.g. child=\"abc\", uvLen = 4 \n // abc \n // / \\ ================> \n // e f suffix part: \"abcdefg^\" \n // \n // \n //jump to next node \n uvLen -= len; \n state.u = child; \n j += len; \n state.j = j; \n fastscan(state,child,uvLen,j); \n } \n break; \n } \n } \n }", "public static void main(String[] args) {\n In in = new In(\"/Users/kliner/Downloads/wordnet/digraph3.txt\");\n Digraph digraph = new Digraph(in);\n SAP sap = new SAP(digraph);\n System.out.println(sap.ancestor(0, 4));\n System.out.println(sap.ancestor(10, 13));\n System.out.println(sap.length(10, 13));\n// System.out.println(sap.ancestor(7, 3));\n// System.out.println(sap.length(7, 3));\n// System.out.println(sap.ancestor(3, 7));\n// System.out.println(sap.length(3, 7));\n// System.out.println(sap.ancestor(7, 1));\n// System.out.println(sap.length(7, 1));\n// System.out.println(sap.ancestor(7, 0));\n// System.out.println(sap.length(7, 0));\n// System.out.println(sap.ancestor(10, 11));\n// System.out.println(sap.length(10, 11));\n// System.out.println(sap.ancestor(10, 12));\n// System.out.println(sap.length(10, 12));\n// System.out.println(sap.ancestor(5, 12));\n// System.out.println(sap.length(5, 12));\n// System.out.println(sap.ancestor(0, 12));\n// System.out.println(sap.length(0, 12));\n }", "public String dfs(TrieNode root, String str){\n TrieNode t = root;\n for(char c : str.toCharArray()){\n if(t.isword)\n return t.word;\n else if(t.children[c - 'a'] == null)\n return null;\n t = t.children[c-'a'];\n }\n return null;\n }", "private void inOrderTraversal(StringBuilder sb) {\n if (left != null) {\n left.inOrderTraversal(sb);\n }\n\n sb.append(data + \" \");\n\n\n if (right != null) {\n right.inOrderTraversal(sb);\n }\n }", "public static void main(String[] args) throws Exception {\n\t\tString fileBase = \"GasWaterElectricity3\";\r\n\t\t//String fileBase = \"000cwHDLdata\";\r\n\t\tBufferedReader b = new BufferedReader(\r\n\t\t\t\tnew FileReader(fileBase+\".txt\"));\r\n\t\tPrintStream fo = new PrintStream(fileBase+\".svg\");\r\n\t\tStringBuffer chips = new StringBuffer();\r\n\t\tStringBuffer joins = new StringBuffer();\r\n\t\tint joinCount = 1;\r\n\t\tStringBuffer paths = new StringBuffer();\r\n\t\tString ln ;\r\n\t\twhile ((ln = b.readLine()) != null){\r\n\t\t\tString [] wrds = ln.split(\"\\\\s+\");\r\n\t\t\tif (wrds.length==0) continue; // A blank line\r\n\t\t\tint x0,y0,x1,y1;\r\n\t\t\tdouble t = 0.1;\r\n\t\t\tswitch (wrds[0])\r\n\t\t\t{\r\n\t\t\tcase \"D\":\r\n\t\t\t\tgridW = Integer.parseInt(wrds[1]);\r\n\t\t\t\tgridH = Integer.parseInt(wrds[2]);\r\n\t\t\t\tbreak;\t\t\t\t\r\n\t\t\tcase \"C\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tx1 = Integer.parseInt(wrds[3]);\r\n\t\t\t\ty1 = Integer.parseInt(wrds[4]);\r\n\t\t\t\tchips.append(String.format(\"<rect x='%f' y='%f' width='%f' height='%f' rx='.2' ry='.2' fill='pink' stroke='black' stroke-width='.2'/>\\n\",\r\n\t\t\t\t\t\tx0+t,y0+t,x1+1-x0-2*t,y1+1-y0-2*t));\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"J\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tx1 = Integer.parseInt(wrds[3]);\r\n\t\t\t\ty1 = Integer.parseInt(wrds[4]);\r\n\t\t\t\tdouble f = 0.04;\r\n\t\t\t\tjoins.append(String.format(\"<circle cx='%f' cy='%f' r='.4' fill='white' stroke='blue' stroke-width='.1'/>\\n\",\r\n\t\t\t\t\t\tx0+.5,y0+.5));\r\n\t\t\t\tjoins.append(String.format(\"<circle cx='%f' cy='%f' r='.4' fill='white' stroke='blue' stroke-width='.1'/>\\n\",\r\n\t\t\t\t\t\tx1+.5,y1+.5));\r\n\t\t\t\tjoins.append(String.format(\"<g transform='translate(%f,%f) scale(%f,%f)'><text text-anchor='middle'>%d</text></g>\\n\",\r\n\t\t\t\t\t\tx0+.5,y0+0.7f,f,f,joinCount));\r\n\t\t\t\tjoins.append(String.format(\"<g transform='translate(%f,%f) scale(%f,%f)'><text text-anchor='middle'>%d</text></g>\\n\",\r\n\t\t\t\t\t\tx1+.5,y1+0.7f,f,f,joinCount++));\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"#\"://A comment, ignore\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"T\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tStringBuffer p = new StringBuffer();\r\n\t\t\t\tp.append(\"M\"+(x0+.5)+\" \"+(y0+.5)+\" l\");\r\n\t\t\t\tfor(int i=3;i<wrds.length;i++)\r\n\t\t\t\t\tfor(int j=0;j<wrds[i].length();j++){\r\n\t\t\t\t\t\tswitch (wrds[i].charAt(j))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 'N':\r\n\t\t\t\t\t\t\tp.append(\" 0 -1\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'E':\r\n\t\t\t\t\t\t\tp.append(\" l 1 0\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'S':\r\n\t\t\t\t\t\t\tp.append(\" 0 1\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'W':\r\n\t\t\t\t\t\t\tp.append(\" -1 0\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\tpaths.append(String.format(\"<path stroke='gray' stroke-width='.2' fill='none' d='%s'/>\\n\",p));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tb.close();\r\n\t\tfo.printf(\"<svg width='10cm' height='10cm' viewBox='0 0 %d %d' xmlns='http://www.w3.org/2000/svg' version='1.1'>\\n\",\r\n\t\t\t\tgridW,gridH);\r\n\t\tString s=\"\";\r\n\t\tfor(int i=0;i<gridW;i++)\r\n\t\t\ts += String.format(\"M %d 0 l 0 %d \",i,gridH);\r\n\t\tfo.printf(\"<path stroke='blue' stroke-width='.02' fill='none' d='%s'/>\", s);\r\n\t\ts=\"\";\r\n\t\tfor(int i=0;i<gridH;i++)\r\n\t\t\ts += String.format(\"M 0 %d l %d 0 \",i,gridW);\r\n\t\tfo.printf(\"<path stroke='blue' stroke-width='.02' fill='none' d='%s'/>\", s);\r\n\t\tfo.print(chips);\r\n\t\tfo.print(paths);\r\n\t\tfo.print(joins);\r\n\t\tfo.print(\"</svg>\");\r\n\t\tfo.close();\r\n\t}", "public static String romaCoding(String s){\n s = s.toLowerCase().replaceAll(\" \", \"\");\n StringBuffer sb = new StringBuffer(s);\n System.out.println(s);\n /**\n * Step1: Reverse the string\n */\n String step1 = sb.reverse().toString();\n System.out.println(step1);\n\n /**\n * Step2: Rail Fence Cipher Coding\n */\n String step2 = RailFenceCipher.railFenceCipherCoding(step1);\n System.out.println(step2);\n\n /**\n * Step3: Computer Key Board Coding\n */\n String step3 = \"\";\n Map<Character, Character> map = KeyBoard.getCodingMap();\n for(int i = 0; i < step2.length(); i++){\n step3 = step3 + map.get(step2.charAt(i));\n }\n System.out.println(step3);\n\n /**\n * Step4: Covert string to numbers with Nokia phone keyboard\n */\n String step4 = \"\";\n Map nokiaMap = KeyBoard.getNokiaCodingMap();\n for(int i = 0; i < step3.length(); i++){\n step4 = step4 + nokiaMap.get(step3.charAt(i)) + \"\";\n }\n System.out.println(step4);\n\n /**\n * Step5: Convert string to morse code\n */\n String step5 = \"\";\n Map morseMap = MorseCode.getMorseMap();\n for(int i = 0; i < step4.length(); i++){\n Character c = step4.charAt(i);\n step5 = step5 + morseMap.get(c) + \"/\";\n }\n System.out.println(step5);\n return step5;\n }", "public java.lang.String c(java.lang.String r9, java.lang.String r10) {\n /*\n r8 = this;\n r0 = 0;\n if (r9 == 0) goto L_0x0071;\n L_0x0003:\n r1 = r9.length();\n if (r1 != 0) goto L_0x000a;\n L_0x0009:\n goto L_0x0071;\n L_0x000a:\n r1 = r9.length();\n r2 = 59;\n r3 = r9.indexOf(r2);\n r4 = 1;\n r3 = r3 + r4;\n if (r3 == 0) goto L_0x0070;\n L_0x0018:\n if (r3 != r1) goto L_0x001b;\n L_0x001a:\n goto L_0x0070;\n L_0x001b:\n r5 = r9.indexOf(r2, r3);\n r6 = -1;\n if (r5 != r6) goto L_0x0023;\n L_0x0022:\n r5 = r1;\n L_0x0023:\n if (r3 >= r5) goto L_0x006f;\n L_0x0025:\n r7 = 61;\n r7 = r9.indexOf(r7, r3);\n if (r7 == r6) goto L_0x0066;\n L_0x002d:\n if (r7 >= r5) goto L_0x0066;\n L_0x002f:\n r3 = r9.substring(r3, r7);\n r3 = r3.trim();\n r3 = r10.equals(r3);\n if (r3 == 0) goto L_0x0066;\n L_0x003d:\n r7 = r7 + 1;\n r3 = r9.substring(r7, r5);\n r3 = r3.trim();\n r7 = r3.length();\n if (r7 == 0) goto L_0x0066;\n L_0x004d:\n r9 = 2;\n if (r7 <= r9) goto L_0x0065;\n L_0x0050:\n r9 = 0;\n r9 = r3.charAt(r9);\n r10 = 34;\n if (r10 != r9) goto L_0x0065;\n L_0x0059:\n r7 = r7 - r4;\n r9 = r3.charAt(r7);\n if (r10 != r9) goto L_0x0065;\n L_0x0060:\n r9 = r3.substring(r4, r7);\n return r9;\n L_0x0065:\n return r3;\n L_0x0066:\n r3 = r5 + 1;\n r5 = r9.indexOf(r2, r3);\n if (r5 != r6) goto L_0x0023;\n L_0x006e:\n goto L_0x0022;\n L_0x006f:\n return r0;\n L_0x0070:\n return r0;\n L_0x0071:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.fabric.sdk.android.services.network.HttpRequest.c(java.lang.String, java.lang.String):java.lang.String\");\n }", "public abstract String division();", "public static Board fen(String str) {\n\t\tPiece[][] b = new Piece[8][8];\n\t\tbyte r = 7, c = 0;\n\t\tString[] s = str.split(\" \");\n\t\t\n\t\tfor (int i = 0; i < s[0].length(); i++) {\n\t\t\tif (s[0].charAt(i) == '/') {\n\t\t\t\tr--;\n\t\t\t\tc = -1;\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'P') {\n\t\t\t\tb[r][c] = new Pawn(true, r, c);\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'N') {\n\t\t\t\tb[r][c] = new Knight(true, r, c);\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'B') {\n\t\t\t\tb[r][c] = new Bishop(true, r, c);\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'R') {\n\t\t\t\tb[r][c] = new Rook(true, r, c);\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'Q') {\n\t\t\t\tb[r][c] = new Queen(true, r, c);\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'K') {\n\t\t\t\tb[r][c] = new King(true, r, c, s[1].charAt(0)=='1', s[1].charAt(1)=='1');\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'p') {\n\t\t\t\tb[r][c] = new Pawn(false, r, c);\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'n') {\n\t\t\t\tb[r][c] = new Knight(false, r, c);\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'b') {\n\t\t\t\tb[r][c] = new Bishop(false, r, c);\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'r') {\n\t\t\t\tb[r][c] = new Rook(false, r, c);\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'q') {\n\t\t\t\tb[r][c] = new Queen(false, r, c);\n\t\t\t}\n\t\t\t\n\t\t\telse if (s[0].charAt(i) == 'k') {\n\t\t\t\tb[r][c] = new King(false, r, c, s[1].charAt(2)=='1', s[1].charAt(3)=='1');\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tfor (byte j = 0; j < Byte.parseByte(s[0].charAt(i)+\"\"); j++) {\n\t\t\t\t\tb[r][c+j] = new Null(r, (byte)(c+j));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tc += Byte.parseByte(s[0].charAt(i)+\"\") - 1;\n\t\t\t}\n\t\t\t\n\t\t\tc++;\n\t\t}\n\t\t\n\t\treturn new Board(b);\n\t}", "public static void main(String[] args) {\r\n //Letter J composed of \"J\",\"A\",\"V\",\"A\"\r\n System.out.println(\"JAVAJAVAJAVA\");\r\n System.out.println(\"JAVAJAVAJAVA\");\r\n System.out.println(\" JAVA\");\r\n System.out.println(\" JAVA\");\r\n System.out.println(\" JAVA\");\r\n System.out.println(\" JAVA\");\r\n System.out.println(\"J JAVA\");\r\n System.out.println(\"JA JAVA\");\r\n System.out.println(\" JAVAJAVA\");\r\n System.out.println(\" JAVAJA\");\r\n }", "public abstract char getStarterChar();", "public MorseCodeTree()\r\n\t{\r\n\t\tbuildTree();\r\n\t}", "public abstract void bepaalGrootte();", "private static void treeApproach(String s) throws ParsingException {\n\t}", "public static void main(String[] args) {\n\t\tNode<Character> root = new Node<>(\n\t\t\t\t'a',\n\t\t\t\tnew Node<>('b'),\n\t\t\t\tnew Node<>('c')\n\t\t);\n\t\t\n\t\t// https://en.wikipedia.org/wiki/Tree_traversal#Pre-order\n\t\tNode<Character> root_complex = new Node<>(\n\t\t\t\t'F',\n\t\t\t\tnew Node<>('B',\n\t\t\t\t\t\tnew Node<>('A'),\n\t\t\t\t\t\tnew Node<>('D',\n\t\t\t\t\t\t\t\tnew Node<>('C'),\n\t\t\t\t\t\t\t\tnew Node<>('E')\n\t\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tnew Node<>('G',\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tnew Node<>('I',\n\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\tnew Node<>('H')\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t);\n\n\t\tIterator<Node<Character>> iterator = root_complex.preOrder();\n\t\t\n\t\twhile (iterator.hasNext()) {\n\t\t\tSystem.out.print(\"\" + iterator.next() + \",\");\n\t\t}\n\t}", "@Test public void testPublic6() {\n Graph<Character> graph= TestGraphs.testGraph3();\n String[] results= {\"O\", \"\", \"\", \"E F\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n \"B K\", \"A N\", \"C G\", \"H K\", \"D\"};\n Character ch;\n int i;\n\n graph.removeEdge('A', 'I');\n graph.removeEdge('K', 'J');\n graph.removeEdge('M', 'L');\n graph.removeEdge('N', 'P');\n\n for (ch= 'A', i= 0; ch <= 'P'; ch++, i++)\n assertEquals(results[i],\n TestGraphs.collToString(graph.getNeighbors(ch)));\n }", "@Override\n public void characters(char[] ch, int start, int length) {\n if (parentMatchLevel > 0 && matchLevel > 2) {\n bufferBagged.append(ch, start, length);\n }\n if (parentMatchLevel > 0 && matchLevel > 0) {\n bufferBagless.append(ch, start, length);\n }\n }", "public String buildDotString(){\n\t\tString ret=\"digraph NFA{\\n\";\n\t\tint numStarts=0;\n\t\tfor (State s : theStates){\n\t\t\tif(s.getAccept())\n\t\t\t\tret+=\"\\t\"+s.getIndex()+\"[shape=doublecircle]\\n\";\n\t\t\tif(s.getStart()){\n\t\t\t\tString startlbl=\"start\"+(numStarts++);\n\t\t\t\tret+=\"\\t\"+startlbl+\"[shape=none,label=\\\"\\\"]\\n\";\n\t\t\t\tret+=\"\\t\"+startlbl+\"->\"+s.getIndex()+\"[color=green]\\n\";\n\t\t\t}\n\t\t\tfor (Object withChar : s.getToStates().keySet()){\n\t\t\t\t//TODO: combine arrows with same from/to\n\t\t\t\tfor (Integer toNode : (ArrayList<Integer>)s.getToStates().get(withChar)){\n\t\t\t\t\t//find similar arrows\n\t\t\t\t\tString arrowName=(String)withChar;\n\t\t\t\t\t/*for (Object otherChar : s.getToStates().keySet()){\n\t\t\t\t\t\tfor (Integer sameNodeIdx : (ArrayList<Integer>)s.getToStates().get(withChar)){\n\t\t\t\t\t\t\tif(sameNodeIdx==toNode) arrowName+=\",\"+otherChar;\n\t\t\t\t\t\t}\n\t\t\t\t\t}*/\n\t\t\t\t\tret+=\"\\t\"+s.getIndex()+\" -> \"+toNode+\"[label=\\\"\"+arrowName+\"\\\"]\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tret+=\"}\";\n\t\treturn ret;\n\t}", "static public void main(String args[])\n\t{\n\t\tint ii;\n\n\t\t// I DONT want to use an array. I want control over each letter\n\t\tNamedGroup root= new NamedGroup(\"root\");\n\t\tNamedGroup A= new NamedGroup(\"A\");\n\t\tNamedGroup B= new NamedGroup(\"B\");\n\t\tNamedGroup C= new NamedGroup(\"C\");\n\t\tNamedGroup D= new NamedGroup(\"D\");\n\t\tNamedGroup E= new NamedGroup(\"E\");\n\t\tNamedGroup F= new NamedGroup(\"F\");\n\t\tNamedGroup G= new NamedGroup(\"G\");\n\t\tNamedGroup H= new NamedGroup(\"H\");\n\t\tNamedGroup I= new NamedGroup(\"I\");\n\t\tNamedGroup J= new NamedGroup(\"J\");\n\t\tNamedGroup K= new NamedGroup(\"K\");\n\t\tNamedGroup L= new NamedGroup(\"L\");\n\t\tNamedGroup M= new NamedGroup(\"M\");\n\t\tNamedGroup N= new NamedGroup(\"N\");\n\n\t\t//root.checkValidity();\n\n\t\troot.addChild(A);\n\t\troot.addChild(B);\n\t\troot.addChild(C);\n\n\t\tA.addChild(D);\n\t\tA.addChild(E);\n\t\tA.addChild(F);\n\n\t\tB.addChild(G);\n\n\t\tC.addChild(H);\n\t\tH.addChild(L);\n\t\tC.addChild(I);\n\n\t\tD.addChild(J);\n\t\tD.addChild(K);\n\n\t\tH.addChild(L);\n\n\t\tK.addChild(M);\n\t\tM.addChild(N);\n\n\t\t// Lookey here.\n\t\t// This is kinda tricky\n\t\t// We're using an anonymous class to define a doAction() for the abstract\n\t\t// class BaseGroupAction\n\t\tnew BaseTraversalAction()\n\t\t{\n\t\t\tprotected boolean actionImplementation(iNamedObject node)\n\t\t\t{\n\t\t\t\tSystem.out.println(node.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t.applyAction(root);\n\n\t\tSystem.exit(0);\n\t}", "static String morganAndString(String a, String b) {\n\n\t\tString result = \"\";\n\n\t\tint pointerA = 0, pointerB = 0;\n\n\t\touter:\n\t\t\twhile ( pointerA < a.length() || pointerB < b.length()){\n\t\t\t\tif ( pointerA == a.length()) {\n\t\t\t\t\tresult = result + b.charAt(pointerB++);\n\t\t\t\t}\n\t\t\t\telse if ( pointerB == b.length()) {\n\t\t\t\t\tresult = result + a.charAt(pointerA++);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tchar ca = a.charAt ( pointerA );\n\t\t\t\t\tchar cb = b.charAt ( pointerB );\n\n\t\t\t\t\tif ( ca < cb ) {\n\t\t\t\t\t\tresult = result + ca;\n\t\t\t\t\t\tpointerA++;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( cb < ca ){\n\t\t\t\t\t\tresult = result + cb;\n\t\t\t\t\t\tpointerB++;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Find the smallest successor.\n\t\t\t\t\t\tint extraPointer = 1;\n\t\t\t\t\t\twhile ( pointerA + extraPointer < a.length() && pointerB + extraPointer < b.length()){\n\t\t\t\t\t\t\tchar cEa = a.charAt ( pointerA + extraPointer);\n\t\t\t\t\t\t\tchar cEb = b.charAt ( pointerB + extraPointer);\n\n\t\t\t\t\t\t\tif ( cEa < cEb ){\n\t\t\t\t\t\t\t\tresult = result + cEa;\n\t\t\t\t\t\t\t\tpointerA++;\n\t\t\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( cEb < cEa ){\n\t\t\t\t\t\t\t\tresult = result + cEb;\n\n\n\t\t\t\t\t\t\t\tpointerB++;\n\t\t\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\textraPointer++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// We got to the point in which both are the same.\n\t\t\t\t\t\tif ( pointerA + extraPointer == a.length() && pointerB + extraPointer == b.length()){\n\t\t\t\t\t\t\t// Both are equal. It doesn't matter which one I take it from.\n\t\t\t\t\t\t\tresult = result + ca;\n\t\t\t\t\t\t\tpointerA++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif ( pointerA + extraPointer == a.length() ){\n\t\t\t\t\t\t\t\t// Compare the current one of B with the next letter.\n\t\t\t\t\t\t\t\t// If next letter is smaller than current one, cut from here.\n\t\t\t\t\t\t\t\t// else, cut from A.\n\t\t\t\t\t\t\t\tif ( b.charAt ( pointerB + extraPointer ) > b.charAt ( pointerB + extraPointer + 1)){\n\t\t\t\t\t\t\t\t\tresult = result + cb;\n\t\t\t\t\t\t\t\t\tpointerB++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tresult = result + ca;\n\t\t\t\t\t\t\t\t\tpointerA++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// The opposite.\n\t\t\t\t\t\t\t\t// Compare the current one of B with the next letter.\n\t\t\t\t\t\t\t\t// If next letter is smaller than current one, cut from here.\n\t\t\t\t\t\t\t\t// else, cut from A.\n\t\t\t\t\t\t\t\tif ( a.charAt ( pointerA + extraPointer ) > a.charAt ( pointerA + extraPointer + 1)){\n\t\t\t\t\t\t\t\t\tresult = result + ca;\n\t\t\t\t\t\t\t\t\tpointerA++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tresult = result + cb;\n\t\t\t\t\t\t\t\t\tpointerB++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn result;\n\n\n\t}", "public static void m13() {\r\n\tfor(int i=1;i<=4;i++) {\r\n\t\tfor(int j =1;j<=(4-i);j++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tchar ch ='A';\r\n\t\tfor(int j=1;j<=i;j++) {\r\n\t\t\tSystem.out.print(ch+\" \");\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n}", "public static void m4() {\r\n\t\r\n\t\tfor(int i=1;i<=5;i++) {\r\n\t\t\tchar ch ='E';\r\n\t\t\tfor(int j=5;j>=1;j--) {\r\n\t\t\t\tSystem.out.print(ch);\r\n\t\t\t\tch--;\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public void backtrack(List<String> result, int i, char[] chars) {\n\n if (i == chars.length) {\n // recursive signal outlet\n result.add(new String(chars));\n // recursive exports\n return;\n }\n\n // chars [i] in the current space possible once or twice Sleeper (The letter signal)\n if (Character.isLetter(chars[i])) {\n // parallel to the Level 1\n chars[i] = Character.toLowerCase(chars[i]);\n backtrack (result, i + 1, chars); // space to the next level\n\n // Level 2 in parallel, corresponding to the next backtrack\n chars[i] = Character.toUpperCase(chars[i]);\n }\n\n backtrack (result, i + 1, chars); // space to the next level\n\n }", "private static void fillTree(Branch side, Scanner scanner, BinaryNode<String> parent) {\r\n\t\t//If the scanner has a next line, take in the line and see if it is \"NULL\". If it is NULL, do nothing (Base case). Else, set the left or right child\r\n\t\t//to a BinaryNode containing the next string taken in by the scanner depending on the side the method was called with. \r\n\t\t//Then execute two recursive calls to fill out the rest of that side of the tree..\r\n\t\tif(scanner.hasNext()) {\r\n\t\t\tBinaryNode <String> entry = new BinaryNode<String>(scanner.nextLine());\r\n\t\t\t//Base case: If the line is \"NULL\", do nothing\r\n\t\t\tif(entry.getData().equals(\"NULL\")) {}\r\n\t\t\telse {\r\n\t\t\t\t//If the side is LEFT, set the left node to the entry\r\n\t\t\t\tif(side == Branch.LEFT) \r\n\t\t\t\t\tparent.setLeftChild(entry);\r\n\t\t\t\t//If the side is RIGHT, set the right node to the entry\r\n\t\t\t\telse if(side == Branch.RIGHT) \r\n\t\t\t\t\tparent.setRightChild(entry);\r\n\t\t\t\t//Call the method for the left and right sides again to fill out the rest of that side of the tree\r\n\t\t\t\tfillTree(Branch.LEFT, scanner, entry);\r\n\t\t\t\tfillTree(Branch.RIGHT, scanner, entry);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String toString() {\n/* 96 */ return \"Outline (Zigzag)\";\n/* */ }", "private void dfs(TrieNode node, List<String> prev, String current) {\n if (node.isLeaf) {\n prev.add(current);\n }\n\n for (int i = 0; i < 26; i++) {\n TrieNode child = node.children[i];\n if (child != null) {\n char c = (char) ('A' + i);\n dfs(child, prev, current + c);\n\n }\n\n\n }\n }", "@Test\n public void testALargeRingSystem() throws Exception {\n // Should have 13 double bonds.\n String smiles = \"O=C1Oc6ccccc6(C(O)C1C5c2ccccc2CC(c3ccc(cc3)c4ccccc4)C5)\";\n IAtomContainer mol = sp.parseSmiles(smiles);\n \n atasc.decideBondOrder(mol, true);\n \n int doubleBondCount = 0;\n for (IBond bond : mol.bonds()) {\n if (bond.getOrder().equals(Order.DOUBLE)) doubleBondCount++;\n }\n Assert.assertEquals(13, doubleBondCount);\n\t}", "public String alienOrder(String[] words) {\n HashMap<Character, Integer> degrees = new HashMap<Character, Integer>();\n //in BFS, we will create result forward, so we need use \"decides\" relation\n //To avoid add same relationship multiple times, we use HashSet to store nodes\n //Ex: za zb ca cb, both shows relationship a decides b, we don't want have 2 b after a in relations\n HashMap<Character, Set<Character>> hs = new HashMap<Character, Set<Character>>();\n \n String prev = \"\";//prev word\n //fill prerequisites table and degree table\n for(String word : words){\n //we put degree table here to include each char in dict\n for(char c : word.toCharArray()){\n if(!degrees.containsKey(c)) degrees.put(c, 0);\n } \n //then search for the the first char after common part\n for(int i = 0; i < Math.min(prev.length(), word.length()); i++){\n char a = prev.charAt(i), b = word.charAt(i);\n if(a != b){\n //we use \"decides\" relation, so a is key while b is a value in related value set\n //we may not necessary to have prerequisites for each char, so we put it here and \n //no need to include all chars in dict, if some words do not have dependency\n if(!hs.containsKey(a)) hs.put(a, new HashSet<Character>());\n hs.get(a).add(b);\n //then we update incoming edge table (degrees table)\n degrees.put(b, degrees.get(b) + 1);\n \n break;//we only care about first char, so break now\n }\n }\n prev = word;//update prev word\n }\n \n //**second part, use BFS to topologically visit the graph **\n Queue<Character> que = new LinkedList<Character>();\n \n for(Character c : degrees.keySet()){\n //add first series of nodes that do not have incoming edges\n if(degrees.get(c) == 0){\n que.offer(c);\n }\n }\n \n StringBuilder sb = new StringBuilder();\n \n while(!que.isEmpty()){\n Character curr = que.poll();\n sb.append(curr);\n \n //since we may not necessary include all nodes in prerequisites table, we need do boundary check first\n if(!hs.containsKey(curr)) continue;\n //remove outgoing edges from c, add new nodes if all their incoming edges have been removed\n for(Character c : hs.get(curr)){\n degrees.put(c, degrees.get(c) - 1);\n if(degrees.get(c) == 0){\n que.offer(c);\n }\n }\n }\n \n //check the result length with supposed length from keySize()\n //if not same, then there must be some nodes in cycle and did not included to our queue\n return sb.length() == degrees.size()? sb.toString() : \"\";\n }", "private boolean dfs(String word, TrieNode parent) {\n if (word.length() == 0) {//since it's parent node so idx cannot be len - 1\n return parent.isLeaf;\n }\n boolean firstMatch = word.length() > 0 && (parent.map.containsKey(word.charAt(0)) || word.charAt(0) == '.');\n if (word.length() > 1 && word.charAt(1) == '*') {\n if(word.charAt(0) == '.') {\n boolean tmp = false;\n for (TrieNode curr : parent.map.values()) {\n tmp = tmp || firstMatch && dfs(word, curr);\n }\n return tmp || firstMatch && dfs(word.substring(2), parent); //match || no match\n } else {\n return firstMatch && (dfs(word, parent.map.get(word.charAt(0))) || dfs(word.substring(2), parent.map.get(word.charAt(0))));\n }\n } else {\n if (word.charAt(0) == '.') {\n boolean tmp = false;\n for (TrieNode curr : parent.map.values()) {\n tmp = tmp || firstMatch && dfs(word.substring(1), curr);\n }\n return tmp;\n } else {\n return firstMatch && dfs(word.substring(1), parent.map.get(word.charAt(0)));\n }\n }\n }", "public void test_der_01() {\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_TRANS_INF, null);\n Resource a = m.createResource(\"http://example.org#A\");\n Resource b = m.createResource(\"http://example.org#B\");\n OntClass A = new OntClassImpl(a.getNode(), (EnhGraph) m) {\n protected boolean hasSuperClassDirect(Resource cls) {\n throw new RuntimeException(\"did not find direct reasoner\");\n }\n };\n \n // will throw an exception if the wrong code path is taken\n A.hasSuperClass(b, true);\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint N = s.nextInt();\n\t\tNode[] n = new Node[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tchar root = s.next().charAt(0);\n\t\t\tchar left = s.next().charAt(0);\n\t\t\tint l;\n\t\t\tif (left == '.') {\n\t\t\t\tl = -1;\n\t\t\t} else {\n\t\t\t\tl = left - 65;\n\t\t\t}\n\t\t\tchar right = s.next().charAt(0);\n\t\t\tint r;\n\t\t\tif (right == '.') {\n\t\t\t\tr = -1;\n\t\t\t} else {\n\t\t\t\tr = right - 65;\n\t\t\t}\n\t\t\tn[root - 65] = new Node(l, r);\n\t\t}\n\t\t// preorder\n\t\tpreorder(0, n);\n\t\tSystem.out.println();\n\n\t\t// inorder\n\t\tinorder(0, n);\n\t\tSystem.out.println();\n\n\t\t// postorder\n\t\tpostorder(0, n);\n\t\tSystem.out.println();\n\n\t}", "private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }", "public void dfs(ArrayList<String> ans, String digits, int level, String str) {\n\t\tif (level == digits.length()) {\n ans.add(str);\n return;\n }\n \n \n //change it to ASCII code, and then get the string\n String letters = mapping[digits.charAt(level) - '0'];\n \n for (int i = 0; i < letters.length(); i++) {\n \tdfs(ans, digits, level+1, str+letters.charAt(i));\n }\n }", "public void rectifyMisRecogChars1stRnd(CharLearningMgr clm) {\n switch (mnExprRecogType) {\n case EXPRRECOGTYPE_ENUMTYPE: {\n break; // single char, do nothing.\n } case EXPRRECOGTYPE_HLINECUT: {\n StructExprRecog serChildNo = mlistChildren.getFirst();\n StructExprRecog serChildDe = mlistChildren.getLast(); \n rectifyMisRecogNumLetter(clm, serChildNo);\n rectifyMisRecogNumLetter(clm, serChildDe);\n break;\n }case EXPRRECOGTYPE_HBLANKCUT:\n case EXPRRECOGTYPE_MULTIEXPRS:\n case EXPRRECOGTYPE_VCUTMATRIX: {\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n StructExprRecog serThisChild = mlistChildren.get(idx);\n rectifyMisRecogNumLetter(clm, serThisChild);\n }\n break;\n } case EXPRRECOGTYPE_HCUTCAP:\n case EXPRRECOGTYPE_HCUTUNDER:\n case EXPRRECOGTYPE_HCUTCAPUNDER: {\n StructExprRecog serCap = null, serBase = null, serUnder = null;\n if (mnExprRecogType == EXPRRECOGTYPE_HCUTCAP) {\n serCap = mlistChildren.getFirst();\n serBase = mlistChildren.getLast();\n } else if (mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER) {\n serBase = mlistChildren.getFirst();\n serUnder = mlistChildren.getLast();\n } else {\n serCap = mlistChildren.getFirst();\n serBase = mlistChildren.get(1);\n serUnder = mlistChildren.getLast();\n }\n \n if (serCap != null) {\n rectifyMisRecogCapUnderNotesChar(clm, serCap);\n }\n rectifyMisRecogCUBaseChar(clm, serBase);\n if (serUnder != null) {\n rectifyMisRecogCapUnderNotesChar(clm, serUnder);\n }\n break;\n } case EXPRRECOGTYPE_VBLANKCUT: {\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n StructExprRecog serThisChild = mlistChildren.get(idx);\n StructExprRecog serThisChildPrinciple = serThisChild.getPrincipleSER(4); // get principle from upper or lower notes.\n if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThisChild.mType == UnitProtoType.Type.TYPE_BRACE\n && idx < (mlistChildren.size() - 1) && mlistChildren.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT\n && mlistChildren.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_MULTIEXPRS\n && mlistChildren.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_VCUTMATRIX) {\n // should change { to ( if the following ser is not a mult exprs nor a matrix\n serThisChild.changeSEREnumType(UnitProtoType.Type.TYPE_ROUND_BRACKET, serThisChild.mstrFont);\n } else if (serThisChildPrinciple.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThisChildPrinciple.mType == UnitProtoType.Type.TYPE_CLOSE_BRACE\n && idx > 0 && mlistChildren.get(idx - 1).mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT\n && mlistChildren.get(idx - 1).mnExprRecogType != EXPRRECOGTYPE_MULTIEXPRS\n && mlistChildren.get(idx - 1).mnExprRecogType != EXPRRECOGTYPE_VCUTMATRIX) {\n // should change } to ) if the previous ser is not a mult exprs nor a matrix\n serThisChildPrinciple.changeSEREnumType(UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET, serThisChildPrinciple.mstrFont);\n } else if (idx < mlistChildren.size() - 1) {\n StructExprRecog serThisChildPrincipleCapUnderUL = serThisChild.getPrincipleSER(5);\n if (serThisChildPrincipleCapUnderUL.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && serThisChildPrincipleCapUnderUL.mType == UnitProtoType.Type.TYPE_SMALL_F\n && serThisChildPrincipleCapUnderUL.mstrFont.equalsIgnoreCase(\"cambria_italian_48_thinned\") // only this font of small f can be misrecognized integrate.\n && serThisChild.mlistChildren.size() == 3) {\n // implies that there are upper note and lower note. So it should be integrate.\n serThisChildPrincipleCapUnderUL.changeSEREnumType(UnitProtoType.Type.TYPE_INTEGRATE, serThisChildPrinciple.mstrFont);\n }\n }\n \n if (idx == 0) {\n if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && !serThisChild.isLetterChar() && !serThisChild.isNumericChar() && !serThisChild.isBoundChar()\n && !serThisChild.isIntegTypeChar() && !serThisChild.isPreUnOptChar() && !serThisChild.isPreUnitChar()\n && !serThisChild.isSIGMAPITypeChar()) {\n // this letter might be miss recognized, look for another candidate.\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChild.mType, serThisChild.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isLetterChar(listCands.get(idx1).mType) || isNumericChar(listCands.get(idx1).mType)\n || isBoundChar(listCands.get(idx1).mType) || isIntegTypeChar(listCands.get(idx1).mType)\n || isPreUnOptChar(listCands.get(idx1).mType) || isPreUnitChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serThisChild.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serThisChild.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n }\n } else if (idx == mlistChildren.size() - 1) {\n if (serThisChildPrinciple.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && !serThisChildPrinciple.isLetterChar() && !serThisChildPrinciple.isNumberChar() && !serThisChildPrinciple.isCloseBoundChar()\n && !serThisChildPrinciple.isPostUnOptChar() && !serThisChildPrinciple.isPostUnitChar()) {\n // this letter might be miss recognized, look for another candidate.\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChildPrinciple.mType, serThisChildPrinciple.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isLetterChar(listCands.get(idx1).mType) || isNumberChar(listCands.get(idx1).mType)\n || isCloseBoundChar(listCands.get(idx1).mType) || isPostUnOptChar(listCands.get(idx1).mType)\n || isPostUnitChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serThisChildPrinciple.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serThisChildPrinciple.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n }\n } else {\n StructExprRecog serPrevChild = mlistChildren.get(idx - 1);\n StructExprRecog serNextChild = mlistChildren.get(idx + 1);\n if (serPrevChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && serNextChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE) {\n if (!serPrevChild.isLetterChar() && !serPrevChild.isNumericChar()\n && !serPrevChild.isCloseBoundChar() && !serPrevChild.isPostUnitChar()\n && !serNextChild.isLetterChar() && !serNextChild.isNumericChar()\n && !serNextChild.isBoundChar() && !serNextChild.isPreUnitChar()\n && !serNextChild.isIntegTypeChar() && !serNextChild.isSIGMAPITypeChar()\n && (!serPrevChild.isPostUnOptChar() || !serNextChild.isPreUnOptChar())\n && !serThisChildPrinciple.isLetterChar() && !serThisChildPrinciple.isNumericChar()) {\n // this letter might be miss recognized, look for another candidate.\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChildPrinciple.mType, serThisChildPrinciple.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isLetterChar(listCands.get(idx1).mType) || isNumericChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serThisChildPrinciple.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serThisChildPrinciple.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n } else if ((serThisChild.mType == UnitProtoType.Type.TYPE_SMALL_X || serThisChild.mType == UnitProtoType.Type.TYPE_BIG_X)\n && serPrevChild.isPossibleNumberChar() && serNextChild.getPrincipleSER(4).isPossibleNumberChar()\n && (serNextChild.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n || serNextChild.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_VCUTUPPERNOTE)\n && serPrevChild.getBottomPlus1() - serThisChild.getBottomPlus1() >= 0\n && serNextChild.getPrincipleSER(4).getBottomPlus1() - serThisChild.getBottomPlus1() >= 0\n && (serThisChild.mnTop - serPrevChild.mnTop) >= serThisChild.mnHeight * ConstantsMgr.msdCrosMultiplyLowerThanNeighbor\n && (serThisChild.mnTop - serNextChild.getPrincipleSER(4).mnTop) >= serThisChild.mnHeight * ConstantsMgr.msdCrosMultiplyLowerThanNeighbor) {\n // cross multiply may be misrecognized as x or X. But corss multiply generally is shorter and lower than its left and right neighbours.\n serThisChild.changeSEREnumType(UnitProtoType.Type.TYPE_MULTIPLY, serThisChild.mstrFont);\n } else if (serPrevChild.isNumericChar() && serThisChild.isLetterChar() && serNextChild.isNumericChar()) {\n // this letter might be miss recognized, look for another candidate. this is for the case like 3S4\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChild.mType, serThisChild.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isNumberChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serThisChild.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serThisChild.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n } else if (serPrevChild.isBiOptChar() && !serPrevChild.isPossibleNumberChar() && !serPrevChild.isPostUnOptChar() && serNextChild.isNumericChar()\n && !serThisChild.isNumberChar() && !serThisChild.isLetterChar() && !serThisChild.isBoundChar()) {\n // this is for the case like +]9\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChild.mType, serThisChild.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isNumberChar(listCands.get(idx1).mType) || isLetterChar(listCands.get(idx1).mType) || isBoundChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serThisChild.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serThisChild.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n } else if (serThisChild.mType == UnitProtoType.Type.TYPE_MULTIPLY\n && ((serPrevChild.isBiOptChar() && !serPrevChild.isPossibleNumberChar() /* && !serPrevChild.isLetterChar()*/) // | can be misrecognized number 1.\n || (serNextChild.isBiOptChar() && !serNextChild.isPossibleNumberChar() /* && !serNextChild.isLetterChar()*/))) {\n // convert like ...\\multiply=... to ...x=....\n // we specify multiply because this is very special case. No other situation when this child is operator would be like this.\n // moreover, generally if we see two continous biopts, we don't know which one is misrecognized. But here we know.\n serThisChild.changeSEREnumType(UnitProtoType.Type.TYPE_SMALL_X, serThisChild.mstrFont);\n }\n }\n }\n }\n break;\n } case EXPRRECOGTYPE_VCUTLEFTTOPNOTE:\n case EXPRRECOGTYPE_VCUTUPPERNOTE:\n case EXPRRECOGTYPE_VCUTLOWERNOTE:\n case EXPRRECOGTYPE_VCUTLUNOTES: {\n StructExprRecog serLeftTopNote = null, serUpperNote = null, serLowerNote = null, serBase = null;\n if (mnExprRecogType == EXPRRECOGTYPE_VCUTLEFTTOPNOTE) {\n serLeftTopNote = mlistChildren.getFirst();\n serBase = mlistChildren.getLast();\n } else if (mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE) {\n serBase = mlistChildren.getFirst();\n serUpperNote = mlistChildren.getLast();\n } else if (mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE) {\n serBase = mlistChildren.getFirst();\n serLowerNote = mlistChildren.getLast();\n } else {\n serBase = mlistChildren.getFirst();\n serLowerNote = mlistChildren.get(1);\n serUpperNote = mlistChildren.getLast();\n }\n if (mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE && serBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && serLowerNote.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serLowerNote.mType == UnitProtoType.Type.TYPE_DOT\n && serBase.isLetterChar()) {\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serBase.mType, serBase.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isNumberChar(listCands.get(idx1).mType)) {\n // ok, change it to a number.\n serBase.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serBase.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n } else if ((mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE || mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE) // if it is upper lower note, then it is an integrate\n && serBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serBase.isIntegTypeChar()) { // this seems to be a function.\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serBase.mType, serBase.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isLetterChar(listCands.get(idx1).mType)) {\n // ok, change it to a letter.\n serBase.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serBase.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n } else {\n if (serLeftTopNote != null) {\n rectifyMisRecogCapUnderNotesChar(clm, serLeftTopNote);\n }\n if (serUpperNote != null) {\n rectifyMisRecogCapUnderNotesChar(clm, serUpperNote);\n }\n if (serLowerNote != null) {\n rectifyMisRecogCapUnderNotesChar(clm, serLowerNote);\n }\n rectifyMisRecogLUNotesBaseChar(clm, serBase);\n }\n break;\n } case EXPRRECOGTYPE_GETROOT: {\n StructExprRecog serRootLevel = mlistChildren.getFirst();\n StructExprRecog serRootedExpr = mlistChildren.getLast();\n if (serRootLevel.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && !serRootLevel.isLetterChar() && !serRootLevel.isNumberChar()\n && !serRootLevel.isSqrtTypeChar()) {\n // this letter might be miss recognized, look for another candidate.\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serRootLevel.mType, serRootLevel.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isLetterChar(listCands.get(idx1).mType) || isNumberChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serRootLevel.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serRootLevel.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n }\n rectifyMisRecogNumLetter(clm, serRootedExpr);\n break;\n } default: {\n // EXPRRECOGTYPE_LISTCUT do nothing.\n }\n }\n // rectify its children.\n if (mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE) {\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n mlistChildren.get(idx).rectifyMisRecogChars1stRnd(clm);\n }\n }\n }", "public static void main(String[] args) \n\t{\n\t\ttree x = new tree(0);\n\t\t\n\t\ttreenode r = x.root;\n\t\t\n//\t\ttreenode c = r;\n//\t\tfor(int i =1;i<=4;i++)\n//\t\t{\n//\t\t\tfor(int j=0;j<=8;j=j+4)\n//\t\t\t{\n//\t\t\t\ttreenode n = new treenode(i+j);\n//\t\t\t\tif(j==0)\n//\t\t\t\t{\n//\t\t\t\t\tr.child.add(n);\n//\t\t\t\t\tc = n;\n//\t\t\t\t}\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\tc.child.add(n);\n//\t\t\t\t\tc = n;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\ttreenode c1 = r;\n\t\ttreenode c2 = r;\n\t\ttreenode c3 = r;\n\t\ttreenode c4 = r;\n\t\tfor(int i=1;i<13;i++)\n\t\t{\n\t\t\ttreenode n = new treenode(i);\n\t\t\tif(i%4==1)\n\t\t\t{\n\t\t\t\tc1.child.add(n);\n\t\t\t\tc1 = n;\n\t\t\t}\n\t\t\tif(i%4==2)\n\t\t\t{\n\t\t\t\tc2.child.add(n);\n\t\t\t\tc2 = n;\n\t\t\t}\n\t\t\tif(i%4==3)\n\t\t\t{\n\t\t\t\tc3.child.add(n);\n\t\t\t\tc3 = n;\n\t\t\t}\n\t\t\tif(i%4==0)\n\t\t\t{\n\t\t\t\tc4.child.add(n);\n\t\t\t\tc4 = n;\n\t\t\t}\n\t\t}\n\t\tx.traverse(r);\n\t}", "private String S() throws SyntaxException, ParserException {\n\t\tswitch (current) {\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase '(':\n\t\t\t\t// S -> ERS\n\t\t\t\tString er = E();\n\t\t\t\tint r = R();\n\t\t\t\tString e=\"\";\n\t\t\t\tfor (int i=0; i<r; i++){\n\t\t\t\t\te += er;\n\t\t\t\t}\n\t\t\t\te+= S();\n\t\t\t\treturn (e);\n\t\t\tcase ')':\n\t\t\tcase END_MARKER:\n\t\t\t\t// S -> epsilon\n\t\t\t\treturn \"\";\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(ErrorType.NO_RULE,current);\n\t\t}\n\t}", "public static void main(String[] args){\n System.out.println(getLastGoodCommit(new char[]{}));\n System.out.println(getLastGoodCommit(new char[]{'G'}));\n System.out.println(getLastGoodCommit(new char[]{'B'}));\n System.out.println(getLastGoodCommit(new char[]{'G','G'}));\n System.out.println(getLastGoodCommit(new char[]{'B','B'}));\n System.out.println(getLastGoodCommit(new char[]{'G','G', 'G'}));\n System.out.println(getLastGoodCommit(new char[]{'B','B', 'B'}));\n System.out.println(getLastGoodCommit(new char[]{'G','B', 'B'}));\n System.out.println(getLastGoodCommit(new char[]{'G','G', 'B'}));\n System.out.println(getLastGoodCommit(new char[]{'G','G', 'B', 'B', 'B'}));\n }", "public static String alienOrder(String[] words) {\n if(words.length==0){\n return \"\";\n }\n else if(words.length==1){\n return words[0];\n }\n else{\n HashMap<Character,HashSet<Character>> graph = new HashMap<Character,HashSet<Character>>();\n //Use this array to denote each node's indegree\n int[] indegree = new int[26];\n Arrays.fill(indegree,-1);\n //****Initialize indegree array, '0' means exits****\n for(String x : words){\n for(char c : x.toCharArray()){\n indegree[c-'a'] = 0;\n }\n }\n int first = 0;\n int second = 1;\n //****Build the graph****\n while(second<words.length){\n int minLen = Math.min(words[first].length(),words[second].length());\n for(int i = 0; i<minLen; i++){\n char f = words[first].charAt(i);\n char s = words[second].charAt(i);\n if(f!=s){\n if(graph.containsKey(s)==true){\n HashSet<Character> hs = graph.get(s);\n if(hs.contains(f)==false){\n indegree[f-'a']++;\n hs.add(f);\n graph.replace(s,hs);\n }\n }\n else{\n HashSet<Character> hs = new HashSet<Character>();\n hs.add(f);\n graph.put(s,hs);\n indegree[f-'a']++;\n }\n break;\n }\n }\n first++;\n second++;\n }\n StringBuilder result = new StringBuilder();\n Queue<Character> topo = new LinkedList<Character>();\n int numOfChar = 0;\n for(int i = 0; i<26; i++){\n if(indegree[i]>=0){\n numOfChar++;\n if(indegree[i]==0){\n topo.offer((char)('a'+i));\n } \n }\n }\n if(topo.size()==0){\n return \"\";\n //Means circle exits\n }\n while(topo.size()>0){\n char c = topo.poll();\n result.append(c);\n if(graph.containsKey(c)==false){\n \tcontinue;\n }\n HashSet<Character> hs = graph.get(c);\n for(char x : hs){\n indegree[x-'a']--;\n if(indegree[x-'a']<0){\n return \"\";\n }\n else if(indegree[x-'a']==0){\n topo.offer(x);\n }\n }\n }\n return result.reverse().toString();\n //return result.length()==numOfChar?result.reverse().toString():\"HAHA\";\n }\n }", "public static String printTree()\n {\n \tString tree = \"\";\n ArrayList<String> letters = converter.toArrayList();\n for(int i = 0; i < letters.size(); i++)\n {\n tree += letters.get(i);\n if(i + 1 < letters.size())\n \t tree += \" \";\n }\n \n return tree;\n }", "public static void main(String[] args) {\n\t\tBinaryTree binaryTree = new BinaryTree();\n\t\tBinaryNode FrontBinaryNode = binaryTree.buildTree();\n\t\tSystem.out.print(\"层次遍历:\");\n\t\tbinaryTree.sequence(FrontBinaryNode);\n\t\tSystem.out.print(\"先序遍历:\");\n\t\tbinaryTree.preorder(FrontBinaryNode);\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"中序遍历:\");\n\t\tbinaryTree.inorder(FrontBinaryNode);\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"后序遍历:\");\n\t\tbinaryTree.postorder(FrontBinaryNode);\n\t\t//测试数据:ebfad.g..c\n\n\t}", "void backtrackTree(StringBuilder sequence1, StringBuilder sequence2, int position) {\n int n = table[0].length;\n if (position == 0) {\n results.add(new StringBuilder[]{new StringBuilder(sequence1), new StringBuilder(sequence2)});\n }\n else {\n List<Integer> listOfParents = parents.get(position);\n for (Integer parent: listOfParents) {\n if (parent == northWest(position)) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append(seq2.charAt(seq2position(position)));\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent / n == position / n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append('_');\n newSeq2.append(seq2.charAt(seq2position(position)));\n position--;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent % n == position % n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append('_');\n position = position - n;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n }\n }\n }", "private static void buildCode(String[] st, Node x, String s) {\n if (!x.isLeaf()) {\n buildCode(st, x.left, s + '0');\n buildCode(st, x.right, s + '1');\n }\n else {\n st[x.ch] = s;\n }\n }" ]
[ "0.532592", "0.5269255", "0.52543086", "0.52430534", "0.52198815", "0.51502526", "0.51107675", "0.5100605", "0.50534457", "0.5020105", "0.49637234", "0.49553442", "0.49141803", "0.4895675", "0.48652264", "0.48532453", "0.48516974", "0.48338538", "0.48268822", "0.48265526", "0.4815982", "0.48094556", "0.48022193", "0.48011404", "0.48006797", "0.47853708", "0.47832793", "0.47763425", "0.47735456", "0.47681746", "0.47525442", "0.47503072", "0.47431698", "0.47375438", "0.4735854", "0.47350404", "0.47313753", "0.47312197", "0.47297853", "0.4723304", "0.4716414", "0.47038823", "0.4697398", "0.46858191", "0.4681772", "0.46748468", "0.46736726", "0.4667237", "0.4665015", "0.4664718", "0.46624732", "0.46451184", "0.46438596", "0.46438143", "0.4640929", "0.46310797", "0.46304122", "0.46288118", "0.46242204", "0.46230504", "0.46227333", "0.4611864", "0.46112415", "0.46096748", "0.46067083", "0.46064958", "0.46014947", "0.4600288", "0.4599866", "0.45965078", "0.45939842", "0.45917243", "0.45914155", "0.45880815", "0.45853168", "0.45833525", "0.45800576", "0.45789567", "0.45787743", "0.45785832", "0.45671463", "0.45600018", "0.45577002", "0.455727", "0.45566863", "0.45539802", "0.45519236", "0.4551823", "0.4543698", "0.45436952", "0.4543647", "0.45394713", "0.4538983", "0.45371962", "0.4537098", "0.4532749", "0.45317575", "0.45304283", "0.4525939", "0.45240664", "0.4522328" ]
0.0
-1
Create a new instance of DetailsFragment, initialized to show the text at 'index'.
public static PurchaseFragment newInstance(int position) { PurchaseFragment f = new PurchaseFragment(); // Supply index input as an argument. Bundle args = new Bundle(); f.setArguments(args); return f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static DetailsFragment newInstance(String index) {\n DetailsFragment f = new DetailsFragment();\n\n // Supply index input as an argument.\n Bundle args = new Bundle();\n args.putString(\"index\", index);\n f.setArguments(args);\n\n return f;\n }", "public static ShowDetailsFragment newInstance(int index,String id,String name,String address,String phone,String landline,String email){\n ShowDetailsFragment f = new ShowDetailsFragment();\n\n Bundle args = new Bundle();\n args.putInt(\"index\",index);\n args.putString(\"id\",id);\n args.putString(\"name\",name);\n args.putString(\"address\",address);\n args.putString(\"phone\",phone);\n args.putString(\"landline\",landline);\n args.putString(\"email\",email);\n\n f.setArguments(args);\n return f;\n }", "public static H03FamilyViewChildDevAccDetailsFragment newInstance(int index) {\n H03FamilyViewChildDevAccDetailsFragment fragment = new H03FamilyViewChildDevAccDetailsFragment();\n Bundle args = new Bundle();\n args.putInt(BabyBonusConstants.CURRENT_FRAGMENT_POSITION, index);\n fragment.setArguments(args);\n return fragment;\n }", "public FExDetailFragment() {\n \t}", "void showDetails(int position) {\r\n if (mDualPane) {\r\n // We can display everything in-place with fragments, so update\r\n // the list to highlight the selected item and show the data.\r\n // getListView().setItemChecked(position, true);\r\n\r\n DetailsFragment details = new DetailsFragment();\r\n if(fragmentCreated) {\r\n Bundle args = new Bundle();\r\n args.putString(\"title\", myAdapter.getTaskDataTitle(position));\r\n args.putString(\"date\", myAdapter.getDate(position));\r\n args.putString(\"hour\", myAdapter.getHour(position));\r\n details.setArguments(args);\r\n getFragmentManager().beginTransaction().replace(R.id.detailsFrameLayout, details).commit();\r\n getFragmentManager().popBackStack();\r\n\r\n\r\n } else {\r\n Bundle args = new Bundle();\r\n args.putString(\"title\", \"\");\r\n args.putString(\"date\", \"\");\r\n args.putString(\"hour\", \"\");\r\n args.putString(\"desc\", \"\");\r\n details.setArguments(args);\r\n getFragmentManager().beginTransaction().add(R.id.detailsFrameLayout, details).commit();\r\n fragmentCreated = true;\r\n }\r\n\r\n\r\n // DetailsFragment details = (DetailsFragment)\r\n // getFragmentManager().findFragmentById(R.id.details);\r\n\r\n //details.updateFrag(myAdapter.getTaskDataTitle(position), myAdapter.getDate(position),\r\n // myAdapter.getHour(position), myAdapter.getDesc(position));\r\n // }\r\n\r\n } else {\r\n // Otherwise we need to launch a new activity to display\r\n // the dialog fragment with selected text.\r\n Intent intent = new Intent();\r\n intent.setClass(getActivity(), DetailsActivity.class);\r\n //intent.putExtra(\"multipane\", true);\r\n intent.putExtra(\"taskTitle\", myAdapter.getTaskDataTitle(position));\r\n intent.putExtra(\"taskDate\", myAdapter.getDate(position));\r\n intent.putExtra(\"taskHour\", myAdapter.getHour(position));\r\n startActivityForResult(intent, GET_STARS_REQUEST);\r\n }\r\n }", "private void configureAndShowDetailFragment(){\n detailFragment = (DetailFragment) getSupportFragmentManager().findFragmentById(R.id.frame_layout_detail);\n\n if (detailFragment == null) {\n // Create new main fragment\n detailFragment = new DetailFragment();\n // Add it to FrameLayout container\n getSupportFragmentManager().beginTransaction()\n .add(R.id.frame_layout_detail, detailFragment)\n .commit();\n }\n }", "public static DetailsFragment newInstance(@IntRange(from = 1, to = 3) int kittenNumber) {\n Bundle args = new Bundle();\n args.putInt(ARG_KITTEN_NUMBER, kittenNumber);\n\n DetailsFragment fragment = new DetailsFragment();\n fragment.setArguments(args);\n\n return fragment;\n }", "@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }", "public SavouriesFragment newInstance(int index) {\n SavouriesFragment fragment = new SavouriesFragment(index);\n Bundle args = new Bundle();\n this.index=index;\n Log.d(\"hi\", \"\" + index);\n args.putInt(\"index\",index);\n fragment.setArguments(args);\n return fragment;\n }", "public static CityWeatherFragment create(int index) {\n CityWeatherFragment fragment = new CityWeatherFragment();\n Bundle args = new Bundle();\n args.putInt(INDEX, index);\n fragment.setArguments(args);\n return fragment;\n }", "public TestDetailFragment() {\n }", "public ItemDetailFragment() {\n }", "public ItemDetailFragment() {\n }", "public ItemDetailFragment() {\n }", "public ItemDetailFragment() {\n }", "public static HiPingFragment newInstance(int index) {\n HiPingFragment fragment = new HiPingFragment();\n Bundle bundle = new Bundle();\n bundle.putInt(ARG_SECTION_NUMBER, index);\n fragment.setArguments(bundle);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new Timer_detail_screen();\n\t}", "public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }", "public static RecipeDetailsFragment getInstance() {\n RecipeDetailsFragment fragment = new RecipeDetailsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public ArticleDetailFragment() { }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_information, container, false);\n\n /*infoNetwork = new InfoNetwork();\n //list = infoNetwork.getInfoMain();*/\n\n /*listView = (ListView)view.findViewById(R.id.listView);\n\n informationAdapter = new InformationAdapter(getContext());\n informationAdapter.setList(list);\n listView.setAdapter(informationAdapter);\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n getActivity()\n .getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.fragmentContainer, new InfoDetailFragment())\n .addToBackStack(null)\n .commit();\n }\n });*/\n\n return view;\n }", "public static Fragment Instance() {\n\t\t\n\t\treturn new GCourtInfoDetailsFragment();\n\t}", "public VenueDetailFragment() {\r\n\t}", "public static ListContactGrowHackingFragment newInstance(int index) {\n ListContactGrowHackingFragment fragment = new ListContactGrowHackingFragment();\n\n // Save the parameters\n Bundle bundle = new Bundle();\n bundle.putInt(INDEX, index);\n fragment.setArguments(bundle);\n fragment.setRetainInstance(true);\n\n return fragment;\n\n }", "public IntentDetailFragment() {\n }", "public static MovieDetailFragment newInstance(String movieId) {\n MovieDetailFragment f = new MovieDetailFragment();\n // Supply index input as an argument.\n Bundle args = new Bundle();\n args.putString(\"movieId\", movieId);\n f.setArguments(args);\n return f;\n }", "@Override\r\n public void showMovieDetails(MovieEntry movie) {\n Fragment fragment = new DetailsFragment();\r\n Bundle args = new Bundle();\r\n args.putParcelable(DetailsFragment.MOVIE_ARG_POSITION, movie);\r\n fragment.setArguments(args);\r\n\r\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\r\n if(!twoPane) {\r\n transaction.replace(R.id.master_fragment, fragment, DetailsFragment.FRAGMENT_TAG);\r\n if(screenSize == Configuration.SCREENLAYOUT_SIZE_NORMAL) {\r\n transaction.addToBackStack(null);\r\n }\r\n } else {\r\n transaction.replace(R.id.details_fragment, fragment, DetailsFragment.FRAGMENT_TAG);\r\n }\r\n\r\n transaction.commit();\r\n }", "public static RecipeDetailFragment newInstance(int recipeId){\n Timber.d(\"RecipeDetailFragment newInstance with RecipeId:\" + recipeId);\n RecipeDetailFragment fragment = new RecipeDetailFragment();\n\n Bundle args = new Bundle();\n args.putInt(RECIPE_ID,recipeId);\n fragment.setArguments(args);\n\n return fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup group, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_item_details, group, false);\n\n //builds textview and links to xml\n toDoInfo = (TextView) v.findViewById(R.id.item_detail_text);\n String itemText = getArguments().getString(MainActivity.TODO_DETAIL);\n toDoInfo.setText(itemText);\n\n return v;\n }", "public PersonDetailFragment() {\r\n }", "public static MasterDetailFragment newInstance(int counter) {\n MasterDetailFragment fragment = new MasterDetailFragment();\n Bundle args = new Bundle();\n count = counter;\n args.putInt(\"count\",count);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n public void onClick(View v) {\n int position = getAdapterPosition();\n FragmentManager manager = adapter.activity.getSupportFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n Log.d(\"ProblemAdapter\", \"we are on index: \" + position);\n RecordsFragment fragment = RecordsFragment.newInstance(position);\n transaction.addToBackStack(null);\n transaction.replace(R.id.content, fragment);\n transaction.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n TextView text = new TextView(getActivity());\n text.setText(getArguments().getString(\"index\"));\n return text;\n }", "public ImageDetailFragment() {}", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "@NonNull\n @Override\n public Fragment createFragment(int position) {\n return QuranFragment.arrayList.get(position);\n\n }", "public static SummaryFragment newInstance() {\n SummaryFragment fragment = new SummaryFragment();\n return fragment;\n }", "@Override\n public Fragment getItem(int position) {\n Bundle args = new Bundle();\n AttVFragment fragment = new AttVFragment();\n args.putInt(AttVFragment.ARG_SECTION_NUMBER, position);\n fragment.setArguments(args);\n return fragment;\n }", "public SymbolDetailFragment() {\n\t}", "public AddressDetailFragment() {\n }", "public ShiftDetailFragment() {\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View mainView = inflater.inflate(R.layout.fragment_task_details, container, false);\n taskTitle = (TextView) mainView.findViewById(R.id.titleView);\n taskDetails = (TextView) mainView.findViewById(R.id.detailView);\n\n\n Bundle bundle = getArguments();\n tasks = bundle.getParcelable(\"DETAIL\");\n taskTitle.setText(tasks.title);\n taskDetails.setText(tasks.description);\n return mainView;\n }", "public static DrawFragment newInstance(int index, Long id) {\n\t\t\n\t\tDrawFragment fragment = new DrawFragment();\n\t\t\n\t\tLog.e(\"TAG\",\"index = \" + index);\n\t\t\n\t\tBundle args = new Bundle();\n\t\targs.putInt(\"index\", index);\n\t\targs.putLong(\"imageId\", id);\n\t\t\n\t\tfragment.setArguments(args);\n\t\t\n\t\treturn fragment;\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.menudetail_fragment, container, false);\r\n String menu = getArguments().getString(\"Menu\");\r\n text = (TextView) view.findViewById(R.id.detail);\r\n text.setText(menu);\r\n return view;\r\n\r\n }", "public static DetailFragment newInstance(String param1) {\n DetailFragment fragment = new DetailFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tBundle extras = getIntent().getExtras();\n\t\tint id = extras.getInt(Intent.EXTRA_TEXT);\n\n\t\tswitch (id) {\n\t\tcase 0:\n\t\t\tFragment frag = new Fragment_PV();\n\t\t\tFragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n\t \t\tft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);\n\t \t\tft.replace(R.id.details1, frag);\n\t \t\tft.commit();\t\t\t\n\t \t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "public void onListItemClicked(int listviewIndex){\n int id = mIndexList.get(listviewIndex);\n changeFragment(new LebensmittelDetailFragment(), id);\n }", "public static AboutFragment newInstance() {\n\t\tAboutFragment aboutFragment = new AboutFragment();\n\t\treturn aboutFragment;\n\t}", "public static PlaceholderFragment newInstance(int sectionNumber) {\r\n PlaceholderFragment fragment = new PlaceholderFragment();\r\n Bundle args = new Bundle();\r\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n args.putString(\"alb_post\",inte.getStringExtra(\"detailJSON\"));\r\n fragment.setArguments(args);\r\n return fragment;\r\n }", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n return inflater.inflate(R.layout.fragment_information_detail, container, false);\n }", "public static ChatFragment newInstance(int index) {\n\t\tChatFragment fragment = new ChatFragment();\n\t\tBundle b = new Bundle();\n\t\tb.putInt(\"index\", index);\n\t\tfragment.setArguments(b);\n\t\treturn fragment;\n\t}", "public SummaryFragment() {\n }", "@Override\n public Fragment getItem(int position) {\n if (position==1){\n return SummaryFragment.newInstance();\n }\n return CollectionFragment.newInstance();\n }", "@Override\n\t\tpublic Fragment getItem(int position) {\n\t\t\tFragment fragment = new SectionFragment(); \n\t\t\tBundle args = new Bundle();\n\t\t\targs.putInt(SectionFragment.ARG_SECTION_NUMBER, position + 1);\n\t\t\tfragment.setArguments(args);\n\t\t\t\n\t\t\t\n\t\t\treturn fragment;\n\t\t\t\n\t\t}", "@SuppressLint(\"ResourceType\")\n @Override\n public void onClick(View view) {\n\n FrameLayout fragmentLayout = new FrameLayout(context);\n fragmentLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));\n fragmentLayout.setId(3);\n main.setContentView(fragmentLayout);\n main.getSupportFragmentManager()\n .beginTransaction().addToBackStack(null)\n .add(3, new DetailFragment(dataset.get(position).getNumber(),\n dataset.get(position).getName(), dataset.get(position).getHeight()))\n .commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_detail, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_detail, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_detail, container, false);\n }", "public InfoShowChecklistFragment() {\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\t\n\t\tgetActivity().getActionBar().setTitle(R.string.court_info);\n\t\t\n\t\tView v = inflater.inflate(R.layout.fragment_court_info_details, null);\n\t\t\n\t\tmModel = (TextView) v.findViewById(R.id.court_model);\n\t\tmCreatYear = (TextView) v.findViewById(R.id.court_create_date);\n\t\tmCourtArea = (TextView) v.findViewById(R.id.court_area);\n\t\tmGreenGrass = (TextView) v.findViewById(R.id.court_greengrass);\n\t\tmData = (TextView) v.findViewById(R.id.court_data);\n\t\tmDesigner = (TextView) v.findViewById(R.id.court_designer);\n\t\tmFairwayLength = (TextView) v.findViewById(R.id.court_fairway_length);\n\t\tmFairwayGrass = (TextView) v.findViewById(R.id.court_fairway_grass);\n\t\tmPhone = (TextView) v.findViewById(R.id.court_phone);\n\t\tmPhone.setOnClickListener(this);\n\t\tmBrief = (TextView) v.findViewById(R.id.court_brief);\n\t\tmFacilities = (TextView) v.findViewById(R.id.court_facilities);\n\t\t\n\t\t\n\t\t\n\t\tmComment = (TextView) v.findViewById(R.id.court_comment);\n\t\tmComment.setOnClickListener(this);\n\t\t\n\t\tGCourtInfoActivity a = (GCourtInfoActivity) getActivity();\n\t\tGCourt court = a.getCourt();\n\t\t\n\t\tSystem.out.println(court.toString());\n\t\t\n\t\tqueryCourtFacility(court.getId());\n\t\t\n\t\tmModel.setText(court.getModel());\n\t\tmCreatYear.setText(court.getCreateYear());\n\t\tmCourtArea.setText(court.getArea());\n\t\tmGreenGrass.setText(court.getGreenGrass());\n\t\tmData.setText(court.getCourtData());\n\t\tmDesigner.setText(court.getDesigner());\n\t\tmFairwayLength.setText(court.getFairwayLength());\n\t\tmFairwayGrass.setText(court.getFairwayGrass());\n\t\tmPhone.setText(court.getPhone());\n\t\tmBrief.setText(court.getRemark());\n\t\tmFacilities.setText(court.getFacilities());\n\t\t\n\t\tmImages = (LinearLayout) v.findViewById(R.id.images);\n\t\tmImages.setOnClickListener(this);\n\t\tmFacilitiesImgs = (LinearLayout) v.findViewById(R.id.facilities_images);\n\t\t\n\t\tDisplayMetrics m = getActivity().getResources().getDisplayMetrics();\n\t\tint widthPixels = m.widthPixels;\n\t\tImageView triange = (ImageView) v.findViewById(R.id.triange);\n\t\ttriange.measure(0, 0);\n\t\t\n\t\tint width = (widthPixels - v.getPaddingLeft() - v.getPaddingRight() - triange.getMeasuredWidth()) * 3 / 4;\n\t\tint imgMargin = 2;\n\t\t\n\t\tint imgWidth = width / 3 - imgMargin * 2;\n\t\tparam = new ViewGroup.MarginLayoutParams(imgWidth, imgWidth);\n\t\t\n\t\tArrayList<String> imgUrl = court.getFairwayImgs();\n\t\t\n\t\tint length = imgUrl.size() <= 3 ? imgUrl.size() : 3 ;\n\t\t\n\t\tfor(int i=0; i<length; i++){\n\t\t\tImageView img = new ImageView(getActivity());\n\t\t\timg.setLayoutParams(param);\n\t\t\timg.setPadding(2, 2, 2, 2);\n\t\t\tmImages.addView(img);\n\t\t\t\n\t\t\tif(imgUrl.size() > i)\n\t\t\t\t_fb.display(img, imgUrl.get(i));\n\t\t}\n\t\t\n//\t\tActionBarActivity activity = (ActionBarActivity) getActivity();\n//\t\tActionBar bar = activity.getSupportActionBar();\n//\t\tbar.setTitle(R.string.court_info);\n//\t\tint change = bar.getDisplayOptions() ^ ActionBar.DISPLAY_HOME_AS_UP;\n//\t bar.setDisplayOptions(change, ActionBar.DISPLAY_HOME_AS_UP);\n\t \n\t\treturn v;\n\t}", "public static TVListFragment newInstance() {\n TVListFragment fragment = new TVListFragment();\n return fragment;\n }", "public static IndividualInformationFragment newInstance(long individualId) {\n IndividualInformationFragment fragment = new IndividualInformationFragment();\n Bundle args = new Bundle();\n args.putLong(INDIVIDUAL_ID, individualId);\n fragment.setArguments(args);\n return fragment;\n }", "public TaskFragmentDetail() {\n // Required empty public constructor\n }", "@Override\n public Fragment getItem(int position) {\n MainFragment fragment=new MainFragment();\n fragment.setType(position);\n return fragment;\n }", "private void initViews() {\n ListFragment listFragment = ListFragment.newInstance();\n fragmentManager.beginTransaction().replace(R.id.holder, listFragment, \"List fragment\").commit();\n\n if (findViewById(R.id.detail_fragment) != null) {\n isTablet = true;\n DetailFragment detailFragment = DetailFragment.newInstance();\n fragmentManager.beginTransaction().replace(R.id.detail_fragment, detailFragment, \"Detail fragment\").addToBackStack(null).commit();\n }\n }", "private void showSection(int position) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))\n .commit();\n\n\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_detail, container, false);\n //Loading IT list item\n mDetails = getArguments().getParcelableArrayList(ARG_DETAIL_LIST);\n mTableListLab = TableListLab.getInstance();\n //Display items in expandable recyclerview\n mExpandableView = view.findViewById(R.id.detail_expandable_view);\n for (Detail detail : mDetails) {\n switch (detail.getType()) {\n case Detail.ONLY_TEXT_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new InfoView(getActivity(), detail));\n break;\n case Detail.IMAGE_TEXT_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageTextInfoView(getActivity(), detail));\n break;\n case Detail.ONLY_IMAGE_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageOnlyInfoView(getActivity(), detail));\n break;\n case Detail.TWO_IMAGES_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageTableInfoView(getActivity(), detail));\n break;\n case Detail.DIRECT_TEXT_TYPE:\n mExpandableView.addView(new DirectTextView(getActivity(), detail));\n break;\n case Detail.FACULTY_INFO_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new FacultyInfoView(getActivity(), detail));\n break;\n case Detail.MAP_ADDRESS_TYPE:\n mExpandableView.addView(new MapAddressView(getActivity(), detail));\n break;\n case Detail.ONLY_TABLE_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new TableInfoView(getActivity(), detail));\n break;\n case Detail.IMAGE_TABLE_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageTableInfoView(getActivity(), detail));\n break;\n case Detail.BODY_CHAPTERS_INFO_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new BodyChaptersInfoView(getActivity(), detail));\n break;\n case Detail.ABOUT_DEVELOPERS_TYPE:\n mExpandableView.addView(new DevelopersInfoView());\n break;\n case Detail.TOP_RECRUITERS_TYPE:\n mExpandableView.addView(new RecruitersInfoView(getActivity(), RecruiterListLab.getInstance()));\n break;\n }\n }\n\n return view;\n }", "public Detail() {\n initComponents();\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}", "@SuppressWarnings(\"unused\")\n public static ItemFragment newInstance(int columnCount, String title) {\n ItemFragment fragment = new ItemFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_COLUMN_COUNT, columnCount);\n args.putString(ARG_TITLTE, title);\n fragment.setArguments(args);\n return fragment;\n }", "public ShowDetails() {\n initComponents();\n }", "private Node createDetails ()\n {\n\n List<String> prefix = Arrays.asList (charts,sessionlength,labels);\n\n FlowPane b = new FlowPane ();\n b.getStyleClass ().add (StyleClassNames.DETAIL);\n\n return b;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_book_details, container, false);\n\n TextView titleTextView = (TextView) view.findViewById(R.id.bookDetailTitleTextView);\n TextView authorTextView = (TextView) view.findViewById(R.id.bookDetailAuthorTextView);\n\n titleTextView.setText(this.bookTitle);\n authorTextView.setText(this.bookAuthor);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n titleTextView = (TextView)rootView.findViewById(R.id.textview_doodle_title);\n imageView = (ImageView)rootView.findViewById(R.id.image_doodle_full);\n\n return rootView;\n }", "public static RecipeListFragment newInstance() {\n RecipeListFragment fragment = new RecipeListFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return fragment;\n }", "public PupilMapDetailsFragment() {\n }", "public TechFragment() {\n }", "public TournListFragment (){\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_detail_list, container, false);\n\n getViews(view);\n\n setInfo();\n\n setListeners();\n\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_detail_data, container, false);\n }", "public RestaurantDetailFragment() {\n }", "public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View myInflatedView = inflater.inflate(R.layout.fragment_info, container,false);\n\n descrizione_sezioni = myInflatedView.findViewById(R.id.spiegazione_sezioni);\n descrizione_dati = myInflatedView.findViewById(R.id.spiegazione_dati);\n descrizione_raccolta_dati = myInflatedView.findViewById(R.id.spiegazione_raccolta_dati);\n\n getActivity().setTitle(\"Informazioni\");\n\n //descrizione_raccolta_dati.setMovementMethod(LinkMovementMethod.getInstance());\n\n String spiegazione_sezioni = \"<b>• Home:</b> Mostra gli ultimi dati forniti dalla protezione civile.<br><br>\" +\n \"<b>• Grafici: </b>Contiene 3 grafici, il primo mostra l'andamento nazionale relativo ai casi totali, deceduti e guariti; il secondo grafico mostra l'andamento del numero di contagi giornalieri; infine, l'ultimo istogramma mostra la situazione dei contagiati.<br><br>\" +\n \"<b>• Regioni/Province: </b>Lista contenente le regioni con i loro principali dati; è possibile cliccare su una regione per poter accedere alle province relative a quella determinata ragione. Se dovreste trovate delle incongruenze tra i nuovi casi della regione delle sue province è dato dal fatto che alcuni casi sono in fase di definizione.<br><br>\" +\n \"<b>• Condividi dati nazionali: </b> Con questa funzionalità è possibile condividere gli ultimi dati ottenuti dall'app.<br><br>\";\n descrizione_sezioni.setText(Html.fromHtml(spiegazione_sezioni));\n\n String spiegazione_dati = \"<b><font color='#FF0000'>• Totale casi:</font></b> totale persone risultate positive.<br><br>\" +\n \"<b><font color='#FF9800'>• Totale positivi:</font></b> totale persone attualmente positive sia ospedalizzate che in isolamento domiciliare.<br><br>\" +\n \"<b><font color='#000000'>• Deceduti:</font></b> persone decedute (in attesa di verifica ISS).<br><br>\" +\n \"<b><font color='#4CAF50'>• Dimessi guariti:</font></b> totale persone clinicamente guarite.<br><br>\" +\n \"<b><font color='#009688'>• Ricoverati con sintomi:</font></b> totale persone ricoverate con sintomi positivi.<br><br>\" +\n \"<b><font color='#3D0A8C'>• Terapia intensiva:</font></b> totale persone che si trovano in terapiva intensiva.<br><br>\" +\n \"<b><font color='#9A558E'>• Ospedalizzati:</font></b> totale persone positive che si trovano in ospedale.<br><br>\" +\n \"<b><font color='#FF5F75ED'>• Isolamento domiciliare:</font></b> totale persone che si trovano in isolamento domiciliare.<br><br>\" +\n \"<b><font color='#E91E63'>• Tamponi:</font></b> numero di tamponi effettuati.<br><br>\";\n descrizione_dati.setText(Html.fromHtml(spiegazione_dati));\n\n\n String spiegazione_raccolta_dati = \"I dati raccolti dall'app vengono raccolti dal <b>Dipartimento della Protezione Civile</b> che vengono aggiornati quotidianamente alle <b>ore 18:30</b>.<br><br>\" +\n \"La repository da cui vengono raccolti i dati è la seguente: <a href=\\\"https://github.com/pcm-dpc/COVID-19\\\">Dati COVID-19 Italia</a><br><br>\" +\n \"<i>Dati forniti dal Ministero della Salute<br>\" +\n \"Elaborazione e gestione dati a cura del Dipartimento della Protezione Civile</i><br>\" +\n \"<i>Licenza: <a href=\\\"https://creativecommons.org/licenses/by/4.0/deed.en\\\">CC-BY-4.0</a> - <a href=\\\"https://github.com/pcm-dpc/COVID-19/blob/master/LICENSE\\\">Visualizza licenza</a></i>\";\n descrizione_raccolta_dati.setText(Html.fromHtml(spiegazione_raccolta_dati));\n\n\n //AlarmHelper.Companion.getInstance().setAlarm(myInflatedView.getContext());\n\n\n return myInflatedView;\n }", "public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}", "public static VsContactsListFragment newInstance(int index) {\n VsContactsListFragment f = new VsContactsListFragment();\n\n // Supply index input as an argument.\n Bundle args = new Bundle();\n args.putInt(\"index\", index);\n f.setArguments(args);\n return f;\n }", "@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0: // Fragment # 0 - This will show FirstFragment\n return new ListFragment();\n case 1: // Fragment # 0 - This will show FirstFragment different title\n return new GridFragment();\n\n default:\n return null;\n }\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t return inflater.inflate(R.layout.fragment_detailsnote, container, false);\n\t}", "@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return DetailsFragment.newInstance(position);\n case 1:\n return MapsFragment.newInstance(position);\n }\n return null;\n }", "public static RecentFragment newInstance(int pos){\n Extras.getInstance().setTabIndex(pos);\n return new RecentFragment();\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_posts_details, container, false);\r\n\r\n vm = new ViewModelProvider(requireActivity()).get(MainActivityVM.class);\r\n\r\n title = view.findViewById(R.id.title);\r\n body = view.findViewById(R.id.body);\r\n\r\n Post post = vm.getPostDetails();\r\n\r\n title.setText(post.getTitle());\r\n body.setText(post.getBody());\r\n\r\n\r\n// vm.getPostDetails().observe(getActivity(), new Observer<Post>() {\r\n// @Override\r\n// public void onChanged(Post post) {\r\n// title.setText(post.getTitle());\r\n// body.setText(post.getBody());\r\n// }\r\n// });\r\n\r\n return view;\r\n }", "public MovieDetailFragment() {\n }", "public MovieDetailFragment() {\n }", "@Override\n public void onItemClicked(View view, int adapterPosition) {\n MainActivity.currentPosn = adapterPosition;\n MainActivity.currentMovie = movies.get(adapterPosition);\n\n // Open new DetailFragment for selected Featured Movie\n DetailFragment detail = new DetailFragment();\n Bundle args = new Bundle();\n args.putString(\"Movie\", String.valueOf(movies.get(adapterPosition)));\n detail.setArguments(args);\n\n assert fragment.getFragmentManager() != null;\n fragment.getFragmentManager()\n .beginTransaction()\n .replace(R.id.mainActivityContainer, detail, \"FeaturedDetailFragment\")\n .addToBackStack(null)\n .commit();\n }", "@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }", "@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }", "@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }", "@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }", "@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }", "@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }", "@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }" ]
[ "0.8406688", "0.730538", "0.67258096", "0.65430874", "0.6506996", "0.64904743", "0.64363205", "0.6401514", "0.63580525", "0.6309602", "0.62997186", "0.62475824", "0.62475824", "0.62475824", "0.62475824", "0.6206828", "0.6200963", "0.6174642", "0.6138015", "0.61374855", "0.6087643", "0.60801685", "0.6039871", "0.6033937", "0.60180783", "0.600166", "0.599594", "0.59877884", "0.59865063", "0.5972673", "0.5964374", "0.59556717", "0.59444815", "0.5926973", "0.5892359", "0.5892359", "0.5892359", "0.5876695", "0.58571386", "0.58387697", "0.5830825", "0.5813978", "0.5794132", "0.578907", "0.57357585", "0.5723925", "0.57058203", "0.5699524", "0.56791234", "0.5677398", "0.5674146", "0.5665102", "0.56621474", "0.56585693", "0.5657686", "0.56564444", "0.5656258", "0.5644911", "0.5644911", "0.5644911", "0.56318885", "0.5612862", "0.5603185", "0.55910313", "0.5582803", "0.5581793", "0.55801636", "0.5578505", "0.55731803", "0.5571742", "0.5567853", "0.55608135", "0.5559651", "0.5559228", "0.555811", "0.55571544", "0.55541164", "0.5553733", "0.55530804", "0.5551065", "0.5544934", "0.55437875", "0.5540671", "0.55365217", "0.5531144", "0.55263716", "0.55237484", "0.5520929", "0.55192685", "0.5516875", "0.5511835", "0.55101687", "0.55101687", "0.55091876", "0.5507283", "0.5507283", "0.5507283", "0.5507283", "0.5507283", "0.5507283", "0.5507283" ]
0.0
-1
/ public List getProfiles(); public ShopperProfile getProfile(long profileId); public Object addProfile(ShopperProfile profileDetails); public ShopperProfile updateProfile(String profileId,ShopperProfile profileDetails); public Object deleteProfile(String profileId);
public List<T> getProfiles();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Profile getProfile( String profileId );", "public List<SmmProfile> getProfiles();", "@Override\r\n public List<Profile> getAllProfiles() {\r\n\r\n return profileDAO.getAllProfiles();\r\n }", "@Override\r\n public Profile getProfileById(int id) {\r\n return profileDAO.getProfileById(id);\r\n }", "public interface ProfileService {\n\n /**\n * Get profile details from the service.\n *\n * @param profileId Profile Id of the user.\n * @param callback Callback with the result.\n */\n void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<Map<String, Object>>> callback);\n\n /**\n * Query user profiles on the services.\n *\n * @param queryString Query string. See https://www.npmjs.com/package/mongo-querystring for query syntax. You can use {@link QueryBuilder} helper class to construct valid query string.\n * @param callback Callback with the result.\n */\n void queryProfiles(@NonNull final String queryString, @Nullable Callback<ComapiResult<List<Map<String, Object>>>> callback);\n\n /**\n * Updates profile for an active session.\n *\n * @param profileDetails Profile details.\n * @param callback Callback with the result.\n */\n void updateProfile(@NonNull final Map<String, Object> profileDetails, final String eTag, @Nullable Callback<ComapiResult<Map<String, Object>>> callback);\n\n /**\n * Applies given profile patch if required permission is granted.\n *\n * @param profileId Id of an profile to patch.\n * @param profileDetails Profile details.\n * @param callback Callback with the result.\n */\n void patchProfile(@NonNull final String profileId, @NonNull final Map<String, Object> profileDetails, final String eTag, @Nullable Callback<ComapiResult<Map<String, Object>>> callback);\n\n /**\n * Applies profile patch for an active session.\n *\n * @param profileDetails Profile details.\n * @param callback Callback with the result.\n */\n void patchMyProfile(@NonNull final Map<String, Object> profileDetails, final String eTag, @Nullable Callback<ComapiResult<Map<String, Object>>> callback);\n }", "public String getProfile();", "public List<ProfilePicture> getProfile() {\r\n\t\t\t\r\n\t\t\treturn (List<ProfilePicture>) userRepo.findAll();\r\n\t\t}", "@Override\n\tpublic List<Profile> getAllProfiles() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Profile getProfile(long profileId) {\n\t\treturn null;\n\t}", "public Profile getProfile() {\n return _profile;\n }", "@RequestMapping(value = { \"/profiles/\" }, method = RequestMethod.GET)\n public ResponseEntity<List<ProfileVO>> listProfiles() {\n\n List<Profile> profileList = service.findAllProfiles();\n List<ProfileVO> profileVOList = new ArrayList<>();\n profileList.forEach( profile -> {\n ProfileVO profileVO = new ProfileVO();\n profileVO.setId(profile.getId());\n profileVO.setFirstName(profile.getFirstName());\n profileVO.setLastName(profile.getLastName());\n profileVO.setBirthDate(profile.getBirthDate());\n profileVO.setSex(profile.getSex());\n profileVO.setEmailAddress(profile.getEmailAddress());\n if(profile.getProfilePhoto()!=null) {\n FileBucket fileBucket = new FileBucket();\n profileVO.setPhoto(fileBucket);\n try {\n byte[] encodeBase64ForProfilePhoto = Base64.encodeBase64(profile.getProfilePhoto());\n String base64EncodedForProfile = new String(encodeBase64ForProfilePhoto, \"UTF-8\");\n profileVO.setBase64Encoded(base64EncodedForProfile);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n profileVOList.add(profileVO);\n });\n\n return new ResponseEntity<List<ProfileVO>>(profileVOList, HttpStatus.OK);\n }", "public ProfileService getProfileService()\n {\n return profileService;\n }", "public Profile getProfile() {\n return m_profile;\n }", "public void setProfile(Profile profile) {\n _profile = profile;\n }", "java.util.List<org.beangle.security.session.protobuf.Model.Profile>\n getProfilesList();", "public CustomerProfile getCustomerProfile();", "@ManyToOne(fetch = FetchType.LAZY)\n\t@JoinColumn(name = \"ID_SECURITY_PROFILE\", referencedColumnName = \"ID_SECURITY_PROFILE\", nullable = false)\n\tpublic Profile getProfile() {\n\t\treturn this.profile;\n\t}", "@OneToMany(fetch = FetchType.LAZY, mappedBy = Profile.Attributes.SYSTEM, targetEntity = Profile.class, orphanRemoval = true)\n\tpublic Set<Profile> getProfiles() {\n\t\treturn profiles;\n\t}", "public void setProfile(Profile profile) {\n\t\tthis.profile = profile;\n\t}", "public String getProfile() {\n return profile;\n }", "String getProfile();", "public static Profile getProfile() {\n return profile;\n }", "public int getProfile_id() {\n return profileID;\n }", "@java.lang.Override\n public java.util.List<org.beangle.security.session.protobuf.Model.Profile> getProfilesList() {\n return profiles_;\n }", "public ProjectProfileBO getProfile()\r\n {\r\n return mProfile;\r\n }", "public String[] getProfiles();", "void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<ComapiProfile>> callback);", "@Override\r\n\tpublic ProfileApi getProfileApi() {\r\n\t\treturn this;\r\n\t}", "public ProfileService profile() {\n return service;\n }", "org.beangle.security.session.protobuf.Model.Profile getProfiles(int index);", "public List<UserProfile> getProfili() {\r\n\t\t// return upDao.findAll();\r\n\t\treturn upDao.getAllUserProfile();\r\n\t}", "public EntityProfile getProfile()\n\t{\n\t\treturn m_profile;\n\t}", "H getProfile();", "public List<ProfileDefinitionModel> profiles() {\n return this.profiles;\n }", "@Override\n\tpublic ProfileInfo getProfileInfo() {\n\t\treturn (ProfileInfo)map.get(PROFILE_INFO);\n\t}", "public T getSelectedProfile(int Id);", "public void getProfileList() {\n\t\t\n\t\tdbo = new DBObject(this);\n\t\t\n\t\tcursor_profile = dbo.getPhoneProfileList();\n\t\t\n\t\tif( cursor_profile.getCount() >0 ) // more than one profile in cursor\n\t\t{\n\t\t\tprofile_id = new int[cursor_profile.getCount()];\n\t\t\tprofile_name = new String[cursor_profile.getCount()];\n\t\t\t\n\t\t\tint idx_id = cursor_profile.getColumnIndexOrThrow(\"_id\");\n\t\t\tint idx_name = cursor_profile.getColumnIndexOrThrow(\"name\");\n\t\t\t\n\t\t\tint counter = 0;\n\t\t\t\n\t\t\tcursor_profile.moveToFirst();\n\t\t\t\n\t\t\tdo {\n\t\t\t\tprofile_id[counter] = cursor_profile.getInt(idx_id);\n\t\t\t\tprofile_name[counter] = cursor_profile.getString(idx_name);\n\t\t\t\tLog.d(TAG, \"retrieved: \" + profile_id[counter] + \"(\" + profile_name[counter] + \")\");\n\t\t\t\tcounter++;\n\t\t\t}while(cursor_profile.moveToNext());\n\t\t}\n\t\t\n\t\tdbo.close();\n\t}", "public List<Profile> getAllProfiles() {\n String[] columns = {\n COLUMN_EMAIL,\n COLUMN_USERNAME,\n COLUMN_PASSWORD,\n COLUMN_FIRST_NAME,\n COLUMN_SUR_NAME,\n COLUMN_BIRTHDAY,\n COLUMN_COUNTRY_USER,\n COLUMN_DESCRIPTION_USER,\n COLUMN_IS_LOGGED_IN\n };\n // sorting orders\n String sortOrder =\n COLUMN_USERNAME + \" ASC\";\n List<Profile> profileList = new ArrayList<Profile>();\n\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_PROFILE, //Table to query\n columns, //columns to return\n null, //columns for the WHERE clause\n null, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n sortOrder); //The sort order\n\n if (cursor.moveToFirst()) {\n do {\n Profile profile = new Profile();\n profile.setEmail(cursor.getString(cursor.getColumnIndex(COLUMN_EMAIL)));\n profile.setUsername(cursor.getString(cursor.getColumnIndex(COLUMN_USERNAME)));\n profile.setPassword(cursor.getString(cursor.getColumnIndex(COLUMN_PASSWORD)));\n profile.setFirstName(cursor.getString(cursor.getColumnIndex(COLUMN_FIRST_NAME)));\n profile.setSurName(cursor.getString(cursor.getColumnIndex(COLUMN_SUR_NAME)));\n profile.setBirthday(cursor.getString(cursor.getColumnIndex(COLUMN_BIRTHDAY)));\n profile.setCountryUser(cursor.getString(cursor.getColumnIndex(COLUMN_COUNTRY_USER)));\n profile.setDescriptionUser(cursor.getString(cursor.getColumnIndex(COLUMN_DESCRIPTION_USER)));\n //profile.setLoggedIn(Boolean.parseBoolean(cursor.getString(cursor.getColumnIndex(COLUMN_IS_LOGGED_IN))));\n // Adding user record to list\n profileList.add(profile);\n } while (cursor.moveToNext());\n }\n cursor.close();\n db.close();\n\n // return user list\n return profileList;\n }", "void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<Map<String, Object>>> callback);", "Map<String, Object> getUserProfile();", "@Override\r\n public void updateProfile(Profile newProfile, Profile oldProfile) {\r\n profileDAO.updateProfile(oldProfile, newProfile);\r\n }", "@RequestMapping(value = \"/profile\", method = RequestMethod.GET)\n\tpublic ResponseEntity<List<Perfil>> listProfilesForFeature(Integer id) {\n\t\tList<Perfil> perfis = FuncionalidadePerfilServiceDao.getPerfilByFuncionalidade(id);\n\t\treturn new ResponseEntity<List<Perfil>>(perfis, HttpStatus.OK);\n\t}", "@GetMapping(value = \"/\")\n\tpublic String getMyProfile(Model model) {\t\t\n\t\tlong profileId =3; \n\t\tSystem.out.println(\"Mapping done for profile id\"+profileId);\n\t\tProfile profile = profileService.getProfile(profileId);\n\t\tList<Education> edu = educationService.getEducationList();\n Address address = addressService.getAddress(profileId);\n List<WorkExp> workExpList = workExpService.getWorkExpList();\n List<AreaOfExpertise> areaOfExpertiseList = areaOfExpertiseService.getAreaOfExpertiseList();\n List<Project> projectList = projectService.getProjectsList();\n List<Skill> skillsList =skillService.getSkill();\n\t\tmodel.addAttribute(\"Profile\",profile);\n\t\tmodel.addAttribute(\"Address\",address);\n\t\tmodel.addAttribute(\"EducationList\",edu);\n\t\tmodel.addAttribute(\"WorkExpList\",workExpList);\n\t\tmodel.addAttribute(\"AreaOfExpertiseList\",areaOfExpertiseList);\n\t\tmodel.addAttribute(\"ProjectList\",projectList);\n\t\tmodel.addAttribute(\"SkillsList\",skillsList);\n\t\treturn \"home\";\n\t\t}", "@java.lang.Override\n public org.beangle.security.session.protobuf.Model.Profile getProfiles(int index) {\n return profiles_.get(index);\n }", "TasteProfile.UserProfile getUserProfile (String user_id);", "Accessprofile getById(Integer id);", "public abstract Properties getProfileProperties();", "public interface ProfileService {\n\n /**\n * persist object\n *\n * @author Yuebiao ma\n * @version 1.0\n * @param st object pending to be persisted\n * @since 2016-03-30\n *\n */\n public void insert(Profile st);\n\n /**\n * delete object\n *\n * @author Yuebiao ma\n * @version 1.0\n * @param id of object pending to be deleted\n * @since 2016-03-30\n *\n */\n public void delete(String id);\n\n /**\n * query object list\n *\n * @author Yuebiao ma\n * @version 1.0\n * @param id of object to be queried\n * @since 2016-03-30\n *\n */\n public List<Profile> getProfilebyid(String id);\n\n public void update(Profile obj);\n\n public String testquery();\n\n}", "public UserProfile getUserProfile() {return userProfile;}", "ProfileStatusReader getProfileUpdate( String profileId );", "List<ProfileStatusReader> getActiveProfiles();", "ApplicationProfile getApplicationProfile();", "@GetMapping(produces = { JSON, XML }, path = \"/profile/{id}\")\t\n\tpublic ResponseEntity<ProfileDTO> getProfile(@PathVariable(\"id\") int id, \n\t\t\t@RequestHeader(HttpHeaders.ACCEPT) Version version) { \n\t\t\n\t\tif(!principal.isAuthorized()) {\n\t\t\treturn ResponseEntity.ok(profileService.read(id, true, version));\n\t\t} \n\t\t\n\t\tUser issuer = getCurrentUser();\n\t\t\n\t\tif (issuer.getIdAsInt() == id) {\n\t\t\treturn ResponseEntity.ok(profileService.read(id, false, version));\n\t\t} else {\n\t\t\tProfileDTO fetched = profileService.read(id, true, version);\n\t\t\t\n\t\t\tif (fetched != null) {\n\t\t\t\tguestService.visitUserProfile(id, issuer.getIdAsInt(), false);\n\t\t\t}\n\t\t\t\n\t\t\treturn ResponseEntity.ok(fetched);\n\t\t}\n\t}", "public ArrayList<ProfileInfo> getProfileList()\r\n\t{\r\n\t\tArrayList<ProfileInfo> list = new ArrayList<ProfileInfo>();\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\t// grab each set of values and add as a ProfileInfo object to list\r\n\t\t\tString str = ps.getString(i + PROFILE);\r\n\t\t\t\r\n\t\t\tString[] values = str.split(\",\");\r\n\t\t\t\r\n\t\t\tif (values.length == 4)\t// Should be 4 strings representing values\r\n\t\t\t{\r\n\t\t\t\tProfileInfo info = new ProfileInfo(values[0],\r\n\t\t\t\t\tvalues[1],\r\n\t\t\t\t\tvalues[2],\r\n\t\t\t\t\tInteger.parseInt(values[3]));\r\n\t\t\t\r\n\t\t\t\tlist.add(info);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn list;\r\n\t}", "public void setProfileId(Integer profileId) {\n _profileId = profileId;\n }", "public Map<String, Object> getProfileProperties() {\n return profileProperties;\n }", "protected Map getProfileMap() {\n \t\t\treturn profileMap;\n \t\t}", "@WebMethod(action=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/getUserProfile\",\n operationName=\"getUserProfile\")\n @RequestWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"getUserProfile\")\n @ResponseWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"getUserProfileResponse\")\n @WebResult(name=\"result\")\n @CallbackMethod(exclude=true)\n String getUserProfile(@WebParam(mode = WebParam.Mode.IN, name=\"profileInformation\")\n String profileInformation) throws ServiceException;", "public void setProfiles(Set<Profile> profiles) {\n\t\tthis.profiles = profiles;\n\t}", "public Profile getProfile(String id) {\r\n\t\tString uuid = id;\r\n\t\tSystem.out.println(\"MineshafterProfileClient.getProfile(\" + uuid + \")\");\r\n\t\tURL u;\r\n\t\ttry {\r\n\t\t\tu = new URL(API_URL + \"?uuid=\" + id);\r\n\r\n\t\t\tHttpsURLConnection conn = (HttpsURLConnection) u.openConnection();\r\n\r\n\t\t\tInputStream in = conn.getInputStream();\r\n\t\t\tString profileJSON = Streams.toString(in);\r\n\t\t\tStreams.close(in);\r\n\r\n\t\t\tSystem.out.println(\"MS API Response: \" + profileJSON);\r\n\r\n\t\t\tif (profileJSON == null || profileJSON.length() == 0) { return new Profile(); }\r\n\r\n\t\t\tJsonObject pj = JsonObject.readFrom(profileJSON);\r\n\r\n\t\t\tProfile p = new Profile(pj.get(\"username\").asString(), uuid);\r\n\t\t\tJsonValue skinVal = pj.get(\"skin\");\r\n\t\t\tJsonValue capeVal = pj.get(\"cape\");\r\n\t\t\tJsonValue modelVal = pj.get(\"model\");\r\n\r\n\t\t\tString url;\r\n\t\t\tif (skinVal != null && !skinVal.isNull() && !skinVal.asString().isEmpty()) {\r\n\t\t\t\turl = textureHandler.addSkin(uuid, skinVal.asString());\r\n\t\t\t\tp.setSkin(url);\r\n\t\t\t}\r\n\r\n\t\t\tif (capeVal != null && !capeVal.isNull() && !capeVal.asString().isEmpty()) {\r\n\t\t\t\turl = textureHandler.addCape(uuid, capeVal.asString());\r\n\t\t\t\tp.setCape(url);\r\n\t\t\t}\r\n\r\n\t\t\tif (modelVal != null && !modelVal.isNull()) {\r\n\t\t\t\tString model = modelVal.asString();\r\n\t\t\t\tif (model.equals(\"slim\")) {\r\n\t\t\t\t\tp.setModel(CharacterModel.SLIM);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setModel(CharacterModel.CLASSIC);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn p;\r\n\t\t} catch (ParseException e) {\r\n\t\t\tSystem.out.println(\"Unable to parse getProfile response, using blank profile\");\r\n\t\t\treturn new Profile();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn new Profile();\r\n\t}", "@java.lang.Override\n public int getProfilesCount() {\n return profiles_.size();\n }", "public interface ProfileServiceWithDefaults {\n\n /**\n * Get profile details from the service.\n *\n * @param profileId Profile Id of the user.\n * @param callback Callback with the result.\n */\n void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<ComapiProfile>> callback);\n\n /**\n * Query user profiles on the services.\n *\n * @param queryString Query string. See https://www.npmjs.com/package/mongo-querystring for query syntax. You can use {@link QueryBuilder} helper class to construct valid query string.\n * @param callback Callback with the result.\n */\n void queryProfiles(@NonNull final String queryString, @Nullable Callback<ComapiResult<List<ComapiProfile>>> callback);\n\n /**\n * Updates profile for an active session.\n *\n * @param profileDetails Profile details.\n * @param callback Callback with the result.\n */\n void updateProfile(@NonNull final ComapiProfile profileDetails, final String eTag, @Nullable Callback<ComapiResult<ComapiProfile>> callback);\n\n /**\n * Applies given profile patch if required permission is granted.\n *\n * @param profileId Id of an profile to patch.\n * @param profileDetails Profile details.\n * @param callback Callback with the result.\n */\n void patchProfile(@NonNull final String profileId, @NonNull final ComapiProfile profileDetails, final String eTag, @Nullable Callback<ComapiResult<ComapiProfile>> callback);\n\n /**\n * Applies profile patch for an active session.\n *\n * @param profileDetails Profile details.\n * @param callback Callback with the result.\n */\n void patchMyProfile(@NonNull final ComapiProfile profileDetails, final String eTag, @Nullable Callback<ComapiResult<ComapiProfile>> callback);\n }", "@Override\r\n public int addProfile(Profile newProfile) {\r\n return profileDAO.addProfile(newProfile);\r\n }", "protected abstract Profile[] getProfileSet();", "protected Map<String, Object> getUserProfile() {\r\n\t\tTimeRecorder timeRecorder = RequestContext.getThreadInstance()\r\n\t\t\t\t\t\t\t\t\t\t\t\t .getTimeRecorder();\r\n\t\tString profileId = (String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID);\r\n\r\n\t\tSite site = Utils.getEffectiveSite(request);\r\n\t\tString siteDNSName = (site == null ? null : site.getDNSName());\r\n\r\n\t\tIUserProfileRetriever retriever = UserProfileRetrieverFactory.createUserProfileImpl(AuthenticationConsts.USER_PROFILE_RETRIEVER, siteDNSName);\r\n\t\ttry {\r\n\t\t\ttimeRecorder.recordStart(Operation.PROFILE_CALL);\r\n\t\t\tMap<String, Object> userProfile = retriever.getUserProfile(profileId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request);\r\n\t\t\ttimeRecorder.recordEnd(Operation.PROFILE_CALL);\r\n\t\t\treturn userProfile;\r\n\t\t} catch (UserProfileException ex) {\r\n\t\t\ttimeRecorder.recordError(Operation.PROFILE_CALL, ex);\r\n\t\t\tRequestContext.getThreadInstance()\r\n\t\t\t\t\t\t .getDiagnosticContext()\r\n\t\t\t\t\t\t .setError(ErrorCode.PROFILE001, ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "public Profile get(Long id, String authenticationCode, long profileId) {\n return new Profile((int)(long)id,\"PROFIL_TESTOWY\", Boolean.FALSE, Boolean.TRUE);\n }", "public interface ProfilingService {\n String PROFILES = \"profiles\";\n\n /**\n * Get the profile factory for a given data source\n *\n * @param dataSourceMetadata the data source metadata\n * @return a ProfileFactory that accepts the reference (or null if it doesn't exist)\n */\n ProfileFactory getProfileFactory( DataSourceMetadata dataSourceMetadata );\n\n /**\n * Return a boolean indicating whether a ProfileFactory exists for the given data source\n *\n * @param dataSourceMetadata the data source metadata\n * @return true iff there is a ProfileFactory that accepts the reference\n */\n boolean accepts( DataSourceMetadata dataSourceMetadata );\n\n /**\n * Creates a profile from the ProfileConfiguration and returns its initial status\n *\n * @param profileConfiguration the profile configuration\n * @return a ProfileStatusManager for the created profile\n * @throws ProfileCreationException if there is an error during profile creation\n */\n ProfileStatusManager create( ProfileConfiguration profileConfiguration ) throws ProfileCreationException;\n\n /**\n * Returns a list of the currently active profiles\n *\n * @return a list of the currently active profiles\n */\n List<ProfileStatusReader> getActiveProfiles();\n\n /**\n * Returns the profile for a given profileId\n *\n * @param profileId the profileId\n * @return the Profile\n */\n Profile getProfile( String profileId );\n\n /**\n * Returns the a ProfileStatusReader for the given profileId\n *\n * @param profileId the profileId\n * @return the ProfileStatusReader\n */\n ProfileStatusReader getProfileUpdate( String profileId );\n\n /**\n * Stops the profile with the given id\n *\n * @param profileId the profileId to stop\n */\n void stop( String profileId );\n\n /**\n * Stops all the running profiles\n */\n void stopAll();\n\n /**\n * Returns a boolean indicating whether a profile is running\n *\n * @param profileId the profileId to check\n * @return a boolean indicating whether a profile is running\n */\n boolean isRunning( String profileId );\n\n /**\n * Discards the profile with the given id\n *\n * @param profileId the profileId to discard\n */\n void discardProfile( String profileId );\n\n /**\n * Discards all profiles\n */\n void discardProfiles();\n}", "public String getProfileId() {\n return profileId;\n }", "public ProfileImage getProfileImage() {\n return profileImage;\n }", "@java.lang.Override\n public java.util.List<? extends org.beangle.security.session.protobuf.Model.ProfileOrBuilder>\n getProfilesOrBuilderList() {\n return profiles_;\n }", "@Override\n\tpublic Profile getProfile(Users user) {\n\t\treturn null;\n\t}", "public void setProfileId(String profileId) {\n this.profileId = profileId;\n }", "public UserProfile getUserProfile(String username);", "@Test\n public void destiny2GetProfileTest() {\n Long destinyMembershipId = null;\n Integer membershipType = null;\n List<DestinyDestinyComponentType> components = null;\n InlineResponse20037 response = api.destiny2GetProfile(destinyMembershipId, membershipType, components);\n\n // TODO: test validations\n }", "protected void load(Profile profile) throws ProfileServiceException{\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.entering(sourceClass, \"load\", profile);\n \t\t}\n \t\t// Do a cache lookup first. If cache miss, make a network call to get\n \t\t// Profile\n \t\t\n \t\tDocument data = getProfileDataFromCache(profile.getReqId());\n \t\tif (data != null) {\n \t\t\tprofile.setData(data);\n \t\t} else {\n \n \t\t\tMap<String, String> parameters = new HashMap<String, String>();\n \t\t\tif (isEmail(profile.getReqId())) {\n \t\t\t\tparameters.put(\"email\", profile.getReqId());\n \t\t\t} else {\n \t\t\t\tparameters.put(\"userid\", profile.getReqId());\n \t\t\t}\n \t\t\tString url = resolveProfileUrl(ProfileEntity.NONADMIN.getProfileEntityType(),\n \t\t\t\t\tProfileType.GETPROFILE.getProfileType());\n \t\t\tObject result = executeGet(url, parameters, ClientService.FORMAT_XML);\n \n \t\t\tif (result != null) {\n \t\t\t\tprofile.setData((Document) result);\n \t\t\t\taddProfileDataToCache(profile.getUniqueId(), (Document) result);\n \t\t\t} else {\n \t\t\t\tprofile.setData(null);\n \t\t\t}\n \n \t\t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\t\tlogger.exiting(sourceClass, \"load\");\n \t\t\t}\n \t\t}\n \t}", "@GET\n\t @Path(\"/topUser\")\n\t public Response getProfile() throws ProfileDaoException {\n\t return Response\n\t .ok(api.getTopUser(datastore))\n\t .build();\n\t }", "boolean hasProfile();", "public Vector<Profil> getAllProfile() throws Exception{\r\n\t\t\r\n\t\tConnection con = (Connection) DBConnection.connection();\r\n\t\t\r\n\t\tPreparedStatement prestmt = con.prepareStatement(\r\n\t\t\t\t\"SELECT * FROM profil\");\r\n\t\t\r\n\t\tResultSet result = prestmt.executeQuery();\r\n\t\t\r\n\t\tVector<Profil> profile = new Vector<Profil>();\r\n\t\t\r\n\t\twhile (result.next()){\r\n\t\t\tProfil profil = new Profil();\r\n\t\t\tprofil.setEmail(result.getString(\"vorname\"));\r\n\t\t\tprofil.setVorname(result.getString(\"vorname\"));\r\n\t\t\tprofil.setNachname(result.getString(\"nachname\"));\r\n\t\t\tprofil.setGeburtsdatum(result.getDate(\"geburtsdatum\"));\r\n\t\t\tprofil.setGeschlecht(result.getString(\"geschlecht\"));\r\n\t\t\tprofil.setHaarfarbe(result.getString(\"haarfarbe\"));\r\n\t\t\tprofil.setKoerpergroesse(result.getInt(\"koerpergroesse\"));\r\n\t\t\tprofil.setReligion(result.getString(\"religion\"));\r\n\t\t\tprofil.setRaucher(result.getString(\"raucher\"));\r\n\t\t\t\t\r\n\t\t\tprofile.add(profil); \r\n\t\t}\r\n\t\t\r\n\t\treturn profile;\r\n\t}", "public ProfileManager getProfileManager() {\n return _profileManager;\n }", "public void setProfiles(HashMap<String, String> profiles) {\n\t\tthis.profiles = profiles;\n\t}", "public static Profile getById(String profileId) {\n return Dao.getInstance().get(Profile.class, profileId);\n }", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "public KunKunProfile getProfile() {\n\t\tObject temp;\n//\t\tif (profile == null || profile.getUserData() == null\n//\t\t\t\t|| profile.getUserData().id == -1) {// nghia la bien o trang\n//\t\t\t\t\t\t\t\t\t\t\t\t\t// thai ban dau hoac da bi\n//\t\t\t\t\t\t\t\t\t\t\t\t\t// reset\n//\t\t\tif ((temp = KunKunUtils.readObject(\n//\t\t\t\t\tKunKunProfile.KUNKUN_PROFILE)) != null) {\n//\t\t\t\tprofile = (KunKunProfile) temp;// bi out memory\n//\t\t\t\tSystem.setProperty(\"networkaddress.cache.ttl\",\"0\");\n//\t\t\t\tSystem.setProperty(\"networkaddress.cache.negative.ttl\" , \"0\");\n//\t\t\t}\n//\t\t}\n\t\treturn profile;\n\t}", "AspirantProfile getAspirantProfile(String email)\n throws IllegalArgumentException, ServiceException;", "public User getProf(String name) { return userDAO.getProfile(name); }", "java.util.List<? extends org.beangle.security.session.protobuf.Model.ProfileOrBuilder>\n getProfilesOrBuilderList();", "@Bean\n\tpublic WebSSOProfile webSSOprofile() {\n\t\treturn new WebSSOProfileImpl();\n\t}", "public Boolean getProfile()\n {\n return profile;\n }", "@PUT\n\t\t@Path(\"update\")\n\t\t@Consumes(MediaType.APPLICATION_JSON)\n\t\tpublic Response updateProfile(ProfileJson json) throws ProfileDaoException{\n\t\t\t\n\t\t\tProfile profile = json.asProfile();\n\t\t\t\n\t\t\t\n\t\t\t//ItemDAO itemDAO = new ItemDAO(ItemJson.class, datastore);\n\t\t\tboolean update = api.updateProfile(profile);\n\n\t\t\treturn ( (update)? Response.ok(null).build() :\n\t\t\t\t\tResponse.notModified().build());\n\n\t\t}", "public MetadataProfile getProfile() {\n\t\treturn profile;\n\t}", "public java.util.List<org.beangle.security.session.protobuf.Model.Profile> getProfilesList() {\n if (profilesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(profiles_);\n } else {\n return profilesBuilder_.getMessageList();\n }\n }", "org.beangle.security.session.protobuf.Model.ProfileOrBuilder getProfilesOrBuilder(\n int index);", "@Override\r\n public List<Profile> getProfilesFromOwner(Account owner) {\r\n return profileDAO.getProfilesFromOwner(owner);\r\n }", "@Override\n public GetServiceProfileResult getServiceProfile(GetServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeGetServiceProfile(request);\n }", "@java.lang.Override\n public org.beangle.security.session.protobuf.Model.ProfileOrBuilder getProfilesOrBuilder(\n int index) {\n return profiles_.get(index);\n }", "public Integer getProfileId() {\n return _profileId;\n }", "public void setProfile(Boolean profile)\n {\n this.profile = profile;\n }", "public void getProfileInfo(String id) {\n\n new WebRequestTask(this, _handler, Constants.GET_METHOD,\n WebServiceDetails.GET_PROFILE_INFO_PID, true, WebServiceDetails.GET_PROFILE_INFO + id).execute();\n }", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getProfileOrBuilder() {\n return getProfile();\n }" ]
[ "0.78261495", "0.7437546", "0.73022854", "0.7119195", "0.69831717", "0.69695395", "0.69676924", "0.69483477", "0.6942314", "0.69352704", "0.6867158", "0.677299", "0.67410624", "0.6698079", "0.6684304", "0.66434604", "0.66166145", "0.66103566", "0.6609055", "0.65878534", "0.65856147", "0.65625304", "0.6541979", "0.6541136", "0.649844", "0.6497569", "0.6489293", "0.64831257", "0.6478779", "0.6471944", "0.64703405", "0.64631635", "0.64265734", "0.63981557", "0.63856673", "0.63759816", "0.6353257", "0.6351466", "0.63454205", "0.63360393", "0.62992036", "0.6292906", "0.62902486", "0.62748945", "0.62016267", "0.61875325", "0.6173808", "0.6144347", "0.61225957", "0.6120518", "0.61199635", "0.6111983", "0.61096084", "0.6108939", "0.6091332", "0.609125", "0.6068232", "0.6066683", "0.60580426", "0.6050979", "0.6048231", "0.60474515", "0.6031675", "0.6022647", "0.6012734", "0.6011301", "0.6005314", "0.6005196", "0.6001757", "0.59998673", "0.5990733", "0.5981787", "0.5980315", "0.5974794", "0.5958542", "0.5931668", "0.5930046", "0.5920822", "0.5909225", "0.5906494", "0.5896668", "0.58954287", "0.5894577", "0.58939016", "0.58871675", "0.5885424", "0.5863867", "0.585461", "0.58498615", "0.58448344", "0.58417624", "0.5839125", "0.583801", "0.5835794", "0.5831795", "0.58154523", "0.57872885", "0.5783681", "0.5777161", "0.5776161" ]
0.70930314
4
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_gank_fuli, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
sets file to be written into to a string variable.
public void writeToFile(String user, Double score){ String path = "src/HighScoresFile.txt"; try{//Wrap in try catch for exception handling. //Create FileWriter object. FileWriter fr = new FileWriter(path,true); fr.write( score + " " + user + "\n"); fr.close();//close the fileWriter object. } //File not found Exception Block. catch (FileNotFoundException e){ System.out.println(e); } //IO Exception Block. catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFile(File f) { file = f; }", "private static void writeStringToFile(String string) {\n\t\ttry (BufferedWriter writer = new BufferedWriter(new FileWriter(OUTPUT_FILE_TEMP))) {\n\t\t\twriter.write(string);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static void writeToFile(String string){\n try {\n buffer.write(string);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void writeStringToFile(String string, String targetFilename, boolean appendFlag)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tStringBufferInputStream theTargetInputStream = new StringBufferInputStream(\r\n\t\t\t\tstring);\r\n\t\tFileOutputStream theFileOutputStream = new FileOutputStream(\r\n\t\t\t\ttargetFilename, appendFlag);\r\n\t\tcopyStreamContent(theTargetInputStream, theFileOutputStream);\r\n\t\ttheFileOutputStream.close();\r\n\t\ttheTargetInputStream.close();\r\n\t}", "private void setFile() {\n\t}", "private void writeOutputFile(String str, String file) throws Exception {\n FileOutputStream fout = new FileOutputStream(file);\n\n fout.write(str.getBytes());\n fout.close();\n }", "private void saveStringToFile(String s) {\n try {\n FileWriter saveData = new FileWriter(SAVE_FILE);\n BufferedWriter bW = new BufferedWriter(saveData);\n bW.write(s);\n bW.flush();\n bW.close();\n } catch (IOException noFile) {\n System.out.println(\"SaveFile not found.\");\n }\n }", "public void setFile(File file);", "protected void openWriteFile(Path filePath, String s) throws IOException{\n\t\tBufferedWriter writer = Files.newBufferedWriter(filePath, ENCODING);\n\t\twriter.write(s, 0, s.length());\n\t\twriter.close();\n\t}", "private static void writeStringValue(String path, String value){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(path, value);\n editor.apply();\n }", "private void writeStringToFileSafe(String string, String targetFilename, boolean appendFlag) {\r\n\t\ttry {\r\n\t\t\twriteStringToFile(string, targetFilename, appendFlag);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\thandleFileNotFoundException(e, targetFilename);\r\n\t\t} catch (IOException e) {\r\n\t\t\thandleIOException(e, targetFilename);\r\n\t\t}\r\n\t}", "void setNewFile(File file);", "public static void writeToFile(File file, String string) throws IOException {\n FileWriter fileWriter = new FileWriter(file);\n fileWriter.write(string);\n fileWriter.close();\n }", "private void writeFile(String string) {\n\t\ttry {\n\t\t\tFormatter fileWriter = new Formatter(new File( System.getProperty(\"user.dir\") + \"\\\\highscores.txt\"));\n\t\t\t\n\t\t\tfileWriter.format(string);\n\t\t\t\n\t\t\tfileWriter.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.print(\"ERROR: Line 132: Unable to write file\");\n\t\t\t//e.printStackTrace();\n\t\t}\n\t}", "public void setFile(String value){\n ((MvwDefinitionDMO) core).setFile(value);\n }", "void setFile(String i) {\n file = i;\n }", "private void setFilePath(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000008;\n filePath_ = value;\n }", "public void write(String s) {\n String s_t_txt = s + \".txt\";\n try {\n PrintWriter writer = new PrintWriter(s_t_txt, \"UTF-8\");\n writer.print(s + \"\\n\");\n writer.print(toString());\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void setFile(String file){\n put(SlackParamsConstants.FILE, file);\n }", "public void setsFilePath(String value) {\n sFilePath = value;\n // // initialize these two\n CurrentFile = null;\n CurrentUri = null;\n // // If we have something real, setup the file and the Uri.\n if (!sFilePath.equalsIgnoreCase(\"\")) {\n CurrentFile = new File(sFilePath);\n CurrentUri = Uri.fromFile(CurrentFile);\n }\n }", "public static void writeStringToFile(String contents,\n \t\t\tFileOutputStream filePath) throws IOException {\n \t\tif (contents != null) {\n \t\t\tBufferedOutputStream bw = new BufferedOutputStream(filePath);\n \t\t\tbw.write(contents.getBytes(\"UTF-8\"));\n \t\t\tbw.flush();\n \t\t\tbw.close();\n \t\t}\n \t}", "protected void setHMetisOutFile(final String str) {\n\t\tthis.hMetisOutFile = str;\n\t}", "public static void writeStringToFile(String content, File file) throws IOException {\n if(StringUtil.isNullOrBlank(content) || file == null) {\n return;\n }\n if(!file.exists() && !file.createNewFile() || file.isDirectory() || !file.canWrite()) {\n return;\n }\n\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(file);\n fos.write(content.getBytes());\n } finally {\n if(fos != null) {\n fos.close();\n }\n }\n }", "void setStdoutFile(File file);", "public void appendStringToFileSafe(String string, String targetFilename) {\r\n\t\twriteStringToFileSafe(string, targetFilename, true);\r\n\t}", "@Override\n public void saveFile(String fileString, String filename) throws IOException {\n }", "@Override\n public void setFile(File f) {\n \n }", "private void writeFileLine(String s, File file)throws IOException{\n\t\tFileWriter filewriter = new FileWriter(file);\n\t\tPrintWriter printWriter = new PrintWriter(filewriter);\n\t\tprintWriter.print(s);\n\t\tprintWriter.close();\n\t}", "public void writeTextFile(String s) {\n\t\ttry {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new FileWriter(filename,true)));\n\t\t\twriter.println(s);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not write to\\t\\\"\" + filename + \"\\\"\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\twriter.close();\n\t\t}\n\t}", "public void writeToTextFile(String filename){\n try{\n FileWriter myWriter = new FileWriter(filename); \n myWriter.write(toString());\n myWriter.close();\n } \n catch(IOException e) { \n System.out.println(\"An error occurred.\"); \n e.printStackTrace();\n } \n }", "public void setNewFilePath(String newValue);", "public static void dumpString(String filename, String s) throws IOException {\n FileWriter fstream = new FileWriter(filename);\n BufferedWriter out = new BufferedWriter(fstream);\n out.write(s);\n out.close();\n }", "void setFileName( String fileName );", "void setFilePath(String filePath);", "public void setOutFile(final File val) {\n outFile = val;\n }", "protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}", "public void overwriteStringToFileSafe(String string, String targetFilename) {\r\n\t\twriteStringToFileSafe(string, targetFilename, false);\r\n\t}", "private void setFile(Serializable object, String path) throws Exception {\t\t\n\t\t\n FileOutputStream fileOut = new FileOutputStream(path);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(object);\n objectOut.close(); \n\t\t\n\t}", "public void writeFileContents(String filename, String contents) {\n }", "public void write_line(String string)\n {\n String[] current = read();\n\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n PrintWriter writer = new PrintWriter(dir);\n\n for (int i = 0; i < current.length; i++)\n {\n String line = current[i];\n if (line != null)\n {\n writer.println(line);\n }\n }\n writer.println(string);\n writer.close();\n }catch (Exception ex)\n {\n debug = \"test write failure\";\n }\n }", "void writeString(String value);", "public void setOutfile( String outfile ) {\n if ( outfile == null ) {\n return ;\n }\n this .outfile = outfile;\n }", "public void setFile(File file)\n {\n this.file = file;\n }", "public void setString(String line)\n {\n tempString = new StringBuilder(line);\n }", "public void overwriteStringToFile(String string, String targetFilename)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\twriteStringToFile(string, targetFilename, false);\r\n\t}", "private void saveToFile(File file) throws IOException {\n FileWriter fileWriter = null;\n try {\n fileWriter = new FileWriter(file);\n fileWriter.write(getSaveString());\n }\n finally {\n if (fileWriter != null) {\n fileWriter.close();\n }\n }\n }", "default void save(String file) {\n save(new File(file));\n }", "public static void overWriteFile(String output, String filePath,\n FileSystem fs) {\n File outFile = openFile(filePath, fs);\n if (outFile != null) {\n outFile.clearContent();\n outFile.appendContent(output);\n }\n }", "public ShortFile(String shortFile) {\r\n newText = shortFile;\r\n }", "public Builder setObjectFile(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n objectFile_ = value;\n onChanged();\n return this;\n }", "public void setSaveFile(File file) {\n\t\t_file = file;\n\t}", "public void saveToFile(String datafile) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException {\n try {\n FileWriter writer = new FileWriter(\"test.html\");\n writer.write(datafile);\n writer.flush();\n writer.close();\n } catch (IOException ioe) {\n System.out.println(\"Error writing file\");\n }\n }", "public void appendStringToFile(String string, String targetFilename)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\twriteStringToFile(string, targetFilename, true);\r\n\t}", "public void setFile(String file) {\r\n this.file = file;\r\n }", "public void toFile(String fname){\r\n\t\ttry(FileWriter fw=new FileWriter(fname)){\r\n\t\t\tfw.write(toString());\r\n\t\t\t\r\n\t\t}catch(IOException e){ e.printStackTrace(); System.exit(0);}\r\n\t}", "public void setCourseToFileString (String courseToFileString)\n\t{\n\t\tthis.courseToFileString = getCourseName ( ) + \" | \" + getCourseNumber ( ) + \" | \" + getInstructor ( ) + \"\\n\" ;\n\t\tthis.saveNeed = true;\n\n\t}", "private void insertIntoFile(String data){\n\t\tOutputStream os = null;\n try {\n os = new FileOutputStream(file);\n os.write(data.getBytes(), 0, data.length());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\t}", "private void saveTextToFile(String content, File file) {\n try {\n PrintWriter writer;\n writer = new PrintWriter(file);\n writer.println(content);\n writer.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public String getStringFile(){\n return fileView(file);\n }", "public void outputToFile(String filemame)\n {\n }", "void set(File local,String name,UserFileType ft)\n{\n user_file = local;\n if (user_file != null && (name == null || name.length() == 0)) \n name = user_file.getName();\n if (name.startsWith(\"/s6/\")) {\n name = name.substring(4);\n }\n else if (name.startsWith(\"s:\")) {\n name = name.substring(2);\n }\n access_name = name;\n file_mode = ft;\n}", "public void setFile(String file)\n\t{\n\t\tthis.file = file;\n\t}", "private static void saveTemplateFile(File file, Template newTemp) {\n String string = newTemp.toString();\n\n //Save File\n try {\n FileOutputStream fos = new FileOutputStream(file);\n fos.write(string.getBytes());\n fos.flush();\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Read back file and check against original.\n try {\n FileInputStream fis = new FileInputStream(file);\n byte[] data = new byte[(int)file.length()];\n\n fis.read(data);\n String tmpIN = new String(data,\"UTF-8\");\n Log.d(\"Behave\",\"Read Back Template: \"+ tmpIN);\n Log.d(\"Behave\",\"Template Saved Correctly: \"+tmpIN.equals(string));\n } catch (FileNotFoundException | UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n // Separate catch block for IOException because other exceptions are encapsulated by it.\n Log.e(\"Behave\", \"IOException not otherwise caught\");\n e.printStackTrace();\n }\n }", "public void setFile(String fileName)\n {\n }", "public void setFile(File file) {\r\n\t\tif (file!=null) this.input = null;\r\n\t\tthis.file = file;\r\n\t}", "public static void writeToFile(String filename, String line) {\n try {\n FileWriter fw = new FileWriter(PATH + filename, true); //the true will append the new data\n fw.write(line + \"\\n\");//appends the string to the file\n fw.close();\n } catch (IOException ioe) {\n System.err.println(\"IOException: \" + ioe.getMessage());\n }\n }", "public void reWriteFile(String filename,String data) {\n\n if (filename.trim().length() > 0) {\n try {\n PrintWriter output = new PrintWriter(filename);\n\n output.write(data);\n\n output.close();\n } catch (IOException e) {\n System.out.println(\"I/O Error\");\n }\n } else {\n System.out.println(\"Enter a filename:\");\n }\n }", "@JsonSetter(\"fileContent\")\r\n public void setFileContent (String value) { \r\n this.fileContent = value;\r\n }", "public void setFile(File file) {\n this.file = file;\n }", "public void set(String keyInput, String valueInput) {\n\t\tfileData.put(keyInput, valueInput);\n\t\ttry {\n\t\t\twriteToFile();\n\t\t}\n\t\tcatch (IOException anything) {\n\t\t\tSystem.out.println(\"Couldn't write to file \" + path + \". Error: \" + anything.getMessage());\n\t\t}\n\t}", "public void setFile(File file) {\n this.path = file != null ? file.toPath() : null;\n }", "public static void createSubmissionFile(String fileName, String submissionString){\n //Todo\n\n try {\n String path=\"./output_files/\";\n File outputFile;\n outputFile = new File(path, fileName + \".out\");\n\n OutputStream fou = new FileOutputStream(outputFile);\n byte[] data = submissionString.getBytes();\n fou.write(data);\n fou.flush();\n fou.close();\n\n\n\n } catch (Exception ex) {\n ex.printStackTrace();\n\n }\n }", "public static void writeFile(String outFile, String text) {\n try{\n FileWriter fileWriter = new FileWriter(outFile,false);\n PrintWriter pw = new PrintWriter(fileWriter,true);\n \n if (text==null) {\n pw.println();\n }\n else\n {\n pw.println(text);\n }\n \n pw.close();\n fileWriter.close();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void setFile(IFile file) {\n _file = file;\n }", "public void setFileName(String fileName) {\n/* 39:39 */ this.fileName = fileName;\n/* 40: */ }", "public static void ConvertToString() {\n\t\t_asmFileStr = _asmFile.toString();\n\t\t_asmFileStr = _asmFileStr.substring(0, _asmFileStr.lastIndexOf('.'));\n\t}", "public static void setFile(File file) {\r\n CONFIG_FILE = file;\r\n }", "void setFilePath(Path filePath);", "@Override\n public void setSaveFile(File file)\n {\n \n }", "String savedFile();", "public void setOutput(File file){\n outputDir = file;\n }", "public void save(){\n\tif(currentFile == null){\n\t // TODO: add popup to select where to save file and file name\n\t // currentFile = new TextFile(os, title, null);\n\t}else{\n\t currentFile.setBody(textArea.getText());\n\t}\n }", "public static void writeStringToFile(File file, String data)\n throws IOException {\n FileUtils.writeStringToFile(file, data, Charset.forName(\"utf-8\"));\n }", "String prepareFile();", "public void writeToFile(File file) {\n\n\t}", "public void setOutputFile(File out) {\n rnaFile = out;\n }", "void setLogFile(File log);", "public void setFile(String file) {\n fileName = file;\n if (isHTTP(fileName)) {\n fileType = HTTP;\n } else {\n fileType = LOCAL;\n }\n }", "@Override\n public void write(String str) {\n BufferedWriter writer;\n try {\n String path = FileManager.getInstance().getPath();\n writer = new BufferedWriter(new FileWriter(path, true));\n writer.write(str);\n writer.newLine();\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void writeChachedFile(Context ctx, String filename, String text){\n \t\t// write data to file\n \t\tFileOutputStream fos;\n \t\ttry {\n \t\t\tfilename = filePrefix + filename;\n \t\t\tfos = ctx.openFileOutput(filename, Context.MODE_PRIVATE);\n \t\t\tfos.write(text.getBytes());\t\t\t\n \t\t} catch (FileNotFoundException e) {\n \t\t} catch (IOException e) {}\n \t}", "public void setFileName(String filename)\n\t{\n\t\tsuper.setFileName(filename);\n\t\t\n\t\t//#CM702602\n\t\t// Generate the path name of Working data File. \n\t\tworkingDataFileName = wFileName.replaceAll(\"\\\\\\\\send\\\\\\\\\", \"\\\\\\\\recv\\\\\\\\\");\n\t}", "public static void writeString(String path, String content) {\n //Open file\n Path jPath = Paths.get(path);\n\n //Create file if necessary\n if (!Files.exists(jPath, LinkOption.NOFOLLOW_LINKS)) {\n try {\n Files.createFile(jPath);\n } catch (IOException ex) {\n System.out.print(ex);\n System.exit(1);\n }\n }\n\n //Error if not writable\n if (!Files.isWritable(jPath)) {\n System.out.println(\"File \" + jPath + \" could not be written!\");\n System.exit(1);\n }\n //Write lines\n try {\n Files.write(jPath, content.getBytes(Charset.forName(\"UTF-8\")));\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "public void write(String filename, String text) {\n\n try (FileWriter writer = new FileWriter(filename)) {\n writer.write(text);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void saveToFile(String file) throws IOException {\n if (file == null) {\n throw new IllegalArgumentException(\"file may not be null\");\n }\n \n save(new File(file));\n }", "private void writeToFile(final String data, final File outFile) {\n try {\n FileOutputStream foutStream = new FileOutputStream(outFile);\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(foutStream);\n outputStreamWriter.write(data);\n outputStreamWriter.close();\n foutStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "public static void setIO(String inFile, String outFile)\r\n\r\n\t// Opens the input file \"inFile\" and output file \"outFile.\"\r\n\t// Sets the current input character \"current\" to the first character on the input stream.\r\n\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tinStream = new BufferedReader( new FileReader(inFile) ); //Set the BufferedReader to read from \"inFile.\"\r\n\t\t\toutStream = new PrintWriter( new FileOutputStream(outFile) ); //Set PrintWriter to write to the output file \"outFile.\"\r\n\t\t\tcurrent = inStream.read(); //Set current to the first character in the file.\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e) //Output error message if input or output files cannot be found.\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void saveFile(File file, String text) {\r\n\t\t\r\n\t\tif (file==null){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\r\n\t\ttry (BufferedWriter bw = new BufferedWriter(new FileWriter(file))) {\r\n\r\n\t\t\tbw.write(text);\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}", "public static void writeToFile(String s, String dir, String filename) {\n writeToFile(s, dir + filename);\n }", "void writeText(FsPath path, String text);", "public abstract String FileOutput();" ]
[ "0.67750585", "0.6601509", "0.6471424", "0.6383421", "0.63378376", "0.6196921", "0.6194981", "0.6130737", "0.6114381", "0.60346985", "0.6001567", "0.5987048", "0.5954357", "0.59404236", "0.5924825", "0.59111106", "0.58934706", "0.5881161", "0.5878644", "0.58705425", "0.58623964", "0.5859533", "0.5820968", "0.5818583", "0.5811492", "0.57981926", "0.5794016", "0.57835823", "0.5775299", "0.57720506", "0.576929", "0.5734636", "0.5732955", "0.5725977", "0.57111233", "0.5703912", "0.5701685", "0.5695744", "0.567614", "0.5658737", "0.5644553", "0.5635384", "0.56342494", "0.5632233", "0.5612519", "0.56029487", "0.5600998", "0.5597486", "0.5588213", "0.5582308", "0.55681396", "0.5538385", "0.5530198", "0.5524069", "0.5520423", "0.5519243", "0.5498968", "0.5489999", "0.5487086", "0.54827225", "0.54809374", "0.5480802", "0.54805", "0.54783714", "0.54686195", "0.54556555", "0.54525566", "0.5425809", "0.5424081", "0.5422563", "0.542112", "0.5419087", "0.541664", "0.5411178", "0.5398222", "0.53923523", "0.53909165", "0.5385902", "0.5384167", "0.53786784", "0.5375161", "0.5374525", "0.5372507", "0.537081", "0.5367561", "0.5363166", "0.53613275", "0.53465575", "0.53451246", "0.5341098", "0.53376263", "0.53215474", "0.5317047", "0.53143495", "0.5310613", "0.53073955", "0.53061986", "0.53042644", "0.5300195", "0.52974415", "0.5295028" ]
0.0
-1
Creates an ArrayList of type Integer.
public ArrayList<String> readFromFile(){ ArrayList<String> results = new ArrayList<>(); //Wrap code in a try/ catch to help with exception handling. try{ //Create a object of Scanner class Scanner s = new Scanner(new FileReader(path)); //While loop for iterating thru the file. // Reads the data and adds it to the ArrayList. while(s.hasNext()) { String c1 = s.next(); String c2 = s.next(); String w = s.next(); results.add(c1); results.add(c2); results.add(w); }return results; }//File not found exception block. catch(FileNotFoundException e){ System.out.println(e); } return results;//default return. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ArrayList<Integer> makeListOfInts() {\n ArrayList<Integer> listOfInts = new ArrayList<>(Arrays.asList(7096, 3, 3924, 2404, 4502,\n 4800, 74, 91, 9, 7, 9, 6790, 5, 59, 9, 48, 6345, 88, 73, 88, 956, 94, 665, 7,\n 797, 3978, 1, 3922, 511, 344, 6, 10, 743, 36, 9289, 7117, 1446, 10, 7466, 9,\n 223, 2, 6, 528, 37, 33, 1616, 619, 494, 48, 9, 5106, 144, 12, 12, 2, 759, 813,\n 5156, 9779, 969, 3, 257, 3, 4910, 65, 1, 907, 4464, 15, 8685, 54, 48, 762, 7952,\n 639, 3, 4, 8239, 4, 21, 306, 667, 1, 2, 90, 42, 6, 1, 3337, 6, 803, 3912, 85,\n 31, 30, 502, 876, 8686, 813, 880, 5309, 20, 27, 2523, 266, 101, 8, 3058, 7,\n 56, 6961, 46, 199, 866, 4, 184, 4, 9675, 92));\n\n return listOfInts;\n }", "public void genericIntegerArray() {\n\t\tArrayList<Integer> a1 = new ArrayList<Integer>();\n\t\ta1.add(20);\n\t\ta1.add(11);\n\t\tSystem.out.println(\"Integer generic ArrayList a1: \" + a1);\n\n\t}", "public static IntArrayList from(int... elements) {\n final IntArrayList list = new IntArrayList(elements.length);\n list.add(elements);\n return list;\n }", "public static ArrayList<Integer> createList(int listSize) {\n ArrayList<Integer> list = new ArrayList<>();\n for (int i = 0; i < listSize; i++) {\n list.add(i);\n }\n return list;\n }", "public IntegerList(int size)\n {\n list = new int[size];\n }", "public static List<Integer> getIntegerList(){\n List<Integer> nums = new ArrayList<>();//ArrayList<Integer> list = new ArrayList<>();\n for(int i=0;i<=1_000_000;i++) {\n nums.add(i);\n }\n return nums;\n }", "public IntegerList(int size)\n {\n list = new int[size];\n }", "private void intListToArrayList(int[] list, ArrayList<Integer> arrayList){\n for(int integer: list){\n arrayList.add(integer);\n }\n }", "public static List<Integer> asList(int[] array) {\n\t\treturn new IntList(array);\n\t}", "public abstract ArrayList<Integer> getIdList();", "public IntArrayList() {\n this(DEFAULT_EXPECTED_ELEMENTS);\n }", "public static List<Integer> getIntegerList(int size) {\n return integerLists.computeIfAbsent(size, createSize -> {\n List<Integer> newList = new ArrayList<>(createSize);\n for (int i = 0; i < createSize; i++)\n newList.add(i);\n return newList;\n });\n }", "public static ArrayList<Integer> ArraytoArrayList(int [] arr){\n ArrayList<Integer> list = new ArrayList<>();\n return list;\n }", "public static ImmutableIntList of() {\n return EMPTY;\n }", "public ArrayListInt(int cantidadDeNumerosDelArray)\n {\n numerosEnteros = new int[cantidadDeNumerosDelArray];\n tamañoDelArray = cantidadDeNumerosDelArray;\n }", "public int[] getIntList();", "public static IntArrayList constant(int size, int value) {\n IntArrayList result = new IntArrayList(size);\n Arrays.fill(result.buffer, value);\n result.elementsCount = size;\n return result;\n }", "public static IntArrayList zero(int size) {\n IntArrayList result = new IntArrayList(size);\n result.elementsCount = size;\n return result;\n }", "public static List<Integer> asList(int[] a) {\n assert (a != null);\n List<Integer> ret = new ArrayList<>(a.length);\n for (int e : a)\n ret.add(e);\n return ret;\n }", "private ArrayIntList buildList(int size) {\n\t\tArrayIntList list = new ArrayIntList();\n\t\tfor (int i=1;i<=size;i++)\n\t\t\tlist.add(i);\n\t\treturn list; \n\t}", "public IntList(int size){\n\t\tprime = new ArrayList<Integer>(size);\n\t}", "java.util.List<java.lang.Integer> getItemsList();", "public NestedInteger() {\n\t\tthis.list = new ArrayList<>();\n\t}", "public static int[] convertIntegers(ArrayList<Integer> Y_list) {\r\n\t int[] Y = new int[Y_list.size()];\r\n\t Iterator<Integer> iterator = Y_list.iterator();\r\n\t for (int i = 0; i < Y.length; i++)\r\n\t {\r\n\t Y[i] = iterator.next().intValue();\r\n\t }\r\n\t return Y;\r\n\t}", "public ArrayIntList(int capacity) {\n\t if (capacity < 0) {\n\t throw new IllegalArgumentException(\"capacity: \" + capacity);\n\t }\n\t elementData = new int[capacity];\n\t size = 0;\n\t }", "public NestedInteger() {\n this.list = new ArrayList<>();\n }", "public static <T> ArrayList<T> createArrayList() {\n \t\treturn new ArrayList<T>();\n \t}", "public static ArrayList<Integer> randomIntegerList(int size, int range)\n {\n ArrayList<Integer> list = new ArrayList<Integer>();\n //int size = list.size();\n \n /*\n * The add method adds the specified object to the end of the list\n * \n * Autoboxing:\n * Primitve values are automatically converted to the \n * wrapper class. However, the type promotion\n * does not occur.\n */\n for (int i = 0; i<size; i++)\n {\n int value = (int)(Math.random() * range) +1;\n list.add(value);\n }\n \n return list;\n }", "@NonNull\n static IntConsList<Integer> intList(@NonNull int... elements) {\n IntConsList<Integer> cons = nil();\n for (int i = elements.length - 1; i >= 0; i--) {\n cons = new IntConsListImpl(elements[i], cons);\n }\n return cons;\n }", "public MyArrayList(int i) {\n if(i <= 0) {\n System.out.println(\"Negative number given please try again\");\n return;\n }\n\n this.arrayList = new Object[i];\n this.elementsInArray = 0;\n this.size = i;\n }", "public List<Integer> getIntegerList(final String key) {\n return getIntegerList(key, new ArrayList<>());\n }", "private void add(int i) {\n\tArrayList<Integer>ar1= new ArrayList<Integer>();\t\n\tar1.add(100);\n\tar1.add(60);\n\tar1.add(70);\n\tSystem.out.println(ar1.size());\n\t}", "public static ImmutableIntList identity(int count) {\n final int[] integers = new int[count];\n for (int i = 0; i < integers.length; i++) {\n integers[i] = i;\n }\n return new ImmutableIntList(integers);\n }", "private ImmutableIntList(int... ints) {\n this.ints = ints;\n }", "public ArrayListOfIntsWritable()\n {\n super();\n }", "public abstract ArrayList<Integer> getSudokuNumbersList();", "private List<Integer> toList(int[] array) {\n List<Integer> list = new LinkedList<Integer>();\n for (int item : array) {\n list.add(item);\n }\n return list;\n }", "public ArrayList<Item> createArrayList(int items) {\n\t\tArrayList<Item> array = new ArrayList<Item>();\n\t\tfor (int i=0;i<items;i++) {\n\t\t\t\n\t\t\tItem item = genItem(i,items);\n\t\t\tarray.add(item);\n\t\t}\n\t\t\n\t\t\n\t\treturn array;\n\t\t\n\t}", "OrderedIntList(int size)\n\t{\n\t\tdata = new int[size];\n\t\tcount = 0;\n\t}", "public NestedInteger() {\n this.nestedIntegers = new ArrayList<>();\n }", "public NumericObjectArrayList() {\r\n list = new Copiable[10];\r\n count = 0;\r\n }", "private MyIntegerList generatedPopulatedList() {\n final MyIntegerList mil = new MyIntegerList();\n\n mil.push(1);\n mil.push(2);\n mil.push(1);\n mil.push(6);\n mil.push(6);\n mil.push(7);\n mil.push(2);\n mil.push(2);\n mil.push(0);\n mil.push(5);\n\n return mil;\n }", "public List<BigInteger> convertIntegerList(List<Integer> alist){\n\t\tList<BigInteger> blist = new ArrayList<BigInteger>(alist.size());\n\t\tfor(int i=0; i < alist.size(); i++){\n\t\t\tblist.add( BigInteger.valueOf( alist.get(i).intValue() ) );\n\t\t}\n\t\t\n\t\treturn blist;\n\t}", "OrderedIntList ()\r\n\t{\r\n\t\tarray = new int[10];\r\n\t}", "java.util.List<java.lang.Integer> getItemList();", "private List<Integer> makeList(int max) {\n List<Integer> myList = new ArrayList<>();\n for (int i = 1; i < max; i++) {\n myList.add(i);\n }\n \n return myList;\n }", "public ArrayList()\n {\n list = new int[SIZE];\n length = 0;\n }", "public static ArrayListOfIntsWritable fromArrayListOfInts(ArrayListOfInts a)\n {\n ArrayListOfIntsWritable list = new ArrayListOfIntsWritable();\n list.array = Arrays.copyOf(a.getArray(), a.size());\n list.size = a.size();\n\n return list;\n }", "public List<Integer> getList() {\n return list;\n }", "public IntList() { // doesn't HAVE to be declared public, but doesn't hurt\n theList = new int[STARTING_SIZE];\n size = 0;\n }", "public static void main(String[] args) {\n int[] myIntArray = new int[10]; // int array\n String[] myStringArray = new String[10]; // String array\n\n ArrayList<String> myStringArrayList = new ArrayList<String>(); // String ArrayList\n myStringArrayList.add(\"Peti\");\nclass IntClass {//create an integer class is a lots of code !! use built in function!\n private int integer;\n\n public IntClass(int integer) {\n this.integer = integer;\n }\n\n public int getInteger() {\n return integer;\n }\n\n public void setInteger(int integer) {\n this.integer = integer;\n }\n}\n //ArrayList<int> intArraylist = new ArrayList<int>();\n //this is cannot work because arrayList only can accept objects not primitive types!\n ArrayList<IntClass> intArraylist = new ArrayList<IntClass>();\n intArraylist.add(new IntClass(12)); // too long and messy solution !\n //built in classes !!\n Integer integer = new Integer(12);\n Double doubleValue = new Double(10.34);\n\n ArrayList<Integer> intArrayList = new ArrayList<Integer>();\n for (int i = 0; i<=10; i++){\n intArrayList.add(Integer.valueOf(i)); // this is autoboxing to convert an int to an Integer\n }\n for (int i = 0; i<=10; i++){\n System.out.println(i + \" --> \" + intArrayList.get(i).intValue()); //this is unboxing to convert the Integer value back into an int !!\n }\n //shorter version to doing this becasue Java know this automatically and do it on the background\n Integer myIntValue = 56; //Integer.valueOf(56);\n int myInt = myIntValue; // myIntValue.getValue();\n\n //annother example for auto and unboxing !!\n ArrayList<Double> doubleList = new ArrayList<Double>();\n for (double dbl = 0.0; dbl <= 10.0; dbl+=0.5){\n doubleList.add(dbl); //doubleList.add(Double.valueOf(dbl));\n }\n\n for (int i = 0; i<doubleList.size();i++){\n double value = doubleList.get(i); //double value = doubleList.get(i).doubleValue();\n System.out.println(i + \" --> \" + value);\n }\n\n\n\n\n\n\n\n }", "java.util.List<java.lang.Integer> getListSnIdList();", "@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }", "private int[] arrayListToIntList(ArrayList<Integer> arrayList){\n int[] list=new int[arrayList.size()];\n for(Integer integer:arrayList){\n list[arrayList.indexOf(integer)]=integer;\n }\n return list;\n }", "public static void convert (int arr[])\r\n\t{\n\t\tArrayList l = new ArrayList ();\r\n\t\t//loop and add element \r\n\t\tfor (int i = 0 ;i<arr.length ; i++) \r\n\t\t{\r\n\t\t\t// index element\r\n\t\t\t// | |\r\n\t\t\tl.add( i , arr[i] );\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// ouput l element \r\n\t\tSystem.out.println(l);\r\n\t}", "public IntArrayList(int expectedElements) {\n this(expectedElements, new BoundedProportionalArraySizingStrategy());\n }", "public List<Integer> getRowAsList(int i){\n\t\tList<Integer> row = new ArrayList<Integer>(size*size);\n\t\tfor (int j = 0; j < size*size; j++){\n\t\t\trow.add(numbers[i][j]);\n\t\t}\n\t\treturn row;\n\t}", "public int[] toIntArray()\r\n {\r\n int[] a = new int[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = (Integer) vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "public List<Integer> generateList(int size){\n List<Integer> data = new ArrayList<>();\n for (int i = 0; i < size; i++){\n data.add(i);\n }\n return data;\n }", "public static int[] convertIntegersToArray(List<Integer> integers){\n \n \tint[] newArray = new int[integers.size()]; \n \tIterator<Integer> iterator = integers.iterator(); // Declare and create iterator on integers arraylist.\n \n for (int i = 0; i < newArray.length; i++){\n newArray[i] = iterator.next().intValue(); // add elements to newArray \n }\n \n return newArray;\n }", "public ImmutableIntList appendAll(Iterable<Integer> list) {\n if (list instanceof Collection && ((Collection) list).isEmpty()) {\n return this;\n }\n return ImmutableIntList.copyOf(Iterables.concat(this, list));\n }", "public ArrayListOfIntsWritable(int initialCapacity)\n {\n super(initialCapacity);\n }", "public ArrayList<Integer> getNumeros(){\r\n\t\treturn numeros;\r\n\t}", "public static void main(String[] args) {\n\t\tArrayList <Integer> numList = new ArrayList <>();\n\t\t\n\t\t//numList.add(Integer.parseInt(\"12\"));\n\t\t\n\t\t//ADDING ITEM\n\t\t//We call add method from ArrayList class\n\t\tInteger i = 100; //autoboxing to Integer Object\n\t\tnumList.add(i);\n\t\tnumList.add(200);\n\t\t\n\t\tSystem.out.println(numList);\n\t\t\n\t\t//GETTING SINGLE ITEM FROM ARRAY ARRAYLIST\n\t\tint i2 = numList.get(0); //auto unboxing happens here\n\t\t\n\t\tSystem.out.println(i2);\n\t\tSystem.out.println(numList.get(1)); //It is a method returns a value\n\t}", "int[] getInts();", "private List<Integer> createData() {\r\n\t\tList<Integer> data = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "private ArrayList<Integer> fillDomain() {\n ArrayList<Integer> elements = new ArrayList<>();\n\n for (int i = 1; i <= 10; i++) {\n elements.add(i);\n }\n\n return elements;\n }", "public static void convertIntArrayToList() {\n\t\tint[] inputArray = { 0, 3, 7, 1, 7, 9, 11, 6, 3, 5, 2, 13, 14 };\n\n\t\t// ********** 1 *************\n\t\tList<Integer> list = Arrays.stream(inputArray) // IntStream\n\t\t\t\t.boxed() // Stream<Integer>\n\t\t\t\t.collect(Collectors.toList());\n\t\tSystem.out.println(list);\n\n\t\t// ********** 2 *************\n\t\tList<Integer> list_2 = IntStream.of(inputArray) // returns IntStream\n\t\t\t\t.boxed().collect(Collectors.toList());\n\t\tSystem.out.println(list_2);\n\t}", "static List<Integer> arrayToList(int[] array) {\r\n List<Integer> list = new ArrayList<Integer>();\r\n for(int i : array)\r\n list.add(i);\r\n return list;\r\n }", "public ArrayList() {\n\t\tthis(10, 75);\n\t}", "public ArrayList() {\n arr = (T[]) new Object[10];\n size = 0;\n }", "public ArrayListOfIntsWritable(int[] arr)\n {\n super(arr);\n }", "public List<Integer> getAsIntegerList(String itemName, List<Integer> defaultValue);", "public TestFListInteger() {\n // an empty constructor since this class is just used for testing.\n }", "public static List<Integer> prepareRandomIntegeArrayList(int size) {\n\t\tList<Integer> arrayList = new ArrayList<>(size);\n\t\tfor (int j = 0; j < size; j++) {\n\t\t\tarrayList.add(j, (int) ((Math.random() * 1000000)));\n\t\t}\n\t\treturn arrayList;\n\t}", "public IntegerSet() {\n elements = new int[MAX_SIZE];\n size = 0;\n }", "public static IntArrayList iota(int size) {\n return range(0, size);\n }", "static void q2(){\n\t\tArrayList<Integer>myList=new ArrayList<>();\n\t\t\n\t}", "@Override\n public IntArrayList clone() {\n try {\n /* */\n final IntArrayList cloned = (IntArrayList) super.clone();\n cloned.buffer = buffer.clone();\n return cloned;\n } catch (CloneNotSupportedException e) {\n throw new RuntimeException(e);\n }\n }", "@Test\n public void testAdd_int_GenericType() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n int expResult = 8;\n instance.add(2, 9);\n assertEquals(expResult, instance.size());\n }", "public ImmutableIntList append(int element) {\n if (ints.length == 0) {\n return of(element);\n }\n final int[] newInts = Arrays.copyOf(this.ints, ints.length + 1);\n newInts[ints.length] = element;\n return new ImmutableIntList(newInts);\n }", "public List<Integer> convertBigIntegerList(List<BigInteger> alist){\n\t\tList<Integer> blist = new ArrayList<Integer>(alist.size());\n\t\tfor(int i=0; i < alist.size(); i++){\n\t\t\tif(alist.get(i)!=null)\n\t\t\t{\n\t\t\tblist.add( new Integer( alist.get(i).intValue() ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn blist;\n\t}", "public Value(int i) {\n integer = i;\n itemClass = Integer.class;\n type = DataType.INT;\n }", "public static ArrayList<Integer> obtenerArregloInteger(String[] arreglo) {\n\t\tArrayList<Integer> datos = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < arreglo.length; i++) {\n\t\t\tdatos.add(Integer.valueOf(arreglo[i]));\n\t\t}\n\t\treturn datos;\n\t}", "public static void main(String[] args) {\n List<Integer> id = new ArrayList<>();\r\n for(int i=0 ; i<=10 ;i++){\r\n \t id.add(i);\r\n }\r\n System.out.println(id);\r\n\t}", "public ArrayList<Integer> makeIndividual();", "public MutableInt() {}", "public SimpleArrayList(int size) {\n this.values = new Object[size];\n }", "public static List<Integer> posList() {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tlist.add(1);\n\t\tlist.add(22);\n\t\tlist.add(93);\n\t\tlist.add(1002);\n\t\tlist.add(0);\n\t\treturn list;\n\t}", "public void initializeNestedArrayList() {\n List<List<Integer>> list = new ArrayList<List<Integer>>();\n }", "public void addElement(Integer elem){\n\t\tlist.add(elem);\n\t}", "public IntArrays()\n\t{\n\t\tthis(10);\n\t}", "public static IntegerVarArray make(int count) {\n\t\treturn new IntegerVarArray(count);\n\t}", "java.util.List<java.lang.Integer> getStatusList();", "public NestedInteger(int value) {\n this.value = value;\n this.list = new ArrayList<>();\n\n }", "List<Integer> fromScannerInput() throws IOException {\n\t\tfinal List<Integer> array = new ArrayList<>();\n\t\twhile (scanner.hasNext()) {\n\t\t\tarray.add(\n\t\t\t\t\tInteger.parseInt(\n\t\t\t\t\t\t\tscanner.next()));\n\t\t}\n\t\treturn array;\n\t}", "public NativeIntegerObjectArrayImpl()\n {\n }", "public java.util.List<java.lang.Integer>\n getDataList() {\n return java.util.Collections.unmodifiableList(data_);\n }", "public IntArrayList(int expectedElements, ArraySizingStrategy resizer) {\n assert resizer != null;\n this.resizer = resizer;\n ensureCapacity(expectedElements);\n }", "List() {\n final int ten = 10;\n list = new int[ten];\n size = 0;\n }", "public java.util.List<java.lang.Integer>\n getItemsList() {\n return java.util.Collections.unmodifiableList(items_);\n }" ]
[ "0.7581512", "0.72694826", "0.6925709", "0.6777982", "0.6725875", "0.66727704", "0.66163343", "0.65800905", "0.6578389", "0.65633667", "0.65587413", "0.653404", "0.6481108", "0.6440199", "0.6438081", "0.64366204", "0.64086354", "0.6387915", "0.63776225", "0.6352716", "0.633873", "0.6321395", "0.6227094", "0.6209155", "0.61950684", "0.6183289", "0.6176357", "0.6171098", "0.6169448", "0.61336", "0.6117663", "0.6110198", "0.6105802", "0.609289", "0.60912347", "0.6068228", "0.606364", "0.60490996", "0.6028679", "0.60278875", "0.60257757", "0.60238194", "0.6015632", "0.60152453", "0.59981966", "0.5994349", "0.59800524", "0.5946401", "0.594613", "0.5910373", "0.59085417", "0.5903581", "0.5898823", "0.58922726", "0.58878154", "0.58844256", "0.58793676", "0.5848348", "0.5843294", "0.5829548", "0.57992756", "0.5794253", "0.5758419", "0.573968", "0.5735462", "0.5724642", "0.56984204", "0.56831205", "0.56517917", "0.5651562", "0.5651433", "0.56306785", "0.5625598", "0.56200075", "0.558386", "0.5580697", "0.55745596", "0.5566684", "0.55609876", "0.5555865", "0.5544713", "0.5531808", "0.5523321", "0.55189455", "0.55131614", "0.5513142", "0.55063534", "0.5466581", "0.5460541", "0.54591113", "0.54531854", "0.54451805", "0.5439585", "0.5437214", "0.54326636", "0.5431849", "0.5430748", "0.54292685", "0.5422639", "0.54185104", "0.54103035" ]
0.0
-1
write your code here
public static void main(String[] args) { System.out.println("hola la concha de tu madre"); Persona persona1 = new Persona("allan",28,19040012); Persona persona2 = new Persona("federico", 14,40794525); Persona persona3 = new Persona("pablito", 66,56654456); List<Persona> personas= new ArrayList<Persona>(); personas.add(persona1); personas.add(persona2); personas.add(persona3); System.out.println("--------Para imprimir la list completa--------"); System.out.println(String.format("Personas: %s",personas)); System.out.println("----------MAYORES A 21-------------"); // mayores a 21 System.out.println(String.format("Mayores a 21: %s",personas.stream() .filter(persona->persona.getEdad() > 21) .collect(Collectors.toList()))); System.out.println("-----------MENORES A 18-------------------"); // menores 18 System.out.println(String.format("menores 18: %s",personas.stream() .filter(persona->persona.getEdad() < 18) .collect(Collectors.toList()))); System.out.println("---------MAYORES A 21 + DNI >20000000 -------------------"); System.out.println(String.format("MAYORES A 21 + DNI >20000000: %s",personas.stream() .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000) //.filter( persona->persona.getDni() >20000000) // tambien funciona con este .collect(Collectors.toList()))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logic(){\r\n\r\n\t}", "public static void generateCode()\n {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void ganar() {\n // TODO implement here\n }", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "CD withCode();", "private stendhal() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void baocun() {\n\t\t\n\t}", "public void mo38117a() {\n }", "public void furyo ()\t{\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "public void themesa()\n {\n \n \n \n \n }", "Programming(){\n\t}", "@Override\n\tvoid output() {\n\t\t\n\t}", "private void yy() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }", "private void kk12() {\n\n\t}", "public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "public static void main(String[] args) {\n\t// write your code here\n }", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}", "protected void mo6255a() {\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public void working()\n {\n \n \n }", "@Override\n\tprotected void postRun() {\n\n\t}", "public void perder() {\n // TODO implement here\n }", "public void smell() {\n\t\t\n\t}", "protected void execute() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void orgasm() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void interr() {\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "protected void execute() {\n\n\n \n }", "@Override\n public void execute() {\n \n \n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "protected void display() {\n\r\n\t}", "private void sout() {\n\t\t\n\t}", "private static void oneUserExample()\t{\n\t}", "public void nhapdltextlh(){\n\n }", "public void miseAJour();", "protected void additionalProcessing() {\n\t}", "private void sub() {\n\n\t}", "@Override\n\tpublic void view() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}", "@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}", "void mo67924c();", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }", "public void mo5382o() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void mo3376r() {\n }", "public static void main(String[] args)\r\n {\n System.out.println(\"Mehedi Hasan Nirob\");\r\n //multiple line comment\r\n /*\r\n At first printing my phone number\r\n then print my address \r\n then print my university name\r\n */\r\n System.out.println(\"01736121659\\nJamalpur\\nDhaka International University\");\r\n \r\n }", "void kiemTraThangHopLi() {\n }", "public void skystonePos5() {\n }", "public final void cpp() {\n }", "public final void mo51373a() {\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"This is the main class of this project\");\r\n\t\tSystem.out.println(\"how about this\");\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"new push\");\r\n\r\n\t\t//how to update this line\r\n\t\t\r\n\t\tSystem.out.println(\"hello there\");\r\n\r\n\t\tSystem.out.println(\"zen me shuoXXXXXXXXXXXKKKKkKKKKKKXXXXXXXX\");\r\n\r\n\t\tSystem.out.println(\"eventually we succeeded!\");\r\n\t\t//wa!!!\r\n\t\t\r\n\r\n\r\n\t\t//hen shu fu !\r\n\t\t\r\n\t\t//it is a good day\r\n\t\t\r\n\t\t//testing\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"hope it works\");\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}" ]
[ "0.61019534", "0.6054925", "0.58806974", "0.58270746", "0.5796887", "0.56999695", "0.5690986", "0.56556827", "0.5648637", "0.5640487", "0.56354505", "0.56032085", "0.56016207", "0.56006724", "0.5589654", "0.5583692", "0.55785793", "0.55733466", "0.5560209", "0.55325305", "0.55133164", "0.55123806", "0.55114794", "0.5500045", "0.5489272", "0.5482718", "0.5482718", "0.5477585", "0.5477585", "0.54645246", "0.5461012", "0.54548836", "0.5442613", "0.5430592", "0.5423748", "0.5419415", "0.5407118", "0.54048806", "0.5399331", "0.539896", "0.5389593", "0.5386248", "0.5378453", "0.53751254", "0.5360644", "0.5357343", "0.5345515", "0.53441405", "0.5322276", "0.5318302", "0.53118485", "0.53118485", "0.53085434", "0.530508", "0.53038436", "0.5301922", "0.5296964", "0.52920514", "0.52903354", "0.5289583", "0.5287506", "0.52869135", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.52859664", "0.52849185", "0.52817136", "0.52791214", "0.5278664", "0.5278048", "0.5276269", "0.52728665", "0.5265451", "0.526483", "0.526005", "0.5259683", "0.52577406", "0.5257731", "0.5257731", "0.52560073", "0.5255759", "0.5255707", "0.5250705", "0.5246863", "0.5243053", "0.52429926", "0.5242727", "0.52396125", "0.5239378", "0.5232576", "0.5224529", "0.52240705", "0.52210563", "0.52203166", "0.521787", "0.52172214" ]
0.0
-1
Use this program and set up the uniform variables for binding
protected void begin() { glUseProgram(programID); shadUniLoc.put(UNIFORM_TRANS, glGetUniformLocation(programID, UNIFORM_TRANS)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init () {\n\t\tshaderProgram.addUniform(TEXTURE_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(SCALING_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(TRANSLATION_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(POSITION_UNIFORM_KEY);\n\t}", "protected abstract void initializeUniforms();", "public void init() {\n createVertexShader(vertexShader(true));\n createFragmentShader(fragShader.SHADER_STRING);\n\n /* Binds the code and checks that everything has been done correctly. */\n link();\n\n createUniform(\"worldMatrix\");\n createUniform(\"modelMatrix\");\n createUniform(\"normalMatrix\");\n\n /* Initialization of the shadow map matrix uniform. */\n createUniform(\"directionalShadowMatrix\");\n\n /* Create uniform for material. */\n createMaterialUniform(\"material\");\n createUniform(\"texture_sampler\");\n /* Initialization of the light's uniform. */\n createUniform(\"camera_pos\");\n createUniform(\"specularPower\");\n createUniform(\"ambientLight\");\n createPointLightListUniform(\"pointLights\", LightModel.MAX_POINTLIGHT);\n createSpotLightUniformList(\"spotLights\", LightModel.MAX_SPOTLIGHT);\n createDirectionalLightUniform(\"directionalLight\");\n createUniform(\"shadowMapSampler\");\n createUniform(\"bias\");\n }", "public void bind()\r\n\t{\r\n\t\tVector3f color;\r\n\r\n\t\tcolor = ambient;\r\n\t\tglColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT);\r\n\t\tglColor4f(color.x, color.y, color.z, transparency);\r\n\r\n\t\tcolor = diffuse;\r\n\t\tglColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);\r\n\t\tglColor4f(color.x, color.y, color.z, transparency);\r\n\r\n\t\tcolor = specular;\r\n\t\tglColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR);\r\n\t\tglColor4f(color.x, color.y, color.z, transparency);\r\n\r\n\t\tif (texture != null)\r\n\t\t{\r\n\t\t\ttexture.bind();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tglBindTexture(GL_TEXTURE_2D, 0);\r\n\t\t}\r\n\t}", "protected void updateUniforms()\n\t{\n\t\tsuper.updateUniforms();\n\t\tfor (int i = 0; i < getTexCoordCount(); i++)\n\t\t{\n\t\t\tint loc = shader.getUniformLocation(U_TEXTURE + i);\n\t\t\tif (loc != -1)\n\t\t\t\tshader.setUniformi(loc, i);\n\t\t}\n\t}", "public void begin() {\r\n GL11.glViewport(0, 0, colorTexture.getWidth(), colorTexture.getHeight());\r\n bind();\r\n }", "public void addBinding(int binding, ZEPipelineBindType bindType, int arrayCount, String[] shaderStages);", "public abstract void setUniforms(GameObject gameObject);", "protected void applyTextureUniforms () {\n final boolean wasPendantic = ShaderProgram.pedantic;\n ShaderProgram.pedantic = false; // Allow shaders that don't use all the textures.\n for (int i = 0; i < textureUnitUniforms.length; i++)\n getShader().setUniformi(textureUnitUniforms[i], i);\n ShaderProgram.pedantic = wasPendantic;\n }", "public void initialize() {\r\n upgradeCounter = 0;\r\n upgradeBound = 1;\r\n rectangleSize = 100;\r\n gridSize = 3;\r\n level = 1;\r\n numTargets = 3;\r\n numLives = 3;\r\n numClicked = 0;\r\n rectangles = new ArrayList<>();\r\n columnConstraints = new ColumnConstraints();\r\n rowConstraints = new RowConstraints();\r\n levelText = new SimpleIntegerProperty();\r\n livesText = new SimpleIntegerProperty();\r\n livesText.setValue(numLives);\r\n levelText.setValue(level);\r\n livesLabel.textProperty().bind(livesText.asString());\r\n levelLabel.textProperty().bind(levelText.asString());\r\n }", "@Override\n\tprotected void getAllUniformLocations() {\n\t\tlocation_transformationMatrix = super.getUniformLocation(\"transformationMatrix\");\n\t\tlocation_projectionMatrix = super.getUniformLocation(\"projectionMatrix\");\n\t\tlocation_viewMatrix = super.getUniformLocation(\"viewMatrix\");\n\t\tlocation_outputR = super.getUniformLocation(\"outputR\");\n\t\tlocation_outputG = super.getUniformLocation(\"outputG\");\n\t\tlocation_outputB = super.getUniformLocation(\"outputB\");\n\t\t\n\t}", "public void setup()\n {\n // we use a separate ArrayList to keep track of each animal. \n // our room is 50 x 50.\n creatures = new ArrayList<Creature>();\n for (int i = 0; i < 55; i++) {\n if (i < 5) {\n creatures.add(new Fox((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1)); \n } else {\n creatures.add(new Tux((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1));\n }\n }\n \n env.setRoom(new Room());\n \n // Add all the animals into to the environment for display\n for (Creature c : creatures) {\n env.addObject(c);\n }\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(-63);\n \n // Turn off the default controls\n env.setDefaultControl(false);\n env.setShowController(false);\n \n }", "@Test\n\tpublic void translateInputBindObjCreation() throws Exception {\n\t\tInputBind inputBind = this.createInputBind();\n\t\tBaseUserLibraryTranslator translator = this.getTranslator();\n\t\tString translatedFunction = translator.translateInputBindObjCreation(\n\t\t\t\tclassName, inputBind);\n\t\tST st = new ST(\n\t\t\t\t\"Type <varIn>DataType;\\n\"\n\t\t\t\t\t\t+ \"<varIn> = Allocation.createFromBitmap(PM_mRS, dataVar, Allocation.MipmapControl.MIPMAP_NONE, \"\n\t\t\t\t\t\t+ \"Allocation.USAGE_SCRIPT|Allocation.USAGE_SHARED);\\n\"\n\t\t\t\t\t\t+ \"<varIn>DataType = newType.Builder(PM_mRS, Element.F32_3(PM_mRS))\"\n\t\t\t\t\t\t+ \".setX(<varIn>.getType().getX())\"\n\t\t\t\t\t\t+ \".setY(<varIn>.getType().getY())\"\n\t\t\t\t\t\t+ \".create();\\n\"\n\t\t\t\t\t\t+ \"<varOut> = Allocation.createTyped(PM_mRS, <varIn>DataType);\\n\"\n\t\t\t\t\t\t+ \"<kernel>.forEach_toFloatBitmapImage(<varIn>, <varOut>);\");\n\t\tst.add(\"kernel\", commonDefinitions.getKernelName(className));\n\t\tst.add(\"varIn\", commonDefinitions.getVariableInName(inputBind.variable));\n\t\tst.add(\"varOut\",\n\t\t\t\tcommonDefinitions.getVariableOutName(inputBind.variable));\n\t\tString expectedTranslation = st.render();\n\t\tthis.validateTranslation(expectedTranslation, translatedFunction);\n\t}", "void glUniform1i(int location, int x);", "protected static void setLightUniform(@NotNull Shape shape) {\n\t\tshape.shaderProgram.setUniform2f(\"resolution\", Display.getSizeF());\n\t\tshape.shaderProgram.setUniform3f(\"ambient\", Lights.ambient);\n\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tif (i >= Lights.lights.size()) break;\n\n\t\t\tLight l = Lights.lights.get(i);\n\t\t\tshape.shaderProgram.setUniform2f(\"lights[\"+i+\"].position\", l.getPosition());\n\t\t\tshape.shaderProgram.setUniform3f(\"lights[\"+i+\"].color\", l.getColor());\n\t\t\tshape.shaderProgram.setUniform1f(\"lights[\"+i+\"].intensity\", l.getIntensity());\n\t\t}\n\t}", "public void bind()\n {\n glBindTexture(GL_TEXTURE_2D, texture);\n }", "@Override\n\tpublic void rebind () {\n\t\tsetParams(Param.Texture, u_texture0);\n\t\tsetParams(Param.ViewportInverse, viewportInverse);\n\t\tendParams();\n\t}", "public void d() {\n super.d();\n int glGetUniformLocation = GLES20.glGetUniformLocation(this.x, \"target\");\n GLES20.glActiveTexture(33984);\n GLES20.glBindTexture(3553, this.f1221a);\n GLES20.glUniform1i(glGetUniformLocation, 0);\n int glGetUniformLocation2 = GLES20.glGetUniformLocation(this.x, \"source\");\n GLES20.glActiveTexture(33985);\n GLES20.glBindTexture(3553, this.f1222b);\n GLES20.glUniform1i(glGetUniformLocation2, 1);\n int glGetUniformLocation3 = GLES20.glGetUniformLocation(this.x, \"field\");\n GLES20.glActiveTexture(33986);\n GLES20.glBindTexture(3553, this.c);\n GLES20.glUniform1i(glGetUniformLocation3, 2);\n int glGetUniformLocation4 = GLES20.glGetUniformLocation(this.x, \"source_size\");\n float[] fArr = this.d;\n GLES20.glUniform2f(glGetUniformLocation4, fArr[0], fArr[1]);\n int glGetUniformLocation5 = GLES20.glGetUniformLocation(this.x, \"target_size\");\n float[] fArr2 = this.e;\n GLES20.glUniform2f(glGetUniformLocation5, fArr2[0], fArr2[1]);\n int glGetUniformLocation6 = GLES20.glGetUniformLocation(this.x, \"field_size\");\n float[] fArr3 = this.f;\n GLES20.glUniform2f(glGetUniformLocation6, fArr3[0], fArr3[1]);\n int glGetUniformLocation7 = GLES20.glGetUniformLocation(this.x, \"full_size\");\n float[] fArr4 = this.g;\n GLES20.glUniform2f(glGetUniformLocation7, fArr4[0], fArr4[1]);\n GLES20.glUniform1f(GLES20.glGetUniformLocation(this.x, \"jump\"), this.h);\n GLES20.glUniformMatrix4fv(GLES20.glGetUniformLocation(this.x, \"region\"), 1, false, this.i, 0);\n }", "@Override\n public void setup() {\n int windowWidth = Integer.parseInt(args[1]);\n int windowHeight = Integer.parseInt(args[2]);\n // windowWidth and windowHeight are used as the parameters for the size\n // function\n size (windowWidth,windowHeight);\n \n // The dataValues[] is used to store the indexes of the arg[] minus the\n // first 3 indexes which elements contain the project name, windowWidth\n // & windowHeight\n float dataValues[] = new float[args.length-3];\n // variable to store the largest data value\n float maxValue = 0;\n float normalizeValue [] = new float [dataValues.length];\n // This for loop converts the index elements in to floats\n for(int i =0;i<dataValues.length;i++){\n dataValues[i] = Float.parseFloat(args[3+i]);\n }\n //This for loop compares the elements in the dataValue array to max\n //value variable and stores the highest value in maxValue\n for(int i = 0; i <dataValues.length;i++){\n if (maxValue <= dataValues[i])\n maxValue = dataValues[i];\n }\n // This for loop is used to normalize each element index in the\n // dataValue array\n\n for (int i= 0; i< dataValues.length;i++){\n normalizeValue [i] = dataValues [i]/maxValue;\n\n }\n\n float maxHeight = windowHeight - 20;\n float barWidth = (windowWidth/normalizeValue.length-\n (normalizeValue.length+1));\n // This for loop creates the rectangles and creates random colors for\n // each one\n for (int i = 0; i <normalizeValue.length;i++){\n float barHeight= (maxHeight * normalizeValue[i]);\n float y = maxHeight- barHeight + 20;\n float x = (5+i*barWidth)+(i+1)*5;\n fill(random(255),random(255),random(255));\n rect(x,y,barWidth,barHeight);\n }\n\n for(int i= 1; i<args.length; i++) {\n System.out.println(args[i]);\n }\n }", "int glGetUniformLocation(int program, String name);", "public void bind() {\n if (isTextureLoaded()) {\n glBindTexture(GL_TEXTURE_2D, texId.getId());\n } else {\n System.err.println(\"[Error] texture::bind() Binding a unloaded texture.\");\n }\n }", "public void setUpTextures(int program, GL2 gl2) {\n\t\t// sets the parameters for texture\n\t\tgl2.glGenTextures(1, buffer);\n\t\tgl2.glActiveTexture(gl2.GL_TEXTURE0);\n\t\tgl2.glBindTexture(gl2.GL_TEXTURE_2D,\n\t\t\t\tgl2.glGetUniformLocation(program, \"abc\"));\n\t\tgl2.glTexParameteri(gl2.GL_TEXTURE_2D, gl2.GL_TEXTURE_MIN_FILTER,\n\t\t\t\tgl2.GL_LINEAR);\n\t\tgl2.glTexParameteri(gl2.GL_TEXTURE_2D, gl2.GL_TEXTURE_MAG_FILTER,\n\t\t\t\tgl2.GL_LINEAR);\n\t\tgl2.glTexImage2D(gl2.GL_TEXTURE_2D, 0, gl2.GL_RGBA,\n\t\t\t\tbufferimage.getWidth(), bufferimage.getHeight(), 0,\n\t\t\t\tgl2.GL_BGRA, gl2.GL_UNSIGNED_BYTE, buffer);\n\t}", "private void setUp() {\r\n\tvariables = new Vector();\r\n\tstatements = new Vector();\r\n\tconstraints = new Vector();\r\n\tvariableGenerator = new SimpleVariableGenerator(\"v_\");\r\n }", "@Override\n public void simpleInitApp() {\n configureCamera();\n configureMaterials();\n viewPort.setBackgroundColor(new ColorRGBA(0.5f, 0.2f, 0.2f, 1f));\n configurePhysics();\n initializeHeightData();\n addTerrain();\n showHints();\n }", "@Override\n\tprotected void init() {\n\t\tShaderProgram shaderProgram = new ShaderProgram(\"aufgabe2\");\n\t\tglUseProgram(shaderProgram.getId());\n\t\tfloat [] vertex_data = {\n\t\t\t\t-0.5f,-0.5f,\n\t\t\t\t0.5f,-0.5f,\n\t\t\t\t0.0f,0.5f,\n\t\t};\n\t\tfloat[] frag_data = { 1f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 1f };\n\t\t// Koordinaten, VAO, VBO, ... hier anlegen und im Grafikspeicher ablegen\n\t\tint vaoId = glGenVertexArrays();\n\t\tglBindVertexArray(vaoId);\n\t\tint vboId = glGenBuffers();\n\t\tglBindBuffer(GL_ARRAY_BUFFER, vboId);\n\t\tglBufferData(GL_ARRAY_BUFFER,vertex_data, GL_STATIC_DRAW);\n\t\tglVertexAttribPointer(0, 2, GL_FLOAT,false, 0, 0);\n\t\tglEnableVertexAttribArray(0);\n\t\tint vboId2 = glGenBuffers();\n\t\tglBindBuffer(GL_ARRAY_BUFFER, vboId2);\n\t\tglBufferData(GL_ARRAY_BUFFER,frag_data, GL_STATIC_DRAW);\n\t\tglVertexAttribPointer(1, 3, GL_FLOAT, false, 0, 0);\n\t\tglEnableVertexAttribArray(1);\n\t}", "public void setup(){\n\t\t gl.glEnable(GL.GL_BLEND);\n\t\t gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);\n\t\t for (int i = 0; i< cubes.length; i++){\n\t\t cubes[i] = this.s.new Cube(\n\t\t \t\tMath.round(p.random(-100, 100)), \n\t\t \t\tMath.round(p.random(-100, 100)), \n\t\t \t\t5,//Math.round(random(-100, 100)),\n\t\t \t\tMath.round(p.random(-10, 10)), \n\t\t \t\t\tMath.round(p.random(-10, 10)), \n\t\t\t\t\tMath.round( p.random(-10, 10))\n\t\t );\n\t\t cubRotation[i]=new Vector3D();\n\t\t cubRotationFactor[i]=new Vector3D();\n\t\t cubRotationFactor[i].x = (float)Math.random()/2f;\n\t\t cubRotationFactor[i].y = (float)Math.random()/2f;\n\t\t cubRotationFactor[i].z = (float)Math.random()/2f;\n\t\t \n\t\t cubColor[i]=new Vector3D();\n\t\t cubColor[i].x = (float)Math.random();\n\t\t cubColor[i].y = (float)Math.random();\n\t\t cubColor[i].z = (float)Math.random();\n\t\t }\n\t\t \n\t\t try {\n\t\t\togl.makeProgram(\n\t\t\t\t\t\t\"glass\",\n\t\t\t\t\t\tnew String[] {},\n\t\t\t\t\t\tnew String[] {\"SpecularColor1\",\"SpecularColor2\",\"SpecularFactor1\",\"SpecularFactor2\",\"LightPosition\"}, //\"GlassColor\",\n\t\t\t\t\t\togl.loadGLSLShaderVObject(\t\"resources/robmunro/perform/ol5/glass_c.vert\" ), \n\t\t\t\t\t\togl.loadGLSLShaderFObject(\t\"resources/robmunro/perform/ol5/glass_c.frag\"\t)\n\t\t\t\t);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "public void defineBinder() {\n\t\tTC_Tutorial3 tc = new TC_Tutorial3(this, getConnectionManager(0));\n\t\taddServerRule(tc);\n\n\t\t// Define the Document processing path\n\t\tsetDPP(createDPP());\n\t}", "public static void setup() {\n\t\ttestUpdateParticle();\n\t\ttestRemoveOldParticles();\n\t\t\n\t\tif (testUpdateParticle() == true || testRemoveOldParticles() == true) {\n\t\t\tSystem.out.println(\"FAILED\");\n\t\t}\n\t\t\n\t\t// Build a new random field.\n\t\trandGen = new Random();\n\n\t\tpositionX = 400; // middle of the screen (left to right): 400\n\t\tpositionY = 300; // middle of the screen (top to bottom): 300\n\t\tstartColor = Utility.color(23, 141, 235); // blue: Utility.color(23,141,235)\n\t\tendColor = Utility.color(23, 200, 255); // lighter blue: Utility.color(23,200,255)\n\t\t\n\t\t// This array can store 800 particles\n\t\tparticles = new Particle[800];\n\n\t}", "public void setup(){\n\t\tprogramGrade = keyboard.nextInt();\n\t\texamGrade = keyboard.nextInt();\n\t}", "public static void init(){\t\t\n\t\tParameters p = RunEnvironment.getInstance().getParameters();\n\n\t\tSIM_RANDOM_SEED = (Integer)p.getValue(\"randomSeed\");\n\t\tSIM_NUM_AGENTS = (Integer)p.getValue(\"maxAgents\");\n\t\tSIM_NORM_VIOLATION_RATE = (Float) p.getValue(\"Norm Violation Rate\");\n\t\tNUM_TICKS_TO_CONVERGE = (Long)p.getValue(\"NumTicksToConverge\");\n\t\tCONTENTS_QUEUE_SIZE = (Long)p.getValue(\"ContentsQueueSize\");\n\t\t\n\t\tNORM_GEN_EFF_THRESHOLD = (Double)p.getValue(\"NormsGenEffThreshold\");\n\t\tNORM_GEN_NEC_THRESHOLD = (Double)p.getValue(\"NormsGenNecThreshold\");\n\t\tNORM_SPEC_EFF_THRESHOLD = (Double)p.getValue(\"NormsSpecEffThreshold\");\n\t\tNORM_SPEC_NEC_THRESHOLD = (Double)p.getValue(\"NormsSpecNecThreshold\");\n\t\tNORM_UTILITY_WINDOW_SIZE = (Integer)p.getValue(\"NormsPerfRangeSize\");\n\t\tNORM_DEFAULT_UTILITY = (Double)p.getValue(\"NormsDefaultUtility\");\n\n\t\tNORM_SYNTHESIS_STRATEGY = (Integer)p.getValue(\"NormSynthesisStrategy\");\n\t\tNORM_GENERATION_REACTIVE = (Boolean)p.getValue(\"NormGenerationReactive\");\n\t\tNORM_GENERALISATION_MODE = (Integer)p.getValue(\"NormGeneralisationMode\");\n\t\tNORM_GENERALISATION_STEP = (Integer)p.getValue(\"NormGeneralisationStep\");\n\t\tNORM_SPEC_THRESHOLD_EPSILON = (Double)p.getValue(\"NormsSpecThresholdEpsilon\");\n\t\tNORMS_MIN_EVALS_CLASSIFY = (Integer)p.getValue(\"NormsMinEvaluationsToClassify\");\n\t\tNORMS_WITH_USER_ID = (Boolean)p.getValue(\"NormsWithUserId\");\n\n\t\t\n\t\t\n\t\t// System goals and their constants\n\t\tsystemGoals = new ArrayList<Goal>();\n\t\tsystemGoals.add(new GComplaints());\n\n\t\t//\t\tdouble tMinusEpsilon = NORM_SPEC_NEC_THRESHOLD - NORM_SPEC_THRESHOLD_EPSILON;\n\t\t//\t\t\n\t\t//\t\t/* For SIMON+ and LION, set default utility in a different manner... */\n\t\t//\t\tif(NORM_SYNTHESIS_STRATEGY == 3 || NORM_SYNTHESIS_STRATEGY == 4) {\n\t\t//\t\t\tNORM_DEFAULT_UTILITY = (float)(tMinusEpsilon * (NORM_MIN_EVALS+1)); \n\t\t//\t\t}\n\n\t\t/* For SIMON+ and LION, set default utility in a different manner... */\n\t\tif((NORM_SYNTHESIS_STRATEGY == 3 || NORM_SYNTHESIS_STRATEGY == 4) &&\n\t\t\t\t!NORM_GENERATION_REACTIVE) \n\t\t{\n\t\t\tNORM_DEFAULT_UTILITY = 0f; \n\t\t\tSystem.out.println(\"Norm generation is set as Deliberative\");\n\t\t}\n\t}", "public void initialise() {\n number_of_rays = 4; // how many rays are fired from the boat\n ray_angle_range = 145; // the range of the angles that the boat will fire rays out at\n ray_range = 30; // the range of each ray\n ray_step_size = (float) 10;\n regen = false;\n }", "public void initialize(Hashtable args) {\r\n addPort(east = new SamplePort2(this));\r\n addPort(west = new SamplePort2(this));\r\n addPort(north = new SamplePort(this));\r\n addPort(south = new SamplePort(this));\r\n System.err.println(\"inicializado nodo SampleNode ;)\");\r\n _number = _NextNumber++;\r\n }", "private void setWeightsUniformly(RandomDataImpl rnd, double eInit) {\n\t\tfor (int i = 0; i < weights.length; i++) {\t\t\n\t\t\tweights[i] = rnd.nextUniform(-eInit, eInit);\n\t\t}\n\t}", "public void setup() {\n space = null;\n rabbitList = new ArrayList<>();\n schedule = new Schedule(1);\n\n //recreate main window\n if (displaySurf != null) {\n displaySurf.dispose();\n }\n displaySurf = null;\n displaySurf = new DisplaySurface(this, \"Rabbits Grass Simulation 1\");\n registerDisplaySurface(\"Rabbits Grass Simulation 1\", displaySurf);\n\n //recreate population plot\n if (populationPlot != null) {\n populationPlot.dispose();\n }\n populationPlot = null;\n populationPlot = new OpenSequenceGraph(\"Population Plot\", this);\n populationPlot.setYAutoExpand(false);\n populationPlot.setYRange(0, 200);\n this.registerMediaProducer(\"Plot\", populationPlot);\n }", "@Override\n protected void initializeSample(SamplingContext context) {\n for(int i = 0 ; i < this.EVars.length ; i++) {\n Variable EVar = this.EVars[i];\n int EVal = this.EVals[i];\n int EIndex = Toolkit.indexOf(this.sampledVars, EVar);\n context.sampledVarsAssignment[EIndex] = EVal;\n }\n // produce a few samples to get the network into a more \"normal\" state\n for(int i = 0 ; i < this.resamplingActions.size() * 2 ; i++)\n this.produceSample(context);\n context.sampleWeight = 1.0;\n\n /*WeightedSampleProducer weightedSampler = new WeightedSampleProducer(\n this.bn, this.XVars, this.YVars, this.EVars, this.EVals);\n // the variable values are preserved after the following call\n weightedSampler.produceSample(context); // evidence is correctly set\n context.sampleWeight = 1.0;*/\n }", "private void setup() {\n\t\tpopulateEntitiesLists();\n\t\t// rayHandler.setCombinedMatrix(batch.getProjectionMatrix());\n\t\tambientColor = Color.CLEAR;\n\t\tsetAmbientAlpha(.3f);\n\t\tfpsLogger = new FPSLogger();\n\t\tdynamicEntities = new ArrayList<DynamicEntity>();\n\t\tfont.getData().setScale(DEBUG_FONT_SCALE);\n\t}", "protected void initializeUniformWeight() {\n\n if(CrashProperties.fitnessFunctions.length == 2){\n for (int n = 0; n < populationSize; n++) {\n double a = 1.0 * n / (populationSize - 1);\n lambda[n][0] = a;\n lambda[n][1] = 1 - (a);\n }\n }else {\n for (int n = 0; n < populationSize; n++) {\n double a = 1.0 * n / (populationSize - 1);\n lambda[n][0] = a;\n lambda[n][1] = (1 - (a))/2;\n lambda[n][2] = (1 - (a))/2;\n }\n }\n\n }", "protected void updatePointerVariables() {\n mPositionHandle = GLES20.glGetAttribLocation(mProgram, \"vPosition\");\n colorUniformHandle = GLES20.glGetUniformLocation(mProgram, \"vColor\");\n textureUniformHandle = GLES20.glGetUniformLocation(mProgram, \"s_texture\");\n textureCoordinateHandle = GLES20.glGetAttribLocation(mProgram, \"a_texCoord\");\n mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, \"uMVPMatrix\");\n\n MyGLRenderer.checkGlError(\"updatePointerVariables\");\n }", "public void setUniform(String uniformName, Material material) {\n setUniform(uniformName + \".color\", material.getColor());\n setUniform(uniformName + \".hasTexture\", material.isTextured() ? 1 : 0);\n setUniform(uniformName + \".reflectance\", material.getReflectance());\n }", "public UniformVector() {\n super(3);\n this.min = new VectorN(3);\n this.max = new VectorN(1.0, 1.0, 1.0);\n this.idum = -1;\n this.rn = new RandomNumber(this.idum);\n fillVector();\n }", "private static void setupProperties(ShaderProgram shader, Map<String, Object> properties, SpriteComponent spriteComponent){\n /*for (Map.Entry<String, Object> shaderProperty : shaderComponent.shaderProperties.entrySet()) {\n shader.setUniformf(shaderProperty.getKey(), shaderProperty.getValue());\n }*/\n shader.setUniformf(\"u_viewportInverse\", new Vector2(1f / spriteComponent.sprite.getTexture().getWidth(),\n 1f / spriteComponent.sprite.getTexture().getHeight()));\n shader.setUniformf(\"u_offset\", 1f);\n shader.setUniformf(\"u_step\", Math.min(1f, spriteComponent.sprite.getTexture().getWidth() / 70f));\n if(properties.containsKey(ShaderComponent.COLOR)) {\n shader.setUniformf(\"u_color\", ((Color)properties.get(ShaderComponent.COLOR)));\n //shader.setUniformf(\"u_color\", new Vector3(1f, 0, 0));\n } else {\n Logger.warning(\"Shader's color is not defined!\");\n shader.setUniformf(\"u_color\", new Vector3(1f, 1f, 1f));\n }\n }", "public static void init() {\n // init quad VAO\n vao = glGenVertexArrays();\n glBindVertexArray(vao);\n int positionVbo = glGenBuffers();\n FloatBuffer fb = BufferUtils.createFloatBuffer(2 * 4);\n fb.put(0.0f).put(0.0f);\n fb.put(1.0f).put(0.0f);\n fb.put(1.0f).put(1.0f);\n fb.put(0.0f).put(1.0f);\n fb.flip();\n glBindBuffer(GL_ARRAY_BUFFER, positionVbo);\n glBufferData(GL_ARRAY_BUFFER, fb, GL_STATIC_DRAW);\n glVertexAttribPointer(Main.shader.inPositionLoc, 2, GL_FLOAT, false, 0, 0L);\n glEnableVertexAttribArray(Main.shader.inPositionLoc);\n glBindBuffer(GL_ARRAY_BUFFER, 0);\n glBindVertexArray(0);\n \n // init texture\n IntBuffer width = BufferUtils.createIntBuffer(1);\n IntBuffer height = BufferUtils.createIntBuffer(1);\n IntBuffer components = BufferUtils.createIntBuffer(1);\n byte[] dataArr = Main.loadResource(\"resources/font DF.png\");\n ByteBuffer data = BufferUtils.createByteBuffer(dataArr.length);\n data.put(dataArr).rewind();\n data = Objects.requireNonNull(stbi_load_from_memory(data, width, height, components, 1));\n int imgWidth = width.get();\n int imgHeight = height.get();\n charWidth = imgWidth / 16;\n charHeight = imgHeight / 16;\n \n texture = glGenTextures();\n glBindTexture(GL_TEXTURE_2D, texture);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, imgWidth, imgHeight, 0, GL_RED, GL_UNSIGNED_BYTE, data);\n stbi_image_free(data);\n \n // set texScale uniform\n glUniform2f(Main.shader.texScaleLoc, 1/16f, 1/16f);\n }", "@Override\n public void initialize() {\n m_desiredColor = ColorWheel.fromGameMessage();\n USBLogging.info(\"Desired Color is \" + m_desiredColor.getName());\n }", "public void bind() {\n }", "public BindState(Set<AccessPath> globalVariableNames) {\n this.stateOnLastFunctionCall = null;\n this.globalDefs =\n addVariables(PathCopyingPersistentTree.<String, BindingPoint>of(), globalVariableNames);\n this.localDefs = new PathCopyingPersistentTree<>();\n }", "public void bind(GL gl) {\n\tgl.glBindTexture(target, textureID);\n }", "@Override\n public int glGetUniformLocation(final int program, final String name) {\n return GL20.glGetUniformLocation(program, name + \"\\0\");\n }", "public void bind()\n {\n glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, this.ID);\n }", "private void bindTextures() {\n\t\ttry {\n//\t\t\tif (textureLoadIndex < maxNumTextures) {\n\t\t\tboundAll = true;\n\t\t\tfor (int n=0; n<sortedPanImageList.length; n++) {\n\t\t\t\tPanImageEntry panImageEntry = sortedPanImageList[n];\n\t\t\t\tif (panImageEntry.imageListEntry.enabled && (!panImageEntry.loaded)) {\n\t\t\t\t\tboundAll = false;\n\t\t\t\t}\n\t\t\t\tif (panImageEntry.loadImageBuffer != null) {\n\t\t\t\t\tif (panImageEntry.textureNumber < 0) {\n\t\t\t\t\t\t// find new texture number\n\t\t\t\t\t\tif (textureLoadIndex < maxNumTextures) {\n\t\t\t\t\t\t\tpanImageEntry.textureNumber = textures.get(textureLoadIndex);\n\t\t\t\t\t textureLoadIndex++;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// no more textures available\n\t\t\t\t\t\t\tSystem.out.println(\"out of available textures\");\n\t\t\t\t\t\t\tpanImageEntry.loadImageBuffer = null;\n\t\t\t\t\t\t\timageLoader.suspend();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n//\t\t\t\t System.out.println(\"*** binding texture \"+panImageEntry.textureNumber);\n//\t\t\t\t long startTime = System.currentTimeMillis();\n\t\t\t GL11.glBindTexture(GL11.GL_TEXTURE_2D, panImageEntry.textureNumber);\n/*\t\t\t \n\t\t\t if (mipmap) {\n\t\t\t GLU.gluBuild2DMipmaps(GL11.GL_TEXTURE_2D, GL11.GL_RGB8, panImageEntry.loadImageWidth, panImageEntry.loadImageHeight, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, panImageEntry.loadImageBuffer);\n\t\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR_MIPMAP_LINEAR);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);\n\t\t\t }\n\t\t\t else {\n\t\t\t GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB8, panImageEntry.loadImageWidth, panImageEntry.loadImageHeight, 0, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, panImageEntry.loadImageBuffer);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);\n\t\t\t }\n*/\n\t\t\t int numLevels = panImageEntry.loadImageBuffer.size();\n\t\t\t if (numLevels == 1) {\n\t\t\t \tint width = ((Integer) panImageEntry.loadImageWidth.get(0)).intValue();\n\t\t\t \tint height = ((Integer) panImageEntry.loadImageHeight.get(0)).intValue();\n\t\t\t \tByteBuffer buffer = (ByteBuffer) panImageEntry.loadImageBuffer.get(0);\n\t\t\t GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB8, width, height, 0, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, buffer);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);\n\t\t\t }\n\t\t\t else {\n\t\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR_MIPMAP_LINEAR);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR/*GL11.GL_NEAREST*/);\n\t\t\t \tfor (int level=0; level<numLevels; level++) {\n\t\t\t\t \tint width = ((Integer) panImageEntry.loadImageWidth.get(level)).intValue();\n\t\t\t\t \tint height = ((Integer) panImageEntry.loadImageHeight.get(level)).intValue();\n\t\t\t\t \tByteBuffer buffer = (ByteBuffer) panImageEntry.loadImageBuffer.get(level);\n\t\t\t\t GL11.glTexImage2D(GL11.GL_TEXTURE_2D, level, GL11.GL_RGB8, width, height, 0, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, buffer);\n\t\t\t \t}\n\t\t\t }\n\t\t\t panImageEntry.loadImageBuffer = null;\n\t\t\t panImageEntry.loadImageHeight = null;\n\t\t\t panImageEntry.loadImageWidth = null;\n\t\t\t panImageEntry.loaded = true;\n//\t\t\t\t System.out.println(\"done\");\n//\t\t\t long time = System.currentTimeMillis() - startTime;\n//\t\t\t System.out.println(\"took \"+time+\" millis\");\n\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Throwable e) {\n\t\t\tUnknownExceptionDialog.openDialog(this.getShell(), \"Error loading image\", e);\n\t\t\te.printStackTrace(); \n\t\t}\n\t\t\n\t}", "protected void bindModel(Model model) {\n\n //Bind the vao and vbo\n glBindVertexArray(model.getVaoID());\n\n //Send the vertices\n if (model.getVertices().length > 0) {\n glBindBuffer(GL_ARRAY_BUFFER, model.getVerticesID());\n glVertexAttribPointer(0, 3, GL_FLOAT, false, 0, 0);\n glEnableVertexAttribArray(0);\n }\n\n //Send the normals\n if (model.getNormals().length > 0) {\n glBindBuffer(GL_ARRAY_BUFFER, model.getNormalsID());\n glVertexAttribPointer(1, 3, GL_FLOAT, false, 0, 0);\n glEnableVertexAttribArray(1);\n }\n\n //Send the uvs\n if (model.getUvs().length > 0) {\n glBindBuffer(GL_ARRAY_BUFFER, model.getUvsID());\n glVertexAttribPointer(2, 2, GL_FLOAT, false, 0, 0);\n glEnableVertexAttribArray(2);\n }\n }", "public static void main(String[] args) {\n\t\t\tColorSensor colorSensor = new ColorSensor(SensorPort.S3);\n\t\t\tcolorSensor.setRGBMode();\n\t\t\tColor rgb; \n\t\t\t\n\t\t\tEV3LargeRegulatedMotor motora = new EV3LargeRegulatedMotor (MotorPort.A);\n\t\t\tEV3LargeRegulatedMotor motorb = new EV3LargeRegulatedMotor (MotorPort.C);\n\t\t\tEV3TouchSensor touchsensor = new EV3TouchSensor (SensorPort.S2);\n\t\t\tEV3IRSensor irSensor = new EV3IRSensor (SensorPort.S1);\n\t\t\t\n\t\t\tWheel wheel1 = WheeledChassis.modelWheel(motora , 2.5).offset(-5.0);\n\t\t Wheel wheel2 = WheeledChassis.modelWheel(motorb , 2.5).offset(5.0);\n\t\t \n\t\t Chassis chassis = new WheeledChassis(new Wheel[] { wheel1, wheel2 }, WheeledChassis.TYPE_DIFFERENTIAL);\n\t\t\t\n\t\t\t\n\t\t\t//is pressed method? do we need to make float values and fetching samples?\n\t\t MovePilot pilot = new MovePilot(chassis);\n\t\t \n\t\t Button.waitForAnyPress(); \n\t\t \n\t\t\tdouble [] hsvmiddle = new double[3];\n\t\t\tdouble [] hsvfloor = new double [3];\n\t\t\tdouble [] hsvline = new double [3];\n\t\t\t\n\t\t\tdouble [] pickupColor = new double [3];\n\t\t\t\n\t\t\t\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\thsvmiddle= RGBtoHSV(rgb);\n\t\t\t\t\n\t\t\t\t//rotate to the left to pickup wood color\n\t\t\t\tpilot.rotate(-20);\n\t\t\t\t\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\thsvfloor= RGBtoHSV(rgb);\n\t\t\t\t\n\t\t\t\t//rotate to the right to pick up black line\n\t\t\t\tpilot.rotate(30);\n\t\t\t\t\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\thsvline= RGBtoHSV(rgb);\n\t\t\t\t\n\t\t\t\t//rotate back to center\n\t\t\t\tpilot.rotate(-10);\n\t\t\t\n\t\t\twhile(Button.ESCAPE.isUp())\n\t\t\t{\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\tpickupColor = RGBtoHSV(rgb);\n\t\t\t\t\n\t /*System.out.println(\"RGB = \"+\n\t \" [\" + rgb.getRed() + \",\" + rgb.getGreen() + \",\" + rgb.getBlue() \n\t +\"]\\n \" + \"HSV = \" + \"[ \" + hsv[0] + \",\" + hsv[1] + \",\" + hsv[2] + \",\" +\" ]\");\n\t\t\t\t//delay a second so we don't see so many outputs on the screen\n\t //need to apply to actual line following strategy*/\n\t\t\t\tDelay.msDelay(1000);\n\t\t\t\t\n\t\t\t\t//touch sensor info\n\t\t\t\tSampleProvider distance = touchsensor.getTouchMode();\n\t\t\t\tfloat[] sample = new float[1];\n\t\t\t\t\n\t\t\t\t//ir info\n\t\t\t\tfloat[] sample2 = new float[1];\n\t\t\t\t\n\t\t\t\tpilot.forward();\n\t\t\t\t\n\t\t\t\twhile (!Button.ESCAPE.isDown()) {\n\t\t\t\t\t//when the robot is on the wood it will rotate and fix itself back on the middle\n\t\t\t\t\t if ((((hsvfloor[0]-5)<pickupColor[0])&&((hsvfloor[0]+5>pickupColor[0])))) { \n\t\t\t\t\t\t System.out.println(\"floor\");\n\t\t\t\t\t\t\tpilot.rotate(-4); \n\t\t\t\t\t }\n\t\t\t\t\t //when the robot is on black it will rotate and fix its self back on the middle\n\t\t\t\t\t else if ((((hsvline[0]-5)<pickupColor[0])&&((hsvline[0]+5>pickupColor[0])))) {\n\t\t\t\t\t\t System.out.println(\"black line\");\n\t\t\t\t\t\t\tpilot.rotate(4);\n\t\t\t\t\t}\n\t\t\t\t\t //when the robot is in the middle, it will go forward\n\t\t\t\t\t else if ((((hsvmiddle[0]-5)<pickupColor[0])&&((hsvmiddle[0]+5>pickupColor[0])))) {\n\t\t\t\t\t\t System.out.println (\"middle\");\n\t\t\t\t\t\t pilot.forward();\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t //need to implement when the robot sees a new color (red) then it with turn or do as it is called to to\n\t\t\t\t\t /*else if ((((hsvred[0]-5)<pickupColor[0])&&((hsvred[0]+5>pickupColor[0])))) {\n\t\t\t\t\t\t \n //touch sensor code\n\t\t\t\t\t distance.fetchSample(sample, 0);\n\t\t\t\t\t\tif (sample[0]== 1) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//pilot.travel(-10);\n\t\t\t\t\t\t\t//pilot.rotate(-90);\n\t\t\t\t\t\t\t//pilot.travel(20);\n\t\t\t\t\t\t\t//pilot.rotate(90);\n\t\t\t\t\t\t\t//pilot.forward();\n\t\t\t\t\t\t}\n\n \n\t\t\t\t\t }*/\n\t\t\t\t\t \n\t\t\t\t\t //when the robot sees silver, then it should recognize that it is at the end of the maze and call to the stacking method to retrace its steps\n\t\t\t\t\t /*else if ((hsvsilver[0]-5<pickupcolor[0])&&(hsvsilver[0]+5<pickupcolor[0])){\n\t\t\t\t\t * end the maze and call the stacking method\n\t\t\t\t\t }*/\n\t\t\t\t\t \n\t\t\t\t\t \t\t\t\t\t\t\n\t\t\t\t\t//ir code\n\t\t\t\t\tdistance.fetchSample(sample, 0);\n\t\t\t\t\t\tif (sample2[0]<=18) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tpilot.travel(-10);\n\t\t\t\t\t\t\tpilot.rotate(-90);\n\t\t\t\t\t\t\tpilot.travel(20);\n\t\t\t\t\t\t\tpilot.rotate(90);\n\t\t\t\t\t\t\tpilot.forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t}\n\t\t\t\t\n\t\t\t\t//add hsv for silver end of the maze, and add red for intersections\n\t\t\t\t/*if the robot sees red and cannot turn to the right (ir sensor) then go straight\n\t\t\t\t * \tthen if it cant go forward, turn around and when you get back to the red line then turn left\n\t\t\t\t * if the robot sees red and can turn right, then turn right\n\t\t\t\t * if the robot hits something in front of itself, then have the robot turn around to the right\t\t\t\t\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\t\n //intersection strategy\n /*if ((red color is sensed using the color sensor) && (ir sensor is activated (there is an obstacle))) {\n pilot.rotate(90); //turn left\n pilot.forward();\n }\n if (touch is pressed) {\n pilot.rotate(180); //turn all the way around\n pilot.forward();\n if (red color is sensed) {\n pilot.rotate(-90); //turn right\n }\n }\n if (touch is pressed) {\n pilot.rotate(180); //turn all the way around\n pilot.forward(); \n }\n \n if ((ir is pressed) && !(touch is pressed)) {\n pilot.rotate(90); //turn left\n if (touch is pressed) {\n pilot.rotate(-90);\n pop that sequence off the stack\n pilot.forward();\n }\n else { //touch is not pressed, no obstacles ahead\n pilot.forward();\n }\n }\n \n //25 is an arbitrary # that we are using to represent the max # of intersections\n for (i=1; i < 25; ++i) {\n //everything that's happening in the entire program has to be in this for loop\n Stack<String> stack = new Stack<String>();\n stack.push(\"i\"); //naming each sequence/intersection by its #\n printStack(stack);\n\n }\n //if we program the robot to turn left at intersections, the IR must be on the right\n //question box: how do we structure our code so that every part works together in unison?\n */\n\t\t\t\n\t\t\t\n\t\t\t\t \n\t\t\t\n\t\t\t//free up resources\n\t\t\tcolorSensor.close();\n\t\t\t\n\t\t}\n\n\t}", "@Override\n\n //-----------------\n\n public void init() {\n //test(); // <---------------- Uncomment to TEST!\n\n // %-distribution of RED, BLUE and NONE\n double[] dist = {0.49, 0.49, 0.02};\n\n // Number of locations (places) in world (square)\n int nLocations = 950;\n\n Actor[] distArray = distribution(nLocations, dist); //Generates array with correct distribution.\n distArray = shuffle(distArray); //Shuffles array\n world = toMatrix(distArray, nLocations, world); //Generates the start world.\n // Should be last\n fixScreenSize(nLocations);\n }", "@Override\r\n protected void setup() {\n Number = Double.valueOf((String) getArguments()[0]);\r\n String Name = getAID().getLocalName();\r\n\r\n System.out.println(\"Agent Id: \" + Name +\" number = \" + Number);\r\n\r\n linkedAgents = Arrays.copyOfRange(getArguments(), 1,\r\n getArguments().length, String[].class);\r\n\r\n addBehaviour(new FindAverage\r\n (this, TimeUnit.SECONDS.toMillis(1)));\r\n }", "public static void main(String[] args) {\n Random r = new Random();\n int w = 50;\n int h = 40;\n int[][] a = new int[w][h];\n for (int i = 0; i < w; i++)\n {\n for (int j = h/2; j < h; j++)\n {\n a[i][j] = r.nextInt(GameView.colors.length);\n }\n }\n GameView tv = new GameView(a);\n new TestFrame(tv, \"Iulia Petria, 1601159\");\n }", "public void bind() {GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, mFrameBufferHandle[0]);}", "public void run(Map<String, Object> bindingContext) {\n // assign values to parameters and create binding\n Map<String, Object> binding = new HashMap<String, Object>();\n\n for (Map.Entry<String, Activity.Parameter> param : activity.getParameters().entrySet()) {\n String paramName = param.getKey();\n Activity.Parameter paramDef = param.getValue();\n \n // retrieve value and assign to 'Input' parameters\n if ( paramDef.isInputType() ) {\n // parameter values come from a process parameter or a constant\n // if from a process parameter, then look up value from binding context,\n // otherwise use the constant stored in the map\n Object paramValue = null;\n ParameterValue valueDef = parameterValues.get(paramName);\n if ( valueDef==null ) {\n // TODO: check this case\n paramValue = paramDef.getDefaultValue();\n }\n else if ( valueDef.mapping!=null ) {\n // beware this could be null...\n paramValue = bindingContext.get(valueDef.mapping);\n }\n else if ( valueDef.constantValue!=null ) {\n paramValue = valueDef.constantValue;\n }\n else {\n // this is a problem if the parameter value contains neither mapping nor constant!\n }\n binding.put(paramName, paramValue);\n }\n // assign default values to 'Output' or 'None' parameters\n else if ( paramDef.isOutputType() || paramDef.isNoneType() ) {\n binding.put(paramName, paramDef.getDefaultValue());\n }\n }\n \n // run activity\n activity.run(binding);\n\n // assign back any output parameters\n for (Map.Entry<String, Activity.Parameter> param : activity.getParameters().entrySet()) {\n String paramName = param.getKey();\n Activity.Parameter paramDef = param.getValue();\n\n if ( paramDef.isOutputType() ) {\n // write updated values from the binding to original locations in bindingContext\n ParameterValue valueDef = parameterValues.get(paramName);\n if ( valueDef.mapping!=null ) {\n bindingContext.put(valueDef.mapping, binding.get(paramName));\n } \n }\n }\n }", "public void bindAll(GL2 gl) throws OpenGLException\n\t{\t\t\n\t\t/* Save state and adjust viewport if this is the first bind. */\n\t\tif (!mIsBound)\n\t\t{\n\t\t\tgl.glPushAttrib(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_VIEWPORT_BIT);\n\t\t\tgl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING, mPreviousBinding, 0);\n\t\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, getHandle());\n\t\t\tgl.glViewport(0, 0, mWidth, mHeight);\n\t\t\tmIsBound = true;\n\t\t}\n\t\t\n\t\t/* Set draw buffers to all color attachments. */\n\t\tint bindings[] = new int[getColorTextureCount()];\n\t\t\n\t\tfor (int i = 0; i < getColorTextureCount(); ++i)\n\t\t{\n\t\t\tbindings[i] = GL2.GL_COLOR_ATTACHMENT0 + i;\n\t\t}\n\t\t\n\t\tgl.glDrawBuffers(getColorTextureCount(), bindings, 0);\n\n\t\t/* Make sure it worked. */\n\t\tOpenGLException.checkOpenGLError(gl);\n\t}", "private void bindTextures(Terrain terrain){\n TerrainTexPack texturePack = terrain.getTexturePack();\n glActiveTexture(GL_TEXTURE0);\n glBindTexture(GL_TEXTURE_2D, texturePack.getBackgroundTexture().getTextureID());\n glActiveTexture(GL_TEXTURE1);\n glBindTexture(GL_TEXTURE_2D, texturePack.getrTexture().getTextureID());\n glActiveTexture(GL_TEXTURE2);\n glBindTexture(GL_TEXTURE_2D, texturePack.getgTexture().getTextureID());\n glActiveTexture(GL_TEXTURE3);\n glBindTexture(GL_TEXTURE_2D, texturePack.getbTexture().getTextureID());\n glActiveTexture(GL_TEXTURE4);\n glBindTexture(GL_TEXTURE_2D, terrain.getBlendMap().getTextureID());\n\n }", "@Override\n protected void initialize() { \n\n \n SmartDashboard.putNumber(\"Side Velocity\", sideVelocity);\n SmartDashboard.putNumber(\"Belt velocity\", beltVelocity);\n\n }", "protected void onBind()\n\t{\n\t}", "public void setup() {\n\n // Set up the serial connection\n if (serialAvailable) {\n println(\"Available serial ports:\");\n println(Serial.list());\n port = new Serial(this, Serial.list()[2], 57600);\n }\n\n // Set up the Geomerative library\n RG.init(this);\n\n // Determine the screen scale and window size\n screenScale = (MAX_SCREEN_Y - 2F * SCREEN_PADDING) / MAX_PLOTTER_Y;\n int xsize = (int) (MAX_PLOTTER_X * screenScale) + 2 * SCREEN_PADDING;\n int ysize = (int) (MAX_PLOTTER_Y * screenScale) + 2 * SCREEN_PADDING;\n System.out.println(screenScale + \" \" + xsize + \" \" + ysize);\n\n smooth();\n size(xsize, ysize);\n background(100);\n }", "private void initializeBuffers()\n\t{\n\t\t// format vertex data so it can be passed to openGL\n\t\tFloatBuffer vertexBuffer = \n\t\t\t\tUtility.floatArrayToBuffer(mesh.vertexData);\n\t\t \n\t // create a buffer object and store the vertex data there\n\t\tvertexBufferObject = glGenBuffers();\n\t\tglBindBuffer(GL_ARRAY_BUFFER, vertexBufferObject);\n\t\tglBufferData(GL_ARRAY_BUFFER, vertexBuffer, GL_STATIC_DRAW);\n\t\tglBindBuffer(GL_ARRAY_BUFFER, 0);\n\t\t\n\t\t// format index data so it can be passed to openGL\n\t\tShortBuffer indexDataBuffer = \n\t\t\t\tUtility.shortArrayToBuffer(mesh.indexData);\n\t\t\n\t\t// create a buffer object and store the index data there\n\t\tindexBufferObject = glGenBuffers();\n\t\tglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBufferObject);\n\t\tglBufferData(GL_ELEMENT_ARRAY_BUFFER, indexDataBuffer, GL_STATIC_DRAW);\n\t\tglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);\n\t}", "void SetUpMeshArrays(int PosHandle, int TexHandle, int NormalHandle)\n\t{\n\t\tm_VertexBuffer.position(m_MeshVerticesDataPosOffset);\n\t GLES20.glVertexAttribPointer(PosHandle, \n\t \t\t\t\t\t\t\t3, \n\t \t\t\t\t\t\t\tGLES20.GL_FLOAT, \n\t \t\t\t\t\t\t\tfalse,\n\t \t\t\t\t\t\t\tm_MeshVerticesDataStrideBytes, \n\t \t\t\t\t\t\t\tm_VertexBuffer);\n\t \n\t GLES20.glEnableVertexAttribArray(PosHandle);\n\t \n\t \n\t if (m_MeshHasUV)\n\t {\n\t \t// Set up Vertex Texture Data stream to shader \n\t \tm_VertexBuffer.position(m_MeshVerticesDataUVOffset);\n\t \tGLES20.glVertexAttribPointer(TexHandle, \n\t \t\t\t\t\t\t\t\t2, \n\t \t\t\t\t\t\t\t\tGLES20.GL_FLOAT, \n\t \t\t\t\t\t\t\t\tfalse,\n\t \t\t\t\t\t\t\t\tm_MeshVerticesDataStrideBytes, \n\t \t\t\t\t\t\t\t\tm_VertexBuffer);\n\t \tGLES20.glEnableVertexAttribArray(TexHandle);\n\t }\n\t \n\t if (m_MeshHasNormals)\n\t {\n\t \t\n\t \t// Set up Vertex Texture Data stream to shader\n\t \tm_VertexBuffer.position(m_MeshVerticesDataNormalOffset);\n\t \tGLES20.glVertexAttribPointer(NormalHandle, \n\t \t\t\t\t\t\t\t\t3, \n\t \t\t\t\t\t\t\t\tGLES20.GL_FLOAT, \n\t \t\t\t\t\t\t\t\tfalse,\n\t \t\t\t\t\t\t\t\tm_MeshVerticesDataStrideBytes, \n\t \t\t\t\t\t\t\t\tm_VertexBuffer);\n\t \tGLES20.glEnableVertexAttribArray(NormalHandle);\n\t } \n\t \n\t \n\t \n\t}", "private void registerBindings(){\t\t\n\t}", "private void registerBindings(){\t\t\n\t}", "public void setup() {\n //our playing field size\n int theGroundWidth = 800;\n int theGroundHeight = 800;\n\n //our pouplation of rabbits\n entitiesOfRabbits = new Entities();\n //our grass population\n entitiesOfGrass = new Entities();\n //array of dead rabbits\n entitiesOfDeadRabbits = new Entities();\n //Array of foxes\n entitiesOfFoxes = new Entities();\n\n //creating an interactive object that is able to open the graph by the push of a button\n openGraph = new InteractiveObject();\n openGraph.createInteractiveObject(this, 875, 100, 50, 50, \"Square\",true);\n\n //Instantiating the object that allow us to start the program\n startTheProgram = new InteractiveObject();\n startTheProgram.createInteractiveObject(this,400,400,50,50,\"Square\", true);\n\n //instatiating the environment, with the sizes from above\n theEnvironment = new Environment(this, theGroundWidth, theGroundHeight);\n\n //createPopulation comes from the entities (population) class, and holds all the rabbits in an arraylist\n entitiesOfRabbits.createEntities(this, 20, Rabbit.class);\n entitiesOfGrass.createEntities(this, 35, Grass.class);\n entitiesOfFoxes.createEntities(this,3,Fox.class);\n\n //AllEntities list, which holds all the different population lists\n allEntities = new ArrayList<>();\n allDeadEntities = new ArrayList<>();\n\n //putting all the rabbits into the AllEntities list, in the main class\n //keeps all the moving parts together, making it easier to compare objects fx rabbits finding food or other rabbits\n allEntities.add(0,entitiesOfRabbits);\n allEntities.add(1,entitiesOfGrass);\n allEntities.add(2,entitiesOfFoxes);\n allDeadEntities.add(entitiesOfDeadRabbits);\n }", "public void init(SoState state)\n\n{\n // Set to GL defaults:\n// ivState.ambientColor.copyFrom( getDefaultAmbient());\n// ivState.emissiveColor.copyFrom( getDefaultEmissive());\n// ivState.specularColor.copyFrom( getDefaultSpecular());\n// ivState.shininess = getDefaultShininess();\n// ivState.colorMaterial = false;\n// ivState.blending = false;\n// ivState.lightModel = LightModel.PHONG.getValue();\n \n // Initialize default color storage if not already done\n if (defaultDiffuseColor == null) {\n defaultDiffuseColor = SbColorArray.allocate(1);\n defaultDiffuseColor.get(0).setValue(getDefaultDiffuse());\n defaultTransparency = new float[1];\n defaultTransparency[0] = getDefaultTransparency();\n defaultColorIndices = new int[1];\n defaultColorIndices[0] = getDefaultColorIndex();\n defaultPackedColor = new int[1];\n defaultPackedColor[0] = getDefaultPacked();\n }\n \n //following value will be matched with the default color, must\n //differ from 1 (invalid) and any legitimate nodeid. \n// ivState.diffuseNodeId = 0;\n// ivState.transpNodeId = 0;\n// //zero corresponds to transparency off (default).\n// ivState.stippleNum = 0;\n// ivState.diffuseColors = defaultDiffuseColor;\n// ivState.transparencies = defaultTransparency;\n// ivState.colorIndices = defaultColorIndices;\n// ivState.packedColors = defaultPackedColor;\n//\n// ivState.numDiffuseColors = 1;\n// ivState.numTransparencies = 1;\n// ivState.packed = false;\n// ivState.packedTransparent = false;\n// ivState.transpType = SoGLRenderAction.TransparencyType.SCREEN_DOOR.ordinal(); \n// ivState.cacheLevelSetBits = 0;\n// ivState.cacheLevelSendBits = 0;\n// ivState.overrideBlending = false;\n// \n// ivState.useVertexAttributes = false;\n//\n// ivState.drawArraysCallback = null;\n// ivState.drawElementsCallback = null; \n// ivState.drawArraysCallbackUserData = null;\n// ivState.drawElementsCallbackUserData = null; \n\n coinstate.ambient.copyFrom(getDefaultAmbient());\n coinstate.specular.copyFrom(getDefaultSpecular());\n coinstate.emissive.copyFrom(getDefaultEmissive());\n coinstate.shininess = getDefaultShininess();\n coinstate.blending = /*false*/0;\n coinstate.blend_sfactor = 0;\n coinstate.blend_dfactor = 0;\n coinstate.alpha_blend_sfactor = 0;\n coinstate.alpha_blend_dfactor = 0;\n coinstate.lightmodel = LightModel.PHONG.getValue();\n coinstate.packeddiffuse = false;\n coinstate.numdiffuse = 1;\n coinstate.numtransp = 1;\n coinstate.diffusearray = SbColorArray.copyOf(lazy_defaultdiffuse);\n coinstate.packedarray = IntArrayPtr.copyOf(lazy_defaultpacked);\n coinstate.transparray = FloatArray.copyOf(lazy_defaulttransp);\n coinstate.colorindexarray = IntArrayPtr.copyOf(lazy_defaultindex);\n coinstate.istransparent = false;\n coinstate.transptype = (int)(SoGLRenderAction.TransparencyType.BLEND.getValue());\n coinstate.diffusenodeid = 0;\n coinstate.transpnodeid = 0;\n coinstate.stipplenum = 0;\n coinstate.vertexordering = VertexOrdering.CCW.getValue();\n coinstate.twoside = false ? 1 : 0;\n coinstate.culling = false ? 1 : 0;\n coinstate.flatshading = false ? 1 : 0;\n coinstate.alphatestfunc = 0;\n coinstate.alphatestvalue = 0.5f;\n}", "public void createMaterialUniform(String uniformName) {\n createUniform(uniformName + \".color\");\n createUniform(uniformName + \".hasTexture\");\n createUniform(uniformName + \".reflectance\");\n }", "public void bind(Nifty nifty, Screen screen) {\n \n this.nifty = nifty;\n this.screen = screen;\n }", "@Override\n public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n \n String vertexShaderSource = TextResourceReader.readTextFileFromResource(context, R.raw.simple_vertex_shader);\n String fragmentShaderSource = TextResourceReader.readTextFileFromResource(context, R.raw.simple_fragment_shader);\n \n int vertexShaderId = ShaderHelper.compileVertexShader(vertexShaderSource);\n int fragmentShaderId = ShaderHelper.compileFragmentShader(fragmentShaderSource);\n \n program = ShaderHelper.linkProgram(vertexShaderId, fragmentShaderId);\n \n if(LoggerConfig.ON){\n \tShaderHelper.validateProgram(program);\n }\n glUseProgram(program);\n uColorLocation = glGetUniformLocation(program, U_COLOR);\n aPositionLocation = glGetAttribLocation(program, A_POSITION);\n \n vertexData.position(0);\n glVertexAttribPointer(aPositionLocation, POSITION_COMPONENT_COUNT, GL_FLOAT, false, 0, vertexData);\n glEnableVertexAttribArray(aPositionLocation); \n }", "@Override\n public void simpleInitApp()\n {\n stateManager.detach(stateManager.getState(StatsAppState.class));\n\n // Activate windowed input behavior.\n flyCam.setDragToRotate(true);\n inputManager.setCursorVisible(true);\n\n viewPort.setBackgroundColor(new ColorRGBA(0.7f, 0.9f, 1, 1));\n\n materialFactory = createMaterialFactory();\n spatialFactory = createSpatialFactory();\n board = (Node)spatialFactory.createBoard(assetManager);\n squaresNode = (Node)board.getChild(\"squares\");\n tokensNode = (Node)board.getChild(\"tokens\");\n\n rootNode.attachChild(board);\n rootNode.addLight(createDirectionalLight());\n rootNode.addLight(createAmbientLight());\n\n initKeys();\n\n reconcileTokens();\n setTheScene();\n }", "private void init() {\r\n\tlocals = new float[maxpoints * 3];\r\n\ti = new float[] {1, 0, 0};\r\n\tj = new float[] {0, 1, 0};\r\n\tk = new float[] {0, 0, 1};\r\n\ti_ = new float[] {1, 0, 0};\r\n\tk_ = new float[] {0, 0, 1};\r\n }", "public ALU() {\n // PROGRAM 1: Student must complete this method\n //declare input(s) and output arrays\n inputA = new boolean[INT_LENGTH];\n inputB = new boolean[INT_LENGTH];\n output = new boolean[INT_LENGTH];\n //initializes zeroFlag and control\n zeroFlag = false;\n control = 15;\n //initialize each array with random boolean values\n for (int i = 0; i < INT_LENGTH; i++) {\n inputA[i] = random.nextBoolean();\n inputB[i] = random.nextBoolean();\n output[i] = random.nextBoolean();\n }\n }", "public void bind(TextureInfo tex) {\n buffer(() -> TextureManager.bind(tex));\n }", "private void uniformMutation(){\n Random random = new Random();\n double newValue = random.nextGaussian()*16.6 + 50.0;\n if(newValue < 0) newValue = 0;\n if(newValue > 100) newValue = 100;\n int gene = random.nextInt(6);\n switch (gene){\n case 0 : this.x1 = newValue; break;\n case 1 : this.x2 = newValue; break;\n case 2 : this.x3 = newValue; break;\n case 3 : this.y1 = newValue; break;\n case 4 : this.y2 = newValue; break;\n case 5 : this.y3 = newValue; break;\n }\n }", "public static void main(String []args ){\n RectangleProgram rectProg = new RectangleProgram();\r\n\t}", "private void initialize(Environment env, Location loc, Direction dir,\n Color col)\n {\n theEnv = env;\n myId = nextAvailableID;\n nextAvailableID++;\n myLoc = loc;\n myDir = dir;\n myColor = col;\n theEnv.add(this);\n\n // object is at location myLoc in environment\n }", "public static void main(String[] args) {\n\r\n\t\ttry {\r\n\r\n\t\t\t// Set up Google Guice Dependency Injector\r\n\t\t\tInjector injector = Guice.createInjector(new BoatImplModule(),\r\n\t\t\t\t\tnew PersonDemoImplModule());\r\n\r\n\t\t\t// Build up the application, resolving dependencies automatically by\r\n\t\t\t// Guice\r\n\t\t\tIBoatController controller = injector\r\n\t\t\t\t\t.getInstance(IBoatController.class);\r\n\r\n//\t\t\tIBoatControllerRMI rmiController = injector\r\n//\t\t\t\t\t.getInstance(IBoatControllerRMI.class);\r\n//\r\n//\t\t\tRegistry registry = LocateRegistry.getRegistry();\r\n//\t\t\tIBoatControllerRMI stub = (IBoatControllerRMI) UnicastRemoteObject\r\n//\t\t\t\t\t.exportObject(rmiController, 0);\r\n//\t\t\tregistry.rebind(\"BoatControllerRMI\", stub);\r\n\r\n\t\t\tBoatTUI tui = new BoatTUI(controller);\r\n\r\n\t\t\ttui.printTUI();\r\n\t\t\t// continue to read user input on the tui until the user decides to\r\n\t\t\t// quit\r\n\t\t\tboolean continu = true;\r\n\t\t\tScanner scanner = new Scanner(System.in);\r\n\t\t\twhile (continu) {\r\n\t\t\t\tcontinu = tui.processInputLine(\"\");\r\n\t\t\t}\r\n\r\n\t\t} \r\n\t\t// catch (RemoteException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t\tfinally {\r\n\t\t\tPlay.stop();\r\n\t\t}\r\n\r\n\t}", "protected void initialize() {\n\t\tsetBodyColor(Color.BLACK);\r\n\t\tsetGunColor(Color.BLACK);\r\n\t\tsetRadarColor(Color.BLACK);\r\n\t\tsetScanColor(Color.BLUE);\r\n\t\tsetBulletColor(Color.RED);\r\n\t}", "public void drawBale() {\n\t\tvertexData.position(0);\n\t\tglVertexAttribPointer(mPositionHandle, POSITION_COMPONENT_COUNT,\n\t\t\t\tGL_FLOAT, false, 0, vertexData);\n\n\t\tglEnableVertexAttribArray(mPositionHandle);\n\n\t\t// Pass in the color information\n\t\tcolorData.position(0);\n\t\tglVertexAttribPointer(mColorHandle, COLOR_COMPONENT_COUNT,\n\t\t\t\tGL_FLOAT, false, 0, colorData);\n\n\t\tglEnableVertexAttribArray(mColorHandle);\n\t\t\n\t\t// Pass in the texture coordinate information\n textureData.position(0);\n GLES20.glVertexAttribPointer(mTextureCoordHandle, TEXTURE_COMPONENT_COUNT, GLES20.GL_FLOAT, false, \n \t\t0, textureData);\n \n GLES20.glEnableVertexAttribArray(mTextureCoordHandle);\n\n\t\t// This multiplies the view matrix by the model matrix, and stores the\n\t\t// result in the MVP matrix\n\t\t// (which currently contains model * view).\n\t\tmultiplyMM(mMVPMatrix, 0, mViewMatrix, 0, mModelMatrix, 0);\n\n\t\t// Pass in the modelview matrix.\n\t\tglUniformMatrix4fv(mMVMatrixHandle, 1, false, mMVPMatrix, 0);\n\n\t\t// This multiplies the modelview matrix by the projection matrix, and\n\t\t// stores the result in the MVP matrix\n\t\t// (which now contains model * view * projection).\n\t\tMatrix.multiplyMM(mMVPMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);\n\n\t\t// Pass in the combined matrix.\n\t\tglUniformMatrix4fv(mMVPMatrixHandle, 1, false, mMVPMatrix, 0);\n\n\t\t// Draw the cube.\n\t\tglDrawArrays(GL_TRIANGLES, 0, 60);\n\t\tglDrawArrays(GL_TRIANGLE_FAN, 60, 12);\n\t\tglDrawArrays(GL_TRIANGLE_FAN, 72, 12);\n\t}", "void glUseProgram(int program);", "public void rebind() {\n // FBOs might be null if the instance wasn't initialized with #resize(int, int) yet.\n if (buffer1.getFbo() != null) {\n Texture texture = buffer1.getFbo().getColorBufferTexture();\n texture.setWrap(wrapU, wrapV);\n texture.setFilter(filterMin, filterMag);\n }\n if (buffer2.getFbo() != null) {\n Texture texture = buffer2.getFbo().getColorBufferTexture();\n texture.setWrap(wrapU, wrapV);\n texture.setFilter(filterMin, filterMag);\n }\n }", "private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}", "public static void main(String[] args) {\n\n try ( LLModel gptjModel = new LLModel(Path.of(\"C:\\\\Users\\\\felix\\\\AppData\\\\Local\\\\nomic.ai\\\\GPT4All\\\\ggml-gpt4all-j-v1.3-groovy.bin\")) ){\n\n LLModel.GenerationConfig config = LLModel.config()\n .withNPredict(4096).build();\n\n // String result = gptjModel.generate(prompt, config, true);\n gptjModel.chatCompletion(\n List.of(Map.of(\"role\", \"system\", \"content\", \"You are a helpful assistant\"),\n Map.of(\"role\", \"user\", \"content\", \"Add 2+2\")), config, true, true);\n\n\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public void setBindings(Binding[] binds) {\n this.binds = binds;\n }", "public void setBindings(Binding[] binds) {\n this.binds = binds;\n }", "public void baiscSetting(){\n generations_ = 0;\n maxGenerations_ = ((Integer) this.getInputParameter(\"maxGenerations\")).intValue();\n populationSize_ = ((Integer) this.getInputParameter(\"populationSize\")).intValue();\n mutation_ = operators_.get(\"mutation\");\n crossover_ = operators_.get(\"crossover\");\n selection_ = operators_.get(\"selection\");\n learning_ = operators_.get(\"learning\");\n\n }", "@Override\n public void initShaderProgram(util.ShaderProgram shaderProgram, Map<String, String> shaderVarsToVertexAttribs) {\n Objects.requireNonNull(glContext);\n GL3 gl = glContext.getGL().getGL3();\n\n shaderLocations = shaderProgram.getAllShaderVariables(gl);\n this.shaderVarsToVertexAttribs = new HashMap<String, String>(shaderVarsToVertexAttribs);\n shaderLocationsSet = true;\n }", "@Override\n public void simpleInitApp()\n {\n stateManager.detach(stateManager.getState(StatsAppState.class));\n\n viewPort.setBackgroundColor(new ColorRGBA(0.7f, 0.9f, 1, 1));\n\n initBoard();\n\n rootNode.attachChild(board);\n rootNode.addLight(createDirectionalLight());\n rootNode.addLight(createAmbientLight());\n\n initKeys();\n }", "public void initializeObliqueLaunch(){\r\n world = new Environment();\r\n cannon = new Thrower();\r\n ball = new Projectile();\r\n this.setInitialValues();\r\n }", "@Override\n\tpublic void bind() {\n\t\t\n\t}", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "public static void main(final String[] args) throws BindException, InjectionException {\n // TODO : build LocalRuntimeConfiguration\n\n /*\n final Tang tang = Tang.Factory.getTang();\n\n final JavaConfigurationBuilder cb = tang.newConfigurationBuilder();\n\n try {\n new CommandLine(cb)\n .registerShortNameOfClass(Local.class)\n .registerShortNameOfClass(TimeOut.class)\n .registerShortNameOfClass(LinearSGD_REEF.InputDir.class)\n .processCommandLine(args);\n\n } catch (final IOException ex) {\n LOG.log(Level.SEVERE, \"Configuration error: cannot load data\", ex);\n throw new RuntimeException(\"Configuration error: cannot load data\", ex);\n }\n\n final Injector injector = tang.newInjector(cb.build());\n\n final boolean isLocal = injector.getNamedInstance(Local.class);\n final int jobTimeout = injector.getNamedInstance(TimeOut.class);\n final String inputDir = injector.getNamedInstance(LinearSGD_REEF.InputDir.class);\n\n final Configuration runtimeConfiguration;\n if (isLocal) {\n LOG.log(Level.INFO, \"Running on the local runtime\");\n runtimeConfiguration = LocalRuntimeConfiguration.CONF\n .set(LocalRuntimeConfiguration.NUMBER_OF_THREADS, NUM_LOCAL_THREADS).build();\n } else {\n LOG.log(Level.INFO, \"Running on YARN\");\n runtimeConfiguration = YarnClientConfiguration.CONF.build();\n }\n\n final EvaluatorRequest computeRequest = EvaluatorRequest.newBuilder()\n .setNumber(NUM_COMPUTE_EVALUATORS)\n .setMemory(1024)\n .setNumberOfCores(4)\n .build();\n\n final Configuration dataLoadConfiguration = new DataLoadingRequestBuilder()\n .setMemoryMB(1024)\n .setInputFormatClass(TextInputFormat.class)\n .setInputPath(inputDir)\n .setNumberOfDesiredSplits(NUM_SPLITS)\n .setComputeRequest(computeRequest)\n .setDriverConfigurationModule(DriverConfiguration.CONF\n .set(DriverConfiguration.GLOBAL_LIBRARIES, EnvironmentUtils.getClassLocation(LinearSGD_Driver.class))\n .set(DriverConfiguration.ON_CONTEXT_ACTIVE, LinearSGD_Driver.ContextActiveHandler.class)\n .set(DriverConfiguration.ON_TASK_COMPLETED, LinearSGD_Driver.TaskCompletedHandler.class)\n .set(DriverConfiguration.DRIVER_IDENTIFIER, \"DataLoadingREEF\"))\n .build();\n\n final LauncherStatus status = run(runtimeConfiguration, JOB_TIMEOUT);\n */\n final Configuration runtimeConfiguration = LocalRuntimeConfiguration.CONF\n .set(LocalRuntimeConfiguration.NUMBER_OF_THREADS, NUM_LOCAL_THREADS)\n .build();\n final LauncherStatus status = run(runtimeConfiguration, TIMEOUT);\n LOG.log(Level.INFO, \"REEF job completed: {0}\", status);\n }", "private void initKeybinds() {\n spellbind1 = KeyBindingHelper.registerKeyBinding(new KeyBinding(\n \"key.malazan.spell1\", // The translation key of the keybinding's name\n InputUtil.Type.KEYSYM, // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse.\n GLFW.GLFW_KEY_Z, // The keycode of the key\n \"category.malazan.spells\"\n ));\n // The translation key of the keybinding's name\n // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse.\n // The keycode of the key\n // The translation key of the keybinding's category.\n spellbind2 = KeyBindingHelper.registerKeyBinding(new KeyBinding(\n \"key.malazan.spell2\", // The translation key of the keybinding's name\n InputUtil.Type.KEYSYM, // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse.\n GLFW.GLFW_KEY_X, // The keycode of the key\n \"category.malazan.spells\" // The translation key of the keybinding's category.\n ));\n }", "private void applyBindings(Bindings bindings) {\n\t\tfor (Map.Entry<String, Object> binding : bindings.entrySet()) {\n\t\t\tluaState.pushJavaObject(binding.getValue());\n\t\t\tString variableName = binding.getKey();\n\t\t\tint lastDotIndex = variableName.lastIndexOf('.');\n\t\t\tif (lastDotIndex >= 0) {\n\t\t\t\tvariableName = variableName.substring(lastDotIndex + 1);\n\t\t\t}\n\t\t\tluaState.setGlobal(variableName);\n\t\t}\n\t}", "private void initializeVariable() {\n\n\t\tlearn = (Button) findViewById(R.id.learnButton);\n\t\tlearn.setOnClickListener(this);\n\t\tplay = (Button) findViewById(R.id.playButton);\n\t\tplay.setOnClickListener(this);\n\t\tmode = (Button) findViewById(R.id.b_mode);\n\t\tmode.setOnClickListener(this);\n\t\tmode.setText(Global.currentMode + \" MODE\");\n\t\tclassID_SD = \"com.example.northamericanwildlifesounds.SOUNDDISPLAY\";\n\t\tsetUpAnimalData();\n\t}", "public static void main(String[] args) {\n\t\tRandom rn = new Random();\n\t\tint low = -100;\n\t\tint high = 100;\n\t\tGen_Random_Number(low, high);\n\n\t}", "public void Setup(int nPoints, float swp, float shp, float ssu)\n {\n Random rnd = new Random();\n\n // Our collection of vertices\n vertices = new float[nPoints*VERTICES_PER_GLYPH*TOTAL_COMPONENT_COUNT];\n\n // Create the vertex data\n for(int i=0;i<nPoints;i++) {\n int offset_x = rnd.nextInt((int)swp);\n int offset_y = rnd.nextInt((int)shp);\n\n float llu = rnd.nextInt(2) * 0.5f;\n float llv = rnd.nextInt(2) * 0.5f;\n \n \n AddGlyph(offset_x, offset_y, ssu, llu, llv, 0.5f, 0.5f);\n }\n\n // The indices for all textured quads\n indices = new short[nPoints*3*TRIANGLES_PER_GLYPH]; \n int last = 0;\n for(int i=0;i<nPoints;i++) {\n // We need to set the new indices for the new quad\n indices[(i*6) + 0] = (short) (last + 0);\n indices[(i*6) + 1] = (short) (last + 1);\n indices[(i*6) + 2] = (short) (last + 2);\n indices[(i*6) + 3] = (short) (last + 0);\n indices[(i*6) + 4] = (short) (last + 2);\n indices[(i*6) + 5] = (short) (last + 3);\n\n // Our indices are connected to the vertices so we need to keep them\n // in the correct order.\n // normal quad = 0,1,2,0,2,3 so the next one will be 4,5,6,4,6,7\n last = last + 4;\n }\n\n // The vertex buffer.\n ByteBuffer bb = ByteBuffer.allocateDirect(vertices.length * BYTES_PER_FLOAT);\n bb.order(ByteOrder.nativeOrder());\n vertexBuffer = bb.asFloatBuffer();\n vertexBuffer.put(vertices);\n vertexBuffer.position(0);\n\n // initialize byte buffer for the draw list\n ByteBuffer dlb = ByteBuffer.allocateDirect(indices.length * BYTES_PER_SHORT);\n dlb.order(ByteOrder.nativeOrder());\n indexBuffer = dlb.asShortBuffer();\n indexBuffer.put(indices);\n indexBuffer.position(0);\n\n }", "public void run() {\n energy = 2;\n redBull = 0;\n gun = 1;\n target = 1;\n }", "int glGetAttribLocation(int program, String name);" ]
[ "0.68881005", "0.66150653", "0.65154374", "0.64614856", "0.61125124", "0.5642222", "0.56382376", "0.5623153", "0.5591104", "0.55871207", "0.55651206", "0.5461227", "0.54486847", "0.54422283", "0.5418563", "0.54070747", "0.53997105", "0.53654706", "0.53062093", "0.5284147", "0.5282477", "0.5234251", "0.5163421", "0.5149554", "0.5148886", "0.5140971", "0.5116263", "0.51090896", "0.5109056", "0.50866216", "0.5075183", "0.5037516", "0.5027646", "0.50262487", "0.5009231", "0.50083447", "0.49927256", "0.49776912", "0.49763483", "0.49750718", "0.49719536", "0.49662393", "0.496412", "0.49545565", "0.49541938", "0.49537382", "0.49495858", "0.4946436", "0.49450967", "0.49436018", "0.49307725", "0.4929378", "0.49279124", "0.4922866", "0.49228543", "0.49202526", "0.4904736", "0.4896672", "0.4889842", "0.4885642", "0.48843977", "0.48770443", "0.48760828", "0.4874788", "0.4874788", "0.48742008", "0.4867748", "0.48608422", "0.4857231", "0.4856922", "0.48502088", "0.48436198", "0.48352677", "0.48331416", "0.48189083", "0.4806842", "0.47997707", "0.47986346", "0.47973472", "0.47952107", "0.47922045", "0.4789623", "0.4786415", "0.47853047", "0.47825962", "0.47825962", "0.47752097", "0.47737977", "0.47728762", "0.4772512", "0.47650245", "0.47646356", "0.47644803", "0.47593752", "0.47584385", "0.4752506", "0.4751461", "0.47486183", "0.47467384", "0.47448522" ]
0.5900145
5
Stop using this program
protected void end() { glUseProgram(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop() {}", "public void stop() {\r\n\t\t//If the program has an error this will stop the program\r\n\t\ttry {\r\n\t\t\trunning = false;\r\n\t\t\tg.dispose();\r\n\t\t\tthread.join();\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void stop() {\n\t\texec.stop();\n\t}", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "public boolean stop();", "public void stop() {\n\t\tSystem.out.println(\"Stopping application\");\n\t\trunning = false;\n\t}", "public void stop(){\n quit = true;\n }", "public void stop()\n\t{\n\t\trunning = false;\n\t}", "public void stop() throws CoreHunterException;", "public void stop() {\n\t\tSystem.out.println(\"结束系统1\");\r\n\t}", "public void stop() {\r\n\t\t// Tell the Gui Agent to shutdown the system\r\n\t\tGui.shutdown = true;\r\n\t}", "public void stop() {\n\t\tthis.stopper = true;\n\t}", "public void stop() {\n System.out.println(\"stop\");\n }", "public void stop() {\n\t\tthis.flag = false;\n\t\t\n\t\t\n\t}", "public void stop() {\n }", "public void stop() {\n }", "public void stop() {\n\t\t\n\t}", "public void stop() {\n intake(0.0);\n }", "public void stop()\r\n\t{\r\n\t\tdoStop = true;\r\n\t}", "public void stop() {\r\n running = false;\r\n }", "public void stop() {\n\t}", "public void stop() {\n stop = true;\n }", "public void stop() {\n System.out.println(\"STOP!\");\n xp.stop();\n }", "public void stop() {\n _running = false;\n }", "public void stopping();", "public void stop() {\n running = false;\n }", "public void stop()\n {\n running = false;\n }", "public synchronized void stop() {\n this.running = false;\n }", "public void stop() {\r\n isRunning = false;\r\n System.out.println(\"Stop sim\");\r\n }", "public void stop() {\n\t\tplaybin.stop();\n\t}", "public void stop()\n {\n }", "abstract public void stop();", "public void stop(){\n\t\t\n\t}", "private void stop() {\r\n\t\tif (!running)\r\n\t\t\treturn;\r\n\t\trunning = false;\r\n\t\ttry {\r\n\t\t\tthread.join();//ends thread to close program correctly\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);//closes canvas\r\n\t\t}\r\n\t}", "public void stop(){\n return;\n }", "public void stopEngine(){\r\n isEngineRunning = false;\r\n System.out.println(\"[i] Engine is no longer running.\");\r\n }", "public void stop() {\r\n _keepGoing = false;\r\n }", "public void stop() {\n setClosedLoopControl(false);\n }", "public void stop(){\n running = false;\n }", "public final void stop() {\n running = false;\n \n \n\n }", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}", "public void stop() {\n\t\tthis.stopTime = System.nanoTime();\n\t\tthis.running = false;\n\t}", "private void safeStop() {\n getRobotDrive().stop();\n //pneumatics.stop();\n }", "public synchronized void stop() {\n try {\n if (isRunning) {\n isRunning = false;\n thread.join();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.exit(0);\n }", "void stop() {\n\t\texitTesting = true;\n\t}", "@Override\n public void stop()\n {\n final String funcName = \"stop\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n if (playing)\n {\n analogOut.setAnalogOutputMode((byte) 0);\n analogOut.setAnalogOutputFrequency(0);\n analogOut.setAnalogOutputVoltage(0);\n playing = false;\n expiredTime = 0.0;\n setTaskEnabled(false);\n }\n }", "@Override\n\t\t\tpublic void cancel() {\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "public void stop() {\n enable = false;\n }", "public void stopProcess() {\r\n\t\tprocess = false;\r\n\t}", "@Override\n public void stop() {}", "public void cancel() {\r\n\t\tbStop = true;\r\n\t}", "public void stop(){\n stop = true;\n }", "public void stop() {\n log.info(\"Stopped\");\n execFactory.shutdown();\n cg.close();\n }", "static void stop() {\n flag = 0;\n }", "void stop() throws IOException;", "public void stop () {\n driveRaw (0);\n }", "public void stop(){\n }", "public synchronized void stop() {\n\t\tif (!running)\n\t\t\treturn;\n\t\ttry {\n\t\t\toptions.save();\n\t\t\twindow.dispose();\n\t\t\trunning = false;\n\t\t\tthread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tSystem.exit(1);\n\t}", "public void stop() {\n m_enabled = false;\n }", "@Override\r\n public void stop() {\r\n }", "@Override\r\n public void stop() {\r\n }", "@Override\n\tpublic void stop()\n\t\t{\n\t\t}", "@Override public void stop() {\n }", "public void stopRunning() {\n try {\n _running = false;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void stop() {\n }" ]
[ "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.79077584", "0.7907684", "0.78985757", "0.78792495", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.7689122", "0.76356703", "0.76323915", "0.7629119", "0.761987", "0.7608577", "0.7600006", "0.75874627", "0.75648594", "0.7550245", "0.75318336", "0.7528247", "0.7528247", "0.7525341", "0.75205696", "0.75125456", "0.7504282", "0.75003487", "0.7475256", "0.7473149", "0.74649745", "0.7464941", "0.7464309", "0.74623066", "0.74505633", "0.7449013", "0.74276936", "0.7417825", "0.7376307", "0.73498625", "0.7322206", "0.7283214", "0.7275065", "0.72728914", "0.72453105", "0.72380555", "0.72368425", "0.7231253", "0.7231253", "0.7231253", "0.7231253", "0.7231253", "0.7230778", "0.72211784", "0.72090423", "0.7204644", "0.71652544", "0.7158465", "0.7154817", "0.7153447", "0.7148286", "0.71422726", "0.71408683", "0.7137313", "0.7127478", "0.7122705", "0.7115462", "0.7114819", "0.7113878", "0.70822394", "0.7081754", "0.70812196", "0.70812196", "0.7075174", "0.70683604", "0.70664775", "0.70607203" ]
0.0
-1
Delete this program so that it doesn't take up memory anymore
protected void delete() { glUseProgram(0); glDetachShader(programID, vShaderID); glDetachShader(programID, fShaderID); glDeleteShader(vShaderID); glDeleteShader(fShaderID); glDeleteProgram(programID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void destroy() {\n \t\ttry {\r\n \t\t\tupKeep.stopRunning();\r\n \t\t} catch (InterruptedException e) {\r\n \t\t}\r\n \r\n \t\t// Kill all running processes.\r\n \t\tfor (MaximaProcess mp : pool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tpool.clear();\r\n \r\n \t\t// Kill all used processes.\r\n \t\tfor (MaximaProcess mp : usedPool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tusedPool.clear();\r\n \t}", "public void dispose()\r\n {\r\n \r\n //ILogger::instance()->logInfo(\"Deleting program %s\", _name.c_str());\r\n \r\n // if (_manager != NULL) {\r\n // _manager->compiledProgramDeleted(_name);\r\n // }\r\n \r\n for (int i = 0; i < _nUniforms; i++)\r\n {\r\n if (_createdUniforms[i] != null)\r\n _createdUniforms[i].dispose();\r\n }\r\n \r\n for (int i = 0; i < _nAttributes; i++)\r\n {\r\n if (_createdAttributes[i] != null)\r\n _createdAttributes[i].dispose();\r\n }\r\n \r\n _createdAttributes = null;\r\n _createdUniforms = null;\r\n \r\n if (!_gl.deleteProgram(this))\r\n {\r\n ILogger.instance().logError(\"GPUProgram: Problem encountered while deleting program.\");\r\n }\r\n }", "private void clearMemory() {\n\t\tRunningAppMgr.getInstance(this).killAll();\n\t\tsetMemory();\n\t}", "public void destroy() {\n this.octaveExec.destroy();\n }", "public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}", "public static void destroy() {\n\t}", "public static void main(String[] args) {\n System.out.println(\"=========================\");\n deleteLab(19);\n }", "public void destroy() {\n\t\tSystem.out.println();\r\n\t}", "private static void deleteMemo() {\n\t\t\n\t}", "private static void gc() {\n System.gc();\n System.gc();\n }", "public void removeProgramWithoutExecution(Program p) {\n mConnection.removeRecording(mConfig, p);\n }", "public void destroy(){\n runner.destroy();\n }", "protected void cleanup() {\n // if the java runtime is holding onto any files in the build dir, we\n // won't be able to delete them, so we need to force a gc here\n System.gc();\n\n if (deleteFilesOnNextBuild) {\n // delete the entire directory and all contents\n // when we know something changed and all objects\n // need to be recompiled, or if the board does not\n // use setting build.dependency\n //Base.removeDir(tempBuildFolder);\n \n // note that we can't remove the builddir itself, otherwise\n // the next time we start up, internal runs using Runner won't\n // work because the build dir won't exist at startup, so the classloader\n // will ignore the fact that that dir is in the CLASSPATH in run.sh\n Base.removeDescendants(tempBuildFolder);\n \n deleteFilesOnNextBuild = false;\n } else {\n // delete only stale source files, from the previously\n // compiled sketch. This allows multiple windows to be\n // used. Keep everything else, which might be reusable\n if (tempBuildFolder.exists()) {\n String files[] = tempBuildFolder.list();\n for (String file : files) {\n if (file.endsWith(\".c\") || file.endsWith(\".cpp\") || file.endsWith(\".s\")) {\n File deleteMe = new File(tempBuildFolder, file);\n if (!deleteMe.delete()) {\n System.err.println(\"Could not delete \" + deleteMe);\n }\n }\n }\n }\n }\n \n // Create a fresh applet folder (needed before preproc is run below)\n //tempBuildFolder.mkdirs();\n }", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy() {\n destroyIn(0);\n }", "public void destroy() {}", "public void destroy() {}", "public void destroy() {\r\n\r\n\t}", "public boolean deleteOnExit();", "public final void destroy() {\n requestExit();\n }", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "public void destroy() {\n\t\t\n\t}", "public void destroy() {\n\t\t\n\t}", "public void destroy() {\n\t\t\n\t}", "public void destroy() {\n\t\t\n\t}", "public void destroy() {\n\t\t\n\t}", "public void destroy() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tAuto miAuto=new Auto(); // 3388\n\t\tAuto miOtroAuto=miAuto; // 3388\n\t\t\n\t\tmiAuto=new Auto();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.gc();\n\t\t\n\t}", "public void destroy() {\n\n\t}", "public void destroy() {\n\n\t}", "public void destroy() {\n\n\t}", "public void destroy() {\n\n\t}", "public void destroy() {\n\n\t}", "public void destroy() {\n\n\t}", "public void clearProgramSpecCache() {\n programSpec = null;\n }", "void purge();", "public void destroy()\r\n\t{\r\n\t}", "public void destroy()\r\n\t{\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void deleteInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been stopped\");\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void clearMainClass();", "void destroy();", "void destroy();", "void destroy();", "void destroy();", "void destroy();", "void destroy();", "void destroy();", "void destroy();", "void destroy();", "void destroy();", "void destroy();", "void destroy();", "@Override\n public void terminateProgram() {\n \n }", "public void destroy() {\r\n }", "public void destroy() {\n \t\n }", "public void gc();", "public static void deleteInstance()\r\n\t{\r\n\t\tlightManager = null;\r\n\t}", "@Override\n\tpublic void destroyProcess() {\n\t\tsuper.destroyProcess();\n\t\tDataDirRemoverHandler ddhHandler = \n\t\t\tnew DataDirRemoverHandler(getLogHandler());\n\t\tddhHandler.setRetryLimitInMillis(2000);\n\t\tddhHandler.execute();\n\t\tportsInUse.remove(port);\n\t}", "public void destroy() {\r\n Display.destroy();\r\n System.exit(0);\r\n }", "private static void exit(){\n\t\t\n\t\tMain.run=false;\n\t\t\n\t}", "public void destroy()\r\n\t{\r\n\t\tlog.fine(\"destroy\");\r\n\t}", "public void destroy()\r\n {\r\n }", "public void destroy()\n\t{\n\t}", "public void destroy() {\n\t\ttry {\n\t\t\tdestroy(10000);\n\t\t}\n\t\tcatch(SQLException e) {}\n\t}", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }" ]
[ "0.6513268", "0.6449591", "0.6416124", "0.6406355", "0.63442016", "0.61974895", "0.61931396", "0.61184263", "0.6025858", "0.5982212", "0.59722924", "0.5960927", "0.5885364", "0.58771384", "0.58771384", "0.58771384", "0.58771384", "0.58771384", "0.58771384", "0.58771384", "0.58771384", "0.58770066", "0.58745897", "0.58745897", "0.5859437", "0.58570313", "0.5819837", "0.5810511", "0.58066225", "0.58066225", "0.58066225", "0.58066225", "0.58066225", "0.58066225", "0.5799457", "0.57979", "0.57979", "0.57979", "0.57979", "0.57979", "0.57979", "0.57929635", "0.57869995", "0.57834053", "0.57705057", "0.5766282", "0.5766282", "0.5766282", "0.5766282", "0.57617", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.5756408", "0.57561153", "0.5755909", "0.5755909", "0.5755909", "0.5755909", "0.5755909", "0.5755909", "0.5755909", "0.5755909", "0.5755909", "0.5755909", "0.5755909", "0.5755909", "0.57523227", "0.57476246", "0.5742473", "0.5742198", "0.57415926", "0.57267594", "0.5726079", "0.5720925", "0.57138973", "0.5705693", "0.5696444", "0.56842566", "0.5682988", "0.5682988", "0.5682988", "0.5682988", "0.5682988", "0.5682988", "0.5682988", "0.5682988", "0.5682988", "0.5682988" ]
0.6539409
0
A representation of the model object 'Double Type'.
public interface DoubleType extends NumericType { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class getValueType() {\n return Double.class;\n }", "public Double getDoubleAttribute();", "@java.lang.Override\n public double getRealValue() {\n if (typeCase_ == 4) {\n return (java.lang.Double) type_;\n }\n return 0D;\n }", "public boolean isDouble() {\n return false;\n }", "public double getRealValue() {\n if (typeCase_ == 4) {\n return (java.lang.Double) type_;\n }\n return 0D;\n }", "public double doubleValue() {\n\t\treturn mDouble;\n\t}", "public double getDouble();", "Double getDoubleValue();", "public double getDoubleValue() {\n\t\treturn value;\r\n\t}", "public double getDouble() {\r\n\t\treturn (value.getDouble());\r\n\t}", "public double getDoubleValue() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not a double.\");\n }", "public boolean isDouble() {\n return this.data instanceof Double;\n }", "public boolean isDouble();", "public double asDouble() {\r\n\t\tif (this.what == SCALARTYPE.Integer || this.what == SCALARTYPE.Float) {\r\n\t\t\treturn (new BigDecimal(this.scalar)).doubleValue();\r\n\t\t} else\r\n\t\t\treturn 0; // ritorna un valore di default\r\n\t}", "public Double\n getDoubleValue() \n {\n return ((Double) getValue());\n }", "public double doubleValue() {\n return this.value;\n }", "public String toString() {\n\t\treturn String.valueOf(mDouble);\n\t}", "public int getAxisType()\n {\n return DOUBLE;\n }", "public double doubleValue() {\n return (double) value;\n }", "public double doubleValue() {\r\n return (double) intValue();\r\n }", "public double getDoubleValue()\n {\n return (double) getValue() / (double) multiplier;\n }", "public Double toDouble() {\n\t\treturn this.getValue().doubleValue();\n\t}", "public double getDoubleValue1() {\n return doubleValue1_;\n }", "public double doubleValue() {\n return (double) m_value;\n }", "public String getDatatype()\n {\n return mDatatype;\n }", "public double getDoubleValue1() {\n return doubleValue1_;\n }", "DType getType();", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default double asDouble() {\n \n return notSupportedCast(BasicTypeID.DOUBLE);\n }", "double getEDouble();", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "@Override\n public Double value(TypeOfValue value);", "public TupleDesc addDouble(String name) {\n columns.add(new TupleDescItem(Type.DOUBLE, name));\n return this;\n }", "public Double getDouble(String attr) {\n return (Double) super.get(attr);\n }", "public double getDoubleValue() {\n\t\treturn (this.numerator/1.0)/this.denominator;\n\t}", "public double value()\n\t{\n\t\treturn _dblValue;\n\t}", "public double doubleValue();", "public boolean realAsDouble() {\n return false;\n }", "@Override\n\tpublic Type getType() {\n\t\treturn Type.FLOAT;\n\t}", "@Test\n public void test_column_type_detection_double() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"12.3e4\", XSDDatatype.XSDdouble), true, Types.DOUBLE, Double.class.getCanonicalName());\n Assert.assertEquals(16, info.getScale());\n Assert.assertEquals(16, info.getPrecision());\n Assert.assertTrue(info.isSigned());\n }", "public double toDouble() {\n return this.toDoubleArray()[0];\n }", "public static JSONNumber Double(double doubleVal) {\n\t\tJSONNumber number = new JSONNumber( Double.toString( doubleVal ) );\n\t\tnumber.doubleVal = doubleVal;\n\t\treturn number;\n\t}", "public String getDataType() \n {\n System.out.println(dataType.getValue().toString());\n return dataType.getValue().toString(); \n }", "public Double getDouble(String key) throws JsonException {\r\n\t\tObject object = get(key);\r\n\t\tDouble result = PrimitiveDataTypeConvertor.toDouble(object);\r\n\t\tif (result == null) {\r\n\t\t\tthrow PrimitiveDataTypeConvertor.exceptionType(key, object, \"Double\");\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public abstract T fromDouble(Double d);", "Double getValue();", "public String getDTypeName() {\n return DTYPE.getName(this.dtype);\n }", "public Double getDouble(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null || value.value == null)\n\t\t\treturn null;\n\t\tif(value.type != ValueType.DOUBLE)\n\t\t\tthrow new JsonTypeException(value.value.getClass(), Double.class);\n\t\treturn (Double)value.value;\n\t}", "public String getType() {\r\n\t\treturn \"Quad\";\r\n\t}", "public Double getDouble(double defaultVal) {\n return get(ContentType.DoubleType, defaultVal);\n }", "public MutableDouble() {\n\t\tsuper();\n mDouble = 0;\n\t}", "@Override\n\t\t\tpublic double getAsDouble() {\n\t\t\t\treturn Math.random();\n\t\t\t}", "public abstract Double toDouble(T t);", "public String getScriptOfParametersDouble() {\r\n\t\tString str = \"\";\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tif (var.getType().equals(\"double\") || var.getType().equals(\"int\")) {\r\n\t\t\t\tstr += var.getName() + \",\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (str.endsWith(\",\")) {\r\n\t\t\tstr = str.substring(0, str.length() - 1);\r\n\t\t}\r\n\t\treturn str;\r\n\t}", "public double getDoubleValue2() {\n return doubleValue2_;\n }", "public final void mDOUBLE() throws RecognitionException {\n try {\n int _type = DOUBLE;\n // /Users/benjamincoe/HackWars/C.g:249:8: ( INTEGER_LITERAL '.' INTEGER_LITERAL )\n // /Users/benjamincoe/HackWars/C.g:249:10: INTEGER_LITERAL '.' INTEGER_LITERAL\n {\n mINTEGER_LITERAL(); \n match('.'); \n mINTEGER_LITERAL(); \n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "public void addDouble(String name, double value) {\n DOUBLES.add(new SimpleMessageObjectDoubleItem(name, value));\n }", "public static Double toDouble(Object o,byte type) throws ExecException {\n try {\n switch (type) {\n case BOOLEAN:\n return (Boolean) o ? Double.valueOf(1.0D) : Double.valueOf(0.0D);\n\n case INTEGER:\n return new Double(((Integer)o).doubleValue());\n\n case LONG:\n return new Double(((Long)o).doubleValue());\n\n case FLOAT:\n return new Double(((Float)o).doubleValue());\n\n case DOUBLE:\n return (Double)o;\n\n case DATETIME:\n return new Double(Long.valueOf(((DateTime)o).getMillis()).doubleValue());\n\n case BYTEARRAY:\n return Double.valueOf(((DataByteArray)o).toString());\n\n case CHARARRAY:\n return Double.valueOf((String)o);\n\n case BIGINTEGER:\n return Double.valueOf(((BigInteger)o).doubleValue());\n\n case BIGDECIMAL:\n return Double.valueOf(((BigDecimal)o).doubleValue());\n\n case NULL:\n return null;\n\n case BYTE:\n case MAP:\n case INTERNALMAP:\n case TUPLE:\n case BAG:\n case UNKNOWN:\n default:\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to a Double\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n } catch (ClassCastException cce) {\n throw cce;\n } catch (ExecException ee) {\n throw ee;\n } catch (NumberFormatException nfe) {\n int errCode = 1074;\n String msg = \"Problem with formatting. Could not convert \" + o + \" to Double.\";\n throw new ExecException(msg, errCode, PigException.INPUT, nfe);\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Double.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n }", "Rule DoubleConstant() {\n // Push 1 DoubleConstNode onto the value stack\n return Sequence(\n Sequence(\n Optional(NumericSign()),\n ZeroOrMore(Digit()),\n Sequence('.', OneOrMore(Digit())),\n MaybeScientific()),\n actions.pushDoubleConstNode());\n }", "public double get_double() {\n return local_double;\n }", "void writeDouble(double value);", "public double getDoubleValue2() {\n return doubleValue2_;\n }", "public double doubleValue() {\n if (originalValue instanceof Double) {\n return (Double) originalValue;\n } else if (originalValue instanceof Number) {\n return ((Number) originalValue).doubleValue();\n } else if (originalValue instanceof String) {\n try {\n return Double.parseDouble((String) originalValue);\n } catch (NumberFormatException e) {\n throw new CellValueCastException(e);\n }\n } else {\n throw new CellValueCastException();\n }\n }", "public String getType() {\n\t\treturn \"Triple\";\n\t}", "public static double getDoubleProperty(String key) {\r\n\t\treturn getDoubleProperty(key, 0);\r\n\t}", "double getDoubleValue2();", "public double doubleValue()\n\t\t{\n\t\t\t// Converts BigIntegers to doubles and then divides \n\t\t\treturn (numerator.doubleValue()*1)/denominator.doubleValue();\n\t\t}", "public abstract Double getDataValue();", "public double getDouble(int pos) {\n return Tuples.toDouble(getObject(pos));\n }", "public double[] getDoubleArray() {\r\n\t\treturn (value.getDoubleArray());\r\n\t}", "public DoubleProperty valueProperty() {\n return value;\n }", "public double fieldValuetoDouble() {\n return Double.parseDouble(this.TF_Field_Value); // This just might throw and Exception. \n }", "public double getDoubleValue() {\n if (getValueIndex() <= 0)\n return 0D;\n return ((DoubleEntry) getPool().getEntry(getValueIndex())).getValue();\n }", "@Override\r\n\tpublic String typeV() {\n\t\treturn hio.TyreType();\r\n\t}", "public final DoubleProperty valueProperty() {\n return value;\n }", "public int getDataType()\n {\n return dtype;\n }", "double readDouble()\n throws IOException {\n return Double.longBitsToDouble( readLong() );\n }", "public Double value() {\n return this.value;\n }", "public String getDataType()\n {\n String v = (String)this.getFieldValue(FLD_dataType);\n return StringTools.trim(v);\n }", "public String toString()\n {\n StringBuffer sb = new StringBuffer(\"DoubleBoundedRangeModel[value=\"); //$NON-NLS-1$\n sb.append(\n Double.valueOf((double) getValue() / (double) multiplier).toString());\n sb.append(\", extent=\"); //$NON-NLS-1$\n sb.append(Double.valueOf(dblExtent).toString());\n sb.append(\", minimum=\"); //$NON-NLS-1$\n sb.append(Double.valueOf(dblMinimum).toString());\n sb.append(\", maximum=\"); //$NON-NLS-1$\n sb.append(Double.valueOf(dblMaximum).toString());\n sb.append(\", precision=\"); //$NON-NLS-1$\n sb.append(Integer.valueOf(precision).toString());\n sb.append(\", multiplier=\"); //$NON-NLS-1$\n sb.append(Integer.valueOf(multiplier).toString());\n sb.append(\", adj=\"); //$NON-NLS-1$\n sb.append(Boolean.valueOf(getValueIsAdjusting()).toString());\n sb.append(\"]\"); //$NON-NLS-1$\n\n return sb.toString();\n }", "public double getDouble(String key) {\n\t\treturn Double.parseDouble(get(key));\n\t}", "@Override\n public String toString() {\n return value + symbol(this.type);\n }", "public static String DoubleToString(double DoubleValue){\n Double doublee = new Double(DoubleValue);\n return doublee.toString(); \n }", "public final void mT__28() throws RecognitionException {\n try {\n int _type = T__28;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalIotLuaXtext.g:28:7: ( 'double' )\n // InternalIotLuaXtext.g:28:9: 'double'\n {\n match(\"double\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public DoubleField() {\n\t\tthis(\"\", Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);\n\t}", "public byte[] serialize(Double object, TypeOptions options) {\n\t\treturn null;\n\t}", "public MyDouble() {\n this.setValue(0);\n }", "public double toDouble(){\n return (double)this.numerator /(double)this.denominator;\n }", "public DoubleValue() {\n this.value = 0;\n }", "public abstract double read_double();", "double readDouble();", "public static double leerDouble() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public Class getDataType() {\n return datatype;\n }", "public DoubleValue(double num) {\n this.num = num;\n }", "public String getDataType() ;", "private final double get_DOUBLE(int column) {\n if (metadata.isZos()) {\n byte[] bytes = new byte[8];\n dataBuffer_.getBytes(columnDataPosition_[column - 1], bytes);\n return FloatingPoint.getDouble_hex(bytes, 0);\n //return dataBuffer_.getDouble(columnDataPosition_[column - 1]);\n } else {\n return dataBuffer_.getDoubleLE(columnDataPosition_[column - 1]);\n// return FloatingPoint.getDouble(dataBuffer_,\n// columnDataPosition_[column - 1]);\n }\n }", "public double getConvertedValue() {\n return value;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"float\";\r\n\t}", "@Override\r\n public double getBaseWeight() { return type.getWeight(); }", "public static final SourceModel.Expr showDouble(SourceModel.Expr d) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showDouble), d});\n\t\t}", "double getDoubleValue1();" ]
[ "0.74470466", "0.70673686", "0.70172715", "0.6903323", "0.68667185", "0.68506855", "0.6785051", "0.6719953", "0.6718368", "0.67016774", "0.6677877", "0.66286707", "0.66135794", "0.65770155", "0.65587884", "0.6499583", "0.6455605", "0.6445919", "0.64068496", "0.6298077", "0.627702", "0.6272498", "0.6272394", "0.6264434", "0.62485564", "0.6204621", "0.61917275", "0.61883146", "0.61734647", "0.6157048", "0.61549395", "0.6100404", "0.6072002", "0.60711443", "0.60498774", "0.60177106", "0.59984976", "0.5986264", "0.5974737", "0.595212", "0.5948724", "0.5944842", "0.5912363", "0.5908943", "0.58926237", "0.58911836", "0.5886699", "0.58809274", "0.5874069", "0.58673126", "0.5860081", "0.58262867", "0.5822439", "0.5821463", "0.58169556", "0.5814533", "0.58086115", "0.58043367", "0.5800312", "0.57948804", "0.5792133", "0.57615155", "0.57552445", "0.5737645", "0.57329535", "0.5729209", "0.57253194", "0.57123923", "0.5707433", "0.5705423", "0.5699673", "0.5693264", "0.569246", "0.56917787", "0.56888556", "0.567883", "0.56747174", "0.5670876", "0.56622124", "0.5660846", "0.5659756", "0.5658738", "0.5651876", "0.56416583", "0.5637527", "0.56374717", "0.56319207", "0.56217307", "0.561638", "0.5614905", "0.5613433", "0.5612803", "0.56112397", "0.56069267", "0.5605634", "0.5604858", "0.56044745", "0.5603126", "0.5602835", "0.5600202" ]
0.60763013
32
Add a room to the level
public boolean addRoom(String name, String id, String description, String enterDescription){ for(int i = 0; i < rooms.size(); i++){ Room roomAti = (Room)rooms.get(i); if(roomAti.id.equals(id)){ return false; } } rooms.add(new Room(name, id, description, enterDescription)); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toString(),\r\n mChemicalDiet.getText().toString(),\r\n mTextureDiet.getText().toString(),\r\n mLiquidDiet.getText().toString(),\r\n mLikes.getText().toString(),\r\n mDislikes.getText().toString(),\r\n mNotes.getText().toString(),\r\n mMeal.getText().toString(),\r\n mDessert.getText().toString(),\r\n mBeverage.getText().toString(),\r\n RoomActivity.mFacilityKey);\r\n mFirebaseDatabaseReference.push().setValue(roomPojo);\r\n Utils.countCensus(RoomActivity.mFacilityKey);\r\n Utils.countNumRoomsFilled(RoomActivity.mHallKey, RoomActivity.mHallStart, RoomActivity.mHallEnd);\r\n }\r\n //close the dialog fragment\r\n RoomDialog.this.getDialog().cancel();\r\n }", "public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "@Override\r\n public void setRoom(Room room) {\n this.room = room; //set the hive room\r\n roomList.add(this.room); // add room to the list\r\n }", "public Room addRoom(Room room) {\r\n\t\tif(userService.adminLogIn) {\r\n\t\t\treturn roomRepository.save(room);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new AdminPermissionRequired(\"admin permission required!!\");\r\n\t\t}\r\n\t}", "private void enterRoom(Room room)\r\n \t{\r\n \t\tif(room.isFull())\r\n \t\t\treturn; // Cannot enter the room\r\n \t\tVector2i pos = room.addCharacter(this, true);\r\n \t\tif(pos == null)\r\n \t\t\treturn; // Cannot enter the room (but should not occur here)\r\n \t\tif(currentRoom != null)\r\n \t\t{\r\n \t\t\t// Quit the last room\r\n \t\t\troom.removeCharacter(this);\r\n \t\t}\r\n \t\tcurrentRoom = room;\r\n \t\tx = pos.x;\r\n \t\ty = pos.y;\r\n \t\t// Debug\r\n \t\tLog.debug(name + \" entered in the \\\"\" + room.getType().name + \"\\\"\");\r\n \t}", "public void addRoom(Chatroom room){\n\n }", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "public boolean addRooms(int id, String location, int numRooms, int price)\n throws RemoteException, DeadlockException;", "public void addRoom(int number, int capacity) {\n\t\t\tRooms newRoom = new Rooms(number, capacity);\r\n\t\t\tRoomDetails.add(newRoom);\r\n\t\t}", "public void addRoom(String name, String size) {\n Room newRoom = new Room(this, name, size);\n rooms.add(newRoom);\n }", "public void enterRoom(Room room) {\n currentRoom = room;\n }", "@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}", "public void nextRoom() {\n room++;\n createRoom();\n }", "public void createRoom() {\n int hp = LabyrinthFactory.HP_PLAYER;\n if (hero != null) hp = hero.getHp();\n try {\n labyrinth = labyrinthLoader.createLabyrinth(level, room);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n characterLoader.createCharacter(level, room);\n hero = characterLoader.getPlayer();\n if (room > 1) hero.setHp(hp);\n createMonsters();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void addRoom(String roomNumber, Double price, RoomType roomType) {\r\n\r\n Room room = new Room(roomNumber, price, roomType);\r\n\r\n if (roomList.contains(getARoom(roomNumber))) {\r\n System.out.println(\"This room number already exists. The room can not be created.\");\r\n } else {\r\n //room = new Room(room.getRoomNumber(), room.getRoomPrice(), room.getRoomType());\r\n roomList.add(room);\r\n System.out.println(\"The room was successfully added to our room list.\");\r\n }\r\n }", "public void addMonster(Monster monster,Room room) {\n\t\troom.addMonster(monster);\n\t}", "public Room createRoom(Room room);", "public void createRoom(Rect room) {\n for(int x = room.x1 + 1; x < room.x2; x++) {\n for(int y = room.y1 + 1; y < room.y2; y++ ) {\n dungeon.map[x][y].blocked = false;\n dungeon.map[x][y].blockSight = false;\n }\n }\n }", "public static String addRoom(ArrayList<Room> roomList) {\n System.out.println(\"Add a room:\");\n String name = getRoomName();\n System.out.println(\"Room capacity?\");\n int capacity = keyboard.nextInt();\n System.out.println(\"Room buliding?\");\n String building1 = keyboard.next();\n System.out.println(\"Room location?\");\n String location1 = keyboard.next();\n Room newRoom = new Room(name, capacity, building1, location1);\n roomList.add(newRoom);\n if (capacity == 0)\n System.out.println(\"\");\n return \"Room '\" + newRoom.getName() + \"' added successfully!\";\n\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "public void addItemToRoom(Item item) {\n this.ItemsInRoom.put(item.getName(), item);\n }", "public void initRooms(Room room) {\n rooms.add(room);\n internalList.add(room);\n }", "public void addSpawners(Room room) {\n\t\tint shiftX = (map.chunkX * 16) - (map.room.length / 2) + 8;\n\t\tint shiftZ = (map.chunkZ * 16) - (map.room.length / 2) + 8;\n\t\t//for(Room room : rooms) {\t\t\t\n\t\t\t//DoomlikeDungeons.profiler.startTask(\"Adding to room \" + room.id);\n\t\t\tfor(Spawner spawner : room.spawners) {\n\t\t\t\t\tDBlock.placeSpawner(map.world, shiftX + spawner.x, spawner.y, shiftZ + spawner.z, spawner.mob);\n\t\t\t}\n\t\t\tfor(BasicChest chest : room.chests) {\n\t\t\t\tchest.place(map.world, shiftX + chest.mx, chest.my, shiftZ + chest.mz, random);\n\t\t\t}\n\t\t\t//DoomlikeDungeons.profiler.endTask(\"Adding to room \" + room.id);\n\t\t//}\t\n\t}", "Room updateOrAddRoom(String username, Room room);", "public void setRoom(Room room) {\n currentRoom = room;\n }", "void setRoom(int inRoom) {\n \t\tgraphics.setRoom(inRoom);\n \t}", "public void createRoom(int len, int leftWid, int rightWid) {\n switch (facing) {\n case \"Up\":\n addUpBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Down\":\n addDownBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Left\":\n addLeftBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Right\":\n addRightBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n default:\n System.out.println(\"The wizard loses his direction!\");\n\n }\n }", "protected void setRoom() {\n\t\tfor(int x = 0; x < xSize; x++) {\n\t\t\tfor (int y = 0; y < ySize; y++) {\n\t\t\t\tif (WALL_GRID[y][x] == 1) {\n\t\t\t\t\tlevelSetup[x][y] = new SimpleRoom();\n\t\t\t\t} else{\n\t\t\t\t\tlevelSetup[x][y] = new ForbiddenRoom();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// put special rooms\n\t\tlevelSetup[6][0] = new RoomWithLockedDoor();\n\t\tlevelSetup[2][6] = new FragileRoom();\n\n\t}", "private Room addRandomRoom(Random random) {\n int width = RandomUtils.uniform(random, MINROOMWIDTH, MAXROOMWIDTH);\n int height = RandomUtils.uniform(random, MINROOMHEIGHT, MAXROOMHEIGHT);\n int xCoordinate = RandomUtils.uniform(random, 0, size.width - width);\n int yCoordinate = RandomUtils.uniform(random, 0, size.height - height);\n Room newRoom = new Room(new Position(xCoordinate, yCoordinate), new Size(width, height));\n drawRoom(newRoom);\n return newRoom;\n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "void joinRoom(int roomId) throws RoomNotFoundException, RoomPermissionException, IOException;", "public Room( Rectangle r){\n\t\tthis.r = r;\n\t}", "public boolean addRoom(String roomName) {\n\t\ttry{\n\t\t\tif(rooms.contains(roomName)){ // ja existe\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn rooms.add(roomName);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public void updateRoom(Room room);", "public void setRoom(Room room) {\r\n\t\tthis.room = room;\r\n\t}", "public void setCurrentRoom(Room newRoom) {\n playerRoom = newRoom;\n }", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\n\t}", "public void addItem(Item item,Room room) {\n\t\troom.addItems(item);\n\t}", "public void setRoom(String room) {\n\t\tthis.room = room;\n\t}", "public void incrementNumberOfRooms() {\n\t\t\n\t\tnumberOfRooms++;\n\t}", "private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "private void loadRoom(Room room) {\n if(currentRooms.isEmpty()) {\n // Add the passed-in Room to the list of selected Rooms.\n this.currentRooms.add(room);\n // Load the data from the Room into the InfoPanel.\n this.roomNameField.setText(room.getName());\n this.includeField.setText(room.getInclude());\n this.inheritField.setText(room.getInherit());\n this.streetNameField.setSelectedItem(room.getStreetName());\n this.determinateField.setText(room.getDeterminate());\n this.lightField.setText(room.getLight());\n this.shortDescriptionField.setText(room.getShort());\n this.longDescriptionField.setText(room.getLong());\n updateExitPanel(room);\n } else {\n this.currentRooms.add(room);\n }\n }", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "public void moveToRoom(Rooms room) {\n this.currentRoom = room;\n }", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "@RequestMapping(method = RequestMethod.POST)\n public ResponseEntity<?> addGameRoom(@RequestBody Game gameRoom) {\n try {\n ls.addGameRoom(gameRoom);\n return new ResponseEntity<>(HttpStatus.CREATED);\n } catch (LacmanPersistenceException ex) {\n Logger.getLogger(LacmanController.class.getName()).log(Level.SEVERE, null, ex);\n return new ResponseEntity<>(ex.getMessage(), HttpStatus.FORBIDDEN);\n }\n }", "public void createLevel(){\n for(LevelController rc: rooms ) {\n rc.loadContent();\n rc.setScreenListener(listener);\n rc.setCanvas(canvas);\n }\n }", "void setRoomId(String roomId);", "public void addRoomList(Detail list) {\n\t\t\tRoomList = list;\r\n\t\t}", "public void addNpcToRoom(NPC npc) {\n this.NPCsInRoom.put(npc.getName(), npc);\n npc.setCurrentRoomName(this.roomName);\n }", "public synchronized void setRoom(String room) {\n this.room = room;\n }", "private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }", "RoomInfo room(String name);", "private void createRooms()\n {\n Room a1, a2, a3, b1, b2, b3, c1, c2, c3, bridge, outskirts;\n \n // create the rooms\n a1= new Room(\"see a strong river flowing south to the west. The trees seem to be letting up a little to the north.\");\n a2 = new Room(\" are still in a very dense forest. Maybe the trees are clearing up the the north?\");\n a3 = new Room(\"see a 30 foot cliff looming over the forest to the east. No way you could climb that. Every other direction is full of trees.\");\n b1 = new Room(\"see a strong river flowing to the west. Heavily wooded areas are in all other directions.\");\n b2 = new Room(\"see only trees around you.\");\n b3 = new Room(\"see a 30 foot cliff to the east. There might be one spot that is climbable. Trees surround you every other way.\");\n c1 = new Room(\" see the river cuts east here, but there seems to be a small wooden bridge to the south over it. The trees are less the direction that the river flows.\");\n c2 = new Room(\"are on a peaceful riverbank. If you weren't lost, this might be a nice spot for a picnic.\");\n c3 = new Room(\"see a 30 foot cliff to your east and a strong flowing river to the south. Your options are definitely limited.\");\n outskirts = new Room(\"make your way out of the trees and find yourself in an open field.\");\n cliff = new Room(\"managed to climb up the rocks to the top of the cliff. Going down, doesn't look as easy. You have to almost be out though now!\");\n bridge = new Room(\"cross the bridge and find a small trail heading south!\");\n win = new Room(\" manage to spot a road not too far off! Congratulations on finding your way out of the woods! Have a safe ride home! :)\" );\n fail = new Room(\" are entirely lost. It is pitch black out and there is no way that you are getting out of here tonight. I'm sorry, you LOSE.\");\n \n // initialise room exits\n a1.setExit(\"north\", outskirts);\n a1.setExit(\"east\", a2);\n a1.setExit(\"south\", b1);\n \n a2.setExit(\"east\", a3);\n a2.setExit(\"west\", a1);\n a2.setExit(\"south\", b2);\n a2.setExit(\"north\", outskirts);\n \n a3.setExit(\"north\", outskirts);\n a3.setExit(\"west\", a2);\n a3.setExit(\"south\", b3);\n \n b1.setExit(\"north\", a1);\n b1.setExit(\"east\", b2);\n b1.setExit(\"south\", c1);\n \n b2.setExit(\"east\", b3);\n b2.setExit(\"west\", b1);\n b2.setExit(\"south\", c2);\n b2.setExit(\"north\", a2);\n \n b3.setExit(\"north\", a3);\n b3.setExit(\"west\", b2);\n b3.setExit(\"south\", c3);\n b3.setExit(\"up\", cliff);\n \n c1.setExit(\"north\", b1);\n c1.setExit(\"east\", c2);\n c1.setExit(\"south\" , bridge);\n \n c2.setExit(\"east\", c3);\n c2.setExit(\"west\", c1);\n c2.setExit(\"north\", b2);\n \n c3.setExit(\"west\", c2);\n c3.setExit(\"north\", b3);\n \n outskirts.setExit(\"north\", win);\n outskirts.setExit(\"east\", a3);\n outskirts.setExit(\"west\", a1);\n outskirts.setExit(\"south\", a2);\n \n cliff.setExit(\"north\", outskirts);\n cliff.setExit(\"east\", win);\n \n bridge.setExit(\"north\", c1);\n bridge.setExit(\"south\", win);\n \n c3.addItem(new Item (\"shiny stone\", 0.1));\n a1.addItem(new Item (\"sturdy branch\", 2));\n a3.addItem(new Item(\"water bottle\" , 0.5));\n a3.addItem(new Item(\"ripped backpack\" , 1));\n currentRoom = b2; // start game outside\n }", "RoomInfo room(int id);", "public void setRoom(java.lang.CharSequence value) {\n this.room = value;\n }", "public void setRoomId(int value) {\n this.roomId = value;\n }", "public abstract void enterRoom();", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "public void setRoom(Room room) {\n this.selectedRoom = room;\n }", "@Override\n\tpublic int addImgRoom(int room_id, String name_img, String type_img) {\n\t\treturn roomDao.addImgRoom(room_id, name_img, type_img);\n\t}", "void addLevel(Level level) {\r\n\t\tif (level != null) {\r\n\t\t\tlevelList.addItem(level.toString());\r\n\t\t}\r\n\t}", "Room(RenderWindow window, KeyboardHandler kh, Level level) {\n this.window = window;\n this.kh = kh;\n this.level = level;\n }", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "public void addWall(StructureTypeEnum type, int x1, int y1, int x2, int y2, float qualityLevel, long structureId, boolean isIndoor) {\n/* 3891 */ if (logger.isLoggable(Level.FINEST))\n/* */ {\n/* 3893 */ logger.finest(\"StructureID: \" + structureId + \" adding wall at \" + x1 + \"-\" + y1 + \",\" + x2 + \"-\" + y2 + \", QL: \" + qualityLevel);\n/* */ }\n/* */ \n/* */ \n/* 3897 */ DbWall dbWall = new DbWall(type, this.tilex, this.tiley, x1, y1, x2, y2, qualityLevel, structureId, StructureMaterialEnum.WOOD, isIndoor, 0, getLayer());\n/* 3898 */ addWall((Wall)dbWall);\n/* 3899 */ updateWall((Wall)dbWall);\n/* */ }", "public void setCurrentRoom(Room room)\n {\n addRoomHistory(currentRoom); //this adds room to history log before changing currentRoom\n currentRoom = room; //changes the currentRoom to the new room player enters\n }", "@PostMapping(\"/rooms\")\n public Room createRoom (\n @Valid\n @RequestBody Room room){\n return roomRepository.save(room);\n }", "@Override\n\tprotected void on_room_entered(String room_door_name) {\n\n\t}", "public Room(String roomName) {\n guests = new ArrayList<>();\n roomTier = null;\n this.roomName = roomName;\n this.roomId = RoomId.generate(roomName);\n }", "@Override\n\tpublic void insert(Room ob) {\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tPreparedStatement ps = cn.prepareStatement(\"INSERT INTO room VALUES (?,?)\");\n\t\t\tps.setInt(1, ob.getIdRoom());\n\t\t\tps.setInt(2, ob.getIdRoomType());\n\n\t\t\tps.execute();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t}", "public void addToLevel(GameLevel g) {\r\n g.addCollidable(this);\r\n g.addSprite(this);\r\n }", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "public static Room newRoom(int random){\n String nameRoom = \"\";\n int monsterAmount = 0;\n\t\tMonster monster;\n MonsterFactory monsterFac = new MonsterFactory();\n\t\tmonster= monsterFac.buildMonster((int)(Math.random() * 3) + 1);\n boolean createHealingPot = false;\n boolean createPitRoom = false;\n boolean createPillar = false;\n boolean createEntrance = false;\n boolean createExit = false;\n boolean createVisionPot = false;\n\n switch (random){\n case 1:\n \tnameRoom = \"The Entrance room\";\n \tmonsterAmount = 0;\n createEntrance = true;\n break;\n\n case 2:\n \tnameRoom = \"The Exit room\";\n \tmonsterAmount = 0;\n createExit = true;\n break;\n\n case 3:\n \tnameRoom = \"The room\";\n \tmonsterAmount = 1; //THIS ROOM WILL HAVE 1 MONSTER\n break;\n \n case 4:\n \tnameRoom = \"The Healing Potion room\";\n \tmonsterAmount=(int)(Math.random() * 1) + 0;\n createHealingPot = true;\n break;\n \n case 5:\n \tnameRoom = \"The Pit room\";\n \tmonsterAmount = 0;\n createPitRoom = true;\n break;\n\n case 6:\n \tnameRoom = \"The Pillar room\";\n \tmonsterAmount=(int)(Math.random() * 1) + 0;\n \tcreatePillar = true;\n break;\n \n case 7:\n \tnameRoom = \"The Vision Potion room\";\n \tmonsterAmount=0;\n createVisionPot=true;\n break;\n }\n \n if(monsterAmount <= 0 ) \n return new Room(nameRoom,createHealingPot, createPitRoom, createEntrance, createExit, createPillar, monsterAmount,createVisionPot);\n else\n return new Room(nameRoom,createHealingPot, createPitRoom, createEntrance, createExit, createPillar, monster, monsterAmount,createVisionPot);\n\n }", "public void setRoomID(int value) {\n this.roomID = value;\n }", "public void createRoom(String roomHost, String roomName) throws IOException {\n ChatRoom newRoom = new ChatRoom(roomHost, roomName);\n chatRooms.add(newRoom);\n }", "void makeMoreRooms() {\n\t\twhile(rooms.size() < size.maxRooms) {\n\t\t\t\tRoom made;\n\t\t\t\tint height = baseHeight;\n\t\t\t\tint x = random.nextInt(size.width);\n\t\t\t\tint z = random.nextInt(size.width);\n\t\t\t\tint xdim = random.nextInt(size.maxRoomSize - 5) + 6;\n\t\t\t\tint zdim = random.nextInt(size.maxRoomSize - 5) + 6;\n\t\t\t\tif(bigRooms.use(random)) {\n\t\t\t\t\txdim += random.nextInt((size.maxRoomSize / 2)) + (size.maxRoomSize / 2);\n\t\t\t\t\tzdim += random.nextInt((size.maxRoomSize / 2)) + (size.maxRoomSize / 2);\n\t\t\t\t}\n\t\t\t\tint ymod = (xdim <= zdim) ? (int) Math.sqrt(xdim) : (int) Math.sqrt(zdim);\n\t\t\t\tint roomHeight = random.nextInt((verticle.value / 2) + ymod + 1) + 2;\n\t\t\t\tmade = new PlaceSeed(x, height, z).growRoom(xdim, zdim, roomHeight, this, null, null);\n\t\t\t}\t\t\n\t\t//DoomlikeDungeons.profiler.endTask(\"Adding Extra Rooms (old)\");\n\t\t}", "Room getRoom();", "Room getRoom();", "public void setRoom(Room room) {\n int roomNumber = room.getRoomNumber();\n if (room.getRoomNumber() > internalList.size()) {\n setRoomForRoomNumberLessThanNumberOfRooms(room);\n } else {\n setRoomForRoomNumberMoreThanNumberOfRooms(room);\n }\n }", "public void setRoomId(String roomId) {\n this.roomId = roomId;\n }", "public void addItem(Item toAdd) throws ImpossiblePositionException, NoSuchItemException {\n int itemX = (int) toAdd.getXyLocation().getX();\n int itemY = (int) toAdd.getXyLocation().getY();\n ArrayList<Item> rogueItems = getRogue().getItems();\n int itemFound = 0;\n if ((itemX >= getWidth() - 1) || (itemX <= 0) || (itemY >= getHeight() - 1)\n || (itemY <= 0) || !(roomDisplayArray[itemY][itemX].equals(\"FLOOR\"))) {\n throw new ImpossiblePositionException();\n } else {\n roomItems.add(toAdd);\n }\n for (Item singleItem : rogueItems) {\n if (toAdd.getId() == singleItem.getId()) {\n itemFound = 1;\n }\n }\n if (itemFound != 1) {\n throw new NoSuchItemException();\n }\n\n }", "public static void createGameRooms()\r\n\t{\r\n\t\tfor(int i = 0; i < MAX_FIREWORKS_ROOMS; i++)\r\n\t\t{\r\n\t\t\taddRoom(\"fireworks_\" + i, new VMKGameRoom(\"fireworks_\" + i, \"Fireworks Game \" + i, \"\"));\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < MAX_PIRATES_ROOMS; i++)\r\n\t\t{\r\n\t\t\taddRoom(\"pirates_\" + i, new VMKGameRoom(\"pirates_\" + i, \"Pirates Game \" + i, \"\"));\r\n\t\t}\r\n\t}", "public void createRoom(LoadingDialog load, String code, String nickname, DataSnapshot roomToHaveAccess) {\n DatabaseReference roomRef = firebaseDatabase.getReference(ROOMS_NODE + \"/\" + code);\n room = new Room(nickname,EMPTY_STRING,0,0,0,0,0,0,false,0,0,0,0,0,3);\n\n roomRef.setValue(room, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError error, @NonNull DatabaseReference ref) {\n ref.child(PLAYER2_NODE).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot fieldPlayer2) {\n if(fieldPlayer2.getValue() != null){\n if(! fieldPlayer2.getValue().equals(EMPTY_STRING)){\n // il giocatore accede alla stanza poichè passa tutti i controlli sulla disponibilità del posto in stanza\n load.dismissDialog();\n Intent intent = new Intent(MultiplayerActivity.this,ActualGameActivity.class);\n intent.putExtra(CODE_ROOM_EXTRA,code);\n intent.putExtra(CODE_PLAYER_EXTRA,ROLE_PLAYER1);\n ref.child(PLAYER2_NODE).removeEventListener(this);\n startActivity(intent);\n }\n } else {\n ref.child(PLAYER2_NODE).removeEventListener(this);\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n OfflineFragment offlineFragment = new OfflineFragment();\n offlineFragment.show(getSupportFragmentManager(),\"Dialog\");\n }\n });\n\n }\n });\n\n\n\n }", "public export.serializers.avro.DeviceInfo.Builder setRoom(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.room = value;\n fieldSetFlags()[3] = true;\n return this;\n }", "public DirectorOffice(String description, String name,Room room) {\n\t\tsuper(description, name,room);\n\t this.addItem(new Pass(\"pass-G\"));\n\t}", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "public void setRoomId(Integer roomId) {\n this.roomId = roomId;\n }", "private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }", "public void setRoomId( String roomId ) {\n this.roomId = roomId;\n }", "public void startGame(Room room);", "void update(Room room);", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) \n {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n }\n else {\n //remove energy from the player everytime he switches rooms\n p.energy -= 10;\n System.out.println(\"Energy: \" + p.energy);\n \n \n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n \n }\n }", "public Integer getNewRoom() {\n return newRoom;\n }", "public ViewRoom(Room r) {\n initComponents();\n this.room = r;\n this.workoutNum = 0;\n updateRoom();\n \n }", "public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }", "public EventRoom getNewRoom(){\r\n newRoom.setRoomItems(eventRoomItems);\r\n return newRoom;\r\n }" ]
[ "0.73068196", "0.71655333", "0.6956041", "0.68222314", "0.6796601", "0.6787746", "0.6777691", "0.665178", "0.6627407", "0.66250217", "0.6586057", "0.65826166", "0.65425694", "0.653228", "0.65185463", "0.6492423", "0.645511", "0.6411601", "0.63829064", "0.63715655", "0.63635546", "0.62699467", "0.6260817", "0.6259415", "0.6249786", "0.6243126", "0.6217826", "0.6214531", "0.6208645", "0.6192717", "0.6192246", "0.619092", "0.61787933", "0.6170297", "0.61701375", "0.6133883", "0.6131313", "0.61093783", "0.6109046", "0.6095881", "0.60915", "0.6089981", "0.60759616", "0.6057597", "0.6054967", "0.6048132", "0.60371554", "0.603436", "0.601041", "0.6001091", "0.59850824", "0.5982092", "0.5951284", "0.5911959", "0.5911319", "0.59018546", "0.58986473", "0.58948606", "0.5889952", "0.58724725", "0.5864205", "0.58492553", "0.5846113", "0.5833185", "0.582727", "0.58110446", "0.5809002", "0.58064395", "0.5796705", "0.5780487", "0.57745934", "0.5766495", "0.57553416", "0.5749778", "0.57486427", "0.57471335", "0.5740383", "0.57276905", "0.572698", "0.57193387", "0.57091886", "0.57091886", "0.570706", "0.57056075", "0.5703356", "0.5702802", "0.57020473", "0.56881875", "0.567605", "0.56695557", "0.5667885", "0.56611145", "0.5642853", "0.5642258", "0.5640981", "0.5630047", "0.5627157", "0.56251365", "0.5617601", "0.5615529" ]
0.6263003
22
Remove a room from this level
public boolean removeRoom(String id){ for(int i = 0; i < rooms.size(); i++){ Room roomAti = (Room)rooms.get(i); if(roomAti.id.equals(id)){ rooms.remove(i); return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeRoom(Room room) {\n rooms.remove(room);\n }", "public void remove() {\n removed = true;\n if (room == null)\n return;\n room.removeEntity(this);\n }", "public void deleteRoom(Room room);", "@Override\n\tpublic void removeRoom(int rid) {\n\t\tfor (Person p : findAll()) {\n\t\t\tfor (Room r : findRooms(p.getId())) {\n\t\t\t\tif (r.getId() == rid) {\n\t\t\t\t\tremoveRoom(p.getId(), r);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public void removeRoomFromList(String roomname){\n\t\troomlist.remove(roomname);\t\t\t\n\t}", "private void deleteRoomClicked() {\n postRequestDelete();\n sessionManager.removeRoom(sessionManager.getRoom(), sessionManager.getID());\n sessionManager.leaveRoom();\n }", "Boolean deleteRoom(String roomId);", "private void ExitRoom() {\n stopFirestoreListenerService();\n\n SharedPreferences roomInfo = getSharedPreferences(\"PreviousRoom\", 0);\n SharedPreferences.Editor roomInfoEditor = roomInfo.edit();\n\n roomInfoEditor.putString(\"roomID\", \"\");\n\n roomInfoEditor.apply();\n\n SelectRoomActivity.recentRooms.remove(roomId);\n }", "@Override\n\tpublic void delete(Room t) {\n\t\t\n\t}", "protected static String removeRoom(ArrayList<Room> roomList) {\n System.out.println(\"Remove a room:\");\n\n int index = findRoomIndex(roomList, getRoomName());\n\n if (index != 0) {\n roomList.remove(index);\n return \"Room removed successfully\";\n } else {\n return \"Room doesn't exist!\";\n }\n }", "@Override\n\tpublic int deleteRoom(int room_id) {\n\t\treturn roomDao.deleteRoom(room_id);\n\t}", "public void removeUnavailableRooms(){\n\t}", "public void delete(Room room) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.delete(room);\n\t\tsession.flush();\n\t}", "public void deleteRoom(String roomId) {\n // copy the room from a store to another one\n Room r = getStore().getRoom(roomId);\n\n if (null != r) {\n if (mAreLeftRoomsSynced) {\n Room leftRoom = getRoom(mLeftRoomsStore, roomId, true);\n leftRoom.setIsLeft(true);\n\n // copy the summary\n RoomSummary summary = getStore().getSummary(roomId);\n if (null != summary) {\n mLeftRoomsStore.storeSummary(new RoomSummary(summary, summary.getLatestReceivedEvent(), summary.getLatestRoomState(), getUserId()));\n }\n\n // copy events and receiptData\n // it is not required but it is better, it could be useful later\n // the room summary should be enough to be displayed in the recent pages\n List<ReceiptData> receipts = new ArrayList<>();\n Collection<Event> events = getStore().getRoomMessages(roomId);\n\n if (null != events) {\n for (Event e : events) {\n receipts.addAll(getStore().getEventReceipts(roomId, e.eventId, false, false));\n mLeftRoomsStore.storeLiveRoomEvent(e);\n }\n\n for (ReceiptData receipt : receipts) {\n mLeftRoomsStore.storeReceipt(receipt, roomId);\n }\n }\n\n // copy the state\n leftRoom.getTimeline().setState(r.getTimeline().getState());\n }\n\n // remove the previous definition\n getStore().deleteRoom(roomId);\n }\n }", "@Override\n\tpublic void delete(Room ob) {\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tPreparedStatement ps = cn.prepareStatement(\"DELETE FROM room WHERE id_room = ?\");\n\t\t\tps.setInt(1, ob.getIdRoom());\n\n\t\t\tps.execute();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t}", "public export.serializers.avro.DeviceInfo.Builder clearRoom() {\n room = null;\n fieldSetFlags()[3] = false;\n return this;\n }", "public void unbookRoom(int room) {\n availableRooms.add(availableRooms.size(), room);\n unavailableRooms.remove(unavailableRooms.indexOf(room));\n unavailableRooms = unavailableRooms.stream().sorted().collect(Collectors.toList());\n availableRooms = availableRooms.stream().sorted().collect(Collectors.toList());\n System.out.println(\"Thank you for staying! See you next time.\");\n }", "public void deleteChatRoom(ChatRoom cr);", "private void removePlayerFromLobby() {\n\n //Added Firebase functionality assuming var player is the player who wants to leave the game.\n }", "public boolean delRoom(String roomName) {\n\t\ttry{\n\t\t\tif (rooms.remove(roomName)) {\n\t\t\t\treturn true;\n\t\t }\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "void leaveRoom(int roomId) throws IOException;", "public Builder clearRoomId() {\n copyOnWrite();\n instance.clearRoomId();\n return this;\n }", "@Modifying\r\n @Query(\"delete from Window w where w.room.id= ?1\")\r\n void deleteByRoom(Long id);", "public void leaveRoom(Person x) {\n\t\toccupant = null;\n\t}", "@Modifying\n @Query(value = \"delete from RWindow w where w.ROOM_ID = :roomId\", nativeQuery = true )\n int deleteWindowByRoom(@Param(\"roomId\") Long roomId);", "public void remove(Lobby lobby) {\n DocumentReference doc = Firebase.docRefFromPath(\"lobbies/\" + lobby.getGameCode());\n doc.delete();\n }", "void remove(int level) {\n if (containsKey(level)) {\n set(level, null);\n }\n }", "public static void removeCharacter(String username, String room)\r\n\t{\r\n\t\tcharacters.remove(username);\r\n\t\trooms.get(room).removeCharacterName(username);\r\n\t}", "public void removePassenger() {\n\t\t\n\t\tsynchronized(this) {\n\t\t\tif(currentOccup > 0)\n\t\t\t\tcurrentOccup--;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Elevator \" + elevatorNum + \" total passenger count: \" + currentOccup);\n\t}", "public String removeRoomById(int roomNo){\r\n\t\t\r\n\t\tif(userService.adminLogIn) {\r\n\t\t\tOptional<Room> room = roomRepository.findById(roomNo);\r\n\t\t\tif (!room.isPresent()) {\r\n\t\t\t\tthrow new RoomNotFoundException(\"room not present!!Cannot delete\");\r\n\t\t\t} else {\r\n\t\t\t\troomRepository.delete(room.get());\r\n\t\t\t\treturn \"deleted successfully\";\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new AdminPermissionRequired(\"admin permission is required!!\");\r\n\t\t}\r\n\t\t\r\n\t}", "public void remove(){\n Api.worldRemover(getWorld().getWorldFolder());\n }", "public void moveToRoom(Rooms room) {\n this.currentRoom = room;\n }", "protected void removeLane()\n {\n if (lane == 1)\n {\n\n MyWorld.Lane1Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 2)\n {\n MyWorld.Lane2Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 3)\n {\n MyWorld.Lane3Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 4)\n {\n MyWorld.Lane4Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 5)\n {\n MyWorld.Lane5Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n MyWorld.monsterAdded();\n }", "@Test\r\n\tpublic final void testDeleteRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\tassertTrue(success);\r\n\t\t// get room (id) due to autoincrement\r\n\t\tRoom copy = roomServices.getRoomByName(expected2.getName());\r\n\t\t// remove room (thru id)+verify\r\n\t\tsuccess = roomServices.deleteRoom(copy);\r\n\t\tassertTrue(success);\r\n\t\t// verify thru id search, verify null result\r\n\t\tRoom actual = roomServices.getRoomById(copy.getId());\r\n\t\tassertNull(actual);\r\n\t}", "public Evolver remove(Location loc)\n {\n Evolver occupant = getGrid().get(loc);\n if (occupant == null)\n return null;\n occupant.removeSelfFromGrid();\n return occupant;\n }", "public synchronized void removeTheWarrior(){\n charactersOccupiedTheLocation[0]=null;\n notifyAll();\n }", "public boolean deleteRoom(int roomId) {\r\n try {\r\n SQL = \"DELETE from ROOMS where ID = \" + roomId + \";\";\r\n stmt.executeUpdate(SQL);\r\n return true;\r\n } catch (SQLException err) {\r\n // Find a way to print out the error or not.\r\n return false;\r\n }\r\n\r\n }", "public void removeFromWorld(World world);", "public void removeLevel()\n {\n clearLevelAndDecreaseCount();\n }", "public void removeNpcFromRoom(NPC npc) {\n this.NPCsInRoom.remove(npc.getName());\n npc.setCurrentRoomName(null);\n }", "public void removeFromfeatures (org.unitime.timetable.model.RoomFeature roomFeature) {\n \t\tif (null == getFeatures()) \n \t\t\tsetFeatures(new java.util.HashSet());\n \t\tgetFeatures().remove(roomFeature);\n \t}", "@Override\r\n public String removeMember(String room, String user) {\r\n Objects.requireNonNull(room);\r\n Objects.requireNonNull(user);\r\n final Map<String, String> roomMembers = this.members.get(room);\r\n final String value = roomMembers == null || roomMembers.isEmpty() ? null : roomMembers.remove(user);\r\n LOG.debug(\"Member: {}, value: {}, room: {}, room members: {}\", \r\n user, value, room, roomMembers);\r\n return value;\r\n }", "void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}", "public void removeFromGame(GameLevel gameLevel) {\n gameLevel.removeSprite(this);\n }", "public void removeFromGame(GameLevel gameLevel) {\n gameLevel.removeSprite(this);\n }", "public void removeFromGame(GameLevel gameLevel) {\n gameLevel.removeSprite(this);\n }", "@Override\n public void onClickButtonCancel(Object roomToCancel) {\n // durante il caricamento della stanza il giocatore annulla il tentativo di creazione stanza\n String room =(String) roomToCancel;\n\n DatabaseReference roomToDelete = firebaseDatabase.getReference(ROOMS_NODE).child(room);\n\n roomToDelete.removeValue( new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError error, @NonNull DatabaseReference ref) {\n loadingDialog.dismissDialog();\n dialogCodeRoom.dismiss();\n }\n });\n\n }", "public void removePlayerFromCurrentLobby(LobbyPlayer player) {\n DocumentReference doc = Firebase.docRefFromPath(\"lobbies/\" + player.getLobbyCode());\n doc.update(FieldPath.of(\"players\", player.getUsername()), FieldValue.delete());\n removeListener();\n GameService.removeListener();\n cache = null;\n }", "public void leaveRoom(Person x)\n {\n occupant = null;\n }", "public void leaveRoom(Person x)\n {\n occupant = null;\n }", "@Override\n\tpublic void remove()\n\t{\n\t\tsuper.remove();\n\t\tgetMyPlayer().getGoldMines().remove(this);\n\t}", "public void removeItemFromRoomMap(String string) {\n this.ItemsInRoom.remove(string);\n }", "@RequestMapping(value = \"/Reservation/{reservation_reservationId}/room/{room_roomId}\", method = RequestMethod.DELETE)\n\t@ResponseBody\n\tpublic void deleteReservationRoom(@PathVariable Integer reservation_reservationId, @PathVariable Integer related_room_roomId) {\n\t\treservationService.deleteReservationRoom(reservation_reservationId, related_room_roomId);\n\t}", "public void removeByequip_id(long equip_id);", "@Override\n public void destroy() {\n super.destroy();\n dungeon.removeEntity(this);\n }", "public boolean deleteRooms(int id, String location)\n throws RemoteException, DeadlockException;", "void deleteRoom(int id) throws DataAccessException;", "public void removeFromLevel(GameLevel g) {\r\n g.removeCollidable(this);\r\n g.removeSprite(this);\r\n }", "@DeleteMapping(path = \"/rooms/{roomId}\")\n public ResponseEntity<?> deleteRoom(@PathVariable String roomId) {\n try {\n Room room = roomService.findRoomById(roomId);\n roomService.deleteRoom(room.getRoomId());\n return new ResponseEntity<>(HttpStatus.OK);\n } catch (RoomNotFoundException e) {\n throw new NotFoundException(e.getMessage());\n }\n }", "@Override\n protected void onDestroy() {\n db.collection(\"users\").document(userId).update(\"room\", FieldValue.delete());\n\n super.onDestroy();\n }", "public void deleteUser(String room, String name) {\n ((GroupChatPanel)grouptabs.get(room)).deleteUser(name);\n \n }", "public void remove()\n {\n domain.removeParticipant(participant);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\taddRoom(new PR1(getSandbox()));\r\n\t\t\t\tremoveMe();\r\n\t\t\t}", "public void EleaveRoom(Enemy1 x)\n\t{\n\t\toccupant = null;\n\t}", "@Override\n\tpublic boolean deleteHotelroom(int hotelID, int roomID) {\n\t\tString hotelroomId = String.valueOf(hotelID)\n\t\t\t\t+String.valueOf(roomID);\n\t\tif(map.get(hotelroomId)!=null) {\n\t\t\thotelroomDataHelper.deleteHotelroom(roomID, hotelID);;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void removeUser(long id) {\n\troomMembers.remove(id);\n }", "public void remove(Equipment equipment) {\n equipments.remove(equipment);\n }", "void removeRoute(McastRoute route);", "public void resetLastRoom(){this.aLastRooms.clear();}", "public void Remove(Floor obj) {\n floorList.remove(obj);\n }", "private void removeArea() {\n \t\tthis.set.remove( this.area );\n \t\tthis.finish();\n \t}", "private void clearRoomId() {\n \n roomId_ = 0L;\n }", "public void remove() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void removePlayer(Player plr){\r\n\t\t\r\n\t\tlobby.removePlayerFromLobby(plr);\r\n\t\tlobby.updateNames();\r\n\t\tsendNameInfoToAll();\r\n\t\tremoveConnection(plr);\r\n\t}", "public void removeFromGame(){\n this.isInGame = false;\n }", "void removeRocket(RocketDTO rocket);", "public void remove () { this.setAsDown(); n.remove(); }", "public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}", "@Override\n\tpublic void onDeleteRoomDone(RoomEvent arg0) {\n\t\t\n\t}", "void end(String roomId);", "public Weapon removeWeapon(int position, int row, int col)\r\n\t{\r\n\t\tif(row < rows && row >= 0 && col < columns && col >= 0)\r\n\t\t\treturn cells[row][col].removeWeapon(position);\r\n\t\treturn null;\r\n\t}", "public void removeFromGame(GameLevel game) {\r\n game.removeCollidable(this);\r\n game.removeSprite(this);\r\n }", "public void removeWorld(String name){\n worlds.remove(getWorld(name));\n }", "public void removeWeapon(Weapon w) {\n try {\n this.validChoice(w);\n weaponSpawnpoint.removeWeapon(w);\n } catch (WrongValueException wvE) {\n wvE.wrong();\n }\n }", "public void removeRoomItem(Item seekItem )\n {\n // Gets the iterator of the currentRoom's item arraylist.\n for(Iterator<Item> it = currentRoom.getInventory().getItems().iterator();it.hasNext();){\n\n Item item = it.next();\n\n // if seekItem is found in the currentRoom's item arraylist.\n if(item.getName().equals(seekItem.getName())){\n\n it.remove(); // removes the item.\n }\n }\n }", "void removeRobot(Position pos);", "private static void DelRoom (){\n boolean DelRoomLoop = true;\n //loop for delete room process\n while (DelRoomLoop) {\n //checking if there are rooms to delete\n if (HotelRoom.roomList.isEmpty() || HotelRoom.AllRoomsOccupied() == true) {\n System.out.println(\"Apologies, there are no available rooms!\");\n break;\n } \n else {\n System.out.println(\"Here is a list of rooms:\");\n //call the method for showing a list of all rooms\n HotelRoom.DisplayAllRooms();\n System.out.println(\"-----------------------------\");\n System.out.print(\"Room number: \");\n //try/catch for delete room input\n try {\n //get the user's input\n int delRoomNumber = RecInput.nextInt();\n //loop through the room list to find whether the room number matches one of the rooms\n //and delete the one asked by the user\n boolean roomNumberExist = false;\n for (int i = 0; i < HotelRoom.roomList.size(); i++){\n\n if (delRoomNumber == HotelRoom.roomList.get(i).roomNumber && HotelRoom.roomList.get(i).occupied == false){\n roomNumberExist = true;\n //room is deleted\n HotelRoom.roomList.remove(i);\n System.out.println(\"The room number \" + delRoomNumber + \" is deleted\");\n System.out.println(\"-----------------------------\");\n //breaking loop to exit process\n DelRoomLoop = false;\n } \n\n }\n if(roomNumberExist == false) {\n //handling if user inputs incorrect room number\n System.out.println(\"The room number you entered is invalid\");\n System.out.println(\"-----------------------------\");\n }\n }\n catch (Exception InputMismatchException) {\n //handling if user input is not integer\n System.out.println(\"Please enter a number\");\n System.out.println(\"-----------------------------\");\n\n //Cleaning scanner\n RecInput.next();\n }\n }\n }\n }", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void removeFromGame(GameLevel g) {\r\n g.removeSprite(this);\r\n }", "public void removeParty(L2Party party)\r\n\t{\r\n\t\t_partys.remove(party);\r\n\t\t_channelLvl = 0;\r\n\t\tfor (L2Party pty : _partys)\r\n\t\t{\r\n\t\t\tif (pty.getLevel() > _channelLvl)\r\n\t\t\t\t_channelLvl = pty.getLevel();\r\n\t\t}\r\n\t\tparty.setCommandChannel(null);\r\n\t\tparty.broadcastToPartyMembers(ExCloseMPCC.STATIC_PACKET);\r\n\r\n\t\tSystemMessage sm;\r\n\t\tif (_partys.size() < 2)\r\n\t\t{\r\n\t\t\tsm = new SystemMessage(SystemMessageId.COMMAND_CHANNEL_DISBANDED);\r\n \t\tbroadcastToChannelMembers(sm);\r\n\t\t\tdisbandChannel();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse if (_partys.size() < 5)\r\n\t\t{\r\n\t\t\tsm = new SystemMessage(SystemMessageId.COMMAND_CHANNEL_ONLY_AT_LEAST_5_PARTIES);\r\n \t\tbroadcastToChannelMembers(sm);\r\n \t\tsm = new SystemMessage(SystemMessageId.S1_PARTIES_REMAINING_UNTIL_CHANNEL);\r\n \t\tsm.addNumber(5 - _partys.size());\r\n\t\t}\r\n\t\tbroadcastToChannelMembers(new ExMultiPartyCommandChannelInfo(this));\r\n\t}", "public void removeReservation(RoomMgr rm) {\n\n\t\tint rNo;\n\t\tboolean flag = false;\n\t\tScanner input = new Scanner(System.in);\n\t\tIterator<Reservation> iter = rList.iterator();\n\n\t\tif (rList.size() < 1) {\n\t\t\tSystem.out.println(\"No Reservations to remove\\n\");\n\t\t} else {\n\t\t\treadReservationList();\n\t\t\tSystem.out.println(\"Enter the reservation no: \");\n\t\t\trNo = input.nextInt();\n\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tReservation str = iter.next();\n\n\t\t\t\tif (str.getResvNo() == rNo && !flag) {\n\t\t\t\t\t//CHECK IF GUEST IN RESERVATION IS STILL CHECKED-IN\n\t\t\t\t\tif (str.getResvStatus() == rStatus[2]){\n\t\t\t\t\t\tSystem.out.println(\"Reservation number \" + rNo + \" cannot be removed as guest is still checked-in!\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\titer.remove();\n\t\t\t\t\t\trm.assignRoom(str.getRoomNo(),0); //Make room vacant\n\t\t\t\t\t\tnumOfReservation--;\n\t\t\t\t\t\tSystem.out.println(\"Reservation number \" + rNo + \" removed!\");\n\t\t\t\t\t}\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!flag)\n\t\t\t\tSystem.out.println(\"Reservation no. does not exist!\");\n\t\t}\n\t}", "@PutMapping(\"/rooms/checkOut/{id}\")\n public Room checkOutRoom(\n @PathVariable(value = \"id\") Long roomId) {\n Room room = roomRepository.findById(roomId)\n .orElseThrow(() -> new ResourceNotFoundException(\"Room\", \"id\", roomId));\n\n //TODO: maybe other exception invalidOperationException\n if (!room.isOccupied()) throw new ResourceNotAvailableException(\"Room\", \"id\", roomId);\n\n room.setActualCapacity(0);\n room.setOccupied(false);\n //TODO: update update time\n\n Room updatedRoom = roomRepository.save(room);\n return updatedRoom;\n }", "public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}", "public void removeFromGame(GameLevel g) {\n if (g != null) {\n g.removeSprite(this);\n g.getBallCounter().decrease(1);\n }\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> deleteRoom(String roomId) {\n return deleteRoom(roomId, null);\n }", "boolean removeObject(RectangleLatLng rectangle, String id);" ]
[ "0.798812", "0.73362315", "0.716577", "0.68484944", "0.6697857", "0.6509087", "0.6449437", "0.6395397", "0.6347737", "0.63388646", "0.62672246", "0.62388915", "0.62321085", "0.6222991", "0.6056267", "0.6015205", "0.6008258", "0.5992015", "0.59828717", "0.5902298", "0.5901871", "0.58821404", "0.58660954", "0.58542585", "0.5853655", "0.5822001", "0.58200127", "0.5815961", "0.58026356", "0.5772699", "0.5757178", "0.57183325", "0.57075834", "0.57009053", "0.56628793", "0.5656932", "0.5654272", "0.56533307", "0.56397533", "0.56302315", "0.56206024", "0.56046224", "0.5598271", "0.55826396", "0.55826396", "0.55826396", "0.55742013", "0.5570133", "0.5548728", "0.5548728", "0.5538232", "0.55375165", "0.5529682", "0.5529575", "0.55165195", "0.55139625", "0.55119103", "0.550103", "0.54971814", "0.54942656", "0.54923177", "0.5485406", "0.5484113", "0.5460386", "0.5455363", "0.5438254", "0.5430132", "0.5411754", "0.5390739", "0.53872883", "0.53750664", "0.53734106", "0.53693426", "0.5348011", "0.5344897", "0.5342094", "0.5340848", "0.53356653", "0.5333358", "0.53026533", "0.53013086", "0.52714413", "0.52682126", "0.5264622", "0.5263832", "0.5258885", "0.5233074", "0.5229163", "0.5229163", "0.5229163", "0.5229163", "0.5229163", "0.5226257", "0.52137893", "0.5210899", "0.52032167", "0.5203053", "0.5191879", "0.5178812", "0.51767313" ]
0.60559344
15
Created by luizramos on 15/06/17.
public interface IServicoPrivadoClienteSemPropostaAPI { public static final String PATH = "ServicoPrivadoClienteSemProposta/"; @GET(PATH) Call<List<ServicoOfertaPrivada>> getAll( @Query("idUsuarioCliente") String idUsuarioCliente ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private void poetries() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void m50366E() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\n public void init() {\n }", "private void kk12() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "private void init() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public void initialize() { \n }", "protected void mo6255a() {\n }", "private void strin() {\n\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo6081a() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public abstract void mo70713b();", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}" ]
[ "0.6168492", "0.6004799", "0.59600294", "0.5866216", "0.5847442", "0.5847442", "0.5798567", "0.57940876", "0.57803476", "0.57757574", "0.5773553", "0.57656103", "0.576515", "0.5755693", "0.57522386", "0.5746306", "0.57461905", "0.57442087", "0.56975424", "0.5697055", "0.56927073", "0.56812775", "0.5668013", "0.5668013", "0.5668013", "0.5668013", "0.5668013", "0.56534636", "0.5648887", "0.56212664", "0.56191033", "0.56124747", "0.56041276", "0.5603431", "0.55972874", "0.55972874", "0.55971366", "0.5583755", "0.558041", "0.557452", "0.5543843", "0.5531867", "0.5531867", "0.5531867", "0.5531867", "0.5531867", "0.5531867", "0.5530536", "0.552839", "0.5526434", "0.5525096", "0.55202186", "0.55202186", "0.5518236", "0.5512339", "0.5512339", "0.5512339", "0.55079174", "0.55033857", "0.55033857", "0.55033857", "0.54971623", "0.54971623", "0.54933465", "0.54883415", "0.5484543", "0.54829365", "0.5481886", "0.54774773", "0.54773325", "0.54773325", "0.54773325", "0.5464885", "0.54586196", "0.54573095", "0.5449598", "0.5441661", "0.5436001", "0.5434558", "0.5413626", "0.5405375", "0.53937113", "0.5390075", "0.5390075", "0.5390075", "0.5390075", "0.5390075", "0.5390075", "0.5390075", "0.5386866", "0.5377772", "0.5375195", "0.5372674", "0.53723824", "0.5364923", "0.5364923", "0.5361051", "0.5356566", "0.5352577", "0.5349458", "0.5349458" ]
0.0
-1
Created by zongbo.zhang on 8/20/18.
public interface CommentService { /** * 通过用户Id查询 * @param userId * @return */ List<Comment> getCommentByUserId(Long userId); /** * 通过primaryKey查询 * @param Id * @return */ Comment getCommentById(Long Id); /** * 通过comment_status 筛选 * @param status * @return */ List<Comment> getCommentByStatus(Integer status); /** * 根据id_list更新状态 * @param status * @param commentIds */ void updateCommentByCommentIds(Byte status,List<Long> commentIds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public final void mo51373a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "public void mo4359a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void strin() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void init() {}", "@Override\n protected void init() {\n }", "public void mo6081a() {\n }", "private void kk12() {\n\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void init() {\n\n\n\n }", "Petunia() {\r\n\t\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "public void mo55254a() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void initialize() { \n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void m50366E() {\n }" ]
[ "0.63408613", "0.6319124", "0.62418336", "0.62040377", "0.62040377", "0.6169467", "0.6100179", "0.6075251", "0.60442257", "0.6038491", "0.59923464", "0.59863263", "0.5984704", "0.59801555", "0.5951967", "0.59337366", "0.5891327", "0.58912885", "0.58869857", "0.58821774", "0.58754903", "0.5872221", "0.5871892", "0.58604246", "0.58600706", "0.5852473", "0.5850631", "0.5850631", "0.58365786", "0.58345914", "0.58345914", "0.58345914", "0.58345914", "0.58345914", "0.5814229", "0.58139914", "0.5810096", "0.5785475", "0.5784133", "0.5774837", "0.57622784", "0.57554066", "0.57400686", "0.57363874", "0.5729222", "0.5717934", "0.5717934", "0.57151425", "0.5712389", "0.5712389", "0.5712389", "0.57067275", "0.57067275", "0.56923157", "0.56923157", "0.56923157", "0.56900096", "0.56887376", "0.5684103", "0.5684103", "0.5684103", "0.5683579", "0.5683579", "0.5683579", "0.5683579", "0.5683579", "0.5683579", "0.5683579", "0.567284", "0.5667173", "0.5667173", "0.5667173", "0.5667173", "0.5667173", "0.5667173", "0.5663475", "0.56612337", "0.56584436", "0.56542975", "0.56512403", "0.56466085", "0.5644792", "0.56435597", "0.56300306", "0.5629794", "0.5629106", "0.56283975", "0.5620549", "0.56194335", "0.5611526", "0.5603068", "0.55908155", "0.5587625", "0.55868876", "0.5569878", "0.555651", "0.5556064", "0.5544426", "0.554271", "0.5533735", "0.55282915" ]
0.0
-1
Inflating the actionBar menu
@Override public boolean onCreateOptionsMenu(Menu menu){ MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.order_list_actions,menu); if(isFinalized){ MenuItem item = menu.findItem(R.id.action_finalized); item.setVisible(false); //this.invalidateOptionsMenu(); } return super.onCreateOptionsMenu(menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n\n getActivity().getMenuInflater().inflate(R.menu.actions , menu);\n\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.toolbar, menu);\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\r\n\t\tinflater.inflate(R.menu.main_activity_actions, menu);\r\n\r\n\r\n\t\tif(tv==null) {\r\n\t\t\tRelativeLayout badgeLayout = (RelativeLayout) menu.findItem(R.id.action_notification).getActionView();\r\n\t\t\ttv = (TextView) badgeLayout.findViewById(R.id.hotlist_hot);\r\n\t\t\ttv.setText(\"12\");\r\n\t\t}\r\n\r\n\t\t/*menu.findItem(R.id.action_notification).getActionView().setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\r\n\t\t\t\t\tSystem.out.println(\"clicked\");\r\n\t\t\t\t\ttv.setEnabled(false);\r\n\t\t\t\t\ttv.setBackground(null);\r\n\t\t\t\t\ttv.setBackgroundDrawable(null);\r\n\t\t\t\t\ttv.setText(null);\r\n\t\t\t\t\tintent = new Intent(getApplicationContext(), Notification.class);\r\n\t\t\t\t\tstartActivity(intent);\r\n\r\n\t\t\t}\r\n\t\t});*/\r\n\t\t//getActionBar().setCustomView(R.layout.menu_example);\r\n\t\t//getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_HOME_AS_UP);\r\n\t\t//getActionBar().setIcon(android.R.color.transparent);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_actionbar, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tsuper.onCreateOptionsMenu(menu, inflater);\n\tinflater.inflate(R.menu.menu_main, menu);\n\tmenu.findItem(R.id.action_edit).setVisible(false);\n\tmenu.findItem(R.id.action_share).setVisible(false);\n\tmenu.findItem(R.id.action_settings).setVisible(true);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n //getMenuInflater().inflate(R.menu.activity_main, menu);\n \tsuper.onCreateOptionsMenu(menu);\n getSupportMenuInflater().inflate(R.menu.actionbar, menu);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n BatteryIcon = (MenuItem)menu.findItem(R.id.acb_battery);\n setActBarBatteryIcon(Callbacksplit.getsavedBatteryStateIcon());\n ConnectIcon = (MenuItem)menu.findItem(R.id.acb_connect);\n setActBarConnectIcon();\n \n ((MenuItem)menu.findItem(R.id.acb_m_5)).setVisible(false);\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.popmovies_menu, menu);\n\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n MenuItem languageItem = menu.findItem(R.id.toolbar_ic_language);\n MenuItem currencyItem = menu.findItem(R.id.toolbar_ic_currency);\n MenuItem profileItem = menu.findItem(R.id.toolbar_edit_profile);\n MenuItem searchItem = menu.findItem(R.id.toolbar_ic_search);\n MenuItem cartItem = menu.findItem(R.id.toolbar_ic_cart);\n profileItem.setVisible(false);\n languageItem.setVisible(false);\n currencyItem.setVisible(false);\n searchItem.setVisible(false);\n cartItem.setVisible(false);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.stock_picking_options, menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_menu, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.song_action_bar, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu2, menu);\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n\t\tinflater.inflate(R.menu.forecastfragment, menu );\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.actions_save, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.base, menu);\n this.mCustomMenu = menu;\n if (mTypeLayout) {\n AppSingleton.isChangelayout = true;\n menu.findItem(R.id.change_view_actionbar).setIcon(R.mipmap.ic_grid_on_white);\n } else {\n AppSingleton.isChangelayout = true;\n menu.findItem(R.id.change_view_actionbar).setIcon(R.mipmap.ic_list_white);\n }\n return true;\n }", "@Override\n public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {\n actionMode.getMenuInflater().inflate(R.menu.action_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n\n\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater menuInflater = getMenuInflater();\n menuInflater.inflate(R.menu.toolbar_menu, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.cartab, menu);\r\n //getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.my_notes_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_course, menu);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.babysitter_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.tool_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_bar, menu);\n return true;\n\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_screen_list_student, menu);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.childloco_menu, menu);\n //getMenuInflater().inflate(R.menu.childloco_menu, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.forecastfragment, menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(final Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true;\n }", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n /* Use AppCompatActivity's method getMenuInflater to get a handle on the menu inflater */\n MenuInflater inflater = getMenuInflater();\n /* Use the inflater's inflate method to inflate our visualizer_menu layout to this menu */\n inflater.inflate(R.menu.menu_movie, menu);\n /* Return true so that the visualizer_menu is displayed in the Toolbar */\n return true;\n }", "public boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\tActionBar action = getActionBar();\n\t\taction.setBackgroundDrawable(new ColorDrawable(Color.rgb(51, 102, 153)));\n\t\taction.setTitle(\"RollBook App\");\n\t\t\n\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater ().inflate ( R.menu.menu_activity , menu );\n return super.onCreateOptionsMenu ( menu );\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n ActionBar bar = getActionBar();\n int color = Color.parseColor(\"#FF038f0d\");\n bar.setBackgroundDrawable(new ColorDrawable(color));\n return true;\n }", "@Override\n public boolean onCreateActionMode(ActionMode mode, Menu menu) {\n MenuInflater inflater = mode.getMenuInflater();\n inflater.inflate(R.menu.context_menu, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_act1, menu);\r\n return true;\r\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n //HOME = menu.findItem(android.R.id.home);\n //HOME.setIcon(new BitmapDrawable(toolBox.myPhoto));\n card = menu.getItem(0);\n star = menu.getItem(1);\n sett = menu.getItem(2);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n MenuItem menuItem = menu.findItem(R.id.action_room_users);\n menuItem.setIcon(\n new IconicsDrawable(this, FontAwesome.Icon.faw_users).actionBar().color(Color.WHITE));\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n getMenuInflater().inflate(R.menu.action_menu, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.acty_b, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\ngetMenuInflater().inflate(R.menu.main, menu);\nreturn true;\n}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_action_category, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n getMenuInflater().inflate(R.menu.app_bar_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_toolbar, menu);\n return true;\n }", "@Override\r\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_log_list, menu);\r\n }" ]
[ "0.7411398", "0.7392997", "0.7385258", "0.734674", "0.7297856", "0.72941625", "0.7284181", "0.72557265", "0.7219769", "0.7203154", "0.7158693", "0.7090003", "0.7074503", "0.70730454", "0.7070143", "0.70590556", "0.70527995", "0.70441455", "0.7038666", "0.7016882", "0.70063514", "0.6997508", "0.6997508", "0.6995532", "0.6983343", "0.6981412", "0.6979111", "0.6967385", "0.6947334", "0.69441485", "0.693992", "0.69388354", "0.69365853", "0.6928681", "0.6928681", "0.69099873", "0.68876094", "0.68844706", "0.68836474", "0.68824106", "0.6873764", "0.6867067", "0.6865513", "0.6865269", "0.68573344", "0.6852742", "0.68443894", "0.68365353", "0.683577", "0.6835071", "0.6826313", "0.68233657", "0.68191725", "0.6815572", "0.68130416", "0.6809931", "0.6801678", "0.6799546", "0.6796254", "0.67947906", "0.6793392", "0.67891556", "0.6786201", "0.6783604", "0.6781628", "0.67797315", "0.6779059", "0.6771549", "0.6768903", "0.67627853", "0.6759893", "0.6759789", "0.6757397", "0.675323", "0.67521226", "0.6751265", "0.67499083", "0.6747752", "0.674372", "0.6741103", "0.67350566", "0.6731033", "0.6726828", "0.6723832", "0.6723832", "0.6723832", "0.6722415", "0.67215365", "0.67157507", "0.67072374", "0.67068434", "0.6703186", "0.6703186", "0.6701976", "0.6701438", "0.66988987", "0.6697239", "0.6697239", "0.6689066", "0.66870916", "0.6685809" ]
0.0
-1
Handle presses on the action bar items
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_refresh: getOperations(); return true; case R.id.action_qrcode: try{ Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.putExtra("SCAN_MODE","QR_CODE_MODE"); startActivityForResult(intent,0); }catch(Exception e){ Uri marketUri = Uri.parse("market://details?id=com.google.zxing.client.android"); Intent marketIntent = new Intent(Intent.ACTION_VIEW,marketUri); startActivity(marketIntent); e.printStackTrace(); } return true; case R.id.action_logout: UserOperations.flush(); updateOrCreateList(); session.logoutUser(); startLoginActivity(); return true; case R.id.action_finalized: seeFinalized(); default: return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\n\n return true;\n }", "void onMenuItemClicked();", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handling item selection\n switch (item.getItemId()) {\n case R.id.action_home:\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n return true;\n case R.id.action_birds:\n intent = new Intent(this, Birds.class);\n startActivity(intent);\n return true;\n case R.id.action_storm:\n intent = new Intent(this, Storm.class);\n startActivity(intent);\n return true;\n case R.id.action_nocturnal:\n intent = new Intent(this, Nocturnal.class);\n startActivity(intent);\n return true;\n case R.id.action_library:\n intent = new Intent(this, Mylibrary.class);\n startActivity(intent);\n return true;\n case R.id.action_now_playing:\n intent = new Intent(this, Nowplaying.class);\n startActivity(intent);\n return true;\n case R.id.action_download:\n intent = new Intent(this, Download.class);\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.action_help:\r\n Intent help = new Intent(facebookplaces.this,appinstr.class);\r\n startActivity(help);\r\n return true;\r\n default:\r\n // If we got here, the user's action was not recognized.\r\n // Invoke the superclass to handle it.\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\r\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\r\n // TODO Auto-generated method stub\r\n return false;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\n\t\tswitch (item.getItemId()) {\n\t\t\n\t\tdefault:\n\t\t\t\n\t\t\tbreak;\n\n\t\t}//switch (item.getItemId())\n\n\t\t\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case R.id.action_tweet:\n Intent intentTweet = new Intent(\"com.phonbopit.learnandroid.yamba.action.tweet\");\n startActivity(intentTweet);\n return true;\n case R.id.action_purge:\n\n return true;\n case R.id.action_settings:\n Intent intentSettings = new Intent(this, SettingActivity.class);\n startActivity(intentSettings);\n return true;\n case R.id.action_refresh:\n\n return true;\n default:\n return false;\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item){\n super.onOptionsItemSelected(item);\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_browse:\n startActivity(new Intent(this, BrowseActivity.class));\n return true;\n case R.id.action_alphabet:\n startActivity(new Intent(this, AlphabetActivity.class));\n return true;\n case R.id.action_editor:\n startActivity(new Intent(this, EditorActivity.class));\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n Class c = Methods.onOptionsItemSelected(id);\n if (c != null) {\n Intent intent = new Intent(getBaseContext(), c);\n startActivity(intent);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "protected void cabOnItemPress(int position) {}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n finish(); // close this activity and return to preview activity (if there is any)\n } else if (item.getItemId() == R.id.action_copy) {\n presenter.onActionCopy();\n } else if (item.getItemId() == R.id.action_toReddit) {\n presenter.onActionToReddit();\n } else if (item.getItemId() == R.id.action_share) {\n Toast toast = Toast.makeText(this, \"sharing\", Toast.LENGTH_SHORT);\n toast.show();\n } else if (item.getItemId() == R.id.action_addToFavorites) {\n presenter.onActionToggleFavorite();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\n\t\ttry {\n\t\t\t// Handle presses on the action bar items\n\t\t\tswitch (item.getItemId()) {\n\n\t\t\tcase R.id.action_note_map_view_info:\n\t\t\t\tsetCurrentView(NoteMapView.info);\n\t\t\t\treturn true;\n\n\t\t\tcase R.id.action_note_map_view_image:\n\t\t\t\tsetCurrentView(NoteMapView.image);\n\t\t\t\treturn true;\n\n\t\t\tcase R.id.action_note_map_view_map:\n\t\t\t\tsetCurrentView(NoteMapView.map);\n\t\t\t\treturn true;\n\n\t\t\tcase R.id.action_note_map_close:\n\t\t\t\t// close -> go back to FragmentMainInput\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\n\t\t\tdefault:\n\t\t\t\treturn super.onOptionsItemSelected(item);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception ex) {\n\t\t\tLog.e(MODULE_TAG, ex.getMessage());\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch(id) {\n case R.id.action_settings: {\n Intent myIntent = new Intent(Activity_Main.this, Activity_Settings.class);\n Activity_Main.this.startActivity(myIntent);\n return true;\n }\n case R.id.action_moveicons: {\n if (TESTING)\n Toast.makeText(this, \"move icons clicked\", Toast.LENGTH_SHORT).show();\n return true;\n }\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) \n {\n if (mDrawerToggle.onOptionsItemSelected(item)) \n {\n return true;\n }\n // Handle action buttons\n switch(item.getItemId()) \n {\n case R.id.action_websearch:\n // create intent to perform web search for this planet\n Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);\n intent.putExtra(SearchManager.QUERY, getActionBar().getTitle());\n // catch event that there's no activity to handle intent\n if (intent.resolveActivity(getPackageManager()) != null) \n {\n startActivity(intent);\n } \n else\n {\n Toast.makeText(this, R.string.app_not_available, Toast.LENGTH_LONG).show();\n }\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.log:\r\n \tIntent i = new Intent(this, LogItemsActivity.class);\r\n \t\tstartActivity(i);\r\n return true;\r\n case R.id.edit:\r\n \tIntent i1 = new Intent(this, EditItemsActivity.class);\r\n \tstartActivity(i1);\r\n return true;\r\n case R.id.stats:\r\n \tIntent i2 = new Intent(this, BarActivity.class);\r\n \t\tstartActivity(i2);\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n // Respond to a click on the \"Delete all entries\" menu option\r\n case R.id.action_share_list:\r\n // TODO: Action for the App Bar\r\n return true;\r\n case R.id.action_delete:\r\n // TODO: Action for the App Bar\r\n return true;\r\n // Respond to a click on the \"Up\" arrow button in the app bar\r\n case android.R.id.home:\r\n NavUtils.navigateUpFromSameTask(RecordActivity.this);\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case R.id.action_save:\n saveEvent();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(com.actionbarsherlock.view.MenuItem item) {\n\t\tif (mDrawerToggle.onOptionsItemSelected(item)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Handle action buttons\n\t\tswitch (item.getItemId()) {\n\t\t// this is not a desirable approach!\n\t\tcase android.R.id.home:\n\t\t\t// Toast.makeText(this, \"Need to be implemented\",\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t/*\n\t\t\t * android.support.v4.app.FragmentTransaction ft =\n\t\t\t * getSupportFragmentManager().beginTransaction();\n\t\t\t * ft.replace(R.id.container, fmt); ft.commit();\n\t\t\t */\n\n\t\t\tbreak;\n\t\tcase R.id.action_websearch:\n\t\t\t// // create intent to perform web search for this planet\n\t\t\t// Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);\n\t\t\t// intent.putExtra(SearchManager.QUERY, getActionBar().getTitle());\n\t\t\t// // catch event that there's no activity to handle intent\n\t\t\t// if (intent.resolveActivity(getPackageManager()) != null) {\n\t\t\t// startActivity(intent);\n\t\t\t// } else {\n\t\t\t// Toast.makeText(this, R.string.app_not_available,\n\t\t\t// Toast.LENGTH_LONG).show();\n\t\t\t// }\n\n\t\t\t// item.expandActionView();\n\t\t\treturn false;\n\t\tcase R.id.menu_exit:\n\t\t\tthis.exitApplication();\n\t\t\tbreak;\n\t\tcase R.id.action_share:\n\n\t\t\t// String message = \"Text I wan't to share.\";\n\t\t\t// Intent share = new Intent(Intent.ACTION_SEND);\n\t\t\t// share.setType(\"text/plain\");\n\t\t\t// share.putExtra(Intent.EXTRA_TEXT, message);\n\t\t\t// startActivity(Intent.createChooser(share,\n\t\t\t// \"Title of the dialog the system will open\"));\n\n\t\t\tbreak;\n\t\tcase R.id.menu_settings2:\n\t\t\tIntent intent3 = new Intent(this, SettingsPreferences.class);\n\t\t\tstartActivity(intent3);\n\t\t\tbreak;\n\t\tcase R.id.set_date:\n\n\t\t\tfinal CharSequence[] items;\n\t\t\titems = getResources().getTextArray(R.array.dates_for_police);\n\n\t\t\tAlertDialog.Builder builder = Global.giveMeDialog(this, \"Choose a month for police data\");\n\n\t\t\tbuilder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t}\n\t\t\t});\n\t\t\tint i = 0;\n\t\t\tfor (; i < items.length; i++) {\n\t\t\t\tif (items[i].equals(Global.POLICE_DATA_REQUEST_MONTH))\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tbuilder.setSingleChoiceItems(items, i, new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tGlobal.setPOLICE_DATA_REQUEST_MONTH(items[which].toString());\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tbuilder.show();\n\n\t\t\tbreak;\n\t\tcase R.id.register_dialgo_action_bar:\n\t\t\tif (!Global.isRegistered(this)) {\n\t\t\t\tif (regDialog == null) {\n\t\t\t\t\tregDialog = new RegDialogFragment();\n\n\t\t\t\t\tregDialog.show(getSupportFragmentManager(), \"should be changed here\");\n\t\t\t\t} else {\n\t\t\t\t\tregDialog.show(getSupportFragmentManager(), \"should be changed here\");\n\t\t\t\t\t// Toast.makeText(this, DEBUG + \" ID Yes\",\n\t\t\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\titem.setVisible(false);\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase R.id.email_developer:\n\t\t\tIntent intent = new Intent(Intent.ACTION_SEND);\n\t\t\tintent.setType(\"message/rfc822\");\n\t\t\tintent.putExtra(Intent.EXTRA_EMAIL, new String[] { \"[email protected]\" });\n\t\t\tintent.putExtra(Intent.EXTRA_SUBJECT, \"[DESURBS] - YOURSafe\");\n\t\t\tintent.putExtra(Intent.EXTRA_TEXT, \"Hi, Yang \\n\\n\");\n\t\t\ttry {\n\t\t\t\tstartActivity(Intent.createChooser(intent, \"Send mail...\"));\n\t\t\t} catch (android.content.ActivityNotFoundException ex) {\n\t\t\t\tToast.makeText(this, \"There are no email clients installed.\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase R.id.survey_developer:\n\n\t\t\tString url = \"https://docs.google.com/forms/d/1HgHhfY-Xgt53xqMPCZC_Q_rL8AKUhNi9LiPXyhKkPq4/viewform\";\n\t\t\tintent = new Intent(Intent.ACTION_VIEW);\n\t\t\tintent.setData(Uri.parse(url));\n\t\t\tstartActivity(intent);\n\n\t\t\tbreak;\n\n\t\tcase R.id.menu_about:\n\t\t\tToast.makeText(this, \"This is Version \" + this.getString(R.string.version_name), Toast.LENGTH_SHORT).show();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\t//noinspection SimplifiableIfStatement\n\t\tIntent intent;\n\t\tswitch (id) {\n\t\t\tcase R.id.action_info:\n\t\t\t\tif(mBound) {\n\t\t\t\t\tStringBuffer message = new StringBuffer(getVersionInfo());\n\t\t\t\t\tmessage.append(mService.getConnectivityStatus().toString());\n\t\t\t\t\tMediaPlayerService.showMessageInPopup(message, Toast.LENGTH_LONG * 50, false);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\tcase R.id.action_settings:\n\t\t\t\tintent = new Intent(this, SettingsActivity.class);\n\t\t\t\tstartActivityForResult(intent, FavoriteStationsFrame.RESULT_SETTINGS);\n\t\t\t\treturn true;\n\t\t\t/*case R.id.action_add:\n\t\t\t\tintent = new Intent(this, SearchForStationsFrame.class);\n\t\t\t\tstartActivityForResult(intent, FavoriteStationsFrame.RESULT_ADD_STATIONS);\n\t\t\t\treturn true;*/\n\t\t\tcase R.id.action_help:\n\t\t\t\tintent = new Intent(this, HelpActivity.class);\n\t\t\t\tintent.putExtra(HelpActivity.ARG_SECTION_NUMBER, mViewPager.getCurrentItem());\n\t\t\t\tstartActivity(intent);\n\t\t\t\treturn true;\n\t\t\t/*case R.id.action_help1:\n\t\t\t\tintent = new Intent(this, HelpTabbedActivity.class);\n\t\t\t\tintent.putExtra(HelpTabbedActivity.PlaceholderFragment.ARG_SECTION_NUMBER, mViewPager.getCurrentItem());\n\t\t\t\tstartActivity(intent);\n\t\t\t\treturn true;*/\n\t\t\tcase android.R.id.home:\n\t\t\t\tif(mViewPager.getCurrentItem() == SEARCH_FOR_STATIONS)\n\t\t\t\t\tbreak;\n\t\t\tcase R.id.action_exit:\n\t\t\t\tHandler delayedPost = new Handler();\n\t\t\t\tdelayedPost.postDelayed(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\texitApp();\n\t\t\t\t\t}\n\t\t\t\t}, 100);//exitApp();\n\t\t\t\treturn true;\n\t\t\tcase R.id.action_volume_down:\n\t\t\tcase R.id.action_volume_up:\n\t\t\t\tif(mBound)\n\t\t\t\t\tmService.changeVolumeLevel(id==R.id.action_volume_up);\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (mDrawerToggle.onOptionsItemSelected(item)) {\n\t\t\treturn true;\n\t\t}\n\t\t// Handle action bar actions click\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.action_rate:\n\n\t\t\n\t\t\tToast.makeText(con, \"rate button is clicked\", 1000).show(); \n\n\t\t\treturn true;\n\t\t\t\n\t\tcase R.id.action_best:\n\n\t\t\t\n\t\t\tToast.makeText(con, \"Best button is clicked\", 1000).show(); \n\n\t\t\treturn true;\n\t\t\t\n\t\t\t\n\t\tcase R.id.action_liked:\n\n\t\t\t\n\t\t\tToast.makeText(con, \"liked button is clicked\", 1000).show(); \n\n\t\t\treturn true;\n\t\t\t\n\t\t\t\n\t\tcase R.id.action_language:\n\t\t{\n\t\t\tToast.makeText(con, \"Language button is clicked\", 1000).show(); \n\t\t\t\n\t\t\t\n\t\t\tString lCode=\"en\";\n\t\t\t\n\t\t\tif(PersistData.getStringData(con, \"LNG\").equalsIgnoreCase(\"en\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t *english is there already, need bangla\n\t\t\t\t */\n\t\t\t\tlCode=\"bn\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if(PersistData.getStringData(con, \"LNG\").equalsIgnoreCase(\"bn\"))\n\t\t\t\n\t\t\t{\n\t\t\t\tlCode=\"en\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tchangeLocateAndRestart(lCode);\n\n\t\t\treturn true;\n\t\t}\n\t\t\t\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n //HouseKeeper handles menu item click event\n mHouseKeeper.onOptionsItemSelected(item);\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings)\n return true;\n\n switch (id) {\n case R.id.action_sendShift:\n sendEvent();\n return true;\n\n\n case R.id.action_delete:\n deleteOrShowMethod();\n return true;\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n //get item id to handle item clicks\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.action_done:\n\t\t\tquitPlay();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_quit:\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.home:\n home_pres();\n break;\n case R.id.back:\n back_press();\n break;\n case R.id.previous:\n previous_press();\n break;\n case R.id.next:\n next_press();\n break;\n default:\n assert false;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (myDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle action buttons\n switch(item.getItemId()) {\n case R.string.action_websearch:\n // create intent to perform web search for this planet\n Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);\n intent.putExtra(SearchManager.QUERY, getSupportActionBar().getTitle());\n // catch event that there's no activity to handle intent\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n } else {\n Toast.makeText(this, R.string.app_not_available, Toast.LENGTH_LONG).show();\n }\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\r\n\t\tinflater.inflate(R.menu.main_activity_actions, menu);\r\n\r\n\r\n\t\tif(tv==null) {\r\n\t\t\tRelativeLayout badgeLayout = (RelativeLayout) menu.findItem(R.id.action_notification).getActionView();\r\n\t\t\ttv = (TextView) badgeLayout.findViewById(R.id.hotlist_hot);\r\n\t\t\ttv.setText(\"12\");\r\n\t\t}\r\n\r\n\t\t/*menu.findItem(R.id.action_notification).getActionView().setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\r\n\t\t\t\t\tSystem.out.println(\"clicked\");\r\n\t\t\t\t\ttv.setEnabled(false);\r\n\t\t\t\t\ttv.setBackground(null);\r\n\t\t\t\t\ttv.setBackgroundDrawable(null);\r\n\t\t\t\t\ttv.setText(null);\r\n\t\t\t\t\tintent = new Intent(getApplicationContext(), Notification.class);\r\n\t\t\t\t\tstartActivity(intent);\r\n\r\n\t\t\t}\r\n\t\t});*/\r\n\t\t//getActionBar().setCustomView(R.layout.menu_example);\r\n\t\t//getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_HOME_AS_UP);\r\n\t\t//getActionBar().setIcon(android.R.color.transparent);\r\n\t\treturn true;\r\n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle action buttons\n switch (item.getItemId()) {\n case R.id.action_websearch:\n // create intent to perform web search for this planet\n Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);\n intent.putExtra(SearchManager.QUERY, getActionBar().getTitle());\n // catch event that there's no activity to handle intent\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n } else {\n Toast.makeText(this, R.string.app_not_available, Toast.LENGTH_LONG).show();\n }\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.action_settings :\n return true;\n\n case R.id.historic:\n vibe.vibrate(60); // 60 is time in ms\n Intent historicIntent = new Intent(MainActivity.this,HistoricActivity.class);\n historicIntent.setAction(BaseUtils.HISTORIC_INTENT);\n startActivityForResult(historicIntent, 1);\n\n break;\n case R.id.action_left:\n\n if(wV.canGoBack()){\n vibe.vibrate(60); // 60 is time in ms\n wV.goBack();\n }else{\n Toast.makeText(this,\"Nothing to load\",Toast.LENGTH_SHORT).show();\n }\n break;\n case R.id.action_right:\n if(wV.canGoForward()){\n vibe.vibrate(60); // 60 is time in ms\n wV.goForward();\n }else{\n Toast.makeText(this,\"Nothing to load\",Toast.LENGTH_SHORT).show();\n }\n break;\n case R.id.bookmarks:\n vibe.vibrate(60); // 60 is time in ms\n //Insert into bookmarks the active URL\n dao.insertBookmark(this,wV.getUrl());\n break;\n case R.id.seeBookmarks:\n Intent bookmarkIntent = new Intent(MainActivity.this,HistoricActivity.class);\n bookmarkIntent.setAction(BaseUtils.BOOKMARKS_INTENT);\n startActivityForResult(bookmarkIntent,1);\n break;\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.action_settings) {\n\t\t\treturn true;\n\t\t}\n\t\t// Handle presses on the action bar items\n\t switch (item.getItemId()) {\n\t case R.id.action_settings:\n\t //openSearch();\n\t return true;\n\t case R.id.action_talkback:\n\t startActivity(new Intent(this, AboutMeActivity.class));\n\t return true;\n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\t\tswitch (item.getItemId()) {\t\t\t\t\t\n\t\t\t\tcase R.id.back:\n\t\t\t\t\tback();\n\t\t\t\t\treturn true;\n\t\t\t\t\t\n\t\t\t\tcase R.id.edit:\n\t\t\t\t\tedit();\n\t\t\t\t\treturn true;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n \r\n \tint id = item.getItemId();\r\n switch (id) {\r\n case R.id.action_settings:\r\n \topenSettings();\r\n return true;\r\n case R.id.action_about:\r\n \topenAbout();\r\n \treturn true;\r\n case R.id.action_exit:\r\n \tExit();\r\n \treturn true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case R.id.action_settings:\n return true;\n case android.R.id.home:\n onActionHomePressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case R.id.action_exit:\n System.exit(0);\n break;\n case R.id.action_2players:\n Intent mainActivity = new Intent(this, TwoPlayersActivity.class);\n startActivity(mainActivity);\n break;\n case R.id.action_about:\n showPopUpWindow();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle action buttons\n switch (item.getItemId()) {\n case R.id.action_websearch:\n Toast.makeText(this, \"Search Web for planet \" + mTitle, Toast.LENGTH_SHORT).show();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch(id)\n {\n case R.id.action_home:\n Intent intent1 = new Intent(NoteListActivity.this.getApplicationContext(), MainActivity.class);\n startActivity(intent1);\n finish();\n break;\n case R.id.action_links:\n Intent intent2 = new Intent(NoteListActivity.this.getApplicationContext(), LinkListActivity.class);\n startActivity(intent2);\n finish();\n break;\n case R.id.action_tips:\n Intent intent3 = new Intent(NoteListActivity.this.getApplicationContext(), TipActivity.class);\n startActivity(intent3);\n break;\n default:\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n Intent i;\n switch (id) {\n case R.id.action_search:\n break;\n case R.id.overflow1:\n i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(\"http://advanced.shifoo.in/site/appterms-and-conditions\"));\n startActivity(i);\n break;\n case R.id.overflow2:\n i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(\"http://www.shifoo.in/site/privacy-policy\"));\n startActivity(i);\n break;\n default:\n return super.onOptionsItemSelected(item);\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n int id = item.getItemId();\n // 주석처리함..\n // if (id == R.id.action_settings) {\n // return true;\n // }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t \n\t case R.id.action_settings:\n\t \t Intent prefsIntentS = new Intent(this, PreferencesActivity.class);\n\t startActivity(prefsIntentS);\n\t return true;\n\t case R.id.action_about:\n\t \t Intent aboutIntent = new Intent(this, AboutActivity.class);\n\t \t startActivity(aboutIntent);\n\t \t overridePendingTransition(R.anim.fadein,R.anim.fader);\n\t return true;\n\t case R.id.action_help:\n\t \t Intent helpIntent = new Intent(this, HelpActivity.class);\n\t \t startActivity(helpIntent);\n\t \t overridePendingTransition(R.anim.fadein,R.anim.fader);\n\t return true;\n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n //Implement action listener on the menu buttons\n int itemId = item.getItemId();\n\n //Choose the appropriate action menu based on the button selected\n switch (itemId) {\n case R.id.action_open_save_list:\n openSaveList();\n break;\n case R.id.action_settings:\n openAppSettings();\n }\n return super.onOptionsItemSelected(item);\n }" ]
[ "0.7173379", "0.69227743", "0.69227743", "0.69227743", "0.69227743", "0.6911944", "0.6884609", "0.6881586", "0.68243235", "0.68193024", "0.68051094", "0.6801348", "0.678705", "0.678705", "0.67608094", "0.67543995", "0.6754033", "0.674645", "0.67355984", "0.6727317", "0.67257065", "0.67257065", "0.67257065", "0.67257065", "0.67257065", "0.67257065", "0.6723229", "0.67047226", "0.670323", "0.6695576", "0.6695576", "0.6695576", "0.6673202", "0.66641897", "0.66641897", "0.66641897", "0.66641897", "0.66641897", "0.66641897", "0.66641897", "0.66641897", "0.6651234", "0.66501373", "0.66408205", "0.6640387", "0.6596357", "0.6595274", "0.6593547", "0.65873045", "0.6578023", "0.65763044", "0.6571006", "0.6561838", "0.65557647", "0.65519553", "0.65340966", "0.65310395", "0.6512335", "0.6510273", "0.6502483", "0.6497952", "0.64960766", "0.6488292", "0.64863867", "0.64830875", "0.6482162", "0.6477473", "0.6476086", "0.6474335", "0.6471746", "0.64694387", "0.64618725", "0.6460911", "0.6459166", "0.64538074", "0.6453495", "0.6448078", "0.644757", "0.6446672", "0.6446672", "0.6446672", "0.6446672", "0.6446672", "0.6446672", "0.64438176", "0.6437946", "0.6434402", "0.6428054", "0.6421541", "0.64196163", "0.64186686", "0.6415855", "0.6414209", "0.64138687", "0.64123267", "0.64088166", "0.6406903", "0.64038754", "0.6401255", "0.6400071", "0.63982415" ]
0.0
-1
Sends the operations part of the JSONObject to the next activity
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { sendOperationMessage(data.get(+position)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeActionsJson() {\n JsonManager.writeActions(this.getActions());\n }", "@Override\n public void onNext(JSONObject jsonObject) {\n }", "@Override\n public void onClick(View v) {\n\n if (v == button_cancel) {\n\n this.finish();\n\n } else if (v == button_next && checkSpinner()) {\n\n if (InternetConnection.checkNetworkConnection(context)) {\n\n\n String url = ApplicationData.URL_CHARACTERISTIC + person_id;\n new PutAsync().execute(url, createJsonBody());\n\n Log.e(\"JSOn BOdy \", createJsonBody());\n Log.e(\"URL are \", url);\n\n } else {\n\n Toast.makeText(getApplicationContext(),ApplicationData.OFFLINE_SAVED_SUCCESSFULLY,Toast.LENGTH_LONG).show();\n ApplicationData.writeToFile(this, ApplicationData.OFFLINE_DB_HOUSE_HOLD_CHARACTERISTICS, createJsonBody());\n finish();\n }\n\n }\n\n }", "public static void main(String[] args) {\n\t\tJSONObject obj=new JSONObject(); \n\t\tobj.put(\"userId\", \"[email protected]\");\n\t\tJSONObject obj2=new JSONObject();\n\t\tobj2.put(\"modulename\", \"SCM\");\n\t\tobj2.put(\"hitserverflag\",1);\n\t\tobj.put(\"extraParam\",obj2);\n\t\tobj.put(\"action\",\"UPDATE\");\n\t\tJSONArray arr=new JSONArray();\n\t\tJSONObject obj3=new JSONObject();\n\t\tJSONArray arr3=new JSONArray();\n\t\tarr3.add(\"UPDATE_PRODUCT\");\n\t\tobj3.put(\"actionarray\",arr3);\n\t\tJSONObject obj4=new JSONObject();\n\t\tobj4.put(\"CML_TITLE\",\"CCR-2\");\n\t\tJSONArray arr4=new JSONArray();\n\t\tobj4.put(\"CML_IMAGE_PATH\",arr4);\n\t\tobj4.put(\"SYNC_PENDING_STATUS\",0);\n\t\tobj4.put(\"LAST_MODIFIED_ON\",\"2019-12-31T06:52:36.441Z\");\n\t\tobj4.put(\"stockMinValue\",36);\n\t\tobj3.put(\"calmailobject\",obj4);\n\t\tobj3.put(\"keyType\",\"TSK\");\n\t\tobj3.put(\"keyVal\",\"rebrand.clouzer.com#PRJ_DEPT_ORG_1231231231231_1234#SEC_WIZ_PRD_DB_0011#TSK_PRD_LST_1577774826691_49\");\n\t\tobj3.put(\"subKeyType\",\"TSK_PRD_LST\");\n\t\tarr.add(obj3);\n\t\t\n\t\tobj.put(\"dataarray\",arr);\n\t\tobj.put(\"modulename\",\"SCM\" );\n\t\tobj.put(\"requestId\",\"/sync#/sync#[email protected]#1577710294530r168r226\");\n\t\tobj.put(\"FROM\",\"senddatatoserver\");\n\t\tobj.put(\"socketId\",\"/sync#wjYh2leVm1goGm_DAABH\");\n\t\tJSONArray arr12=new JSONArray();\n\t\tJSONObject obj9=new JSONObject();\n\t\tobj9.put(\"Location\",\"serverOperation : front_end\");\n\t\tobj9.put(\"Timestamp\",157770);\n\t\tarr12.add(obj9);\n\t\tJSONObject obj11=new JSONObject();\n\t\tobj11.put(\"Location\",\"etRouteHandler2Paget_serverOperation : node\");\n\t\tobj11.put(\"Timestamp\",157770);\n\t\tarr.add(obj11);\n\t\tJSONObject obj12=new JSONObject();\n\t\tobj12.put(\"Location\",\"etOrgActionCreator_sendtoJava : node\");\n\t\tobj12.put(\"Timestamp\",157770);\n\t\tarr12.add(obj12);\n\t\tJSONObject obj13=new JSONObject();\n\t\tobj13.put(\"Location\",\"etDirectToQueue_sendToJavaProcess : node\");\n\t\tobj13.put(\"Timestamp\",157770);\n\t\tarr12.add(obj13);\n\t\tJSONObject obj14=new JSONObject();\n\t\tobj14.put(\"Location\",\"etKafka_producer_sendMessage:node\");\n\t\tobj14.put(\"Timestamp\",157770);\n\t\tarr12.add(obj14);\n\t\tobj.put(\"baton\",arr12);\n\t\tobj.put(\"topic\",\"CCR_CLZ_COM\");\n\t\tSystem.out.println(obj);\n\t\t\n\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttry{\n\t\t\t\tJSONObject json=new JSONObject();\n\t\t\t\t\n\t\t\t\tjson.put(\"operator\", 10);\n\t\t\t\tjson.put(\"user\", 1);\n\n\t\t\t\tjson.put(\"message\", editMsg.getText().toString());\n\t\t\t\tString url=urlJsonObj+\"?fields=\"+json.toString();\n\n\t\t\t\tmakeEnquiryRequest(url);\n\t\t\t\t}catch(JSONException exception){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "@Override\n protected void executeLowLevelRequest() {\n doPutItem();\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tJSONObject jsonObject = getJsonObject();\r\n\t\t\t\ttranformJson(jsonObject.toString());\r\n\r\n\t\t\t}", "void onComplete(boolean result, JSONObject jsonObject);", "public abstract boolean onProcess(JSONObject jSONObject, long j) throws Exception;", "@Override\n\tpublic void visit(JsonOperator arg0) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void process(String key, int status, List<JSONObject> lst) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void process(String key, int status, List<JSONObject> lst) {\n\n\t\t\t}", "@Override\r\n public void scenePartOperatorTimerSaveSuccess(BaseResponse baseResponse) {\n\r\n String name = getIntent().getStringExtra(\"activity\");\r\n if (name!=null && name.equals(\"mLightSettingActivity\")) {\r\n Intent intent = new Intent(this, LightTimingListActivity.class);\r\n intent.putExtra(\"operatorId\", operatorId);// 业务id\r\n startActivity(intent);\r\n }\r\n this.finish();\r\n\r\n }", "private void checkIntentInformation() {\n Bundle extras = getIntent().getExtras();\n Gson gson = new Gson();\n if (extras != null) {\n Curso aux;\n aux = (Curso) getIntent().getSerializableExtra(\"addCurso\");\n if (aux == null) {\n aux = (Curso) getIntent().getSerializableExtra(\"editCurso\");\n if (aux != null) {//Accion de actualizar\n //found an item that can be updated\n String cursoU = \"\";\n cursoU = gson.toJson(aux);\n\n apiUrlTemp = apiUrlAcciones+\"acc=updateC\" +\"&cursoU=\"+cursoU +\"&profesor_id=\"+aux.getProfesor().getCedula();\n MyAsyncTasksCursoOperaciones myAsyncTasksOp = new MyAsyncTasksCursoOperaciones();\n myAsyncTasksOp.execute();\n }\n } else {//Accion de agregar\n //found a new Curso Object\n String cursoA = \"\";\n cursoA = gson.toJson(aux);\n\n apiUrlTemp = apiUrlAcciones+\"acc=addC\" +\"&cursoA=\"+cursoA +\"&profesor_id=\"+aux.getProfesor().getCedula();\n MyAsyncTasksCursoOperaciones myAsyncTasksOp = new MyAsyncTasksCursoOperaciones();\n myAsyncTasksOp.execute();\n }\n }\n }", "private void OooO00o(int i, Object obj, long j, Map<String, String> map) {\n Call call;\n if (!this.f23516OooO00o && (call = this.f23512OooO00o) != null && call.isExecuted()) {\n this.f23512OooO00o.cancel();\n }\n this.f23510OooO00o.m20656OooO00o().post(new OooO0OO(obj, map));\n AbstractC8962ooOOo ooooo = f23506OooO00o;\n if (ooooo != null) {\n String method = this.f23512OooO00o.request().method();\n Map<String, String> map2 = this.f23511OooO00o;\n String httpUrl = this.f23512OooO00o.request().url().toString();\n JSONObject jSONObject = this.f23515OooO00o;\n ooooo.OooO00o(method, map2, j, i, httpUrl, jSONObject == null ? null : jSONObject.toString());\n }\n }", "public void mo9092a(JSONObject jSONObject) throws JSONException {\n }", "void onOTPSendSuccess(ConformationRes data);", "@Override\r\n\t\t\t\tpublic void onSucceed(JSONObject obj) {\n\t\t\t\t\tLog.e(\"upload\",obj.toString());\r\n\t\t\t\t}", "public interface BackStep {\n\n String submit12345(JSONObject jsonObject);\n\n String submitYGXF(JSONObject jsonObject);\n}", "public abstract VKRequest mo118416a(JSONObject jSONObject);", "public interface OperateJson {\n\n\n boolean filter(List<KeyFilter> list, JSONObject json);\n\n OrderTemp simpleOperate(KeyConfig kc, JSONObject json);\n\n List<Order> operateArray(String arrayKey, JSONObject json, OrderTemp temp);\n}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n JSONObject jsonObject = new JSONObject();\n try {\n jsonObject.put(\"meeting_id\", message.meetingId);\n jsonObject.put(\"user_id\", User.ID);\n jsonObject.put(\"meeting_status\", \"Accept\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n final String url = URLs.MEETING_STATUS_CHANGE;\n Map<String, String> params = new HashMap();\n params.put(\"json\", jsonObject.toString());\n\n JsonObjectFormRequest request = new JsonObjectFormRequest(Request.Method.POST, url, params, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n if (!response.getString(\"result\").equals(\"success\")){\n Toast.makeText(context, context.getString(R.string.time_out), Toast.LENGTH_LONG);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n MySingleton.getInstance(context).addToRequestQueue(request);\n\n }", "@Override\r\n\tpublic void httpResponse_success(Map<String, String> map,\r\n\t\t\tList<Object> list, Object jsonObj) {\n\t\tJSONObject json = (JSONObject) jsonObj;\r\n\t\ttry {\r\n\t\t\tJSONObject cg = json.getJSONObject(\"rvalue\").getJSONObject(\"cg\");\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tMessage msg1 = new Message();\r\n\t\tmsg1.what = 1;\r\n\t\tmHandler.sendMessage(msg1);\r\n\t}", "protected void handleOrderSteps(JSONObject orderJson) throws JSONException {\n if (!orderJson.has(\"step\")) {\n orderJson.put(\"step\", \"all\");\n }\n final String step = orderJson.getString(\"step\");\n if (\"create\".equals(step)) {\n orderJson.put(\"payment\", -1);\n orderJson.put(\"generateInvoice\", false);\n orderJson.put(\"generateShipment\", false);\n orderJson.put(\"isLayaway\", false);\n } else if (\"pay\".equals(step)) {\n orderJson.put(\"payment\", -1);\n orderJson.put(\"generateInvoice\", false);\n orderJson.put(\"generateShipment\", false);\n orderJson.put(\"isLayaway\", true);\n } else if (\"ship\".equals(step)) {\n orderJson.put(\"payment\", orderJson.getDouble(\"grossAmount\"));\n orderJson.put(\"generateShipment\", true);\n orderJson.put(\"isLayaway\", true);\n } else if (\"all\".equals(step)) {\n copyPropertyValue(orderJson, \"grossAmount\", \"payment\");\n // do nothing\n } else {\n log.warn(\"Step value \" + step + \" not recognized, order \" + orderJson + \" assuming all\");\n copyPropertyValue(orderJson, \"grossAmount\", \"payment\");\n }\n }", "private void executeAccion(Client client, Model model) {\n\n if (Constants.ADD.equals(client.getAction())) {\n final String uri = \"https://backend.bgarcial.me/clients\";\n RestTemplate restTemplate = new RestTemplate();\n Client result = restTemplate.postForObject(uri, client, Client.class);\n System.out.println(\"Run Name:\" + result.getName());\n System.out.println(\"Run Id:\" + result.getId());\n\n model.addAttribute(\"message\", \"Calling the Backend - User was Added\");\n\n } else if (Constants.Delete.equals(client.getAction())) {\n final String uri = \"https://backend.bgarcial.me/clients/delete\";\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.postForObject(uri, client, ArrayList.class);\n model.addAttribute(\"message\", \"Calling the Backend - User was Removed!\");\n }\n }", "public void doJob(JSONObject jsonResult) {\n String api = getString(R.string.pref_api_key);\n try {\n SharedPreferences pref = getActivity().getSharedPreferences(PaperDetailMenuFragment.class.getName(), Context.MODE_PRIVATE);\n pref.edit().putString(api, jsonResult.getString(api)).apply();\n } catch (JSONException ex) {\n Log.e(PasswordDialogFragment.class.getName(), \"api_key does not exists in JSON Result\", ex);\n }\n Toast.makeText(getActivity(), \"Registered finished!!!\", Toast.LENGTH_LONG).show();\n }", "public boolean addOperation(BalanceOperation NewOp){\n if(NewOp == null){return false;}\n if(this.operationsMap.containsKey(NewOp.getBalanceId())){\n return false;\n }\n this.operationsMap.put(NewOp.getBalanceId(), NewOp);\n\n //Updating JSON Object in the JSON Array\n //encoding basic BalanceOperation properties\n JSONObject joperation = new JSONObject();\n joperation.put(\"balanceId\", ((Integer)NewOp.getBalanceId()).toString());\n joperation.put(\"description\", NewOp.getType());\n joperation.put(\"money\", ((Double)NewOp.getMoney()).toString());\n joperation.put(\"date\", NewOp.getDate().toString());\n\n //encoding subclass specific properties\n if(NewOp instanceof OrderImpl){\n OrderImpl order = (OrderImpl) NewOp;\n //joperation.put(\"sub\",\"order\");\n joperation.put(\"productCode\", order.getProductCode());\n joperation.put(\"pricePerUnit\",((Double) order.getPricePerUnit()).toString());\n joperation.put(\"quantity\", ((Integer) order.getQuantity()).toString());\n joperation.put(\"status\", order.getStatus());\n }\n else if(NewOp instanceof SaleTransactionImplementation){\n SaleTransactionImplementation sale = (SaleTransactionImplementation) NewOp;\n\n joperation.put(\"discountRate\", ((Double)sale.getDiscountRate()).toString());\n joperation.put(\"status\", sale.getStatus());\n //section to load the JSONArray entries\n JSONArray jEntries = new JSONArray();\n JSONObject jEntry;\n for (int i = 0; i < sale.entries.size(); i++) {\n jEntry = new JSONObject();\n TicketEntry entry = sale.entries.get(i);\n jEntry.put(\"barcode\",entry.getBarCode());\n jEntry.put(\"description\",entry.getProductDescription());\n jEntry.put(\"amount\",((Integer)entry.getAmount()).toString());\n jEntry.put(\"PPU\",((Double)entry.getPricePerUnit()).toString());\n jEntry.put(\"discountRate\",((Double)entry.getDiscountRate()).toString());\n jEntries.add(jEntry);\n }\n joperation.put(\"entries\",jEntries);\n //section to load the JSONArray rfids\n JSONArray jRfids = new JSONArray();\n JSONObject jRfid;\n if(sale.rfids != null) {\n for (int i = 0; i < sale.rfids.size(); i++) {\n jRfid = new JSONObject();\n String rfid = sale.rfids.get(i).RFID;\n Integer pId = sale.rfids.get(i).productId;\n jRfid.put(\"rfid\",rfid);\n jRfid.put(\"pId\",pId.toString());\n jRfids.add(jRfid);\n }\n }\n joperation.put(\"rfids\",jRfids);\n }\n else if(NewOp instanceof ReturnTransaction){\n ReturnTransaction retTrans = (ReturnTransaction) NewOp;\n joperation.put(\"saleId\",retTrans.getSaleId().toString());\n joperation.put(\"saleDiscount\", ((Double)retTrans.getSaleDiscount()).toString());\n joperation.put(\"status\",retTrans.getStatus());\n //section to load the JSONArray entries\n JSONArray jEntries = new JSONArray();\n JSONObject jEntry;\n for (int i = 0; i < retTrans.getReturnEntries().size(); i++) {\n jEntry = new JSONObject();\n TicketEntry entry = retTrans.getReturnEntries().get(i);\n jEntry.put(\"barcode\",entry.getBarCode());\n jEntry.put(\"description\",entry.getProductDescription());\n jEntry.put(\"amount\",((Integer)entry.getAmount()).toString());\n jEntry.put(\"PPU\",((Double)entry.getPricePerUnit()).toString());\n jEntry.put(\"discountRate\",((Double)entry.getDiscountRate()).toString());\n jEntries.add(jEntry);\n }\n joperation.put(\"entries\",jEntries);\n //section to load the JSONArray rfids\n JSONArray jRfids = new JSONArray();\n JSONObject jRfid;\n if(retTrans.rfids != null) {\n for (int i = 0; i < retTrans.rfids.size(); i++) {\n jRfid = new JSONObject();\n String rfid = retTrans.rfids.get(i).RFID;\n Integer pId = retTrans.rfids.get(i).productId;\n jRfid.put(\"rfid\",rfid);\n jRfid.put(\"pId\",pId.toString());\n jRfids.add(jRfid);\n }\n }\n joperation.put(\"rfids\",jRfids);\n }\n else {\n //case where it's either a simple Debit or Credit operation\n if(NewOp.getMoney() > 0){\n //joperation.put(\"sub\",\"credit\");\n }\n else{\n //joperation.put(\"sub\",\"debit\");\n }\n }\n //actually adding the encoded operation into the jArray\n jArrayOperations.add(joperation);\n\n return true;\n }", "public void setOperation(String op) {this.operation = op;}", "private void sendHelpOperations()\n\t{\n\t\t/*** API Calls ***/\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Get most recent tweet by account name. Use the explicit command: !getrecenttweet <screen name/twitter handle>\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Get most recent daily(Monday-Friday) stock data by symbol name(not case sensitive). Use the explicit command: !stockdata <stock symbol>\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Weather data by zipcode or city name. Use the explicit command: !weathercity <city name> or just ask me something like: How's the weather in 75087?\");\n\t\tsendMessageAndAppend(this.channel, \"- Cryptocurrency price data: !cprice <crypto symbol (BTC, ETH, etc...)>\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Exchange rates for any currency: !exchange <currency symbol (USD, JPY, MXN, etc...)>\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- State/city government representatives by zipcode: !representatives <zipcode> or just ask me something like: Who are the representatives for 01002?\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Get distance between two zip codes in miles or kilometers: !distance <zipcode 1> <zipcode 2> <m or k>\");\n\t\tsendMessageAndAppend(this.channel, \"- Get current coordinates of the International Space Station: !iss\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Find the name of a pokemon by its ID number: !pokefind <pokemon ID number>\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Translate English to Dothraki: !dothraki <English sentence to be translated>\");\n\t\t///\n\n\t\t/*** Math functions ***/\n\t\tsendMessageAndAppend(this.channel, \"- Multiply a list of numbers: !multiply <num1> <num2> <num3> ... <num N>\");\n\t\tsendMessageAndAppend(this.channel, \"- Apply factorial on a number: !factorial <number>\");\n\t\tsendMessageAndAppend(this.channel, \"- Calculate exponential: !ex <base> <exponent>\");\n\t\t///\n\n\t\t/*** Miscellaneous ***/\n\t\tsendMessageAndAppend(this.channel, \"- Change my nickname: !changenick <new nickname>\");\n\t\tsendMessageAndAppend(this.channel, \"- Get the current time: !time\");\n\t\tsendMessageAndAppend(this.channel, \"- Ping the bot: !ping\");\n\t\t///\n\t}", "public void sendHttp() {\n String url = \"https://openwhisk.ng.bluemix.net/api/v1/namespaces/1tamir198_tamirSpace/actions/testing_trigger\";\n //api key that i got from blumix EndPoins\n String apiKey = \"530f095a-675e-4e1c-afe0-4b421201e894:0HriiSRoYWohJ4LGOjc5sGAhHvAka1gwASMlhRN8kA5eHgNu8ouogt8BbmXtX21N\";\n try {\n //JSONObject jsonObject = new JSONObject().put(\"openwhisk.ng.bluemix.net\" ,\"c1165fd1-f4cf-4a62-8c64-67bf20733413:hdVl64YRzbHBK0n2SkBB928cy2DUO5XB3yDbuXhQ1uHq8Ir0dOEwT0L0bqMeWTTX\");\n String res = (new HttpRequest(url)).prepare(HttpRequest.Method.POST).withData(apiKey).sendAndReadString();\n //String res = new HttpRequest(url).prepare(HttpRequest.Method.POST).withData(jsonObject.toString()).sendAndReadString();\n System.out.println( res + \"***********\");\n\n } catch ( IOException exception) {\n exception.printStackTrace();\n System.out.println(exception + \" some some some\");\n System.out.println(\"catched error from response ***********\");\n }\n }", "boolean doCommandDeviceTimerPost(JSONObject timerJSON);", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "@Override\n\tpublic void sendData(JSONObject o) {\n\t\taddToProduct(o);\n\t}", "@Override\r\n public void onClick(View v) {\n try {\r\n postDatatoServer(\"accept_request\", notification.toJSON());\r\n fetchDatafromServer(\"notifications\");\r\n } \r\n catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n protected String doInBackground(String... strings) {\n createJSON();\n\n String JsonDATA = json.toString();\n HttpURLConnection urlConnection = null;\n\n try {\n URL url = new URL(global.getUrl() + \":8080/UBUassistant/post/log\");\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setDoOutput(true);\n urlConnection.setRequestMethod(\"POST\");\n urlConnection.setRequestProperty(\"Content-Type\", \"application/json\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n Writer writer = new BufferedWriter(new OutputStreamWriter(urlConnection.getOutputStream(), \"UTF-8\"));\n writer.write(JsonDATA);\n writer.close();\n retorno = String.valueOf(urlConnection.getResponseCode());\n Log.e(\"Respuesta POST\", String.valueOf(urlConnection.getResponseCode()));\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n\n if (global.getState() == 201){\n createLearnJSON();\n\n Log.e(\"JSON\", json.toString());\n\n try {\n URL url = new URL(global.getUrl() + \":8080/UBUassistant/post/learn\");\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setDoOutput(true);\n urlConnection.setRequestMethod(\"POST\");\n urlConnection.setRequestProperty(\"Content-Type\", \"application/json\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n Writer writer = new BufferedWriter(new OutputStreamWriter(urlConnection.getOutputStream(), \"UTF-8\"));\n writer.write(json.toString());\n writer.close();\n retorno = String.valueOf(urlConnection.getResponseCode());\n Log.e(\"Respuesta POST\", String.valueOf(urlConnection.getResponseCode()));\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n }\n return retorno;\n }", "private void loadJsonAcitivty() {\n\n // log the event\n Log.i(this.getClass().getSimpleName(), \"changing activity to JSON list activity\");\n\n // start new intent to change activity to JSON list activity\n Intent intent = new Intent(this, JsonListActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n sendRequestWithOkHttp();\n// intent = new Intent(MainActivity.this,JsonText.class);\n// startActivity(intent);\n// Toast.makeText(MainActivity.this,\"Success\",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public void setJSON(JSONObject json) {this.progressJSON = json;}", "@Override\n public void onSuccess(String arg0) {\n LogUtil.d(\"mytest\", \"ret==\" + arg0);\n try {\n JSONObject jsonObjs = new JSONObject(arg0);\n String state = jsonObjs.getString(\"state\");\n if (!state.equals(\"200\")) {\n dismissLoadingLayout();\n Toast.makeText(getActivity(), \"发布失败\", Toast.LENGTH_SHORT).show();\n return;\n }\n JSONObject obj = jsonObjs.getJSONObject(\"data\");\n //JSONObject obj = new JSONObject(jsonObjs.getString(\"data\"));\n accessKeyId = obj.getString(\"accessKeyId\");\n accessKeySecret = obj.getString(\"accessKeySecret\");\n securityToken = obj.getString(\"securityToken\");\n expiration = obj.getString(\"expiration\");\n asyncPutObjectFromLocalFile(0);\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public void parsing() throws JSONException {\r\n\t\ttry {\r\n\t\tHttpParams httpParameters = new BasicHttpParams();\r\n\t\tint timeoutConnection = 30000;\r\n\t\tHttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\r\n\t\tint timeoutSocket = 31000;\r\n\t\tHttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\r\n\t\tHttpClient client = new DefaultHttpClient(httpParameters);\r\n\t\tHttpPost httpost = new HttpPost(Url_Address.url_Home+\"/FetchPendingRideRequests\");//Url_Address.url_promocode);\r\n\t\tJSONObject json = new JSONObject();\r\n\t\t\r\n\t\tjson.put(\"Trigger\", \"FetchPendingRideRequests\");\r\n\t\t\r\n\t\tjson.put(\"Role\", \"Rider\");\r\n\t\tSystem.err.println(\"Rider\");\r\n\t\r\n\t\tjson.put(\"Id\", prefs.getString(\"userid\", null));\r\n\t\tSystem.err.println(prefs.getString(\"userid\", null));\r\n\t\t\r\n\t\tjson.put(\"Trigger\", \"queue\");\r\n\t\tSystem.err.println(\"rider queue\");\r\n\t //\t \r\n\t\thttpost.setEntity(new StringEntity(json.toString()));\r\n\t\thttpost.setHeader(\"Accept\", \"application/json\");\r\n\t\thttpost.setHeader(\"Content-type\", \"application/json\");\r\n\t\t\r\n\t\tHttpResponse response = client.execute(httpost);\r\n\t\tHttpEntity resEntityGet = response.getEntity();\r\n\t\tString jsonstr=EntityUtils.toString(resEntityGet);\r\n\t\tif(jsonstr!=null)\r\n\t\t{\r\n\t\t Log.i(tag,\" result-->>>>> \"+ jsonstr);\r\n\t\t}\r\n\t\tJSONObject obj=new JSONObject(jsonstr);\r\n\t\tString\tjsonResult=obj.getString(\"result\");\r\n\t\tString\tpending_jsonMessage=obj.getString(\"message\");\r\n\t\t\t\r\n\t\t\tString PendingRequestList=\tobj.getString(\"PendingRequestList\");\r\n\t\t\tLog.i(tag, \"PendingRequestList queue: \"+PendingRequestList);\r\n\t\t\t\r\n\t\t\tJSONArray jsonarray=obj.getJSONArray(\"PendingRequestList\");\r\n\t\r\n\t\t\t\r\n\t\tfor(int i=0;i<jsonarray.length();i++){\r\n\t\t\t\t\r\n\t\t\tJSONObject obj2=jsonarray.getJSONObject(i);\r\n\t\t\t\r\n\t\t\tString tripId=obj2.getString(\"tripId\");\r\n\t\t\tLog.i(tag, \"tripId: \"+tripId);\r\n\t\t\t\r\n\t\t\tString\triderId=\tobj2.getString(\"riderId\");\r\n\t\t\tLog.i(tag, \"riderId: \"+riderId);\r\n\t\t\t\r\n\t\t\tString driverId=\tobj2.getString(\"driverId\");\r\n\t\t\tLog.i(tag, \"driverId: \"+driverId);\r\n\t\t\t\r\n\t\t\tString driver_first=\tobj2.getString(\"driver_first\");\r\n\t\t\tLog.i(tag, \"driver_first: \"+driver_first);\r\n\t\t\t\r\n\t\t\tString driver_last=\tobj2.getString(\"driver_last\");\r\n\t\t\tLog.i(tag, \"driver_last: \"+driver_last);\r\n\t\t\t\r\n\t\t\tString trip_miles_est=\tobj2.getString(\"trip_miles_est\");\r\n\t\t\tLog.i(tag, \"trip_miles_est: \"+trip_miles_est);\r\n\t\t\t\r\n\t\t\tString trip_time_est=\tobj2.getString(\"trip_time_est\");\r\n\t\t\tLog.i(tag, \"trip_time_est: \"+trip_time_est);\r\n\t\t\t\r\n\t\t\tString start_loc=\tobj2.getString(\"start_loc\");\r\n\t\t\tLog.i(tag, \"start_loc: \"+start_loc);\r\n\t\t\t\r\n\t\t\tString destination_loc=\tobj2.getString(\"destination_loc\");\r\n\t\t\tLog.i(tag, \"destination_loc: \"+destination_loc);\r\n\t\t\t\r\n\t\t\tString request_type=\tobj2.getString(\"request_type\");\r\n\t\t\tLog.i(tag, \"request_type: \"+request_type);\r\n\t\t\t\r\n\t\t\tString trip_request_date=\tobj2.getString(\"trip_request_date\");\r\n\t\t\tLog.i(tag, \"request_type: \"+trip_request_date);\r\n\t\t\t\r\n\t\t\tString driver_image=\tobj2.getString(\"driver_image\");\r\n\t\t\tLog.i(tag, \"driver_image: \"+driver_image);\r\n\t\t\t\r\n\t\t\tString rider_image=\tobj2.getString(\"rider_image\");\r\n\t\t\tLog.i(tag, \"rider_image: \"+rider_image);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString setfare=\tobj2.getString(\"setfare\");\r\n\t\t\tLog.i(tag, \"setfare: \"+setfare);\r\n\t\t\t\r\n\t\t\tString offered_fare=\tobj2.getString(\"offered_fare\");\r\n\t\t\tLog.i(tag, \"offered_fare: \"+offered_fare);\r\n\t\t\t\r\n\t\t\tString driver_rating=\tobj2.getString(\"driver_rating\");\r\n\t\t\tLog.i(\"tag:\", \"riderRating: \"+driver_rating);\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tString status=\tobj2.getString(\"status\");\r\n\t\t\tLog.i(tag, \"status: \"+status);\r\n\t\t\t\r\n\t\t\tString vehicle_color=\tobj2.getString(\"vehicle_color\");\r\n\t\t\tLog.i(tag, \"vehicle_color: \"+vehicle_color);\r\n\t\t\t\r\n\t\t\tString vehicle_type=\tobj2.getString(\"vehicle_type\");\r\n\t\t\tLog.i(\"tag:\", \"vehicle_type: \"+vehicle_type);\r\n\t\t\t\r\n\t\t\tString vehicle_name=\tobj2.getString(\"vehicle_name\");\r\n\t\t\tLog.i(\"tag:\", \"vehicle_name: \"+vehicle_name);\r\n\r\n\t\t\t\t\r\n\t\t\tString vehicle_img=\tobj2.getString(\"vehicle_img\");\r\n\t\t\tLog.i(\"tag:\", \"vehicle_img: \"+vehicle_img);\r\n\t\t\r\n\t\t\tString vehicle_year=\tobj2.getString(\"vehicle_year\");\r\n\t\t\tLog.i(\"tag:\", \"vehicle_year: \"+vehicle_year);\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tLog.i(tag, \"Result: \"+jsonResult);\r\n\t\t\tLog.i(tag, \"Message :\"+pending_jsonMessage);\r\n\t\t\t\r\n\t\t\tarraylist_destination.add(destination_loc);\r\n\t\t\tarraylist_driverid.add(driverId);\r\n\t\t\tarraylist_riderid.add(riderId);\r\n\t\t\tarraylist_drivername.add(driver_first);\r\n\t\t\tarraylist_pickuptime.add(trip_request_date);\r\n\t\t\tarraylist_tripid.add(tripId);\r\n\t\t\tarraylist_driver_image.add(driver_image);\r\n\t\t\tarraylist_rider_image.add(rider_image);\r\n\t\t\tarraylist_distance.add(trip_miles_est);\r\n\t\t\tarraylist_requesttype.add(request_type);\r\n\t\t\tarraylist_start.add(start_loc);\r\n\t\t\tarraylist_actualfare.add(setfare);\r\n\t\t\tarraylist_suggestion.add(offered_fare);\r\n\t\t\tarraylist_eta.add(trip_time_est);\r\n\t\t\tarraylist_driverrating.add(driver_rating);\r\n\t\t\tarraylist_status.add(status);\r\n\t\t\tarraylist_vehicle_color.add(vehicle_color);\r\n\t\t\tarraylist_vehicle_type.add(vehicle_type);\r\n\t\t\tarraylist_vehicle_name.add(vehicle_name);\r\n\t\t\tarraylist_vehicle_img.add(vehicle_img);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tarraylist_vehicle_year.add(vehicle_year);\r\n\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t catch(Exception e){\r\n\t\t System.out.println(e);\r\n\t\t Log.d(tag, \"Error :\"+e); } \r\n\t\t\t}", "private void processData() {\n switch (actionCode) {\n\n // get all cars in inventory\n case \"101\":\n String size = \"There are totally \" + Inventory.cars.size() + \" cars in inventory\\n\";\n response = size + Inventory.serializeCarList(Inventory.cars);\n break;\n\n // find cars by make\n case \"102\":\n List<Car> carList = Inventory.findCarsByMake(data);\n\n if (!carList.isEmpty())\n response = Inventory.serializeCarList(carList);\n else\n response = \"Not found.\";\n break;\n\n // find car by VIN\n case \"103\":\n Car car = Inventory.findCarByVIN(data);\n if (car != null)\n response = car.getCarInfo();\n else\n response = \"Not found.\";\n break;\n\n // add new car from data client supplies\n case \"104\":\n // process data submitted by client\n String[] details = data.split(\",\");\n String vin = details[0];\n String make = details[1];\n String color = details[2];\n int doors = Integer.parseInt(details[3]);\n int seats = Integer.parseInt(details[4]);\n double price = Double.parseDouble(details[5]);\n int mpg = Integer.parseInt(details[6]);\n int power = Integer.parseInt(details[7]);\n\n Car newCar = new Car(vin, make, color, doors, seats, price, mpg, power);\n Inventory.addCar(newCar);\n\n response = \"New car added.\";\n break;\n\n // get all parts in inventory\n case \"201\":\n // serialize list of part\n String partSize = \"There are totally \" + Inventory.parts.size() + \" parts in inventory\\n\";\n response = partSize + Inventory.serializePartList(Inventory.parts);\n break;\n\n // find part by ID\n case \"202\":\n int id = Integer.parseInt(data);\n Part p = Inventory.findPartById(id);\n if (p != null)\n response = p.getPartInfo();\n else\n response = \"Not found.\";\n break;\n\n // add new part to inventory\n case \"203\":\n String[] partDetails = data.split(\",\");\n int partID = Integer.parseInt(partDetails[0]);\n String des = partDetails[1];\n double partPrice = Double.parseDouble(partDetails[2]);\n String origin = partDetails[3];\n\n Part newPart = new Part(partID, des, partPrice, origin);\n Inventory.addPart(newPart);\n response = \"New part added.\";\n break;\n\n // get all sales\n case \"301\":\n String totalSaleOrders = \"There are totally \" + SeedPurchases.purchases.size() + \" sale orders.\\n\";\n String cost = \"Total sale value: \" + SeedPurchases.getPurchasesCost() + \" dollars\\n\";\n\n response = totalSaleOrders + cost;\n break;\n\n default:\n response = \"Invalid request\";\n }\n }", "public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "@Override\n\t\t\tpublic void processRaw(String key, int status, String json) {\n\t\t\t}", "@Override\n protected void executeCommands(ITextTokenStream<BasicTextTokenType> stream) {\n TextToken<BasicTextTokenType> object = stream.getFirstObject();\n String token = object == null ? null : object.getStandardToken();\n if (token != null) {\n if (stream.getVerb() != null){\n switch (stream.getVerb().getType()) {\n case ATTACK:\n attackMob(token, object);\n break;\n case LOOK:\n lookAt(token, object);\n break;\n case MOVE:\n movePlayer(token, object);\n break;\n case GET:\n getItemFromRoom(token, object);\n break;\n case LOOT:\n lootAll(token, object);\n break;\n case DROP:\n dropItem(token, object);\n break;\n case EQUIP: // effect replaced with LOCK\n lock(token, object);\n //equipItem(token, object);\n break;\n case UNEQUIP: // effect replaced with UNLOCK\n unlock(token, object);\n //unequipItem(token, object);\n break;\n case INFO:\n info(token, object);\n break;\n case QUIT:\n quitGame();\n break;\n default:\n return;\n }\n }\n // For objects that can also be used to infer their verbs\n else {\n switch (object.getType()) {\n case DIRECTION:\n movePlayer(token, object);\n break;\n case INVENTORY:\n info(token, object);\n break;\n case HEALTH:\n info(token, object);\n break;\n default:\n return;\n }\n }\n\n } else {\n return;\n }\n\n }", "public JSONObject save();", "private void generateActions(JSONObject jsonMon, Monster mon) {\r\n JSONArray jsonActions = (JSONArray) jsonMon.get(\"actions\");\r\n for (int i = 0; i < jsonActions.size(); i++) {\r\n JSONObject jsonAction = (JSONObject) jsonActions.get(i);\r\n String name = (String) jsonAction.get(\"name\");\r\n String desc = (String) jsonAction.get(\"desc\");\r\n\r\n Integer atkBon = (Integer) jsonAction.get(\"attack_bonus\");\r\n String dmgDice = (String) jsonAction.get(\"damage_dice\");\r\n Integer dmgBon = (Integer) jsonAction.get(\"damage_bonus\");\r\n\r\n Boolean hasAtkBon = (!atkBon.equals(null)) ? true : false;\r\n Boolean hasDmgDice = (!dmgDice.equals(null) && dmgDice.length() > 0) ? true : false;\r\n Boolean hasDmgBon = (!dmgBon.equals(null)) ? true : false;\r\n\r\n if (hasAtkBon && hasDmgDice && hasDmgBon) {\r\n Action act = new Action(name, desc, atkBon, dmgDice, dmgBon);\r\n mon.addAction(act);\r\n } else if (hasAtkBon && hasDmgDice) {\r\n Action act = new Action(name, desc, atkBon, dmgDice);\r\n mon.addAction(act);\r\n } else {\r\n Action act = new Action(name, desc);\r\n mon.addAction(act);\r\n }\r\n\r\n }\r\n }", "@Override\n public JsonWrapper buildExtend0(JsonWrapper wrapper) {\n wrapper.putString(1, StringUtil.implode(huConfirmList, \",\"));\n wrapper.putInt(2, moFlag);\n wrapper.putInt(3, toPlayCardFlag);\n wrapper.putInt(4, moSeat);\n if (moSeatPair != null) {\n String moSeatPairVal = moSeatPair.getId() + \"_\" + moSeatPair.getValue();\n wrapper.putString(5, moSeatPairVal);\n }\n if (autoDisBean != null) {\n wrapper.putString(6, autoDisBean.buildAutoDisStr());\n\n } else {\n wrapper.putString(6, \"\");\n }\n if (zaiCard != null) {\n wrapper.putInt(7, zaiCard.getId());\n }\n wrapper.putInt(8, sendPaoSeat);\n wrapper.putInt(9, firstCard ? 1 : 0);\n if (beRemoveCard != null) {\n wrapper.putInt(10, beRemoveCard.getId());\n }\n wrapper.putInt(12, maxPlayerCount);\n wrapper.putString(\"startLeftCards\", startLeftCardsToJSON());\n wrapper.putInt(13, ceiling);\n wrapper.putInt(15, isLianBanker);\n wrapper.putInt(\"catCardCount\", catCardCount);\n\n wrapper.putInt(17, jiaBei);\n wrapper.putInt(18, jiaBeiFen);\n wrapper.putInt(19, jiaBeiShu);\n wrapper.putInt(20, autoPlayGlob);\n wrapper.putInt(21, autoTimeOut);\n JSONArray tempJsonArray = new JSONArray();\n for (int seat : tempActionMap.keySet()) {\n tempJsonArray.add(tempActionMap.get(seat).buildData());\n }\n wrapper.putString(\"22\", tempJsonArray.toString());\n wrapper.putInt(24, finishFapai);\n wrapper.putInt(25, below);\n wrapper.putInt(26, belowAdd);\n wrapper.putInt(27, paoHu);\n \n wrapper.putInt(28, disCardCout1);\n \n \n wrapper.putInt(29, randomSeat);\n wrapper.putInt(30, noDui);\n wrapper.putInt(31, fanZhongZhuang);\n wrapper.putInt(32, daNiaoWF);\n wrapper.putInt(33, xiaoQiDuiWF);\n wrapper.putInt(34, daNiaoVal);\n wrapper.putInt(35, suiJiZhuang);\n wrapper.putInt(36, qiangzhiHu);\n \n \n return wrapper;\n }", "@Override\n public void onClick(View view) {\n cliente.post(getActivity(), Helpers.URLApi(\"altausuariopassword\"), Helpers.ToStringEntity(json), \"application/json\", new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n super.onSuccess(statusCode, headers, responseBody);\n\n // Respuesta\n JSONObject respuesta = Helpers.ResponseBodyToJSON(responseBody);\n\n try {\n // Guardamos el token del usuario\n Helpers.setTokenAcceso(getActivity(), respuesta.getJSONObject(\"usuario\").getString(\"token\"));\n\n // Guardamos el nombre del usuario\n Helpers.setNombre(getActivity(), respuesta.getJSONObject(\"usuario\").getString(\"nombre\"));\n\n // Obtenemos la imagen del usuario\n ObtenerImagenUsuario(respuesta.getJSONObject(\"usuario\").getString(\"imagen\"));\n }\n catch (Exception ex) { }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n super.onFailure(statusCode, headers, responseBody, error);\n\n // Mostramos el mensaje de error\n Helpers.MostrarError(getActivity(), \"No se ha podido volver a activar el usuario en Noctua\");\n }\n });\n }", "public void onRedaction(JSONObject jsonObj) {\n/* 726 */ if (!this.mPdfViewCtrl.isUndoRedoEnabled()) {\n/* */ return;\n/* */ }\n/* */ \n/* */ try {\n/* 731 */ if (jsonObj == null) {\n/* 732 */ jsonObj = new JSONObject();\n/* */ }\n/* 734 */ if (this.mContext != null) {\n/* 735 */ String redaction = this.mContext.getResources().getString(R.string.undo_redo_redaction);\n/* 736 */ jsonObj.put(\"Action\", redaction);\n/* */ } \n/* 738 */ jsonObj.put(\"Action event\", \"redaction\");\n/* */ \n/* 740 */ if (Utils.isNullOrEmpty(jsonObj.toString())) {\n/* 741 */ AnalyticsHandlerAdapter.getInstance().sendException(new Exception(\"takeUndoSnapshot with an empty string\"));\n/* */ }\n/* */ \n/* 744 */ takeUndoSnapshot(jsonObj.toString());\n/* 745 */ if (sDebug)\n/* 746 */ Log.d(TAG, \"snapshot: \" + jsonObj.toString()); \n/* 747 */ } catch (Exception e) {\n/* 748 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }", "@Override\n public void onClick(View v) {\n\n HashMap <String, String> data = new LinkedHashMap<>();\n\n data.put(\"id\", idStory);\n data.put(\"name\", titulo_upd.getText().toString());\n data.put(\"synopsis\", synopsis_upd.getText().toString());\n data.put(\"genre_id\", String.valueOf(gl_genre_id));\n data.put(\"user_id\", channel);\n\n\n JSONObject jsonObject = new JSONObject (data);\n\n System.out.print(jsonObject.toString());\n\n VolleySingleton.getInstance(getContext()).addToRequestQueue(\n new JsonObjectRequest(\n Request.Method.POST,\n Constantes.UPDATE_STORY,\n jsonObject,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n //generarPersonaje(response);\n Toast.makeText(getActivity(), \"Story has been update\", Toast.LENGTH_SHORT).show();\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //Toast.makeText(getActivity().getApplicationContext(), error.getMessage(), Toast.LENGTH_LONG).show();\n Toast.makeText(getActivity().getApplicationContext(), \"An error has occur. Please try again.\", Toast.LENGTH_LONG).show();\n }\n }\n ) {\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n headers.put(\"Accept\", \"application/json\");\n return headers;\n }\n\n @Override\n public String getBodyContentType() {\n return \"application/json; charset=utf-8\" + getParamsEncoding();\n }\n }\n );\n\n }", "public static void main(String[] args) throws IOException, FileNotFoundException, org.json.simple.parser.ParseException, ParseException {\n System.out.println(\"you can specify your location of the file else default location will be continued you can enter no\");\r\n Json_ip jp=new Json_ip();\r\n jp.fpath=\"f.json\";\r\n Scanner sc=new Scanner(System.in);\r\n String path_e=sc.nextLine();\r\n if(!(path_e.toLowerCase()).equals(\"no\")){\r\n jp.fpath=path_e;\r\n }\r\n operations op=new operations();\r\n while(true){\r\n System.out.println(\"***************************************************************\");\r\n System.out.println(\"*************************OPTIONS*****************************\");\r\n System.out.println(\"Click corresponding number for specific operations \\n 1.create key \\n 2.Delete key\\n 3.Read Key \\n 4.Exit \\n\");\r\n int choice=sc.nextInt();\r\n \r\n switch(choice){\r\n case 1:\r\n System.out.println(\"Create the key \");\r\n op.create();\r\n break;\r\n case 2:\r\n System.out.println(\"Delete the Key\");\r\n op.delete();\r\n break;\r\n case 3:\r\n System.out.println(\"Read Key\");\r\n op.read();\r\n break;\r\n case 4:\r\n System.out.println(\"Exit\");\r\n return;\r\n default:\r\n System.out.println(\"Enter choice 1-4\");\r\n }\r\n }\r\n }", "protected JSONObject successMessage(JSONObject jsonOrder) throws Exception {\n processedOrders.get().put(processedOrders.get().length(), jsonOrder);\n return super.successMessage(jsonOrder);\n }", "@Override\n\tpublic String handle() {\n\t\tif (result != null) {\n\t\t\ttry {\n\t\t\t\tJSONObject downloadObject = new JSONObject(result);\n\t\t\t\tString content0 = (String) downloadObject.get(\"content\");\n\t\t\t\tString tableName = downloadObject.getString(\"tableName\");\n\t\t\t\tJSONArray content = new JSONArray(content0);\n\t\t\t\tString code = downloadObject.getString(\"code\");\n\t\t\t\tif (\"1\".equals(code)) {\n\t\t\t\t\tif (Constant.ROUTINE_INS.equals(tableName)\n\t\t\t\t\t\t\t|| Constant.SPECIAL_INS.equals(tableName)\n\t\t\t\t\t\t\t|| Constant.EMPHASIS_INS.equals(tableName)\n\t\t\t\t\t\t\t|| Constant.LEAK_INS.equals(tableName)) {\n\t\t\t\t\t\tDao<BsPnInsTask, Long> bsPnInsTaskDao = AppContext\n\t\t\t\t\t\t\t\t.getInstance().getAppDbHelper()\n\t\t\t\t\t\t\t\t.getDao(BsPnInsTask.class);\n\t\t\t\t\t\tBsPnInsTask bsPnInsTask = new BsPnInsTask();\n\t\t\t\t\t\tif (content != null && content.length() > 0) {\n\t\t\t\t\t\t\tfor (int i = 0; i < content.length(); ++i) {\n\t\t\t\t\t\t\t\tJsonAnalysisUtil.setJsonObjectData(\n\t\t\t\t\t\t\t\t\t\tcontent.getJSONObject(i), bsPnInsTask);\n\t\t\t\t\t\t\t\tbsPnInsTaskDao.delete(bsPnInsTask);\n\t\t\t\t\t\t\t\tbsPnInsTaskDao.create(bsPnInsTask);\n\t\t\t\t\t\t\t\t/*String formListStr = content.getJSONObject(i)\n\t\t\t\t\t\t\t\t\t\t.getString(\"formList\");*/\n\t\t\t\t\t\t\t\tJSONObject formList =content.getJSONObject(i).getJSONObject(\"formList\");\n\t\t\t\t\t\t\t\tif (Constant.ROUTINE_INS.equals(tableName)) {\n\n\t\t\t\t\t\t\t\t\tDao<BsSupervisionPoint, Long> bsSupervisionPointDao = AppContext\n\t\t\t\t\t\t\t\t\t\t\t.getInstance().getAppDbHelper()\n\t\t\t\t\t\t\t\t\t\t\t.getDao(BsSupervisionPoint.class);\n\t\t\t\t\t\t\t\t\tDao<BsRoutineInsArea, Long> bsRoutineInsAreaDao = AppContext\n\t\t\t\t\t\t\t\t\t\t\t.getInstance().getAppDbHelper()\n\t\t\t\t\t\t\t\t\t\t\t.getDao(BsRoutineInsArea.class);\n\n\t\t\t\t\t\t\t\t\tJSONArray bsSupervisionPointS = formList\n\t\t\t\t\t\t\t\t\t\t\t.getJSONArray(\"BsSupervisionPoint\");\n\t\t\t\t\t\t\t\t\tJSONArray bsRoutineInsAreaS = formList\n\t\t\t\t\t\t\t\t\t\t\t.getJSONArray(\"BsRoutineInsArea\");\n\n\t\t\t\t\t\t\t\t\tif (bsSupervisionPointS != null\n\t\t\t\t\t\t\t\t\t\t\t&& bsSupervisionPointS.length() > 0) {\n\t\t\t\t\t\t\t\t\t\tfor (int j = 0; j < bsSupervisionPointS\n\t\t\t\t\t\t\t\t\t\t\t\t.length(); ++j) {\n\t\t\t\t\t\t\t\t\t\t\tBsSupervisionPoint bsSupervisionPoint = new BsSupervisionPoint();\n\t\t\t\t\t\t\t\t\t\t\tJsonAnalysisUtil.setJsonObjectData(\n\t\t\t\t\t\t\t\t\t\t\t\t\tbsSupervisionPointS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getJSONObject(j),\n\t\t\t\t\t\t\t\t\t\t\t\t\tbsSupervisionPoint);\n\t\t\t\t\t\t\t\t\t\t\tbsSupervisionPoint.setWorkTaskNum(bsPnInsTask.getPnitNum());\n\t\t\t\t\t\t\t\t\t\t\tbsSupervisionPointDao\n\t\t\t\t\t\t\t\t\t\t\t\t\t.create(bsSupervisionPoint);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (bsRoutineInsAreaS != null\n\t\t\t\t\t\t\t\t\t\t\t&& bsRoutineInsAreaS.length() > 0) {\n\t\t\t\t\t\t\t\t\t\tfor (int j = 0; j < bsRoutineInsAreaS\n\t\t\t\t\t\t\t\t\t\t\t\t.length(); ++j) {\n\t\t\t\t\t\t\t\t\t\t\tBsRoutineInsArea bsRoutineInsArea = new BsRoutineInsArea();\n\t\t\t\t\t\t\t\t\t\t\tJsonAnalysisUtil.setJsonObjectData(\n\t\t\t\t\t\t\t\t\t\t\t\t\tbsRoutineInsAreaS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getJSONObject(j),\n\t\t\t\t\t\t\t\t\t\t\t\t\tbsRoutineInsArea);\n\t\t\t\t\t\t\t\t\t\t\tbsRoutineInsArea.setWorkTaskNum(bsPnInsTask.getPnitNum());\n\t\t\t\t\t\t\t\t\t\t\tbsRoutineInsAreaDao\n\t\t\t\t\t\t\t\t\t\t\t\t\t.create(bsRoutineInsArea);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} else if (Constant.SPECIAL_INS\n\t\t\t\t\t\t\t\t\t\t.equals(tableName)) {\n\n\t\t\t\t\t\t\t\t\tJSONArray bsInsFacInfoS = formList\n\t\t\t\t\t\t\t\t\t\t\t.getJSONArray(\"BsInsFacInfo\");\n\t\t\t\t\t\t\t\t\tDao<BsInsFacInfo, Long> bsInsFacInfoDao = AppContext\n\t\t\t\t\t\t\t\t\t\t\t.getInstance().getAppDbHelper()\n\t\t\t\t\t\t\t\t\t\t\t.getDao(BsInsFacInfo.class);\n\t\t\t\t\t\t\t\t\tif (bsInsFacInfoS != null\n\t\t\t\t\t\t\t\t\t\t\t&& bsInsFacInfoS.length() > 0) {\n\t\t\t\t\t\t\t\t\t\tfor (int j = 0; j < bsInsFacInfoS\n\t\t\t\t\t\t\t\t\t\t\t\t.length(); ++j) {\n\t\t\t\t\t\t\t\t\t\t\tBsInsFacInfo bsInsFacInfo = new BsInsFacInfo();\n\t\t\t\t\t\t\t\t\t\t\tJsonAnalysisUtil.setJsonObjectData(\n\t\t\t\t\t\t\t\t\t\t\t\t\tbsInsFacInfoS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getJSONObject(j),\n\t\t\t\t\t\t\t\t\t\t\t\t\tbsInsFacInfo);\n\t\t\t\t\t\t\t\t\t\t\tbsInsFacInfo.setWorkTaskNum(bsPnInsTask.getPnitNum());\n\t\t\t\t\t\t\t\t\t\t\tbsInsFacInfoDao\n\t\t\t\t\t\t\t\t\t\t\t\t\t.create(bsInsFacInfo);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} else if (Constant.EMPHASIS_INS\n\t\t\t\t\t\t\t\t\t\t.equals(tableName)) {\n\n\t\t\t\t\t\t\t\t\tJSONArray bsEmphasisInsAreaS = formList\n\t\t\t\t\t\t\t\t\t\t\t.getJSONArray(\"BsEmphasisInsArea\");\n\t\t\t\t\t\t\t\t\tDao<BsEmphasisInsArea, Long> bsEmphasisInsAreaDao = AppContext\n\t\t\t\t\t\t\t\t\t\t\t.getInstance().getAppDbHelper()\n\t\t\t\t\t\t\t\t\t\t\t.getDao(BsEmphasisInsArea.class);\n\t\t\t\t\t\t\t\t\tif (bsEmphasisInsAreaS != null\n\t\t\t\t\t\t\t\t\t\t\t&& bsEmphasisInsAreaS.length() > 0) {\n\t\t\t\t\t\t\t\t\t\tfor (int j = 0; j < bsEmphasisInsAreaS\n\t\t\t\t\t\t\t\t\t\t\t\t.length(); ++j) {\n\t\t\t\t\t\t\t\t\t\t\tBsEmphasisInsArea bsEmphasisInsArea = new BsEmphasisInsArea();\n\t\t\t\t\t\t\t\t\t\t\tJsonAnalysisUtil.setJsonObjectData(\n\t\t\t\t\t\t\t\t\t\t\t\t\tbsEmphasisInsAreaS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getJSONObject(j),\n\t\t\t\t\t\t\t\t\t\t\t\t\tbsEmphasisInsArea);\n\t\t\t\t\t\t\t\t\t\t\tbsEmphasisInsArea.setWorkTaskNum(bsPnInsTask.getPnitNum());\n\t\t\t\t\t\t\t\t\t\t\tbsEmphasisInsAreaDao\n\t\t\t\t\t\t\t\t\t\t\t\t\t.create(bsEmphasisInsArea);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} else if (Constant.LEAK_INS.equals(tableName)) {\n\n\t\t\t\t\t\t\t\t\tJSONArray bsLeakInsAreaS = formList\n\t\t\t\t\t\t\t\t\t\t\t.getJSONArray(\"BsLeakInsArea\");\n\t\t\t\t\t\t\t\t\tDao<BsLeakInsArea, Long> bsLeakInsAreaDao = AppContext\n\t\t\t\t\t\t\t\t\t\t\t.getInstance().getAppDbHelper()\n\t\t\t\t\t\t\t\t\t\t\t.getDao(BsLeakInsArea.class);\n\t\t\t\t\t\t\t\t\tif (bsLeakInsAreaS != null\n\t\t\t\t\t\t\t\t\t\t\t&& bsLeakInsAreaS.length() > 0) {\n\t\t\t\t\t\t\t\t\t\tfor (int j = 0; j < bsLeakInsAreaS\n\t\t\t\t\t\t\t\t\t\t\t\t.length(); ++j) {\n\t\t\t\t\t\t\t\t\t\t\tBsLeakInsArea bsLeakInsArea = new BsLeakInsArea();\n\t\t\t\t\t\t\t\t\t\t\tJsonAnalysisUtil.setJsonObjectData(\n\t\t\t\t\t\t\t\t\t\t\t\t\tbsLeakInsAreaS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getJSONObject(j),\n\t\t\t\t\t\t\t\t\t\t\t\t\tbsLeakInsArea);\n\t\t\t\t\t\t\t\t\t\t\tbsLeakInsArea.setWorkTaskNum(bsPnInsTask.getPnitNum());\n\t\t\t\t\t\t\t\t\t\t\tbsLeakInsAreaDao\n\t\t\t\t\t\t\t\t\t\t\t\t\t.create(bsLeakInsArea);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tupdatePush(insTablePushTaskVo, bsPnInsTask);\n\t\t\t\t\t\t\treturn \"1\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn \"0\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(Constant.RRWO_TASK.equals(tableName)){\n\t\t\t\t\t\tif (content != null && content.length() > 0) {\n\t\t\t\t\t\t\tDao<BsRushRepairWorkOrder, Long> bsRushRepairWorkOrderDao = AppContext\n\t\t\t\t\t\t\t.getInstance().getAppDbHelper()\n\t\t\t\t\t\t\t.getDao(BsRushRepairWorkOrder.class);\n\t\t\t\t\t\t\tfor (int i = 0; i < content.length(); ++i) {\n\t\t\t\t\t\t\t\tBsRushRepairWorkOrder bsRushRepairWorkOrder =new BsRushRepairWorkOrder();\n\t\t\t\t\t\t\t\tJsonAnalysisUtil\n\t\t\t\t\t\t\t\t.setJsonObjectData(content\n\t\t\t\t\t\t\t\t\t\t.getJSONObject(i), bsRushRepairWorkOrder);\n\t\t\t\t\t\t\t\tbsRushRepairWorkOrderDao.create(bsRushRepairWorkOrder);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tupdatePush(insTablePushTaskVo);\n\t\t\t\t\t\t\treturn \"1\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t// 没有相应的处理类型\n\t\t\t\t\t\t\treturn \"0\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn \"3\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn \"0\";\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\treturn \"0\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "public String getOperation() {return operation;}", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "@Override\r\n public void getProcessFinish(JSONObject[] jsonObjects) {\r\n // Call the appropriate method to display the data according to the data type\r\n switch(dataType) {\r\n case \"NON-SED\":\r\n displayNonSedData(jsonObjects);\r\n break;\r\n case \"CALORIE\":\r\n displayCalorieData(jsonObjects);\r\n break;\r\n case \"ACTIVE\":\r\n displayActiveData(jsonObjects);\r\n break;\r\n }\r\n\r\n // Show previous and next buttons\r\n Button btnPrev = findViewById(R.id.btn_prev);\r\n if(offsetFromToday <= MAX_OFFSET)\r\n btnPrev.setVisibility(View.VISIBLE);\r\n\r\n Button btnNext = findViewById(R.id.btn_next);\r\n if(!getTodayAtMidnight().equals(endDate.getTime()))\r\n btnNext.setVisibility(View.VISIBLE);\r\n\r\n // If the screen has just been opened setup the previous and next buttons\r\n if(firstLoad) {\r\n firstLoad = false;\r\n setPrevNextButtonsAppearance();\r\n setupButtonListeners();\r\n }\r\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\tif(!isInputPassed())\n\t\t\t\t\treturn;\n\t\t\t\tlmv.show(\"正在查询\");\n\t\t String urlString = UrlUtils.GetGoInfo;\n\t\t RequestParams params = new RequestParams(); // 绑定参数\n\t\t params.put(\"phone\", phone.getText().toString());\n\n\t\t HttpUtils.post(urlString, params, new BaseJsonHttpResponseHandler<GoInfoModel>() {\n\n\t\t \t\n\t\t @Override\n\t\t public void onSuccess(int statusCode, Header[] headers, String rawJsonResponse, GoInfoModel response) {\n\t\t \t\tif(response.isLogin() && response.isSuccess())\n\t\t \t\t{\n\t\t \t\t\tGlobalConfig config =GlobalConfig.getInstance();\n\t\t \t\t\tconfig.setAmount(Float.parseFloat(amount.getText().toString()));\n\t\t \t\t\tconfig.setCustomGoCoin(response.getData().getBalance());\n\t\t \t\t\tconfig.setProportion(response.getData().getProportion());\n\t\t \t\t\tconfig.setCustomName(response.getData().getName());\n\t\t \t\t\tconfig.setCustomPhone(phone.getText().toString());\n\t\t \t\t\tconfig.setCusomerId(response.getData().getCid());\n\t\t \t\t\t\tIntent it = new Intent(MainActivity.this,PayMethodActivity.class);\n\t\t \t\t\t\tstartActivity(it);\n\t\t \t\t}\n\t\t \t\telse\n\t\t \t\t{\n\t\t \t\t\tif(!response.isLogin())\n\t\t \t\t\t\tMainActivity.this.toLogin();\n\t\t \t\t\telse\n\t\t \t\t\t\tToast.makeText(MainActivity.this, response.getErrorMessage(), Toast.LENGTH_LONG).show();\n\t\t \t\t}\n\t\t \t\tlmv.hide();\n\t\t }\n\n\t\t @Override\n\t\t public void onFailure(int statusCode, Header[] headers, Throwable throwable, String rawJsonData, GoInfoModel errorResponse) {\n\n\t\t \t\tToast.makeText(MainActivity.this, throwable.getMessage(), Toast.LENGTH_LONG).show();\n\t\t \t\tlmv.hide();\n\t\t }\n\n\t\t @Override\n\t\t protected GoInfoModel parseResponse(String rawJsonData) throws Throwable {\n\t\t return new ObjectMapper().readValues(new JsonFactory().createParser(rawJsonData), GoInfoModel.class).next();\n\t\t }\n\n\t\t });\n\n\t\t\t}", "@Override\n public void onSucces(String result) {\n JSONObject object = new JSONObject();\n boolean isSuccess = object.optBoolean(result);\n Log.hb(\"orderDetailBean.order_info.status after::\"+orderDetailBean.order_info.status);\n finish();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "private void uploadData(){\n\n // Log.v(\"data to upload\", db.getClicksToUpload().toString() );\n JSONObject moments = db.getClicksToUpload();\n\n//\n// /// upload data\n//\n//\n// //get json to post up\n// JSONObject moments = new JSONObject();\n// JSONObject moment = new JSONObject();\n//\n// //{\"moments\":[\n// // {\"identifier\":1, \"timestamp\":\"2016-09-27 12:09:28 +0000\", \"state\":0, \"latitude\":12999999.0, \"longitude\":-99999.0}\n// // ]}\n//\n// try {\n// //obj.put(\"moments\",\"h\");\n// moment.put(\"identifier\", 83449);\n// moment.put(\"timestamp\", \"2016-09-27 12:09:28 +0000\");\n// moment.put(\"state\", 0);\n// moment.put(\"latitude\", 99);\n// moment.put(\"longitude\", 99);\n// JSONArray jsonArray = new JSONArray();\n// jsonArray.put(moment);\n// moments.put(\"moments\", jsonArray);\n//\n//\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n Log.v(\"data for upload\", moments.toString() );\n\n\n String urla = serverURL+\"/v1/users/\"+user_ID+\"/moments\";\n\n Log.v(\"moments length\", Integer.toString(moments.length()) );\n\n try {\n if(moments != null && moments.getJSONArray(\"moments\").length() > 0 ) {\n\n\n JsonObjectRequest jsObjRequesta = new JsonObjectRequest\n (Request.Method.POST, urla, moments, new Response.Listener<JSONObject>() {\n\n\n @Override\n public void onResponse(JSONObject response) {\n //mTxtDisplay.setText(\"Response: \" + response.toString());\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n\n Toast.makeText(getApplicationContext(), \"Upload Failed: Server Unreachable\", Toast.LENGTH_LONG).show();\n Log.v(\"tag\", \"request fail\");\n error.printStackTrace();\n\n }\n });\n\n // Add the request to the RequestQueue.\n SnapApplication.getInstance().getRequestQueue().add(jsObjRequesta);\n //super.queue.add(jsObjRequest);\n }\n else {\n Toast.makeText(getApplicationContext(), \"No Data to Upload\", Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n\n\n\n}", "private void OooO00o(int i, long j, Object obj, Map<String, String> map) {\n this.f23510OooO00o.m20656OooO00o().post(new OooO0O0(obj, map));\n AbstractC8962ooOOo ooooo = f23506OooO00o;\n if (ooooo != null) {\n ooooo.OooO00o(this.f23512OooO00o.request().method(), this.f23511OooO00o, j, i, this.f23512OooO00o.request().url().toString(), obj.toString());\n }\n }", "@Override\n\tsynchronized void execute() {\n\t\t_dataOUTPipe.dataIN(op1.getText());\n\t\t_dataOUTPipe.dataIN(op2.getText());\n\t\t_dataOUTPipe.dataIN(op.getText());\n\t}", "@Override\n\t\t\tprotected String doInBackground(Void... params) {\n\t\t\t\tString rev1 = null;\n\t\t\t\tJSONObject jsonObject = null;\n\t\t\t\ttry {\n\t\t\t\t\tjsonObject = jsonObjectDict();\n\t\t\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tString jsonString = \"OrderRequest=\"+jsonObject.toString();\n\t\t\t\t\n\t\t\t\tLog.e(\"jsonString****\", \"\"+jsonString);\n\t\t\t\t\n\t\t\t\tString url = \"http://mapi.tripglobal.cn/Hotel.aspx?action=SubmitHotelOrder\";\n\t\t\t\t\n\t\t\t\t\n//\t\t\t\thotelOrderInterFaces = new HotelOrderInterFaces(HotelOrderYuDingMain.this, handler);\n//\t\t\t\thotelOrderInterFaces.getModelFromPOST(url, jsonString, TripgMessage.HANGBAN);\n\t\t\t\t\n\t\t\t\ttry { \n\t\t\t\t HttpClient httpclient = new DefaultHttpClient(); \n\t\t\t\t HttpPost httppost = new HttpPost(url); \n\t\t\t\t //添加http头信息 \n\t\t\t\t \n\t\t\t\t //认证token \n\t\t\t\t httppost.addHeader(\"OrderRequest\", \"application/json\"); \n\t\t\t\t httppost.addHeader(\"Content-type\", \"application/x-www-form-urlencoded\"); \n\n\t\t\t\t httppost.setEntity(new StringEntity(jsonString)); \n\t\t\t\t HttpResponse response; \n\t\t\t\t response = httpclient.execute(httppost); \n\t\t\t\t rev1 = EntityUtils.toString(response.getEntity());\n\t\t\t\t \n\t\t\t\t //obj = new JSONObject(rev); \n\t\t\t\t //检验状态码,如果成功接收数据\n//\t\t\t\t int code = response.getStatusLine().getStatusCode();\n\t\t\t\t \n\n\t\t\t\t } catch (ClientProtocolException e) { \n\t\t\t\t \t\n\t\t\t\t } catch (IOException e) {\n\t\t\t\t \t\n\t\t\t\t } catch (Exception e) { \n\t\t\t\t \t\n\t\t\t\t } \n\t\t\t\t\n\t\t\t\treturn rev1;\n\t\t\t}", "Operations operations();", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {\n\n SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this.cordova.getActivity());\n\n if (action.equals(\"fetch\")) {\n JSONObject options = args.getJSONObject (0);\n String key = options.getString(\"key\");\n String dict = options.getString(\"dict\");\n if (dict != \"\")\n \t\tkey = dict + '.' + key;\n if (sharedPrefs.contains(key)) {\n String obj = (String) sharedPrefs.getAll().get(key);\n // JSONObject jsonValue = new JSONObject((Map) obj);\n callbackContext.success(obj.toString());\n } else {\n \t\tcallbackContext.error(0);\n// callbackContext.sendPluginResult(new PluginResult ());\n }\n return true;\n } else if (action.equals(\"store\")) {\n JSONObject options = args.getJSONObject (0);\n String key = options.getString(\"key\");\n String value = options.getString(\"value\");\n String dict = options.getString(\"dict\");\n if (dict != \"\")\n \t\tkey = dict + '.' + key;\n Editor editor = sharedPrefs.edit();\n editor.putString(key, value);\n if (editor.commit()) {\n callbackContext.success();\n } else {\n callbackContext.error(createErrorObj(COMMIT_FAILED, \"Cannot commit change\"));\n } \n return true;\n// } else if (action.equals(\"load\")) {\n// JSONObject obj = new JSONObject();\n// Map prefs = sharedPrefs.getAll();\n// Iterator it = prefs.entrySet().iterator();\n// while (it.hasNext()) {\n// Map.Entry pairs = (Map.Entry)it.next();\n// obj.put(pairs.getKey().toString(), pairs.getValue().toString());\n// }\n// callbackContext.sendPluginResult(new PluginResult(status, obj));\n// } else if (action.equals(\"show\")) {\n// String activityName = args.getString(0);\n// Intent intent = new Intent(Intent.ACTION_VIEW);\n// intent.setClassName(this.cordova.getActivity(), activityName);\n// try {\n// this.cordova.getActivity().startActivity(intent);\n// } catch (ActivityNotFoundException e) {\n// callbackContext.sendPluginResult(createErrorObj(NO_PREFERENCE_ACTIVITY, \"No preferences activity called \" + activityName));\n// }\n } else if (action.equals(\"clearAll\")) {\n Editor editor = sharedPrefs.edit();\n editor.clear();\n editor.commit();\n if (editor.commit()) {\n callbackContext.success();\n } else {\n callbackContext.error(createErrorObj(COMMIT_FAILED, \"Cannot commit change\"));\n } \n return true;\n } else if (action.equals(\"remove\")) {\n JSONObject options = args.getJSONObject (0);\n String key = options.getString(\"key\");\n String dict = options.getString(\"dict\");\n if (dict != \"\")\n \t\tkey = dict + '.' + key;\n if (sharedPrefs.contains(key)) {\n Editor editor = sharedPrefs.edit();\n editor.remove(key);\n if (editor.commit()) {\n callbackContext.success();\n } else {\n callbackContext.error(createErrorObj(COMMIT_FAILED, \"Cannot commit change\"));\n } \n } else {\n callbackContext.sendPluginResult(new PluginResult (PluginResult.Status.NO_RESULT));\n }\n return true;\n }\n // callbackContext.sendPluginResult(new PluginResult (PluginResult.Status.JSON_EXCEPTION));\n return false;\n }", "private static void printOp(User u){\n\t\tSystem.out.println(\"Hello \"+u.getUserName()+\", type:\\n\"\n\t\t\t\t + \"- request\\n\"\n\t\t\t\t\t+ \"- confirm\\n\"\n\t\t\t\t\t+ \"- search\\n\"\n\t\t\t\t\t+ \"- post\\n\"\n\t\t\t\t\t+ \"- follow\\n\"\n\t\t\t\t\t+ \"- listPosts\\n\"\n\t\t\t\t\t+ \"- listFriends\\n\"\n\t\t\t\t\t+ \"- listRequests\\n\"\n\t\t\t\t\t+ \"- listFollowed\\n\"\n\t\t\t\t\t+ \"- logout\");\n\t}", "public void onClick(final DialogInterface dialog, int whichButton) {\n String URL = \"https://\"+ appState.ENDPOINT + \"/v2/companies/test/set/\" + appState.TEST_ID;\n\n HashMap<String, String> params = new HashMap<String, String>();\n params.put(\"username\", appState.USERNAME);\n params.put(\"passcode\", appState.PASSCODE);\n params.put(\"action\",\"next\");\n// params.put(\"action\",mTEST_SECTION_DELIMITERS[appState.CURRENT_TEST_SECTION_SLIDE_INDEX_NUMBER+1]);\n// appState.CURRENT_TEST_SECTION_SLIDE_INDEX_NUMBER++;\n\n// TextView lame= (TextView) findViewById(R.id.participants_count);\n// lame.setText(\"Total participants : \" + mTEST_SECTION_DELIMITERS[appState.CURRENT_TEST_SECTION_SLIDE_INDEX_NUMBER]);\n\n JsonObjectRequest request_json = new JsonObjectRequest(URL, new JSONObject(params), new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n getCurrentTestInfo();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.e(\"Error: \", error.getMessage());\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(TestAdminActivity.this);\n request_json.setShouldCache(false);\n requestQueue.add(request_json);\n }", "public void goToAddEdificio(View view) {\n\n //get the result data\n String resultData = null;\n\n System.out.println(\"goToAddEdificio - 1\");\n\n\n TextView txtText = (TextView) view.findViewById(R.id.textResult);\n System.out.println(\"goToAddEdificio - 1.2\");\n\n EditText editTextName = (EditText) view.findViewById(R.id.taskToDo);\n System.out.println(\"goToAddEdificio - 1.3\"+editTextName);\n String messageName = editTextName.getText().toString();\n\n EditText editTextEstado = (EditText) view.findViewById(R.id.edoToDo);\n String messageEstado = editTextEstado.getText().toString();\n\n EditText editTextPais = (EditText) view.findViewById(R.id.paisToDo);\n String messagePais = editTextPais.getText().toString();\n\n\n System.out.println(\"goToAddEdificio - 2\");\n RequestTaskEdificioAdd th=new RequestTaskEdificioAdd();\n System.out.println(\"goToAddEdificio - 3\");\n th.name=messageName;\n System.out.println(\"goToAddEdificio - 3\");\n th.estado=messageEstado;\n System.out.println(\"goToAddEdificio - 3\");\n th.pais=messagePais;\n\n th.execute(txtText); // here the result in text will be displayed\n System.out.println(\"goToAddEdificio - 4\");\n\n\n\n\n }", "private JsonObject OnGoingRideObject()\n {\n OnGoingRideRequestModel requestModel = new OnGoingRideRequestModel();\n requestModel.setUserId(UserId);\n return new Gson().toJsonTree(requestModel).getAsJsonObject();\n }", "public boolean update(JSONObject jsonProgram);", "@Override\n\tprotected void setOperation() {\n\t\tbt1.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tTextHttp();\n\t\t\t}\n\t\t});\n\t\tbt2.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tActivityDataRequest.getImage(MainActivity.this, img1);\n\t\t\t}\n\t\t});\n\t}", "protected void send(O operation)\n {\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "void onRequest(Member member, Map<String, ?> input, JSONObject output);", "@Override\r\n\tpublic void processResponse(Object res) {\r\n\t\tJSONObject response = (JSONObject) res;\r\n\t\tsaveNomineeDetailButton.setEnabled(true);\r\n\t\tif(response != null && response.length() > 0) {\r\n\t\t\ttry {\r\n\t\t\t\tif(response != null && String.valueOf(response.get(Constant.AddNominee.API_STATUS)).equals(\"1\")) {\r\n\t\t\t\t\tToast.makeText(getActivity(),String.valueOf(response.get(Constant.AddNominee.API_MESSAGE)), Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tNomineeListActivity nomineesActivity = new NomineeListActivity();\r\n\t\t\t\t\t((MainFragmentActivity)getActivity()).redirectScreenWithoutStack(nomineesActivity);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tToast.makeText(getActivity(),String.valueOf(response.get(Constant.AddNominee.API_MESSAGE)), Toast.LENGTH_LONG).show();\r\n\t\t\t\t}\r\n\t\t\t} catch (JSONException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void sendJson(Object data);", "public interface iCommand {\n void execute(String peerId, JSONObject payload) throws JSONException;\n}", "private void urlMethods(String URL, final String intUrls) {\n Utils.get(URL, null, new JsonHttpResponseHandler() {\n @Override\n public void onStart() {\n progressDialog.show();\n progressDialog.setMessage(\"Connecting to Server ...\");\n\n }\n\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray timeline) {\n // Pull out the first event on the public timeline\n try {\n\n if (timeline == null && timeline.length() <= 0) {\n filMthd();\n return;\n\n } else if (intUrls.equalsIgnoreCase(Utils.URL_POSCLIENT)) {\n whID = timeline.getJSONObject(0).getString(\"wh_id\");\n groupCode = timeline.getJSONObject(0).getString(\"group_code\");\n Utils.saveString(BackgrodBaseActivity.this, timeline.getJSONObject(0).getString(\"wh_id\").toString(), \"wh_id\");\n\n // String[] xyz = {\"company_name\", \"wh_name\", \"wh_id\", \"group_code\", \"tax_type\",\"tax_per\", \"curr_code\", \"pymt_code\", \"header_info\", \"footer_info\", \"absorb_tax\"};\n Utils.saveJSONArray(BackgrodBaseActivity.this, \"server\", \"key\", timeline);\n\n Utils.saveMap(getApplicationContext(), Utils.jsonToMap(timeline.getJSONObject(0)), \"getPOSClient\");\n Log.d(\"saved\", \"\" + whID);\n\n } else if (intUrls.equalsIgnoreCase(\"woImg\")) {\n jsBtnWoimg = new JSONArray();\n jsBtnWoimg = timeline;\n\n //Utils.saveJSONArray(getApplicationContext(), \"pages\", \"1\", timeline);\n\n }\n\n\n } catch (Exception exception) {\n Log.d(\"this error\", \"\" + exception);\n\n }\n\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n // Utils.alertDialogShow(getApplicationContext(), \"Error\", \" Connection refused\", 0);\n }\n\n\n @Override\n public void onFinish() {\n progressDialog.dismiss();\n if (intUrls.equalsIgnoreCase(Utils.URL_POSCLIENT)) {\n\n String urlMtds = Utils.INTIALSTRI + Utils._MEALGROUP + Utils.COMPCODE + \"&whid=\" + Utils.getString(BackgrodBaseActivity.this, \"wh_id\") + \"&mealid=\" + MealID + \"&regcode=\" + tsdArr.get(4) + \"&date=\" + Utils.currenDate();\n Log.d(\"urrrl2\", urlMtds);\n frstUrl(urlMtds, \"Meal GROUP\");\n } else if (intUrls.equalsIgnoreCase(\"woImg\")) {\n String urlMtds = Utils.INTIALSTRI + Utils._FULLDETAILS + Utils.COMPCODE + \"&paramgroup_code=\" + MealGroup;\n frstUrl(urlMtds, \"FULL DETAILS\");\n Log.d(\"urrrl3\", urlMtds);\n }\n\n\n }\n });\n\n\n }", "void mo28373a(JSONObject jSONObject);", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tJSONObject json = new JSONObject();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tjson.putOpt(\"productId\", \"1\");\r\n\t\t\t\t\tjson.putOpt(\"productName\", \"60元宝\");\r\n\t\t\t\t\tjson.putOpt(\"productDesc\", \"6元\");\r\n\t\t\t\t\tjson.putOpt(\"paramPrice\", \"6\");\r\n\t\t\t\t\tjson.putOpt(\"buyNum\", \"1\");\r\n\t\t\t\t\tjson.putOpt(\"coinNum\", \"1\");\r\n\t\t\t\t\tjson.putOpt(\"paramZoneId\", \"1\");\r\n\t\t\t\t\tjson.putOpt(\"serverName\", \"魔兽一区\");\r\n\t\t\t\t\tjson.putOpt(\"paramRoleId\", \"10\");\r\n\t\t\t\t\tjson.putOpt(\"roleName\", \"好人\");\r\n\t \t\tRandom r = new Random();\r\n\t \t\tint nextInt = r.nextInt(10000);\r\n\t\t\t\t\tjson.putOpt(\"paramBillNo\",\"9ca7d741-6000-4c68-a18f-\"+String.valueOf(nextInt));\r\n\t\t\t\t\tjson.putOpt(\"roleLevel\", \"1\");\r\n\t\t\t\t\tjson.putOpt(\"vip\", \"12\");\r\n\t\t\t\t\tjson.putOpt(\"userid\", \"312\");\r\n\t\t\t\t\t\r\n//\t\t\t\t\tpayBean.setUserId(\"2312312\");\r\n//\t\t\t\t\tpayBean.setExchangeRate(\"1\");\r\n//\t\t\t\t\tpayBean.setOrderPrice(\"1\");\r\n//\t\t\t\t\tpayBean.setOrderId(\"9ca7d741-6000-4c68-a18f-95cdfcffe08d\");\r\n//\t\t\t\t\tpayBean.setProductId(\"1\");\r\n//\t\t\t\t\tpayBean.setProductCount(\"35\");\r\n//\t\t\t\t\tpayBean.setOrderTitle(\"100元宝\");\r\n//\t\t\t\t\tpayBean.setRoleId(\"e904e50f0c049ebe2fa99ddb172354d6\");\r\n//\t\t\t\t\tpayBean.setRoleName(\"sadfdf\");\r\n//\t\t\t\t\tpayBean.setZoneId(\"1\");\r\n//\t\t\t\t\tpayBean.setPayCallBackUrl(\"http://lzzg.talkyun.com.cn/Orders/Pay/CallBack/360\");\r\n//\t\t\t\t\tpayBean.setAppName(\"我的三国\");\r\n//\t\t\t\t\tpayBean.setAppKey(\"27d7a59844aa83e97ca32f4db9d2b524\");\r\n//\t\t\t\t\tpayBean.setNoteOne(\"1\");\r\n//\t\t\t\t\tpayBean.setNoteTwo(\"\");\r\n//\t\t\t\t\tpayBean.setAppPrivateKey(\"c49d7aadc42eba752bd9410eaaabd30f\");\r\n//\t\t\t\t\tpayBean.setRoleLevel(\"1\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tpay(json.toString());\r\n\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t// pay(payJson);\r\n\t\t\t}", "public void mo15090a(JSONObject jSONObject) {\n }", "default void execOperation(UUID operationId,\n Map<String, String> properties,\n OperationFeedback feedback,\n ProtocolGateway protocolGateway) {\n this.execOperation(operationId, properties, feedback);\n }", "@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\n\t\t\t\t}", "public void logEmissions(JSONObject object, Context context) {\n try {\n JSONArray jsonArray = readEmissionsLog(context);\n if (jsonArray == null) {\n jsonArray = new JSONArray();\n }\n FileOutputStream fos = context.openFileOutput(profileManager.getActiveUserName() + \"Nutrition.json\", Context.MODE_PRIVATE);\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"Nutrition data\", object);\n jsonArray.put(jsonObject);\n fos.write(jsonArray.toString().getBytes());\n fos.close();\n } catch (IOException | JSONException e) {\n Log.e(\"IOException\", \"Error occurred writing file \");\n }\n }", "public void processKeystrokes() {\n\t\t// Only send an update if the keystroke count object is not null and we have\n\t\t// keystroke activity\n\t\t//\n\t\tif (this.hasData()) {\n\t\t\t\n\t\t\tthis.endUnendedFiles();\n\n\t\t\t//\n\t\t\t// Send the info now\n\t\t\t//\n\t\t\tthis.sendKeystrokeData(this);\n\t\t}\n\t}", "private synchronized void zzlx() {\n try {\n JSONObject jSONObject = new JSONObject();\n jSONObject.put(\"castSessionId\", this.zzTp);\n jSONObject.put(\"playerTokenMap\", new JSONObject(this.zzTn));\n this.zztB.edit().putString(\"save_data\", jSONObject.toString()).commit();\n } catch (JSONException e) {\n zzQW.zzf(\"Error while saving data: %s\", e.getMessage());\n }\n return;\n }", "@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}", "public void executeCommand(String text) {\r\n JsonParser parser = new JsonParser();\r\n try {\r\n JsonObject o = (JsonObject) parser.parse(text);\r\n interpretJson(o);\r\n } catch (JsonSyntaxException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (sJSON.length() > 0) {\n\n\t\t\t\t\t\t\tJSONObject jsonObject2 = new JSONObject(sJSON);\n\n\t\t\t\t\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\t\t\t\t\t\t\tdata.Update(\"notificationcount\",\n\t\t\t\t\t\t\t\t\tjsonObject2.getInt(\"admincount\")\n\t\t\t\t\t\t\t\t\t\t\t+ jsonObject2.getInt(\"membercount\"));\n\n\t\t\t\t\t\t\tstartThread();\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}", "public void execute() {\n\t\tString userID = clientMediator.getUserName();\n\t\tString id = reactToController.communicateWith(userID);\n\t\tif(id != null){\n\t\t\tclientMediator.setReactTo(id);\n\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tString message = reactToController.reactToEntity(id,userID);\n\t\t\tString result = \"You just interacted with \" + id + \", so you \" + message + \" at \" + df.format(new Date()).toString();\n\t\t\tclientMediator.setReactResult(result);\n\t\t\tclientMediator.getEventQueue().add(new ReactToEvent(id,userID));\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n titleTask = txtTitle.getText().toString();\n descriptionTask = txtDescription.getText().toString();\n locationTask = txtLocation.getText().toString();\n\n\n //Also set the code to add the object to the server,\n //It should call getInfo() which will store all of the inputs into strings or ints\n\n\n //This checks to make sure the input is valid, if not will not allow the user to save to database\n if (dayPass == 0 || monthPass == 0 || yearPass == 0 || titleTask == null || descriptionTask == null || startMinute == 0 || startHour == 0)\n Toast.makeText(AddTask.this, \"Incorrect input, please try again\", Toast.LENGTH_SHORT).show();\n else {\n if(MainActivity.groupview)\n MainActivity.dh.writeTask(MainActivity.user.getUserID(), MainActivity.group.getGroupID(), new Task(dayPass, monthPass, yearPass, startHour, startMinute, categoryTask, titleTask, descriptionTask, locationTask, false, MainActivity.user));\n else\n MainActivity.dh.writeTask(MainActivity.user.getUserID(), \"\", new Task(dayPass, monthPass, yearPass, startHour, startMinute, categoryTask, titleTask, descriptionTask, locationTask, false, MainActivity.user));\n //MainActivity.dh.readBlock(MainActivity.user.getUserID(), \"\", \"04202019\");\n Toast.makeText(AddTask.this, \"Task saved to your calendar\", Toast.LENGTH_LONG).show();\n Intent intentHome = new Intent(AddTask.this,\n MainActivity.class);\n startActivity(intentHome);\n }\n\n }", "public JSONObject addAICmdToJSON(AddAICommand addAICommandObj) {\n\n stringResult = gsonConverter.toJson(addAICommandObj);\n\n jsonObjectResult = new JSONObject(stringResult);\n\n return jsonObjectResult;\n }", "@Override\n public void run() {\n String domain = Constant.BASE_URL + Constant.TICKER;\n String params = Constant.OPER + \"=\" + Constant.TICK_CORP + \"&\" + Constant.LOGIN_TOKEN + \"=\" + token + \"&\" + \"p=1\";\n String json = GetSession.post(domain, params);\n if (!json.equals(\"+ER+\")){\n try {\n if (json.equals(\"[]\")) {\n Message message = new Message();\n message.what = NODATASHOW;\n handler.sendMessage(message);\n }\n JSONArray jsonArray = new JSONArray(json);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n }", "static void writeOperations(){\n \ttry{\n \t\t\n\t\t\t// Create file \n\t\t\tFileWriter fstream = new FileWriter(FILE_FILEOP);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t \tfor (int i=0; i < operations.size(); i++){\n\t \t\tout.write(operations.get(i).getDetails() );\n\t \t}\n\t\t\t\n\t\t\t//Close the output stream\n\t\t\tout.close();\n\t\t}\n \tcatch (Exception e){//Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t\tSystem.out.print(\"Operations file written.\\n\");\n\n \t\n }", "public thExecOTX(globalAreaData m, JSONObject jo) {\n gDatos = m;\n gSub = new srvRutinas(gDatos);\n this.params = jo;\n }", "@Override\n public void result(Server.State state, String data) {\n if (state == Server.State.Complete) {\n JsonValue json = main.server.parseData(data);\n int s = json.getInt(\"state\", 0);\n if (s == 1) {\n historyBoards.clear();\n scroll.setSize(0);\n scroll.toBegin();\n scroll.stop();\n JsonValue jsonActions = json.get(\"actions\");\n if (jsonActions.size > 0) {\n for (JsonValue val = jsonActions.child; val != null; val = val.next) {\n historyBoards.add(new HistoryBoard(HistoryPage.this, val));\n scroll.addSize(240);\n }\n scroll.addSize(-(HEIGHT - 760));\n scroll.removeNegativeSize();\n }\n }\n }\n }", "@Override\n\t\t\t\tpublic void onBizSuccess(String responseDescription, JSONObject data, final String all_data) {\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tString status = data.getString(\"status\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (status != null && status.equals(\"1\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tT.showToast(VoteDetailActivity.this, com.rs.mobile.wportal.R.string.kr_vote_complete);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tT.showToast(VoteDetailActivity.this, data.getString(\"msg\"));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tL.e(e);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}", "public JSONArray operations(final String protocol) throws Exception {\n\t\ttry {\n\t\t\tClient c = getHttpClient();\n\t\t\tWebResource r = c.resource(url + \"/operations\" + \"/\" + protocol);\n\t\t\tString response = r.get(String.class);\n\t \t\ttry { return new JSONArray(new JSONTokener(response)); }\n\t \t\tcatch (JSONException e) { throw new Exception(\"JSON syntax error in response\", e); }\n\t\t} catch (UniformInterfaceException e) {\n\t\t\tthrow new Exception(e.getMessage() + \" (\" + e.getResponse().getEntity(String.class) + \")\");\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t}\n\t}" ]
[ "0.57606125", "0.5564533", "0.55504525", "0.55285513", "0.53870296", "0.52961034", "0.52672726", "0.52458566", "0.5221693", "0.5211185", "0.5200539", "0.5200539", "0.5169433", "0.51605815", "0.5150749", "0.51409596", "0.5132533", "0.51212484", "0.511792", "0.5100561", "0.5089703", "0.50889033", "0.50813717", "0.50626767", "0.50384724", "0.50235367", "0.4992797", "0.49821004", "0.4979282", "0.49735236", "0.49587435", "0.49574426", "0.49564558", "0.49510685", "0.49487388", "0.49444395", "0.49261603", "0.4909768", "0.4909365", "0.49054727", "0.48852608", "0.4885024", "0.48822886", "0.48791322", "0.48782375", "0.4872295", "0.48631123", "0.48544618", "0.48516572", "0.4836711", "0.48319414", "0.4806957", "0.48061627", "0.47860077", "0.47823256", "0.4780518", "0.47761336", "0.4774176", "0.47682685", "0.47658053", "0.4765743", "0.47651932", "0.47640288", "0.47636816", "0.47627896", "0.47610444", "0.47559685", "0.47541267", "0.475049", "0.47420692", "0.47414085", "0.47377446", "0.4736875", "0.4731893", "0.4724013", "0.47206017", "0.4717487", "0.4716242", "0.4713297", "0.4701757", "0.4701112", "0.47008625", "0.47001138", "0.46985286", "0.46960452", "0.46921688", "0.4690338", "0.46890202", "0.46857324", "0.4681036", "0.46788737", "0.46761185", "0.4673349", "0.4671205", "0.46678925", "0.4652441", "0.46491295", "0.46485466", "0.46483767", "0.46454507", "0.46441025" ]
0.0
-1
`invoiceid`, date , `contactId` , `operationType` , `itemId` , suAmount , suPrice, totalPrice
@Override public String[] headers() { return new String[]{"فاکتور", "تاریخ", "شناسه مخاطب", "نام مخاطب", "نوع", "شناسه کالا", "شرح کالا", "مقدار کل", "واحد", "فی", "مقدار جزء", "مبلغ کل", "مانده"}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TotalInvoiceAmountType getTotalInvoiceAmount();", "public List<TblMemorandumInvoiceDetail>getAllMemorandumInvoiceDetail(Date startDate,Date endDate,TblPurchaseOrder po,TblMemorandumInvoice mi,TblItem item,ClassMemorandumInvoiceBonusType bonusType);", "public JSONObject getInvoiceForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n /**\n * Get Invoice total sum\n */\n String companyId=reqParams.optString(\"companyid\");\n reqParams.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n JSONObject jSONObject = new JSONObject();\n List<Object> invoiceData = accEntityGstDao.getInvoiceDataWithDetailsInSql(reqParams);\n reqParams.remove(\"isb2cs\"); // remove to avoid CN index while fetching data\n double taxableAmountInv = 0d;\n double totalAmountInv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n int count=0;\n if (!reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n for (Object object : invoiceData) {\n Object[] data = (Object[]) object;\n String term = data[1]!=null?data[1].toString():\"\";\n double termamount = data[0]!=null?(Double) data[0]:0;\n count = data[4]!=null?((BigInteger) data[4]).intValue():0;\n totalAmountInv = data[3]!=null?(Double) data[3]:0;\n if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n taxableAmountInv += data[2]!=null?(Double) data[2]:0;\n IGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n taxableAmountInv += data[2]!=null?(Double) data[2]:0;\n CGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n } else if(StringUtil.isNullOrEmpty(term)){\n taxableAmountInv += data[2]!=null?(Double) data[2]:0;\n }\n }\n jSONObject.put(\"count\", count);\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountInv, companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountInv+IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n } else {\n jSONObject = accGSTReportService.getSalesInvoiceJSONArrayForGSTR3B(invoiceData, reqParams, companyId);\n }\n return jSONObject;\n }", "public Invoice(){//String invoiceId, String customer, String invoiceIssuer, Timestamp invoicingDate, TimeStamp dueDate, BigDecimal netAmount, BigDecimal vat, BigDecimal totalAmount, String currency, String linkToInvoiceDocument, String linkToInvoiceDocumentCopy, String invoicingPeriod, BigDecimal gp, Event event, Timestamp paidDate, BigDecimal amountOpen, String revenueType, String originalInvoiceId) {\r\n }", "public Double getTotalDiscount(java.sql.Timestamp transDate, java.sql.Timestamp eodDate, int storeCode, int... discountType) {\r\n\t\tString query = \"SELECT o.OR_NO, i.PROD_CODE, i.SELL_PRICE, i.QUANTITY from invoice_item i, invoice o, products_lu p \" +\r\n\t\t\"WHERE p.PROD_CODE = i.PROD_CODE\" +\r\n\t\t\" AND o.TRANS_DT >= ? AND o.TRANS_DT <= ? \" +\r\n\t\t\" AND i.OR_NO = o.OR_NO \" +\r\n\t\t\" AND o.STORE_CODE = i.STORE_CODE \" +\r\n\t\t\" AND o.STORE_CODE = ?\" +\r\n\t\t\" AND NOT EXISTS (SELECT 1 FROM INVOICE_SET s WHERE s.OR_NO = o.OR_NO) \";\r\n//\t\t\r\n\t\tif (discountType.length > 0) {\r\n\t\t\tquery += \" AND i.DISC_CODE = \" + discountType[0];\r\n\t\t}\r\n//\t\tString query = \"SELECT sum(d.DISC_RATE/100 *i.sell_price*i.quantity) FROM discount_lu d, invoice_item i, invoice o, products_lu p \" +\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\"WHERE p.PROD_CODE = i.PROD_CODE\" +\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" AND d.DISC_NO = i.DISC_CODE\" +\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" AND o.TRANS_DT >= ? AND o.TRANS_DT <= ? \" +\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" AND i.OR_NO = o.OR_NO \" +\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" AND o.STORE_CODE = ?\";\r\n\t\t\r\n\t\tPreparedStatement pquery;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tpquery = Main.getDBManager().getConnection().prepareStatement(query);\r\n\t\t\t\r\n\t\t\tpquery.setTimestamp(1, transDate);\r\n\t\t\tpquery.setTimestamp(2, eodDate);\r\n\t\t\tpquery.setInt(3, storeCode);\r\n\t\t\t\r\n\t\t\trs = pquery.executeQuery();\r\n\t\t\t\r\n\t\t\tDouble amount = 0.0d;\r\n\t\t\t\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tamount += (InvoiceItemService.getInstance().getDiscountAmount(rs.getLong(\"OR_NO\"),rs.getString(\"PROD_CODE\"))) * rs.getDouble(\"QUANTITY\");\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlogger.debug(\"Total Discount: \"+amount);\r\n\t\t\treturn amount;\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "InvoiceItem addInvoiceItem(InvoiceItem invoiceItem);", "public JSONObject getInvoiceForGSTR3BZeroRated(JSONObject reqParams) throws JSONException, ServiceException {\n /**\n * Get Invoice total sum\n */\n String companyId=reqParams.optString(\"companyid\");\n reqParams.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n JSONObject jSONObject = new JSONObject();\n List<Object> invoiceData = accEntityGstDao.getInvoiceDataWithDetailsInSql(reqParams);\n if (!reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n double taxableAmountInv = 0d;\n double taxableAmountCN = 0d;\n double taxableAmountAdv = 0d;\n double taxableAmountAdvAdjusted = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n for (Object object : invoiceData) {\n Object[] data = (Object[]) object;\n// String term = data[1]!=null?data[1].toString():\"\";\n// double termamount = data[0]!=null?(Double) data[0]:0;\n taxableAmountInv = data[2]!=null?(Double) data[2]:0;\n }\n\n// /**\n// * Get CN amount\n// */\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"cnentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"cnentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n// reqParams.put(\"GST3B\", true);\n// List<Object> cnData = accEntityGstDao.getCNDNWithInvoiceDetailsInSql(reqParams);\n// for (Object object : cnData) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// taxableAmountCN = (Double) data[2];\n// }\n//\n// /**\n// * Get Advance for which idx not linked yet\n// */\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n// reqParams.put(\"GST3B\", true);\n// reqParams.put(\"at\", true);\n// reqParams.remove(\"atadj\");\n// List<Object> AdvData = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvData) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// taxableAmountAdv = (Double) data[2];\n//\n// }\n// /**\n// * Get Advance for which invoice isLinked\n// */\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n// reqParams.put(\"GST3B\", true);\n// reqParams.remove(\"at\");\n// reqParams.put(\"atadj\", true);\n// AdvData = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvData) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// taxableAmountAdvAdjusted = (Double) data[2];\n//\n// }\n jSONObject.put(\"Nature of Supplies\", \"b) Outward taxable supplies (zero rated)\");\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountInv,companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountInv,companyId));\n } else {\n jSONObject = accGSTReportService.getSalesInvoiceJSONArrayForGSTR3B(invoiceData, reqParams, companyId);\n }\n return jSONObject;\n }", "private void PayBill() {\r\n Cursor crsrBillDetail = dbBillScreen.getBillDetailByCustomer(iCustId, 2, Float.parseFloat(tvBillAmount.getText().toString()));\r\n if (crsrBillDetail.moveToFirst()) {\r\n strPaymentStatus = \"Paid\";\r\n PrintNewBill(businessDate, 1);\r\n } else {\r\n if (strPaymentStatus== null || strPaymentStatus.equals(\"\"))\r\n strPaymentStatus = \"CashOnDelivery\";\r\n\r\n\r\n ArrayList<AddedItemsToOrderTableClass> orderItemList = new ArrayList<>();\r\n int taxType =0;\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n int menuCode =0;\r\n String itemName= \"\";\r\n double quantity=0.00;\r\n double rate=0.00;\r\n double igstRate=0.00;\r\n double igstAmt=0.00;\r\n double cgstRate=0.00;\r\n double cgstAmt=0.00;\r\n double sgstRate=0.00;\r\n double sgstAmt=0.00;\r\n double cessRate=0.00;\r\n double cessAmt=0.00;\r\n double subtotal=0.00;\r\n double billamount=0.00;\r\n double discountamount=0.00;\r\n\r\n TableRow RowBillItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n\r\n // Item Number\r\n if (RowBillItem.getChildAt(0) != null) {\r\n CheckBox ItemNumber = (CheckBox) RowBillItem.getChildAt(0);\r\n menuCode = (Integer.parseInt(ItemNumber.getText().toString()));\r\n }\r\n\r\n // Item Name\r\n if (RowBillItem.getChildAt(1) != null) {\r\n TextView ItemName = (TextView) RowBillItem.getChildAt(1);\r\n itemName = (ItemName.getText().toString());\r\n }\r\n\r\n\r\n\r\n // Quantity\r\n if (RowBillItem.getChildAt(3) != null) {\r\n EditText Quantity = (EditText) RowBillItem.getChildAt(3);\r\n String qty_str = Quantity.getText().toString();\r\n double qty_d = 0.00;\r\n if(qty_str==null || qty_str.equals(\"\"))\r\n {\r\n Quantity.setText(\"0.00\");\r\n }else\r\n {\r\n qty_d = Double.parseDouble(qty_str);\r\n }\r\n quantity = (Double.parseDouble(String.format(\"%.2f\",qty_d)));\r\n\r\n }\r\n\r\n // Rate\r\n if (RowBillItem.getChildAt(4) != null) {\r\n EditText Rate = (EditText) RowBillItem.getChildAt(4);\r\n String rate_str = Rate.getText().toString();\r\n double rate_d = 0.00;\r\n if((rate_str==null || rate_str.equals(\"\")))\r\n {\r\n Rate.setText(\"0.00\");\r\n }else\r\n {\r\n rate_d = Double.parseDouble(rate_str);\r\n }\r\n rate = (Double.parseDouble(String.format(\"%.2f\",rate_d)));\r\n\r\n }\r\n\r\n\r\n // Service Tax Percent\r\n\r\n if(chk_interstate.isChecked()) // IGST\r\n {\r\n cgstRate =0;\r\n cgstAmt =0;\r\n sgstRate =0;\r\n sgstAmt =0;\r\n if (RowBillItem.getChildAt(23) != null) {\r\n TextView iRate = (TextView) RowBillItem.getChildAt(23);\r\n igstRate = (Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(iRate.getText().toString()))));\r\n }\r\n\r\n // Service Tax Amount\r\n if (RowBillItem.getChildAt(24) != null) {\r\n TextView iAmt = (TextView) RowBillItem.getChildAt(24);\r\n igstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(iAmt.getText().toString())));\r\n }\r\n\r\n\r\n }else // CGST+SGST\r\n {\r\n igstRate =0;\r\n igstAmt =0;\r\n if (RowBillItem.getChildAt(15) != null) {\r\n TextView ServiceTaxPercent = (TextView) RowBillItem.getChildAt(15);\r\n sgstRate = (Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(ServiceTaxPercent.getText().toString()))));\r\n }\r\n\r\n // Service Tax Amount\r\n if (RowBillItem.getChildAt(16) != null) {\r\n TextView ServiceTaxAmount = (TextView) RowBillItem.getChildAt(16);\r\n sgstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(ServiceTaxAmount.getText().toString())));\r\n }\r\n\r\n // Sales Tax %\r\n if (RowBillItem.getChildAt(6) != null) {\r\n TextView SalesTaxPercent = (TextView) RowBillItem.getChildAt(6);\r\n cgstRate = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(SalesTaxPercent.getText().toString())));\r\n }\r\n // Sales Tax Amount\r\n if (RowBillItem.getChildAt(7) != null) {\r\n TextView SalesTaxAmount = (TextView) RowBillItem.getChildAt(7);\r\n cgstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(SalesTaxAmount.getText().toString())));\r\n }\r\n }\r\n if (RowBillItem.getChildAt(25) != null) {\r\n TextView cessRt = (TextView)RowBillItem.getChildAt(25);\r\n if(!cessRt.getText().toString().equals(\"\"))\r\n cessRate = Double.parseDouble(cessRt.getText().toString());\r\n }\r\n if (RowBillItem.getChildAt(26) != null) {\r\n TextView cessAt = (TextView)RowBillItem.getChildAt(26);\r\n if(!cessAt.getText().toString().equals(\"\"))\r\n cessAmt = Double.parseDouble(cessAt.getText().toString());\r\n }\r\n\r\n\r\n\r\n // Tax Type\r\n if (RowBillItem.getChildAt(13) != null) {\r\n TextView TaxType = (TextView) RowBillItem.getChildAt(13);\r\n taxType = (Integer.parseInt(TaxType.getText().toString()));\r\n }\r\n // subtotal\r\n subtotal = (rate*quantity) + igstAmt+cgstAmt+sgstAmt;\r\n\r\n AddedItemsToOrderTableClass orderItem = new AddedItemsToOrderTableClass( menuCode, itemName, quantity, rate,\r\n igstRate,igstAmt, cgstRate, cgstAmt, sgstRate,sgstAmt, rate*quantity,subtotal, billamount,cessRate,cessAmt,discountamount);\r\n orderItemList.add(orderItem);\r\n }\r\n\r\n Bundle bundle = new Bundle();\r\n bundle.putDouble(Constants.TOTALBILLAMOUNT, Double.parseDouble(tvBillAmount.getText().toString()));\r\n bundle.putDouble(Constants.TAXABLEVALUE, Double.parseDouble(tvSubTotal.getText().toString()));\r\n\r\n// bundle.putDouble(Constants.ROUNDOFFAMOUNT, Double.parseDouble(edtRoundOff.getText().toString()));\r\n if (tvOthercharges.getText().toString().isEmpty()) {\r\n bundle.putDouble(Constants.OTHERCHARGES, Double.parseDouble(tvOthercharges.getText().toString()));\r\n } else {\r\n bundle.putDouble(Constants.OTHERCHARGES, Double.parseDouble(tvOthercharges.getText().toString()));\r\n }\r\n bundle.putDouble(Constants.DISCOUNTAMOUNT, Double.parseDouble(tvDiscountAmount.getText().toString()));\r\n bundle.putInt(Constants.TAXTYPE, isForwardTaxEnabled);\r\n //bundle.putInt(CUSTID, Integer.parseInt(tvCustId.getText().toString()));\r\n bundle.putString(Constants.PHONENO, edtCustPhoneNo.getText().toString());\r\n bundle.putParcelableArrayList(Constants.ORDERLIST, orderItemList);\r\n if (chk_interstate.isChecked()) {\r\n double igstAmount = Double.parseDouble(tvIGSTValue.getText().toString());\r\n double cessAmount = Double.parseDouble(tvcessValue.getText().toString());\r\n bundle.putDouble(Constants.TAXAMOUNT, igstAmount + cessAmount);\r\n } else {\r\n double sgstAmount = Double.parseDouble(tvSGSTValue.getText().toString());\r\n double cgstAmount = Double.parseDouble(tvCGSTValue.getText().toString());\r\n double cessAmount = Double.parseDouble(tvcessValue.getText().toString());\r\n bundle.putDouble(Constants.TAXAMOUNT, cgstAmount + sgstAmount + cessAmount);\r\n }\r\n\r\n fm = getSupportFragmentManager();\r\n proceedToPayBillingFragment = new PayBillFragment();\r\n proceedToPayBillingFragment.initProceedToPayListener(this);\r\n proceedToPayBillingFragment.setArguments(bundle);\r\n proceedToPayBillingFragment.show(fm, \"Proceed To Pay\");\r\n\r\n /* Intent intentTender = new Intent(myContext, PayBillActivity.class);\r\n intentTender.putExtra(\"TotalAmount\", tvBillAmount.getText().toString());\r\n intentTender.putExtra(\"CustId\", edtCustId.getText().toString());\r\n intentTender.putExtra(\"phone\", edtCustPhoneNo.getText().toString());\r\n intentTender.putExtra(\"USER_NAME\", strUserName);\r\n intentTender.putExtra(\"BaseValue\", Float.parseFloat(tvSubTotal.getText().toString()));\r\n intentTender.putExtra(\"ORDER_DELIVERED\", strOrderDelivered);\r\n intentTender.putExtra(\"OtherCharges\", Double.parseDouble(tvOthercharges.getText().toString()));\r\n intentTender.putExtra(\"TaxType\", taxType);// forward/reverse\r\n intentTender.putParcelableArrayListExtra(\"OrderList\", orderItemList);\r\n startActivityForResult(intentTender, 1);*/\r\n //mSaveBillData(2, true);\r\n //PrintNewBill();\r\n }\r\n\r\n /*int iResult = dbBillScreen.deleteKOTItems(iCustId, String.valueOf(jBillingMode));\r\n Log.d(\"Delivery:\", \"Items deleted from pending KOT:\" + iResult);*/\r\n\r\n //ClearAll();\r\n //Close(null);\r\n }", "public Map getTotalItemByVoucherNoForEditGRHelper(String voucherNo)\r\n\t{\n\t\t\tSystem.out.println(\"====HELPER====\");\r\n\t\t\tSystem.out.println(\"voucherNo :: \" + voucherNo);\r\n\t\t\tlong k = 0l;\r\n\t\t\tDouble grossTotal = 0.0;\r\n\t\t\tDouble totalTaxAmt = 0.0;\r\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\r\n\t\t\t//Map<Long, PurchaseReturnGetItems> map = new HashMap<Long, PurchaseReturnGetItems>();\r\n\t\t\t\r\n\t\t\tSupplierDetailDao dao = new SupplierDetailDao();\r\n\t\t\tList productList = dao.getTotalItemByVoucherNoForEditGRDao(voucherNo);\r\n\t\t\tMap map = new HashMap();\r\n\t\t\tPurchaseReturnGetItems cs = null;\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < productList.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tk++;\r\n\t\t\t\tObject[] o = (Object[]) productList.get(i);\r\n\t\t\t\tEditPurchase bean = new EditPurchase();\r\n\t\t\t\tbean.setPkGoodRecId(Long.parseLong(o[0].toString()));\r\n\t\t\t\tbean.setCatName(o[1].toString());\r\n\t\t\t\tbean.setItemName(o[2].toString());\r\n\t\t\t\tbean.setQuantity(Double.parseDouble(o[3].toString()));\r\n\t\t\t\tbean.setOriQuantity(o[3].toString());\r\n\t\t\t\tbean.setBuyPrice(Double.parseDouble(o[4].toString()));\r\n\t\t\t\tbean.setFinalBuyPrice(o[4].toString());\r\n\t\t\t\tbean.setVat(Double.parseDouble(o[5].toString()));\r\n\t\t\t\tbean.setIgst(Double.parseDouble(o[11].toString()));\r\n\t\t\t\tbean.setFinalVat(Double.parseDouble(o[5].toString()));\r\n\t\t\t\tbean.setFinalIgst(Double.parseDouble(o[11].toString()));\r\n\t\t\t\tbean.setDiscount(Double.parseDouble(o[12].toString()));\r\n\t\t\t\tbean.setFinalDisPer(o[12].toString());\r\n\t\t\t\tbean.setRollsize(Double.parseDouble(o[13].toString()));\r\n\t\t\t\tbean.setTotal(Double.parseDouble(o[6].toString()));\r\n\t\t\t\tbean.setContactPerson(o[7].toString());\r\n\t\t\t\tbean.setBarcodeNo(Long.parseLong(o[8].toString()));\r\n\t\t\t\tbean.setOndate(o[9].toString());\r\n\t\t\t\tbean.setAvailquantity(Double.parseDouble(o[10].toString()));\r\n\t\t\t\tbean.setSize(o[14].toString());\r\n\t\t\t\tbean.setSupplierId(o[15].toString());\r\n\t\t\t\tbean.setBillNo(o[16].toString());\r\n\t\t\t\tbean.setSupplierName2(o[17].toString());\r\n\t\t\t\tbean.setGrossTotal(Double.parseDouble(o[18].toString()));\r\n\t\t\t\tDouble d = 0d;\r\n\t\t\t\tbean.setReturnTotal(d);\r\n\t\t\t\tLong editQuan = 0l;\r\n\t\t\t\tbean.setEditQuantity(editQuan);\r\n\t\t\t\tbean.setTotalQuantity(k);\r\n\t\t\t\tgrossTotal = grossTotal + Double.parseDouble(o[6].toString());\r\n\t\t\t\tbean.setFinalGrossTotal(o[18].toString());\r\n\t\t\t\tbean.setSubcatName(o[19].toString());\r\n\t\t\t\tbean.setHsnSac(o[20].toString());\r\n\t\t\t\tbean.setColor(o[21].toString());\r\n\t\t\t\tbean.setStyle(o[22].toString());\r\n\t\t\t\tif(o[23] == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbean.setPurchaseCode(\"\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbean.setPurchaseCode(o[23].toString());\r\n\t\t\t\t}\r\n\t\t\t\tbean.setContactPerson(o[24].toString());\r\n\t\t\t\tbean.setTaxAmount(o[25].toString());\r\n\t\t\t\tbean.setReturnedQty(o[26].toString());\r\n\t\t\t\tint rQtyInInt = (int)(Double.parseDouble(o[26].toString()));\r\n\t\t\t\tbean.setReturnedQty(String.valueOf(rQtyInInt));\r\n\t\t\t\tbean.setSalePrice(Double.parseDouble(o[27].toString()));\r\n\t\t\t\tbean.setFinalSalePrice(o[27].toString());\r\n\t\t\t\tbean.setPkSuppId(o[28].toString());\r\n\t\t\t\tbean.setProductId(o[29].toString());\r\n\t\t\t\tbean.setSubCatId(o[30].toString());\r\n\t\t\t\tbean.setCatId(o[31].toString());\r\n\t\t\t\tbean.setSuppCode(o[32].toString());\r\n\t\t\t\tbean.setSoldQty(o[33].toString());\r\n\t\t\t\tbean.setPendingBillPayment(o[34].toString());\r\n\t\t\t\tbean.setBarQtyTotalPuchaseQty(o[35].toString());\r\n\t\t\t\tSystem.out.println(\"BarQtyTotalPuchaseQty ====> \"+bean.getBarQtyTotalPuchaseQty());\r\n\t\t\t\tSystem.out.println(\"grossTotal =====> \"+grossTotal);\r\n\t\t\t\tSystem.out.println(\"***************\" + o[0]);\r\n\t\t\t\tmap.put(bean.getPkGoodRecId(), bean);\t\r\n\t\t\t/*if (catList != null && catList.size() > 0)\r\n\t\t\t{\r\n\t\t\t\tcs = (PurchaseReturnGetItems) catList.get(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"TOTAL ITEMLIST Helper \"+catList.size());\r\n\t\t\t\r\n\t\t\treturn cs;*/\r\n\t\t}\r\n\t\t\t\r\n\t\t\treturn map;\r\n\t}", "public List<TblPurchaseOrderDetail>getAllDataPurchaseOrderDetail(TblSupplier supplier,TblPurchaseOrder po,RefPurchaseOrderStatus poStatus,TblItem item,Date startDate,Date endDate,TblPurchaseRequest mr);", "public void calcularReserva(ProductoDTO item) {\n\t\t\n\t}", "org.adscale.format.opertb.AmountMessage.Amount getCampaignprice();", "public void testUpdateInvoiceAccuracy() throws Exception {\n Invoice invoice = new Invoice();\n\n invoice.setId(4);\n invoice.setCreationDate(new Date());\n invoice.setCreationUser(\"tc\");\n invoice.setModificationDate(new Date());\n invoice.setModificationUser(\"tc\");\n invoice.setCompanyId(5);\n invoice.setProjectId(8);\n invoice.setInvoiceNumber(\"invoiceNumber\");\n invoice.setPaid(true);\n invoice.setDueDate(new Date());\n invoice.setInvoiceDate(new Date());\n invoice.setPurchaseOrderNumber(\"purchaseOrderNumber\");\n invoice.setSalesTax(new BigDecimal(5));\n\n ExpenseEntry entry = new ExpenseEntry();\n entry.setAmount(new BigDecimal(5));\n ExpenseEntry[] expenseEntries = new ExpenseEntry[] {entry};\n invoice.setExpenseEntries(expenseEntries);\n\n PaymentTerm paymentTerm = new PaymentTerm();\n paymentTerm.setId(3);\n invoice.setPaymentTerm(paymentTerm);\n\n FixedBillingEntry fixedBillingEntry = new FixedBillingEntry();\n FixedBillingEntry[] fixedBillingEntries = new FixedBillingEntry[] {fixedBillingEntry};\n invoice.setFixedBillingEntries(fixedBillingEntries);\n\n InvoiceServiceDetail detail = new InvoiceServiceDetail();\n detail.setAmount(new BigDecimal(8));\n detail.setId(4);\n InvoiceServiceDetail[] serviceDetails = new InvoiceServiceDetail[] {detail};\n invoice.setServiceDetails(serviceDetails);\n\n InvoiceStatus invoiceStatus = new InvoiceStatus(4, \"description\", \"user\", \"user\", new Date(), new Date());\n invoice.setInvoiceStatus(invoiceStatus);\n\n invoiceSessionBean.updateInvoice(invoice, true);\n\n }", "BigDecimal getSumaryTechoCveFuente(BudgetKeyEntity budgetKeyEntity);", "org.adscale.format.opertb.AmountMessage.Amount getExchangeprice();", "List<PriceRow> getPriceInformationsForProduct(ProductModel model);", "public interface SalesDateLocationDetailService extends BaseService<SalesDateLocationDetailHolder>,\r\n DBActionService<SalesDateLocationDetailHolder>\r\n{\r\n public List<SalesDateLocationDetailHolder> selectSalesLocationDetailByKey(BigDecimal salesOid) throws Exception;\r\n}", "public JSONObject getGoodsReceiptForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n reqParams.put(\"entitycolnum\", reqParams.optString(\"goodsreceiptentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"goodsreceiptentityValue\"));\n JSONObject jSONObject = new JSONObject();\n List<Object> invoiceData = gstr2Dao.getInvoiceDataWithDetailsInSql(reqParams);\n String companyId = reqParams.optString(\"companyid\");\n double taxableAmountInv = 0d;\n double totalAmountInv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n int count=0;\n if (!reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n for (Object object : invoiceData) {\n Object[] data = (Object[]) object;\n String term = data[1] != null ? data[1].toString() : \"\";\n double termamount = data[0] != null ? (Double) data[0] : 0;\n totalAmountInv = data[3] != null ? (Double) data[3] : 0;\n count = data[4] != null ? ((BigInteger) data[4]).intValue() : 0;\n if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"InputIGST\").toString()) || term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n taxableAmountInv += data[2] != null ? (Double) data[2] : 0;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"InputCGST\").toString()) || term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n taxableAmountInv += data[2] != null ? (Double) data[2] : 0;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"InputSGST\").toString()) || term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"InputUTGST\").toString()) || term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"InputCESS\").toString()) || term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n } else if (StringUtil.isNullOrEmpty(term)) {\n taxableAmountInv += data[2] != null ? (Double) data[2] : 0;\n }\n }\n jSONObject.put(\"count\", count);\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountInv, companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount, companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount, companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount, companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount, companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount + CGSTAmount + SGSTAmount + CESSAmount, companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountInv + IGSTAmount + CGSTAmount + SGSTAmount + CESSAmount, companyId));\n } else {\n jSONObject = accGSTReportService.getPurchaseInvoiceJSONArrayForGSTR3B(invoiceData, reqParams, companyId);\n }\n return jSONObject;\n }", "public List getActivePaymentRequestsByPOIdInvoiceAmountInvoiceDate(Integer poId, KualiDecimal invoiceAmount, Date invoiceDate);", "boolean createInvoice(int id, String title, LocalDate effecitvedate, float amount) throws PreconditionException, PostconditionException, ThirdPartyServiceException;", "@Override\n protected boolean beforeSave(boolean newRecord) {\n if (!newRecord){\n if ((is_ValueChanged(X_Z_RemDifInvLinAfecta.COLUMNNAME_PriceEntered)) || (is_ValueChanged(X_Z_RemDifInvLinAfecta.COLUMNNAME_QtyEntered))){\n this.setLineTotalAmt(this.getQtyEntered().multiply(this.getPriceEntered()).setScale(2, RoundingMode.HALF_UP));\n\n MInvoiceLine invoiceLine = (MInvoiceLine) this.getC_InvoiceLine();\n if ((invoiceLine != null) && (invoiceLine.get_ID() > 0)){\n invoiceLine.setQtyInvoiced(this.getQtyEntered());\n invoiceLine.setQtyEntered(this.getQtyEntered());\n invoiceLine.setPriceActual(this.getPriceEntered());\n invoiceLine.setPriceEntered(this.getPriceEntered());\n\n MProduct prod = (MProduct) invoiceLine.getM_Product();\n\n // Impuesto del producto (primero impuesto especial de compra, y si no tiene, entonces el impuesto normal\n if (prod.get_ValueAsInt(\"C_TaxCategory_ID_2\") > 0) {\n MTaxCategory taxCat = new MTaxCategory(getCtx(), prod.get_ValueAsInt(\"C_TaxCategory_ID_2\"), null);\n MTax tax = taxCat.getDefaultTax();\n if (tax != null) {\n if (tax.get_ID() > 0) {\n invoiceLine.setC_Tax_ID(tax.get_ID());\n }\n }\n } else {\n if (prod.getC_TaxCategory_ID() > 0) {\n MTaxCategory taxCat = (MTaxCategory) prod.getC_TaxCategory();\n MTax tax = taxCat.getDefaultTax();\n if (tax != null) {\n if (tax.get_ID() > 0) {\n invoiceLine.setC_Tax_ID(tax.get_ID());\n }\n }\n }\n }\n\n invoiceLine.setLineNetAmt();\n invoiceLine.setTaxAmt();\n invoiceLine.saveEx();\n }\n\n }\n }\n\n return true;\n }", "protected void saveIndirectTotalValues(){\n\n }", "public TableModel cacualateFixPriceFee(EbCandidateItem item) {\n EbFeeCaculaterFactory factory = EbFeeCaculaterFactory.getInstance();\r\n EbUtil ebu = new EbUtil();\r\n fixInserts.put(ZcSettingConstants.FIX, \"上架费\");\r\n fixInserts.put(\r\n ZcSettingConstants.US,\r\n factory.getFixInsertFees(ZcSettingConstants.US, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.US)));\r\n fixInserts.put(\r\n ZcSettingConstants.UK,\r\n factory.getFixInsertFees(ZcSettingConstants.UK, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.UK)));\r\n fixInserts.put(\r\n ZcSettingConstants.DE,\r\n factory.getFixInsertFees(ZcSettingConstants.DE, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.DE)));\r\n fixInserts.put(\r\n ZcSettingConstants.FR,\r\n factory.getFixInsertFees(ZcSettingConstants.FR, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.FR)));\r\n fixInserts.put(\r\n ZcSettingConstants.CA,\r\n factory.getFixInsertFees(ZcSettingConstants.CA, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.CA)));\r\n fixInserts.put(\r\n ZcSettingConstants.AU,\r\n factory.getFixInsertFees(ZcSettingConstants.AU, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.AU)));\r\n\r\n fixFVLs.put(ZcSettingConstants.FIX, \"成交费\");\r\n fixFVLs.put(\r\n ZcSettingConstants.US,\r\n factory.getFixFVLs(ZcSettingConstants.US, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.US), item.getCategoryType()));\r\n fixFVLs.put(\r\n ZcSettingConstants.UK,\r\n factory.getFixFVLs(ZcSettingConstants.UK, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.UK), item.getCategoryType()));\r\n fixFVLs.put(\r\n ZcSettingConstants.DE,\r\n factory.getFixFVLs(ZcSettingConstants.DE, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.DE), item.getCategoryType()));\r\n fixFVLs.put(\r\n ZcSettingConstants.FR,\r\n factory.getFixFVLs(ZcSettingConstants.FR, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.FR), item.getCategoryType()));\r\n fixFVLs.put(\r\n ZcSettingConstants.CA,\r\n factory.getFixFVLs(ZcSettingConstants.CA, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.CA), item.getCategoryType()));\r\n fixFVLs.put(\r\n ZcSettingConstants.AU,\r\n factory.getFixFVLs(ZcSettingConstants.AU, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.AU), item.getCategoryType()));\r\n\r\n fixPayPalFees.put(ZcSettingConstants.FIX, \"paypal费\");\r\n fixPayPalFees.put(\r\n ZcSettingConstants.US,\r\n factory.getFixPayPalFees(ZcSettingConstants.US, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.US),\r\n ebu.getCurencyValue(item.getEbShippingFee(), item.getCurrencyId(), ZcSettingConstants.US)));\r\n fixPayPalFees.put(\r\n ZcSettingConstants.UK,\r\n factory.getFixPayPalFees(ZcSettingConstants.UK, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.UK),\r\n ebu.getCurencyValue(item.getEbShippingFee(), item.getCurrencyId(), ZcSettingConstants.UK)));\r\n fixPayPalFees.put(\r\n ZcSettingConstants.DE,\r\n factory.getFixPayPalFees(ZcSettingConstants.DE, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.DE),\r\n ebu.getCurencyValue(item.getEbShippingFee(), item.getCurrencyId(), ZcSettingConstants.DE)));\r\n fixPayPalFees.put(\r\n ZcSettingConstants.FR,\r\n factory.getFixPayPalFees(ZcSettingConstants.FR, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.FR),\r\n ebu.getCurencyValue(item.getEbShippingFee(), item.getCurrencyId(), ZcSettingConstants.FR)));\r\n fixPayPalFees.put(\r\n ZcSettingConstants.CA,\r\n factory.getFixPayPalFees(ZcSettingConstants.CA, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.CA),\r\n ebu.getCurencyValue(item.getEbShippingFee(), item.getCurrencyId(), ZcSettingConstants.CA)));\r\n fixPayPalFees.put(\r\n ZcSettingConstants.AU,\r\n factory.getFixPayPalFees(ZcSettingConstants.AU, ZcSettingConstants.STORE_TYPE_BASIC,\r\n ebu.getCurencyValue(item.getEbPrice(), item.getCurrencyId(), ZcSettingConstants.AU),\r\n ebu.getCurencyValue(item.getEbShippingFee(), item.getCurrencyId(), ZcSettingConstants.AU)));\r\n\r\n fixProfits.put(ZcSettingConstants.FIX, \"利润\");\r\n fixProfitRates.put(ZcSettingConstants.FIX, \"利润率\");\r\n\r\n if (item.getCost() != null && item.getTransportFee() != null) {\r\n\r\n EbProfit profit = getProfit(ebu.getRMBValue(item.getEbPrice(), item.getCurrencyId()),\r\n ebu.getRMBValue(item.getEbShippingFee(), item.getCurrencyId()), item.getCost(), item.getTransportFee(),\r\n ebu.getRMBValue((BigDecimal) fixInserts.get(ZcSettingConstants.US), ZcSettingConstants.CURENCY_USD),\r\n ebu.getRMBValue((BigDecimal) fixFVLs.get(ZcSettingConstants.US), ZcSettingConstants.CURENCY_USD),\r\n ebu.getRMBValue((BigDecimal) fixPayPalFees.get(ZcSettingConstants.US), ZcSettingConstants.CURENCY_USD));\r\n fixProfits.put(ZcSettingConstants.US, profit.getProfit());\r\n fixProfitRates.put(ZcSettingConstants.US, profit.getProfitRate());\r\n\r\n profit = getProfit(ebu.getRMBValue(item.getEbPrice(), item.getCurrencyId()), ebu.getRMBValue(item.getEbShippingFee(), item.getCurrencyId()),\r\n item.getCost(), item.getTransportFee(), ebu.getRMBValue((BigDecimal) fixInserts.get(ZcSettingConstants.UK), ZcSettingConstants.CURENCY_GBP),\r\n ebu.getRMBValue((BigDecimal) fixFVLs.get(ZcSettingConstants.UK), ZcSettingConstants.CURENCY_GBP),\r\n ebu.getRMBValue((BigDecimal) fixPayPalFees.get(ZcSettingConstants.UK), ZcSettingConstants.CURENCY_GBP));\r\n fixProfits.put(ZcSettingConstants.UK, profit.getProfit());\r\n fixProfitRates.put(ZcSettingConstants.UK, profit.getProfitRate());\r\n\r\n profit = getProfit(ebu.getRMBValue(item.getEbPrice(), item.getCurrencyId()), ebu.getRMBValue(item.getEbShippingFee(), item.getCurrencyId()),\r\n item.getCost(), item.getTransportFee(), ebu.getRMBValue((BigDecimal) fixInserts.get(ZcSettingConstants.DE), ZcSettingConstants.CURENCY_EUR),\r\n ebu.getRMBValue((BigDecimal) fixFVLs.get(ZcSettingConstants.DE), ZcSettingConstants.CURENCY_EUR),\r\n ebu.getRMBValue((BigDecimal) fixPayPalFees.get(ZcSettingConstants.DE), ZcSettingConstants.CURENCY_EUR));\r\n fixProfits.put(ZcSettingConstants.DE, profit.getProfit());\r\n fixProfitRates.put(ZcSettingConstants.DE, profit.getProfitRate());\r\n\r\n profit = getProfit(ebu.getRMBValue(item.getEbPrice(), item.getCurrencyId()), ebu.getRMBValue(item.getEbShippingFee(), item.getCurrencyId()),\r\n item.getCost(), item.getTransportFee(), ebu.getRMBValue((BigDecimal) fixInserts.get(ZcSettingConstants.FR), ZcSettingConstants.CURENCY_EUR),\r\n ebu.getRMBValue((BigDecimal) fixFVLs.get(ZcSettingConstants.FR), ZcSettingConstants.CURENCY_EUR),\r\n ebu.getRMBValue((BigDecimal) fixPayPalFees.get(ZcSettingConstants.FR), ZcSettingConstants.CURENCY_EUR));\r\n fixProfits.put(ZcSettingConstants.FR, profit.getProfit());\r\n fixProfitRates.put(ZcSettingConstants.FR, profit.getProfitRate());\r\n\r\n profit = getProfit(ebu.getRMBValue(item.getEbPrice(), item.getCurrencyId()), ebu.getRMBValue(item.getEbShippingFee(), item.getCurrencyId()),\r\n item.getCost(), item.getTransportFee(), ebu.getRMBValue((BigDecimal) fixInserts.get(ZcSettingConstants.CA), ZcSettingConstants.CURENCY_CAD),\r\n ebu.getRMBValue((BigDecimal) fixFVLs.get(ZcSettingConstants.CA), ZcSettingConstants.CURENCY_CAD),\r\n ebu.getRMBValue((BigDecimal) fixPayPalFees.get(ZcSettingConstants.CA), ZcSettingConstants.CURENCY_CAD));\r\n fixProfits.put(ZcSettingConstants.CA, profit.getProfit());\r\n fixProfitRates.put(ZcSettingConstants.CA, profit.getProfitRate());\r\n\r\n profit = getProfit(ebu.getRMBValue(item.getEbPrice(), item.getCurrencyId()), ebu.getRMBValue(item.getEbShippingFee(), item.getCurrencyId()),\r\n item.getCost(), item.getTransportFee(), ebu.getRMBValue((BigDecimal) fixInserts.get(ZcSettingConstants.AU), ZcSettingConstants.CURENCY_AUD),\r\n ebu.getRMBValue((BigDecimal) fixFVLs.get(ZcSettingConstants.AU), ZcSettingConstants.CURENCY_AUD),\r\n ebu.getRMBValue((BigDecimal) fixPayPalFees.get(ZcSettingConstants.AU), ZcSettingConstants.CURENCY_AUD));\r\n fixProfits.put(ZcSettingConstants.AU, profit.getProfit());\r\n fixProfitRates.put(ZcSettingConstants.AU, profit.getProfitRate());\r\n }\r\n return getFixTableModel();\r\n }", "public double getStockFinal(long pv) {\n float entree = 0 ;\n float sortie = 0 ;\n\n ArrayList<Produit> produits = null ;\n if (pv==0) produits = produitDAO.getAll();\n else produits = produitDAO.getAllByPv(pv) ;\n\n ArrayList<Mouvement> mouvements = null;\n\n double valeur = 0 ;\n double total = 0 ;\n double quantite = 0 ;\n double cmpu = 0 ;\n double restant = 0 ;\n double qsortie = 0 ;\n double qentree = 0 ;\n // Vente par produit\n Mouvement mouvement = null ;\n Operation operation = null ;\n\n for (int i = 0; i < produits.size(); i++) {\n try {\n mouvements = mouvementDAO.getManyByProductInterval(produits.get(i).getId_externe(),DAOBase.formatter2.parse(datedebut),DAOBase.formatter2.parse(datefin)) ;\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n if (mouvements != null){\n valeur = 0 ;\n quantite = 0 ;\n restant = 0 ;\n qentree = 0 ;\n cmpu = 0 ;\n qsortie = 0 ;\n\n for (int j = 0; j < mouvements.size(); j++) {\n mouvement = mouvements.get(j) ;\n operation = operationDAO.getOne(mouvement.getOperation_id()) ;\n if (operation==null || (operation.getAnnuler()==1 && operation.getDateannulation().before(new Date())) || operation.getTypeOperation_id().startsWith(OperationDAO.CMD)) continue;\n\n //if (pv!=0 && caisseDAO.getOne(operation.getCaisse_id()).getPointVente_id()!=pv) continue;\n if (j==0)\n if (mouvement.getRestant()==mouvement.getQuantite() && mouvement.getEntree()==0){\n restant = 0 ;\n }\n else restant = mouvement.getRestant() ;\n\n if (mouvement.getEntree()==0) {\n valeur -= mouvement.getPrixA() * mouvement.getQuantite() ;\n qentree += mouvement.getQuantite() ;\n cmpu = mouvement.getPrixA() ;\n }\n else {\n valeur += mouvement.getCmup() * mouvement.getQuantite() ;\n qsortie += mouvement.getQuantite() ;\n }\n /*\n if (restant!=0) cmpu = valeur / restant ;\n else cmpu = mouvement.getCmup() ;\n */\n }\n\n quantite = restant + qentree - qsortie ;\n total+=Math.abs(valeur) ;\n }\n }\n\n return total;\n }", "public List<TblStockOpnameDetailItemExpiredDate>getAllDataStockOpnameItemExp(TblItem item);", "public List<TblPurchaseOrder>getAllDataPurchaseOrder(Date startDate,Date endDate,TblPurchaseOrder po,TblSupplier supplier);", "public JSONObject getInvoiceForGSTR3BNillRated(JSONObject reqParams) throws JSONException, ServiceException {\n String companyId=reqParams.optString(\"companyid\");\n double taxableAmountInv = 0d;\n double taxableAmountCN = 0d;\n double taxableAmountAdv = 0d;\n double taxableAmountAdvAdjusted = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n int count=0;\n JSONObject jSONObject = new JSONObject();\n reqParams.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n reqParams.put(\"GST3B\", !reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.remove(\"zerorated\");\n List invoiceData = accEntityGstDao.getNillInvoiceDataWithDetailsInSql(reqParams);\n if (!reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n for (Object object : invoiceData) {\n Object[] data = (Object[]) object;\n taxableAmountInv = data[0] != null ? (Double) data[0] : 0;\n count = data[1] != null ? ((BigInteger) data[1]).intValue() : 0;\n }\n\n//\n// /**\n// * Get CN amount\n// */\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"cnentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"cnentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n// reqParams.put(\"GST3B\", true);\n// List cnData = accEntityGstDao.getNillCNDNWithInvoiceDetailsInSql(reqParams);\n// if (!cnData.isEmpty() && cnData.get(0) != null) {\n// taxableAmountCN = (Double) cnData.get(0);\n// }\n//\n// /**\n// * Get Advance for which invoice not linked yet\n// */\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n// reqParams.put(\"GST3B\", true);\n// reqParams.put(\"at\", true);\n// reqParams.remove(\"atadj\");\n// List AdvData = accEntityGstDao.getNillAdvanceDetailsInSql(reqParams);\n// if (!AdvData.isEmpty() && AdvData.get(0) != null) {\n// taxableAmountAdv = (Double) AdvData.get(0);\n// }\n// /**\n// * Get Advance for which invoice isLinked\n// */\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n// reqParams.put(\"GST3B\", true);\n// reqParams.remove(\"at\");\n// reqParams.put(\"atadj\", true);\n// AdvData = accEntityGstDao.getNillAdvanceDetailsInSql(reqParams);\n// if (!AdvData.isEmpty() && AdvData.get(0) != null) {\n// taxableAmountAdvAdjusted = (Double) AdvData.get(0);\n// }\n jSONObject.put(\"count\", count);\n jSONObject.put(\"Nature of Supplies\", \"e) Non GST outward supplies\");\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountInv,companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountInv,companyId));\n } else {\n jSONObject = accGSTReportService.getSalesInvoiceJSONArrayForGSTR3B(invoiceData, reqParams, companyId);\n }\n return jSONObject;\n }", "public interface IPLMBasicFeeInfoService {\n\n void save(IMetaObjectImpl object);\n\n //费率信息\n\n void delete(int objid);\n void deleteByIds_(String objids);\n void deleteByProductId(int productid);\n\n IMetaDBQuery getSearchList(Map<String, String> map);\n IMetaObjectImpl getInfoById(int objid);\n\n public IMetaDBQuery queryByids(String objids);\n List<Map> getListByProductId(int productid);\n\n //获得管理费统计信息\n\n List<Map> getManageFeeCountList(Map map);\n\n\n\n //利率要素\n IMetaObjectImpl getInfoById_feeRate(int objid);\n void delete_feeRate(int objid);\n void deleteByIds__feeRate(String objids);\n void deleteByProductId_feeRate(int productid);\n\n List<Map> getListByProductId_feeRate(int productid);\n\n\n}", "public float getItemPriceInvoice()\n\t{\n\t\treturn itemPriceInvoice;\n\t}", "public static String[] getItemPrice(String type, String entity, String item, String uom, String curr) {\n\r\n String[] TypeAndPrice = new String[2]; \r\n String Type = \"none\";\r\n String price = \"0\";\r\n String pricecode = \"\";\r\n\r\n try{\r\n Connection con = null;\r\n if (ds != null) {\r\n con = ds.getConnection();\r\n } else {\r\n con = DriverManager.getConnection(url + db, user, pass); \r\n }\r\n Statement st = con.createStatement();\r\n ResultSet res = null;\r\n try{\r\n \r\n // customer based pricing\r\n if (type.equals(\"c\")) {\r\n res = st.executeQuery(\"select cm_price_code from cm_mstr where cm_code = \" + \"'\" + entity + \"'\" + \";\");\r\n while (res.next()) {\r\n pricecode = res.getString(\"cm_price_code\");\r\n } \r\n // if there is no pricecode....it defaults to billto\r\n if (! pricecode.isEmpty()) {\r\n entity = pricecode;\r\n }\r\n\r\n res = st.executeQuery(\"select cpr_price from cpr_mstr where cpr_cust = \" + \"'\" + entity + \"'\" + \r\n \" AND cpr_item = \" + \"'\" + item + \"'\" +\r\n \" AND cpr_uom = \" + \"'\" + uom + \"'\" +\r\n \" AND cpr_curr = \" + \"'\" + curr + \"'\" +\r\n \" AND cpr_type = 'LIST' \"+ \";\");\r\n while (res.next()) {\r\n price = res.getString(\"cpr_price\").replace('.', defaultDecimalSeparator);\r\n Type = \"cust\";\r\n\r\n }\r\n }\r\n\r\n // vendor based pricing\r\n if (type.equals(\"v\")) {\r\n res = st.executeQuery(\"select vd_price_code from vd_mstr where vd_addr = \" + \"'\" + entity + \"'\" + \";\");\r\n while (res.next()) {\r\n pricecode = res.getString(\"vd_price_code\");\r\n } \r\n // if there is no pricecode....it defaults to billto\r\n if (! pricecode.isEmpty()) {\r\n entity = pricecode;\r\n }\r\n\r\n res = st.executeQuery(\"select vpr_price from vpr_mstr where vpr_vend = \" + \"'\" + entity + \"'\" + \r\n \" AND vpr_item = \" + \"'\" + item + \"'\" +\r\n \" AND vpr_uom = \" + \"'\" + uom + \"'\" +\r\n \" AND vpr_curr = \" + \"'\" + curr + \"'\" + \r\n \" AND vpr_type = 'LIST' \"+ \";\");\r\n while (res.next()) {\r\n price = res.getString(\"vpr_price\").replace('.', defaultDecimalSeparator);\r\n Type = \"vend\";\r\n\r\n }\r\n }\r\n\r\n\r\n // if there is no customer specific price...then pull price from item master it_sell_price\r\n if ( price.equals(\"0\") ) {\r\n if (type.equals(\"c\")) { \r\n res = st.executeQuery(\"select it_sell_price as itemprice from item_mstr where it_item = \" + \"'\" + item + \"'\" + \";\");\r\n } else {\r\n res = st.executeQuery(\"select it_pur_price as itemprice from item_mstr where it_item = \" + \"'\" + item + \"'\" + \";\"); \r\n }\r\n while (res.next()) {\r\n price = res.getString(\"itemprice\").replace('.', defaultDecimalSeparator); \r\n Type = \"item\";\r\n }\r\n }\r\n\r\n TypeAndPrice[0] = Type;\r\n TypeAndPrice[1] = String.valueOf(price);\r\n\r\n }\r\n catch (SQLException s){\r\n MainFrame.bslog(s);\r\n } finally {\r\n if (res != null) {\r\n res.close();\r\n }\r\n if (st != null) {\r\n st.close();\r\n }\r\n con.close();\r\n }\r\n }\r\n catch (Exception e){\r\n MainFrame.bslog(e);\r\n }\r\n return TypeAndPrice;\r\n\r\n }", "public static double getPaymentAmountDue(Payment payment, HashMap requestParams, accVendorPaymentDAO accVendorPaymentobj) throws ServiceException, ParseException {\n boolean isOpeningPayment = false;\n boolean isAdvancePaymentToVendor = false;\n boolean isRefundPaymentToCustomer = false;\n DateFormat df = (DateFormat) requestParams.get(GoodsReceiptCMNConstants.DATEFORMAT);\n if (df == null) {\n df = (DateFormat) requestParams.get(Constants.df);\n }\n String companyid = (String) requestParams.get(GoodsReceiptCMNConstants.COMPANYID);\n double paymentDueAmt = 0;\n if ((payment.getAdvanceDetails() != null && !payment.getAdvanceDetails().isEmpty()) || payment.isIsOpeningBalencePayment()) {\n double paymentAmt = 0;\n double linkedPaymentAmt = 0;\n if (payment.isIsOpeningBalencePayment()) {//opening payment\n isOpeningPayment = true;\n paymentAmt += payment.getDepositAmount();\n } else if (payment.getVendor() != null) {//advance payment against vendor\n isAdvancePaymentToVendor = true;\n for (AdvanceDetail advanceDetail : payment.getAdvanceDetails()) {\n paymentAmt += advanceDetail.getAmount();\n }\n } else if (payment.getCustomer() != null) {//Refund payment against customer\n isRefundPaymentToCustomer = true;\n for (AdvanceDetail advanceDetail : payment.getAdvanceDetails()) {\n if (advanceDetail.getReceiptAdvanceDetails() == null) {//Only such refunds can be due in which at the time of creation no document (no advance receipt) is selected \n paymentAmt += advanceDetail.getAmount();\n }\n }\n //In this case paymentAmt can be zero (if all refund have advance receipt documnet selected) so we need to retun amount due zero here\n if (paymentAmt == 0) {\n return 0;\n }\n }\n HashMap<String, Object> reqParams1 = new HashMap();\n reqParams1.put(\"paymentid\", payment.getID());\n reqParams1.put(\"companyid\", companyid);\n reqParams1.put(Constants.df, df);\n if (requestParams.containsKey(\"asofdate\") && requestParams.get(\"asofdate\") != null) {\n reqParams1.put(\"asofdate\", requestParams.get(\"asofdate\"));\n }\n if (isOpeningPayment || isAdvancePaymentToVendor) {\n KwlReturnObject result = accVendorPaymentobj.getLinkedDetailsPayment(reqParams1);\n List<LinkDetailPayment> linkedDetaisPayments = result.getEntityList();\n for (LinkDetailPayment ldp : linkedDetaisPayments) {\n linkedPaymentAmt += ldp.getAmount();\n }\n result = accVendorPaymentobj.getLinkDetailPaymentToCreditNote(reqParams1);\n List<LinkDetailPaymentToCreditNote> linkedDetaisPaymentsToCN = result.getEntityList();\n for (LinkDetailPaymentToCreditNote ldp : linkedDetaisPaymentsToCN) {\n linkedPaymentAmt += ldp.getAmount();\n }\n result = accVendorPaymentobj.getAdvanceReceiptDetailsByPayment(reqParams1);\n List<Object[]> list2 = result.getEntityList();\n for (Object obj[] : list2) {\n double revExchangeRate = 1.0;\n double amount = obj[1] != null ? Double.parseDouble(obj[1].toString()) : 0.0;\n double exchangeRate = obj[2] != null ? Double.parseDouble(obj[2].toString()) : 0.0;\n if (exchangeRate != 0.0) {\n revExchangeRate = 1 / exchangeRate;\n }\n linkedPaymentAmt += authHandler.round(revExchangeRate * amount, companyid);\n }\n result = accVendorPaymentobj.getLinkDetailReceiptToAdvancePayment(reqParams1);\n List<LinkDetailReceiptToAdvancePayment> linkDetailReceiptToAdvancePayment = result.getEntityList();\n for (LinkDetailReceiptToAdvancePayment ldp : linkDetailReceiptToAdvancePayment) {\n linkedPaymentAmt += ldp.getAmountInPaymentCurrency();\n }\n paymentDueAmt = paymentAmt - linkedPaymentAmt;\n } else if (isRefundPaymentToCustomer) {\n KwlReturnObject result = accVendorPaymentobj.getLinkDetailAdvanceReceiptToRefundPayment(reqParams1);\n List<LinkDetailPaymentToAdvancePayment> linkDetailPaymentToAdvancePayment = result.getEntityList();\n for (LinkDetailPaymentToAdvancePayment ldp : linkDetailPaymentToAdvancePayment) {\n linkedPaymentAmt += ldp.getAmount();\n }\n paymentDueAmt = paymentAmt - linkedPaymentAmt;\n }\n }\n paymentDueAmt = authHandler.round(paymentDueAmt, companyid);\n return paymentDueAmt;\n }", "public void updateInvoice(ApplicationFormHeaderDto dto, ApplicationFormHeader po) {\r\n\t\tlogger.info(\"===Updating invoice====\" + dto.getRefId());\r\n\r\n\t\tif (po.getApplicationStatus() == ApplicationStatus.APPROVED) {\r\n\t\t\tlogger.info(\"Application status approved - we don't update invoice\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tInvoiceDto invoice = invoiceHelper.getInvoice(po.getInvoiceRef());\r\n\t\tInvoice invoicePO = applicationDao.findByRefId(po.getInvoiceRef(), Invoice.class);\r\n\t\tApplicationType type = po.getApplicationType();\r\n\t\tApplicationCategory category = applicationDao.findApplicationCategory(type);\r\n\r\n\t\tList<InvoiceLine> lines = new ArrayList<>();\r\n\t\tDouble sum = 0.0;\r\n\t\tif (invoice != null && category != null) {\r\n\t\t\tInvoiceLine invLinePO = new InvoiceLine();\r\n\t\t\tInvoiceLineDto invLine = new InvoiceLineDto(\r\n\t\t\t\t\tinvoice.getContactName() + \", \" + \"'\" + category.getType().getDisplayName()\r\n\t\t\t\t\t\t\t+ \"' member registration fee\",\r\n\t\t\t\t\tcategory.getApplicationAmount(), category.getApplicationAmount());\r\n\t\t\tinvLine.setQuantity(1);\r\n\r\n\t\t\tinvLinePO.copyFrom(invLine);\r\n\t\t\tinvLinePO.setInvoice(invoicePO);\r\n\t\t\tlines.add(invLinePO);\r\n\t\t\tsum = sum + invLine.getTotalAmount();\r\n\t\t}\r\n\r\n\t\tif (!lines.isEmpty()) {\r\n\t\t\t// delete existing invoiceLines\r\n\t\t\tinvoiceDao.deleteInvoiceLine(invoicePO);\r\n\t\t\tSet<InvoiceLine> invoiceLinesSet = new HashSet<>(lines);\r\n\t\t\tinvoicePO.setLines(invoiceLinesSet);\r\n\t\t\tinvoicePO.setAmount(sum);\r\n\r\n\t\t\tinvoiceDao.save(invoicePO);\r\n\t\t}\r\n\t}", "public VatDetail[] getRetailExportVatSummaries() {\n POSLineItem[] items = compositePOSTransaction.getLineItemsArray();\n HashMap vatDetails = new HashMap();\n for (int idx = 0; idx < items.length; idx++) {\n //if(!((CMSItem)items[idx].getItem()).isConcessionItem() && !((CMSItem)items[idx].getItem()).getVatCode().equals(\"0\"))\n if (((CMSItem)items[idx].getItem()).getVatRate() != null\n && ((CMSItem)items[idx].getItem()).getVatRate().doubleValue() > 0) {\n int signMult = 1;\n if (items[idx] instanceof ReturnLineItem)\n signMult = -1;\n double rate = items[idx].getItem().getVatRate().doubleValue();\n if (vatDetails.get(((CMSItem)items[idx].getItem()).getVatRate()) == null) {\n VatDetail detail = new VatDetail(items[idx].getExtendedNetAmount().multiply(signMult)\n , items[idx].getExtendedVatAmount().multiply(signMult), rate\n , items[idx].getNetAmount().multiply(rate / (1 + rate)).multiply(signMult).round().\n multiply(items[idx].getQuantity().intValue()), items[idx].getQuantity().intValue());\n // to do: need a new vat service at item level rather than calcing right here, vatAmount = lineItemDetail.getNetAmount().multiply((1.0 - creditCardRatio * CREDIT_CARD_CHARGE_RATE) * rate / (1.0 + rate));\n vatDetails.put(items[idx].getItem().getVatRate(), detail);\n } else {\n VatDetail detail = (VatDetail)vatDetails.get(((CMSItem)items[idx].getItem()).getVatRate());\n detail.addCompositeAmount(items[idx].getExtendedNetAmount().multiply(signMult));\n detail.addVatAmount(items[idx].getExtendedVatAmount().multiply(signMult));\n detail.addOriginalVatAmount(items[idx].getNetAmount().multiply(rate / (1 + rate)).\n multiply(signMult).round().multiply(items[idx].getQuantity().intValue()));\n detail.addItemQty(items[idx].getQuantity().intValue());\n }\n }\n }\n return (VatDetail[])vatDetails.values().toArray(new VatDetail[0]);\n }", "public JSONArray getGoodsReceiptsJsonMerged(HashMap<String, Object> request, List<GoodsReceipt> list, JSONArray jArr, AccountingHandlerDAO accountingHandlerDAOobj, accCurrencyDAO accCurrencyDAOobj, accGoodsReceiptDAO accGoodsReceiptobj, accAccountDAO accAccountDAOobj, accGoodsReceiptCMN accGoodsReceiptCommon, accTaxDAO accTaxObj) throws ServiceException {\n try {\n String companyid = (String) request.get(GoodsReceiptCMNConstants.COMPANYID);\n String currencyid = (String) request.get(GoodsReceiptCMNConstants.GCURRENCYID);\n// DateFormat userDateFormat = (DateFormat) request.get(Constants.userdf);\n DateFormat userDateFormat=null;\n if (request.containsKey(Constants.userdf) && request.get(Constants.userdf) != null) {\n userDateFormat = (DateFormat) request.get(Constants.userdf);\n }\n DateFormat df = (DateFormat) request.get(GoodsReceiptCMNConstants.DATEFORMAT);\n String only1099AccStr = (String) request.get(GoodsReceiptCMNConstants.ONLY1099ACC);\n DateFormat dateFormat=(DateFormat) authHandler.getDateOnlyFormat();\n List ll = null;\n /*\n * amoutinbase is used to calculate excnahnge rate for transaction \n */\n double amountInBase=0.0;\n KwlReturnObject extraprefresult = null;\n ExtraCompanyPreferences extraCompanyPreferences = null;\n if(!StringUtil.isNullOrEmpty(companyid)){\n extraprefresult = accountingHandlerDAOobj.getObject(ExtraCompanyPreferences.class.getName(), companyid);\n extraCompanyPreferences = extraprefresult != null ? (ExtraCompanyPreferences) extraprefresult.getEntityList().get(0) : null;\n }\n boolean isMalaysian = extraCompanyPreferences != null ? extraCompanyPreferences.getCompany().getCountry().getID().equalsIgnoreCase(\"137\") : false;\n KwlReturnObject curresult = accountingHandlerDAOobj.getObject(KWLCurrency.class.getName(), currencyid);\n KWLCurrency currency = (KWLCurrency) curresult.getEntityList().get(0);\n boolean isBadDebtInvoices = false;// for Malasian Company\n boolean isproductCategory=false;\n boolean isproductType = false;\n KwlReturnObject cmp = accountingHandlerDAOobj.getObject(Company.class.getName(), companyid);\n Company company = (Company) cmp.getEntityList().get(0);\n int countryid = company.getCountry() != null ? Integer.parseInt(company.getCountry().getID()) : 0;\n request.put(\"countryid\", countryid);\n if (request.containsKey(\"isBadDebtInvoices\") && request.get(\"isBadDebtInvoices\") != null) {\n isBadDebtInvoices = (Boolean) request.get(\"isBadDebtInvoices\");\n }\n if (request.containsKey(\"productCategoryid\") && request.get(\"productCategoryid\")!=null && !StringUtil.isNullOrEmpty((String) request.get(\"productCategoryid\"))) {\n isproductCategory = true;\n }\n if (request.containsKey(InvoiceConstants.productid) && request.get(InvoiceConstants.productid) != null && !StringUtil.isNullOrEmpty((String) request.get(InvoiceConstants.productid))) {\n isproductType = true;\n }\n int noOfInterval = Constants.DefaultNoOfIntervals;\n if(request.containsKey(\"noOfInterval\") && request.get(\"noOfInterval\") != null) {\n noOfInterval = request.get(\"noOfInterval\").toString().equals(\"\") ? Constants.DefaultNoOfIntervals : Integer.parseInt(request.get(\"noOfInterval\").toString());\n }\n\n double taxPercent = 0;\n boolean belongsTo1099 = false;\n boolean isAged = (request.containsKey(\"isAged\") && request.get(\"isAged\") != null) ? Boolean.parseBoolean(request.get(\"isAged\").toString()) : false;\n boolean isProduct = (request.containsKey(GoodsReceiptCMNConstants.PRODUCTID) && !StringUtil.isNullOrEmpty((String) request.get(GoodsReceiptCMNConstants.PRODUCTID))) ? true : false;\n boolean only1099Acc = (only1099AccStr != null ? Boolean.parseBoolean(only1099AccStr) : false);\n boolean ignoreZero = request.get(GoodsReceiptCMNConstants.IGNOREZERO) != null;\n boolean onlyAmountDue = request.get(GoodsReceiptCMNConstants.ONLYAMOUNTDUE) != null;\n boolean report = request.get(\"report\") != null;\n boolean isFixedAsset = request.containsKey(\"isFixedAsset\") ? (Boolean) request.get(\"isFixedAsset\") : false;\n boolean isConsignment = request.containsKey(\"isConsignment\") ? (Boolean) request.get(\"isConsignment\") : false;\n int duration = (request.containsKey(GoodsReceiptCMNConstants.DURATION) && request.get(GoodsReceiptCMNConstants.DURATION) != null) ? Integer.parseInt(request.get(GoodsReceiptCMNConstants.DURATION).toString()) : 30;\n int invoiceLinkedWithGRNStatus = (request.containsKey(\"invoiceLinkedWithGRNStatus\") && request.get(\"invoiceLinkedWithGRNStatus\") != null) ? Integer.parseInt(request.get(\"invoiceLinkedWithGRNStatus\").toString()) : 0;\n boolean isExport = (request.get(\"isExport\") == null) ? false : (Boolean) request.get(\"isExport\");\n\n Date startDate=null;\n if(request.containsKey(Constants.REQ_startdate) && request.get(Constants.REQ_startdate)!=null){\n try{\n startDate=dateFormat.parse(request.get(Constants.REQ_startdate).toString());\n }catch(Exception ex){\n startDate = null;\n }\n }\n String curDateString = \"\";\n Date curDate = null;\n boolean booleanAged = false;//Added for aged payable/receivable\n\n //Custom field details Maps for Global data\n HashMap<String, String> customFieldMap = new HashMap<String, String>();\n HashMap<String, String> customDateFieldMap = new HashMap<String, String>();\n\n HashMap<String, Object> fieldrequestParams = new HashMap();\n int moduleid=isFixedAsset ? Constants.Acc_FixedAssets_PurchaseInvoice_ModuleId :isConsignment?Constants.Acc_Consignment_GoodsReceipt_ModuleId: Constants.Acc_Vendor_Invoice_ModuleId;\n fieldrequestParams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid));\n fieldrequestParams.put(Constants.filter_values, Arrays.asList(companyid, moduleid));\n HashMap<String, String> replaceFieldMap = new HashMap<String, String>();\n HashMap<String, Integer> FieldMap = accAccountDAOobj.getFieldParamsCustomMap(fieldrequestParams, replaceFieldMap, customFieldMap, customDateFieldMap);\n\n //Custom field details Maps for Line Level data\n HashMap<String, Object> fieldrequestParamsRows = new HashMap();\n HashMap<String, String> replaceFieldMapRows = new HashMap();\n HashMap<String, String> customFieldMapRows = new HashMap();\n HashMap<String, String> customDateFieldMapRows = new HashMap();\n fieldrequestParamsRows.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, Constants.customcolumn));\n fieldrequestParamsRows.put(Constants.filter_values, Arrays.asList(companyid, moduleid, 1));\n HashMap<String, Integer> fieldMapRows = null;\n fieldMapRows = accAccountDAOobj.getFieldParamsCustomMap(fieldrequestParamsRows, replaceFieldMapRows, customFieldMapRows, customDateFieldMapRows);\n\n List InvoiceList=new ArrayList();\n String compids[] = Constants.Companyids_Chkl_And_Marubishi.split(\",\");\n boolean isFromChklorMarubishi = false;\n for (int cnt = 0; cnt < compids.length; cnt++) {\n String compid = compids[cnt];\n if (compid.equalsIgnoreCase(companyid)) {\n isFromChklorMarubishi = true;\n }\n }\n Calendar oneDayBeforeCal1 = Calendar.getInstance();\n Calendar cal1 = Calendar.getInstance();\n Calendar cal2 = Calendar.getInstance();\n Calendar cal3 = Calendar.getInstance();\n Calendar cal4 = Calendar.getInstance();\n Calendar cal5 = Calendar.getInstance();\n Calendar cal6 = Calendar.getInstance();\n Calendar cal7 = Calendar.getInstance();\n Calendar cal8 = Calendar.getInstance();\n Calendar cal9 = Calendar.getInstance();\n Calendar cal10 = Calendar.getInstance();\n\n if (request.get(Constants.asOfDate) != null) {//Added for aged payable/receivable\n curDateString = (String) request.get(Constants.asOfDate);\n\n if (request.get(\"MonthlyAgeingCurrDate\") != null) {\n curDate = (Date) request.get(\"MonthlyAgeingCurrDate\");\n } else {\n curDate = df.parse(curDateString);\n }\n booleanAged = true;\n oneDayBeforeCal1.setTime(curDate);\n cal1.setTime(curDate);\n cal2.setTime(curDate);\n cal3.setTime(curDate);\n cal4.setTime(curDate);\n cal5.setTime(curDate);\n cal6.setTime(curDate);\n cal7.setTime(curDate);\n cal8.setTime(curDate);\n cal9.setTime(curDate);\n cal10.setTime(curDate);\n oneDayBeforeCal1.add(Calendar.DAY_OF_YEAR, -1); //Need to verify in multiple cases, then only take action on it\n cal2.add(Calendar.DAY_OF_YEAR, -duration);\n cal3.add(Calendar.DAY_OF_YEAR, -(duration * 2));\n cal4.add(Calendar.DAY_OF_YEAR, -(duration * 3));\n cal5.add(Calendar.DAY_OF_YEAR, -(duration * 4));\n cal6.add(Calendar.DAY_OF_YEAR, -(duration * 5));\n cal7.add(Calendar.DAY_OF_YEAR, -(duration * 6));\n cal8.add(Calendar.DAY_OF_YEAR, -(duration * 7));\n cal9.add(Calendar.DAY_OF_YEAR, -(duration * 8));\n cal10.add(Calendar.DAY_OF_YEAR, -(duration * 9));\n }\n\n Date oneDayBeforeCal1Date = null;\n Date cal1Date = null;\n Date cal2Date = null;\n Date cal3Date = null;\n Date cal4Date = null;\n Date cal5Date = null;\n Date cal6Date = null;\n Date cal7Date = null;\n Date cal8Date = null;\n Date cal9Date = null;\n Date cal10Date = null;\n\n String oneDayBeforeCal1String = dateFormat.format(oneDayBeforeCal1.getTime());\n oneDayBeforeCal1Date = dateFormat.parse(oneDayBeforeCal1String);\n\n String cal1String = dateFormat.format(cal1.getTime());\n cal1Date = dateFormat.parse(cal1String);\n\n String cal2String = dateFormat.format(cal2.getTime());\n cal2Date = dateFormat.parse(cal2String);\n\n String cal3String = dateFormat.format(cal3.getTime());\n cal3Date = dateFormat.parse(cal3String);\n\n String cal4String = dateFormat.format(cal4.getTime());\n cal4Date = dateFormat.parse(cal4String);\n\n String cal5String = dateFormat.format(cal5.getTime());\n cal5Date = dateFormat.parse(cal5String);\n\n String cal6String = dateFormat.format(cal6.getTime());\n cal6Date = dateFormat.parse(cal6String);\n\n String cal7String = dateFormat.format(cal7.getTime());\n cal7Date = dateFormat.parse(cal7String);\n\n String cal8String = dateFormat.format(cal8.getTime());\n cal8Date = dateFormat.parse(cal8String);\n\n String cal9String = dateFormat.format(cal9.getTime());\n cal9Date = dateFormat.parse(cal9String);\n\n String cal10String = dateFormat.format(cal10.getTime());\n cal10Date = dateFormat.parse(cal10String);\n\n double amountdue1 = 0;\n double amountdue2 = 0;\n double amountdue3 = 0;\n double amountdue4 = 0;\n double amountdue5 = 0;\n double amountdue6 = 0;\n double amountdue7 = 0;\n double amountdue8 = 0;\n double amountdue9 = 0;\n double amountdue10 = 0;\n double amountdue11 = 0;\n// double accruedbalance = 0;\n if (list != null && !list.isEmpty()) {\n for (Object objectArr : list) {\n Object[] oj = (Object[]) objectArr;\n String invid = oj[0].toString();\n //Withoutinventory 0 for normal, 1 for billing\n boolean withoutinventory = Boolean.parseBoolean(oj[1].toString());\n {\n amountdue1 = amountdue2 = amountdue3 = amountdue4 = amountdue5 = amountdue6 = amountdue7 = amountdue8 = amountdue9 = amountdue10 = amountdue11 = 0;\n KwlReturnObject objItr = accountingHandlerDAOobj.getObject(GoodsReceipt.class.getName(), invid);\n GoodsReceipt gReceipt = (GoodsReceipt) objItr.getEntityList().get(0);\n\n \n \n \n /*------- Code for Loading Data in Invoice Grid as per Applied filter of PI linking with GR--------- */\n if (invoiceLinkedWithGRNStatus != 0) {\n boolean invoiceLinkedWithGRNStatusFilter = false;\n\n if (invoiceLinkedWithGRNStatus == 11) {//When PI is fully received\n invoiceLinkedWithGRNStatusFilter = isInvoiceFullyLinkedWithGR(gReceipt);\n } else if (invoiceLinkedWithGRNStatus == 12) {//When PI is not linked with GR\n invoiceLinkedWithGRNStatusFilter = isInvoiceNotLinkedWithAnyGR(gReceipt);\n } else if (invoiceLinkedWithGRNStatus == 13) {//When PI is partially received\n invoiceLinkedWithGRNStatusFilter = isInvoicePartiallyLinkedWithGR(gReceipt);\n }\n /*--------Only relevant Data will load as per applied filter--------- */\n if (!invoiceLinkedWithGRNStatusFilter) {\n continue;\n }\n\n }\n\n \n //Below If Block code is used to remove duplicate invoice id's when filter on the basis of Product category or Product name\n if (isproductCategory || isproductType) {\n if (InvoiceList.contains(gReceipt.getID())) {\n continue;\n } else {\n InvoiceList.add(gReceipt.getID());\n }\n }\n JournalEntry je = null;\n JournalEntryDetail d = null;\n if (gReceipt.isNormalInvoice()) {\n je = gReceipt.getJournalEntry();\n d = gReceipt.getVendorEntry();\n }\n\n double invoiceOriginalAmt = 0d;\n double externalCurrencyRate = 0d;\n boolean isopeningBalanceInvoice = gReceipt.isIsOpeningBalenceInvoice();\n Date creationDate = null;\n\n currencyid = (gReceipt.getCurrency() == null ? currency.getCurrencyID() : gReceipt.getCurrency().getCurrencyID());\n Account account = null;\n if (gReceipt.isIsOpeningBalenceInvoice() && !gReceipt.isNormalInvoice()) {\n KwlReturnObject accObjItr = accountingHandlerDAOobj.getObject(Account.class.getName(), gReceipt.getVendor().getAccount().getID());\n account = (Account) accObjItr.getEntityList().get(0);\n externalCurrencyRate = gReceipt.getExchangeRateForOpeningTransaction();\n creationDate = gReceipt.getCreationDate();\n invoiceOriginalAmt = gReceipt.getOriginalOpeningBalanceAmount();\n } else {\n account = d.getAccount();\n externalCurrencyRate = je.getExternalCurrencyRate();\n JSONObject jObj = extraCompanyPreferences.getColumnPref() != null ? new JSONObject(extraCompanyPreferences.getColumnPref()) : new JSONObject();\n boolean isPostingDateCheck = false;\n if (!StringUtil.isNullObject(jObj) && jObj.has(Constants.IS_POSTING_DATE_CHECK) && jObj.get(Constants.IS_POSTING_DATE_CHECK) != null && jObj.optBoolean(Constants.IS_POSTING_DATE_CHECK, false)) {\n isPostingDateCheck = true;\n }\n if(isPostingDateCheck){\n creationDate = gReceipt.getCreationDate();\n }else{\n creationDate = je.getEntryDate();\n }\n invoiceOriginalAmt = d.getAmount();\n }\n double amountdue = 0,amountdueinbase = 0, deductDiscount = 0,amountDueOriginal=0.0;\n if (gReceipt.isIsExpenseType()) {\n if(Constants.InvoiceAmountDueFlag && !isAged){\n ll = accGoodsReceiptCommon.getUpdatedExpGRAmountDue(request, gReceipt);\n } else {\n ll = accGoodsReceiptCommon.getExpGRAmountDue(request, gReceipt);\n amountdueinbase = (Double) ll.get(5);\n }\n amountdue = (Double) ll.get(1);\n belongsTo1099 = (Boolean) ll.get(3);\n } else {\n if (gReceipt.isIsOpeningBalenceInvoice() && !gReceipt.isNormalInvoice()) {\n ll = new ArrayList();\n ll.add(gReceipt.getOriginalOpeningBalanceAmount());\n ll.add(gReceipt.getOpeningBalanceAmountDue());\n ll.add(\"\");\n ll.add(false);\n ll.add(0.0);\n ll.add(gReceipt.getOpeningBalanceAmountDue());\n } else {\n if (Constants.InvoiceAmountDueFlag && !isAged) {\n ll = accGoodsReceiptCommon.getInvoiceDiscountAmountInfo(request, gReceipt);\n } else {\n ll = accGoodsReceiptCommon.getGRAmountDue(request, gReceipt);\n amountdueinbase = (Double) ll.get(6);\n }\n }\n\n amountdue = (Double) ll.get(1);\n belongsTo1099 = (Boolean) ll.get(3);\n deductDiscount = (Double) ll.get(4);\n amountDueOriginal = (Double) ll.get(5);\n }\n if (onlyAmountDue && authHandler.round(amountdue, companyid) == 0 || (only1099Acc && !belongsTo1099)) {//remove //belongsTo1099&&gReceipt.isIsExpenseType()\\\\ in case of viewing all accounts. [PS]\n continue;\n }\n if ((ignoreZero && authHandler.round(amountdue, companyid) <= 0)) {\n continue;\n }\n int isReval = 0;\n if (report) {\n KwlReturnObject brdAmt = accGoodsReceiptobj.getRevalFlag(gReceipt.getID());\n List reval = brdAmt.getEntityList();\n if (!reval.isEmpty() && (Long) reval.get(0) > 0) {\n isReval = 1;\n }\n }\n\n if (request.containsKey(\"excludeInvoiceId\") && request.get(\"excludeInvoiceId\") != null) {\n String excludeInvoiceId = (String) request.get(\"excludeInvoiceId\");\n if (gReceipt.getGoodsReceiptNumber().equals(excludeInvoiceId)) {\n continue;\n }\n }\n Vendor vendor=gReceipt.getVendor();\n HashMap<String, Object> hashMap = new HashMap<>();\n hashMap.put(\"invoiceID\", gReceipt.getID());\n hashMap.put(\"companyid\", companyid);\n KwlReturnObject object = accInvoiceDAOobj.getinvoiceDocuments(hashMap);\n int attachemntcount = object.getRecordTotalCount();\n com.krawler.utils.json.base.JSONObject obj = new com.krawler.utils.json.base.JSONObject();\n obj.put(GoodsReceiptCMNConstants.BILLID, gReceipt.getID());\n obj.put(\"isdropshipchecked\", gReceipt.isIsDropshipDocument());\n obj.put(Constants.isDraft, gReceipt.isIsDraft());\n boolean isForTemplate = (request.containsKey(\"isForTemplate\") && Boolean.parseBoolean(request.get(\"isForTemplate\").toString()))?true:false;\n //KwlReturnObject cmp = accountingHandlerDAOobj.getObject(Company.class.getName(), companyid);\n // Company company = (Company) cmp.getEntityList().get(0);\n // int countryid = company.getCountry() != null ? Integer.parseInt(company.getCountry().getID()) : 0;\n // Comment this code because get Company object availble for method\n\n String landedInvoice = accProductObj.consignmentInvoice(gReceipt.getID(), companyid);\n\n \n if (Constants.indian_country_id == countryid) {\n List<ExciseDetailsInvoice> ed = null;\n if (!isForTemplate) {\n if (extraCompanyPreferences.isExciseApplicable()) {\n KwlReturnObject exciseDetails = accGoodsReceiptobj.getExciseDetails(gReceipt.getID());\n// if (!exciseDetails.getEntityList().isEmpty()){\n ed = exciseDetails.getEntityList();\n// }\n }\n if (extraCompanyPreferences.isExciseApplicable() && ed.size() > 0) {\n if (isFixedAsset) {\n obj.put(\"assetExciseid\", ed.get(0).getId());\n } else {\n obj.put(\"exciseDetailid\", ed.get(0).getId());\n }\n obj.put(\"suppliers\", ed.get(0).getSupplier());\n obj.put(\"supplierTINSalesTAXNo\", ed.get(0).getSupplierTINSalesTaxNo());\n obj.put(\"supplierExciseRegnNo\", ed.get(0).getSupplierExciseRegnNo());\n obj.put(\"cstnumber\", ed.get(0).getCstnumber());\n obj.put(\"supplierRange\", ed.get(0).getSupplierRange());\n obj.put(\"supplierCommissionerate\", ed.get(0).getSupplierCommissioneRate());\n obj.put(\"supplierAddress\", ed.get(0).getSupplierAddress());\n obj.put(\"supplierImporterExporterCode\", ed.get(0).getSupplierImporterExporterCode());\n obj.put(\"supplierDivision\", ed.get(0).getSupplierDivision());\n obj.put(\"manufacturername\", ed.get(0).getManufacturerName());\n obj.put(\"manufacturerExciseRegnNo\", ed.get(0).getManufacturerExciseregnNo());\n obj.put(\"manufacturerRange\", ed.get(0).getManufacturerRange());\n obj.put(\"manufacturerCommissionerate\", ed.get(0).getManufacturerCommissionerate());\n obj.put(\"manufacturerDivision\", ed.get(0).getManufacturerDivision());\n obj.put(\"manufacturerAddress\", ed.get(0).getManufacturerAddress());\n obj.put(\"manufacturerImporterExporterCode\", ed.get(0).getManufacturerImporterexporterCode());\n obj.put(\"supplierState\", ed.get(0).getSupplierstate());\n obj.put(\"registrationType\", ed.get(0).getRegistrationType());\n obj.put(\"UnitName\", ed.get(0).getUnitname());\n obj.put(\"ECCNo\", ed.get(0).getECCNo());\n obj.put(\"isExciseInvoiceWithTemplate\", (!ed.get(0).getRegistrationType().equals(\"\") || !ed.get(0).getUnitname().equals(\"\") || !ed.get(0).getECCNo().equals(\"\")) ? true : false);\n }\n HashMap tmpHashMap = new HashMap();\n tmpHashMap.put(\"moduleRecordId\", invid);\n tmpHashMap.put(\"companyid\", companyid);\n KwlReturnObject exciseTemp = accountingHandlerDAOobj.getExciseTemplatesMap(tmpHashMap);\n if (exciseTemp != null && exciseTemp.getEntityList().size() > 0) {\n ExciseDetailsTemplateMap moduleTemp = (ExciseDetailsTemplateMap) exciseTemp.getEntityList().get(0);\n if (moduleTemp != null) {\n// obj.put(\"manufacturerType\", moduleTemp.getManufacturerType());\n obj.put(\"registrationType\", moduleTemp.getRegistrationType());\n obj.put(\"UnitName\", moduleTemp.getUnitname());\n obj.put(\"ECCNo\", moduleTemp.getECCNo());\n }\n }\n obj.put(\"vvattin\", !StringUtil.isNullOrEmpty(gReceipt.getVendor().getVATTINnumber())?gReceipt.getVendor().getVATTINnumber():\"\");\n obj.put(\"vcsttin\", !StringUtil.isNullOrEmpty(gReceipt.getVendor().getCSTTINnumber())?gReceipt.getVendor().getCSTTINnumber():\"\");\n obj.put(\"veccno\", !StringUtil.isNullOrEmpty(gReceipt.getVendor().getECCnumber())?gReceipt.getVendor().getECCnumber():\"\");\n obj.put(\"vservicetaxregno\", !StringUtil.isNullOrEmpty(gReceipt.getVendor().getSERVICEnumber())?gReceipt.getVendor().getSERVICEnumber():\"\");\n obj.put(\"vattinno\", !StringUtil.isNullOrEmpty(vendor.getVATTINnumber())?vendor.getVATTINnumber():\"\");\n obj.put(\"csttinno\", !StringUtil.isNullOrEmpty(vendor.getCSTTINnumber())?vendor.getCSTTINnumber():\"\");\n obj.put(\"eccno\", !StringUtil.isNullOrEmpty(vendor.getECCnumber())?vendor.getECCnumber():\"\");\n obj.put(\"panno\", !StringUtil.isNullOrEmpty(vendor.getPANnumber())?vendor.getPANnumber():\"\");\n obj.put(\"servicetaxno\", !StringUtil.isNullOrEmpty(vendor.getSERVICEnumber())?vendor.getSERVICEnumber():\"\");\n obj.put(\"tanno\", !StringUtil.isNullOrEmpty(vendor.getTANnumber())?vendor.getTANnumber():\"\");\n obj.put(\"formtypeid\", !StringUtil.isNullOrEmpty(gReceipt.getFormtype()) ? gReceipt.getFormtype() : 0);\n obj.put(\"gtaapplicable\", gReceipt.isGtaapplicable());\n obj.put(\"gstapplicable\", gReceipt.isIsIndGSTApplied());\n obj.put(\"isInterstateParty\", gReceipt.getVendor().isInterstateparty());\n obj.put(\"formseriesno\", !StringUtil.isNullOrEmpty(gReceipt.getFormseriesno()) ? gReceipt.getFormseriesno() : \"\");\n obj.put(\"formno\", !StringUtil.isNullOrEmpty(gReceipt.getFormno()) ? gReceipt.getFormno() : \"\");\n obj.put(\"formdate\", gReceipt.getFormdate());\n obj.put(\"formamount\", gReceipt.getFormamount());\n if (!StringUtil.isNullOrEmpty(gReceipt.getFormstatus())) {\n if (gReceipt.getFormstatus().equals(\"1\")) {\n obj.put(\"formstatus\", \"NA\");\n } else if (gReceipt.getFormstatus().equals(\"2\")) {\n obj.put(\"formstatus\", \"Pending\");\n } else if (gReceipt.getFormstatus().equals(\"3\")) {\n obj.put(\"formstatus\", \"Submitted\");\n }\n } else{\n obj.put(\"formstatus\", \"NA\");\n }\n } else {\n if (company.getCountry() != null && Integer.parseInt(company.getCountry().getID()) == Constants.indian_country_id && extraCompanyPreferences.isExciseApplicable()) {\n obj.put(\"suppliers\", vendor.getName());\n obj.put(\"supplierCommissionerate\", vendor.getCommissionerate() != null ? vendor.getCommissionerate() : \"\");\n obj.put(\"supplierDivision\", vendor.getDivision() != null ? vendor.getDivision() : \"\");\n obj.put(\"supplierRange\", vendor.getRangecode() != null ? vendor.getRangecode() : \"\");\n obj.put(\"supplierImporterExporterCode\", vendor.getIECNo() != null ? vendor.getIECNo() : \"\");\n obj.put(\"cstnumber\", vendor.getCSTTINnumber() != null ? vendor.getCSTTINnumber() : \"\");\n obj.put(\"supplierTINSalesTAXNo\", vendor.getVATTINnumber() != null ? vendor.getVATTINnumber() : \"\");\n obj.put(\"supplierExciseRegnNo\", vendor.getECCnumber() != null ? vendor.getECCnumber() : \"\");\n\n HashMap<String, Object> addrRequestParams = new HashMap<String, Object>();\n addrRequestParams.put(\"vendorid\", vendor.getID());\n addrRequestParams.put(\"companyid\", companyid);\n addrRequestParams.put(\"isBillingAddress\", true);//only billing address \n KwlReturnObject addressResult = accountingHandlerDAOobj.getVendorAddressDetails(addrRequestParams);\n if (!addressResult.getEntityList().isEmpty()) {\n List<VendorAddressDetails> casList = addressResult.getEntityList();\n if (casList.size() > 0) {\n VendorAddressDetails vas = (VendorAddressDetails) casList.get(0);\n String fullAddress = \"\";\n if (!StringUtil.isNullOrEmpty(vas.getAddress())) {\n fullAddress += vas.getAddress() + \", \";\n }\n if (!StringUtil.isNullOrEmpty(vas.getCity())) {\n fullAddress += vas.getCity() + \", \";\n }\n if (!StringUtil.isNullOrEmpty(vas.getState())) {\n fullAddress += vas.getState() + \", \";\n }\n if (!StringUtil.isNullOrEmpty(vas.getCountry())) {\n fullAddress += vas.getCountry() + \", \";\n }\n if (!StringUtil.isNullOrEmpty(fullAddress)) {\n fullAddress = fullAddress.substring(0, fullAddress.length() - 2);\n }\n obj.put(\"supplierAddress\", fullAddress);\n obj.put(\"supplierState\", vas.getState() != null ? vas.getState() : \"\");\n }\n }\n }\n }\n /**\n * Get Module template and its mapped Unit details for company if Line level term flag ON \n */\n if(extraCompanyPreferences!=null && extraCompanyPreferences.getLineLevelTermFlag()==1 && isForTemplate){\n HashMap<String, Object> ModuleTempParams = new HashMap<>();\n ModuleTempParams.put(\"modulerecordid\", invid);\n ModuleTempParams.put(\"companyid\", companyid);\n /** Get Module template from invoice id . In module template invoice id add as modulerecordid */\n KwlReturnObject ModuleTempObj = accountingHandlerDAOobj.getModuleTemplates(ModuleTempParams);\n if(ModuleTempObj!=null && ModuleTempObj.getEntityList().size() > 0){\n ModuleTemplate moduleTemp = (ModuleTemplate) ModuleTempObj.getEntityList().get(0);\n obj.put(\"companyunitid\", moduleTemp.getCompanyUnitid());\n\n HashMap tmpHashMap = new HashMap();\n tmpHashMap.put(\"companyunitid\", moduleTemp.getCompanyUnitid());\n tmpHashMap.put(Constants.companyKey, companyid);\n /* Get Company Unit details from companyunitid mapped with module template */\n KwlReturnObject exciseTemp = accountingHandlerDAOobj.getExciseTemplatesMap(tmpHashMap);\n if (exciseTemp != null && exciseTemp.getEntityList()!=null && exciseTemp.getEntityList().size() > 0) {\n ExciseDetailsTemplateMap ExcisemoduleTemp = (ExciseDetailsTemplateMap) exciseTemp.getEntityList().get(0);\n if (ExcisemoduleTemp != null) {\n obj.put(\"registrationType\", ExcisemoduleTemp.getRegistrationType());\n obj.put(\"UnitName\", ExcisemoduleTemp.getUnitname());\n obj.put(\"ECCNo\", ExcisemoduleTemp.getECCNo());\n }\n }\n }\n }\n if (extraCompanyPreferences.isExciseApplicable()) {\n KwlReturnObject grDetailsRes = accountingHandlerDAOobj.getObject(GoodsReceipt.class.getName(), gReceipt.getID());\n GoodsReceipt goodsReceiptDetail = (GoodsReceipt) grDetailsRes.getEntityList().get(0);\n if (goodsReceiptDetail.isIsExciseInvoice()) {\n Set<GoodsReceiptDetail> rows = goodsReceiptDetail.getRows();\n for (GoodsReceiptDetail goodsReceiptDetailsRow : rows) {\n KwlReturnObject result = accGoodsReceiptobj.getSupplierExciseDetailsMapping(goodsReceiptDetailsRow.getID(), companyid); //while deleting GR check wether it is used in Consignment Cost\n list = result.getEntityList();\n if (list != null && !list.isEmpty()) {\n obj.put(\"isSupplierLinekd\", true);\n break;\n }\n }\n }\n }\n /**\n * Put GST document history.\n */\n if (gReceipt.getCompany().getCountry().getID().equalsIgnoreCase(\"\" + Constants.indian_country_id)) {\n obj.put(\"refdocid\", gReceipt.getID());\n fieldDataManagercntrl.getGSTDocumentHistory(obj);\n }\n /**\n * Put Merchant Exporter Check\n */\n obj.put(Constants.isMerchantExporter, gReceipt.isIsMerchantExporter());\n\n \n \n }\n if (company.getCountry() != null && Integer.parseInt(company.getCountry().getID()) == Constants.indian_country_id && extraCompanyPreferences.isTDSapplicable()) {\n //For Indian Country related fields\n obj.put(\"TotalAdvanceTDSAdjustmentAmt\", gReceipt.getTotalAdvanceTDSAdjustmentAmt());\n obj.put(\"natureOfPayment\", gReceipt.getVendor() != null ? gReceipt.getVendor().getNatureOfPayment() : \"\");\n obj.put(\"deducteetype\", gReceipt.getVendor() != null ? gReceipt.getVendor().getDeducteeType() : \"\");\n obj.put(\"residentialstatus\", gReceipt.getVendor() != null ? gReceipt.getVendor().getResidentialstatus() : \"\");\n String tdsPayableAccount = \"\";\n MasterItem masterItem2 = null;\n if (!StringUtil.isNullOrEmpty(vendor.getNatureOfPayment())) {\n KwlReturnObject catresult = accountingHandlerDAOobj.getObject(MasterItem.class.getName(), vendor.getNatureOfPayment());\n masterItem2 = (MasterItem) catresult.getEntityList().get(0);\n obj.put(\"natureOfPaymentname\", masterItem2.getCode() + \" - \" + masterItem2.getValue());//INDIAN Company for TDS Calculation\n tdsPayableAccount = masterItem2.getAccID();\n } else {\n obj.put(\"natureOfPaymentname\", \"\");\n }\n if (!StringUtil.isNullOrEmpty(vendor.getDeducteeType())) {\n KwlReturnObject catresult = accountingHandlerDAOobj.getObject(MasterItem.class.getName(), vendor.getDeducteeType());\n masterItem2 = (MasterItem) catresult.getEntityList().get(0);\n obj.put(\"deducteetypename\", (masterItem2!=null)?masterItem2.getValue():\"\");//INDIAN Company for TDS Calculation in Make Payment\n } else {\n obj.put(\"deducteetypename\", \"\");\n }\n obj.put(\"tdsPayableAccount\", tdsPayableAccount);\n }\n\n \n HashMap<String, Object> ModuleTempParams = new HashMap<>();\n ModuleTempParams.put(\"modulerecordid\", invid);\n ModuleTempParams.put(\"companyid\", companyid);\n /**\n * Get Module template from invoice id . In module\n * template invoice id add as modulerecordid\n */\n KwlReturnObject ModuleTempObj = accountingHandlerDAOobj.getModuleTemplates(ModuleTempParams);\n if (ModuleTempObj != null && ModuleTempObj.getEntityList().size() > 0) {\n ModuleTemplate moduleTemp = (ModuleTemplate) ModuleTempObj.getEntityList().get(0);\n obj.put(\"companyunitid\", moduleTemp.getCompanyUnitid());\n obj.put(\"populateproducttemplate\", moduleTemp.isPopulateproductintemp());\n obj.put(\"populatecustomertemplate\", moduleTemp.isPopulatecustomerintemp());\n obj.put(\"populateautodointemp\", moduleTemp.isPopulateautodointemp());\n }\n// MasterItem gstRegistrationType = vendor != null ? vendor.getGSTRegistrationType() : null;\n// if (gstRegistrationType != null && gstRegistrationType.getDefaultMasterItem() != null) {\n// obj.put(\"GSTINRegTypeDefaultMstrID\", gstRegistrationType.getDefaultMasterItem().getID());\n// }\n obj.put(\"tdsrate\", gReceipt.getTdsRate());\n obj.put(\"tdsamount\", gReceipt.getTdsAmount());\n obj.put(\"tdsmasterrateruleid\", gReceipt.getTdsMasterRateRuleId());\n obj.put(\"isInterstateParty\", (gReceipt.getVendor() !=null ? gReceipt.getVendor().isInterstateparty() : false));\n obj.put(\"isOpeningBalanceTransaction\", gReceipt.isIsOpeningBalenceInvoice());\n obj.put(\"isExciseInvoice\", gReceipt.isIsExciseInvoice());\n obj.put(\"defaultnatureofpurchase\", gReceipt.getDefaultnatureOfPurchase());\n obj.put(\"manufacturertype\", gReceipt.getManufacturerType());\n obj.put(\"isNormalTransaction\", gReceipt.isNormalInvoice());\n obj.put(\"parentinvoiceid\", gReceipt.getParentInvoice()!=null?gReceipt.getParentInvoice().getID():\"\");\n obj.put(\"companyid\", gReceipt.getCompany().getCompanyID());\n obj.put(\"companyname\", gReceipt.getCompany().getCompanyName());\n obj.put(\"withoutinventory\", withoutinventory);\n obj.put(Constants.HAS_ACCESS, vendor.isActivate());\n obj.put(GoodsReceiptCMNConstants.PERSONID,vendor == null ? account.getID() : vendor.getID());\n obj.put(GoodsReceiptCMNConstants.ALIASNAME, vendor == null ? \"\" : vendor.getAliasname());\n obj.put(GoodsReceiptCMNConstants.PERSONEMAIL, vendor == null ? \"\" : vendor.getEmail());\n obj.put(\"code\", vendor == null ? \"\" : vendor.getAcccode());\n obj.put(GoodsReceiptCMNConstants.BILLNO, gReceipt.getGoodsReceiptNumber());\n obj.put(GoodsReceiptCMNConstants.CURRENCYID, currencyid);\n obj.put(GoodsReceiptCMNConstants.CURRENCYSYMBOL, (gReceipt.getCurrency() == null ? currency.getSymbol() : gReceipt.getCurrency().getSymbol()));\n obj.put(\"currencyCode\", (gReceipt.getCurrency() == null ? currency.getCurrencyCode() : gReceipt.getCurrency().getCurrencyCode()));\n obj.put(\"currencycode\", (gReceipt.getCurrency() == null ? currency.getCurrencyCode() : gReceipt.getCurrency().getCurrencyCode()));\n obj.put(GoodsReceiptCMNConstants.CURRENCYNAME, (gReceipt.getCurrency() == null ? currency.getName() : gReceipt.getCurrency().getName()));\n obj.put(GoodsReceiptCMNConstants.COMPANYADDRESS, gReceipt.getCompany().getAddress());\n obj.put(GoodsReceiptCMNConstants.COMPANYNAME, gReceipt.getCompany().getCompanyName());\n// KwlReturnObject bAmt = accCurrencyDAOobj.getBaseToCurrencyAmount(request, 1.0, currencyid, creationDate, 0);\n KwlReturnObject bAmt = accCurrencyDAOobj.getBaseToCurrencyAmount(request, 1.0, currencyid, gReceipt.getCreationDate(), 0);\n obj.put(GoodsReceiptCMNConstants.OLDCURRENCYRATE, bAmt.getEntityList().get(0));\n obj.put(GoodsReceiptCMNConstants.BILLTO, gReceipt.getBillFrom());\n obj.put(GoodsReceiptCMNConstants.ISEXPENSEINV, gReceipt.isIsExpenseType());\n obj.put(GoodsReceiptCMNConstants.SHIPTO, gReceipt.getShipFrom());\n obj.put(GoodsReceiptCMNConstants.JOURNALENTRYID, je != null ? je.getID() : \"\");\n obj.put(GoodsReceiptCMNConstants.EXTERNALCURRENCYRATE, externalCurrencyRate);\n obj.put(GoodsReceiptCMNConstants.ENTRYNO, je != null ? je.getEntryNumber() : \"\");\n obj.put(GoodsReceiptCMNConstants.DATE, df.format(creationDate));\n obj.put(GoodsReceiptCMNConstants.SHIPDATE, gReceipt.getShipDate() == null ? \"\" : df.format(gReceipt.getShipDate()));\n obj.put(GoodsReceiptCMNConstants.DUEDATE, df.format(gReceipt.getDueDate()));\n obj.put(GoodsReceiptCMNConstants.PERSONNAME, vendor == null ? account.getName() : vendor.getName());\n obj.put(\"personcode\", vendor == null ? (account.getAcccode()==null?\"\":account.getAcccode()) : (vendor.getAcccode()==null?\"\":vendor.getAcccode()));\n obj.put(GoodsReceiptCMNConstants.PERSONINFO, vendor == null ? (account.getAcccode()==null?\"\":account.getAcccode()) : (vendor.getName()+\"(\"+vendor.getAcccode()+\")\"));\n obj.put(\"agent\", gReceipt.getMasterAgent() == null ? \"\" : gReceipt.getMasterAgent().getID());\n obj.put(\"agentname\", gReceipt.getMasterAgent() == null ? \"\" : gReceipt.getMasterAgent().getValue());\n obj.put(GoodsReceiptCMNConstants.MEMO, gReceipt.getMemo());\n obj.put(\"posttext\", gReceipt.getPostText());\n obj.put(\"shiplengthval\", gReceipt.getShiplength());\n obj.put(\"invoicetype\", gReceipt.getInvoicetype());\n obj.put(\"purchaseinvoicetype\",gReceipt.isIsExpenseType() ? \"Expense\" : \"Product\");\n obj.put(GoodsReceiptCMNConstants.TERMNAME, vendor == null ? \"\" : ((vendor.getDebitTerm() == null) ? \"\" : vendor.getDebitTerm().getTermname()));\n obj.put(GoodsReceiptCMNConstants.DELETED, gReceipt.isDeleted());\n obj.put(GoodsReceiptCMNConstants.TAXINCLUDED, gReceipt.getTax() == null ? false : true);\n obj.put(GoodsReceiptCMNConstants.TAXID, gReceipt.getTax() == null ? \"\" : gReceipt.getTax().getID());\n// obj.put(GoodsReceiptCMNConstants.TAXNAME, gReceipt.getTax() == null ? \"\" : gReceipt.getTax().getName());\n obj.put(GoodsReceiptCMNConstants.ExchangeRate, \"1 \"+currency.getCurrencyCode()+\" = \"+externalCurrencyRate+\" \"+(gReceipt.getCurrency() == null ? \"\" : gReceipt.getCurrency().getCurrencyCode()));\n obj.put(\"status\", gReceipt.isIsOpenInGR()?\"Open\":\"Closed\");\n obj.put(\"amountDueStatus\", gReceipt.isIsOpenPayment()? \"Open\" : \"Closed\");\n obj.put(\"isTDSApplicable\", gReceipt.isIsTDSApplicable());// TDS Applicable Flag where at time of creating invoice TDS Applicable or not\n obj.put(Constants.SUPPLIERINVOICENO, gReceipt.getSupplierInvoiceNo()!=null? gReceipt.getSupplierInvoiceNo():\"\");\n obj.put(Constants.importExportDeclarationNo, gReceipt.getImportDeclarationNo()!=null? gReceipt.getImportDeclarationNo():\"\");\n obj.put(Constants.IsRoundingAdjustmentApplied, gReceipt.isIsRoundingAdjustmentApplied());\n obj.put(Constants.isCreditable, isExport ? (gReceipt.isIsCreditable() ? \"Yes\" : \"No\") : gReceipt.isIsCreditable());\n\n if (!StringUtil.isNullObject(gReceipt.getBillingShippingAddresses())) {\n obj.put(\"billingAddContactPerson\", gReceipt.getBillingShippingAddresses().getBillingContactPerson() != null ? gReceipt.getBillingShippingAddresses().getBillingContactPerson() : \"\");\n obj.put(\"shippingAddContactPerson\", gReceipt.getBillingShippingAddresses().getShippingContactPerson() != null ? gReceipt.getBillingShippingAddresses().getShippingContactPerson() : \"\");\n obj.put(\"billingAddContactNo\", gReceipt.getBillingShippingAddresses().getBillingContactPersonNumber() != null ? gReceipt.getBillingShippingAddresses().getBillingContactPersonNumber() : \"\");\n obj.put(\"shippingAddContactNo\", gReceipt.getBillingShippingAddresses().getShippingContactPersonNumber() != null ? gReceipt.getBillingShippingAddresses().getShippingContactPersonNumber() : \"\");\n obj.put(\"BillingAddEmail\", gReceipt.getBillingShippingAddresses().getBillingEmail() != null ? gReceipt.getBillingShippingAddresses().getBillingEmail() : \"\");\n obj.put(\"shippingAddEmail\", gReceipt.getBillingShippingAddresses().getShippingEmail() != null ? gReceipt.getBillingShippingAddresses().getShippingEmail() : \"\");\n } else {\n obj.put(\"billingAddContactPerson\", \"\");\n obj.put(\"shippingAddContactPerson\", \"\");\n obj.put(\"billingAddContactNo\", \"\");\n obj.put(\"shippingAddContactNo\", \"\");\n obj.put(\"BillingAddEmail\", \"\");\n obj.put(\"shippingAddEmail\", \"\");\n }\n\n Set<LccManualWiseProductAmount> manualProductDetailsSet = gReceipt.getLccmanualwiseproductamount() != null ? (Set<LccManualWiseProductAmount>) gReceipt.getLccmanualwiseproductamount() : null;\n if (manualProductDetailsSet != null && !manualProductDetailsSet.isEmpty()) {\n JSONArray manuProductDetailsJArr = new JSONArray();\n for (LccManualWiseProductAmount lccManualWiseProductAmountObj : manualProductDetailsSet) {\n JSONObject manuProductDetailsJOBJ = new JSONObject();\n manuProductDetailsJOBJ.put(\"id\", lccManualWiseProductAmountObj.getID());\n manuProductDetailsJOBJ.put(\"billid\", lccManualWiseProductAmountObj.getGrdetailid().getGoodsReceipt().getID());\n manuProductDetailsJOBJ.put(\"rowid\", lccManualWiseProductAmountObj.getGrdetailid().getID());\n manuProductDetailsJOBJ.put(\"originalTransactionRowid\", lccManualWiseProductAmountObj.getGrdetailid().getID());\n manuProductDetailsJOBJ.put(\"productid\", lccManualWiseProductAmountObj.getGrdetailid().getInventory().getProduct().getID());\n manuProductDetailsJOBJ.put(\"billno\", lccManualWiseProductAmountObj.getGrdetailid().getGoodsReceipt().getGoodsReceiptNumber());\n manuProductDetailsJOBJ.put(\"productname\", lccManualWiseProductAmountObj.getGrdetailid().getInventory().getProduct().getName());\n manuProductDetailsJOBJ.put(\"enterpercentage\", lccManualWiseProductAmountObj.getPercentage());\n manuProductDetailsJOBJ.put(\"enteramount\", lccManualWiseProductAmountObj.getAmount());\n if (lccManualWiseProductAmountObj.getAssetDetails() != null) {\n manuProductDetailsJOBJ.put(\"productname\", lccManualWiseProductAmountObj.getAssetDetails().getAssetId());\n }\n manuProductDetailsJOBJ.put(\"assetId\", lccManualWiseProductAmountObj.getAssetDetails() != null ? lccManualWiseProductAmountObj.getAssetDetails().getAssetId() : \"\");\n if (lccManualWiseProductAmountObj.isCustomDutyAllocationType()) {\n manuProductDetailsJOBJ.put(\"igstamount\", lccManualWiseProductAmountObj.getIgstamount());\n manuProductDetailsJOBJ.put(\"igstrate\", lccManualWiseProductAmountObj.getIgstrate());\n manuProductDetailsJOBJ.put(\"taxablevalueforigst\", lccManualWiseProductAmountObj.getTaxablevalueforigst());\n manuProductDetailsJOBJ.put(\"customdutyandothercharges\", lccManualWiseProductAmountObj.getCustomdutyandothercharges());\n manuProductDetailsJOBJ.put(\"customdutyandothercharges\", lccManualWiseProductAmountObj.getCustomdutyandothercharges());\n manuProductDetailsJOBJ.put(\"taxablevalueforcustomduty\", lccManualWiseProductAmountObj.getTaxablevalueforcustomduty());\n int hsncolnum = 0, producttaxcolnum = 0;\n HashMap fieldparams = new HashMap<>();\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyid, lccManualWiseProductAmountObj.getGrdetailid().getGoodsReceipt().isFixedAssetInvoice() ? Constants.Acc_FixedAssets_AssetsGroups_ModuleId : Constants.Acc_Product_Master_ModuleId, \"Custom_\" + Constants.HSN_SACCODE));\n\n KwlReturnObject kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n List<FieldParams> fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n hsncolnum = fieldParams.getColnum();\n }\n fieldparams = new HashMap<>();\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyid, lccManualWiseProductAmountObj.getGrdetailid().getGoodsReceipt().isFixedAssetInvoice() ? Constants.Acc_FixedAssets_AssetsGroups_ModuleId : Constants.Acc_Product_Master_ModuleId, \"Custom_\" + Constants.GSTProdCategory));\n\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n producttaxcolnum = fieldParams.getColnum();\n }\n manuProductDetailsJOBJ.put(\"producttaxcolnum\", producttaxcolnum);\n manuProductDetailsJOBJ.put(\"hsncolnum\", hsncolnum);\n List temp = fieldManagerDAOobj.getFieldComboValue(hsncolnum, lccManualWiseProductAmountObj.getGrdetailid().getInventory().getProduct().getID());\n if (list != null && !temp.isEmpty()) {\n Object[] tempArr = (Object[]) temp.get(0);\n String hsncode = (String) tempArr[0];\n manuProductDetailsJOBJ.put(\"hsncode\", hsncode);\n }\n temp = fieldManagerDAOobj.getFieldComboValue(producttaxcolnum, lccManualWiseProductAmountObj.getGrdetailid().getInventory().getProduct().getID());\n if (temp != null && !temp.isEmpty()) {\n Object[] tempArr = (Object[]) temp.get(0);\n String producttaxclassvalue = (String) tempArr[0];\n manuProductDetailsJOBJ.put(\"producttaxclass\", producttaxclassvalue);\n }\n }\n manuProductDetailsJArr.put(manuProductDetailsJOBJ);\n }\n //manuProductDetailsJOBJTemp.put(\"data\", manuProductDetailsJArr);\n obj.put(\"manualLandedCostCategory\", manuProductDetailsJArr.toString());\n }\n double taxAmt = 0d;\n if(isopeningBalanceInvoice){\n taxAmt = gReceipt.getTaxamount();\n } else {\n if (gReceipt.getTaxEntry() != null) {// if Invoice Level Tax is available\n taxAmt = gReceipt.getTaxEntry() == null ? 0 : gReceipt.getTaxEntry().getAmount();\n // obj.put(GoodsReceiptCMNConstants.TAXAMOUNT, gReceipt.getTaxEntry() == null ? 0 : gReceipt.getTaxEntry().getAmount());\n }\n }\n /**\n * Finding Term Mapped to Invoice and Discount Mapped to\n * Term and passing discount value, Type, applicable\n * days, Purchase invoice date and amount due of invoice\n * because these are used on JS side for calculation of\n * discount while making bulk payment of selected invoice.\n * ERM-981.\n */\n JSONObject columnPrefJObj = null;\n if (!StringUtil.isNullOrEmpty(extraCompanyPreferences.getColumnPref())) {\n columnPrefJObj = new JSONObject((String) extraCompanyPreferences.getColumnPref());\n if (columnPrefJObj.has(Constants.DISCOUNT_ON_PAYMENT_TERMS) && columnPrefJObj.get(Constants.DISCOUNT_ON_PAYMENT_TERMS) != null && columnPrefJObj.optBoolean(Constants.DISCOUNT_ON_PAYMENT_TERMS, false)) {\n obj.put(\"grcreationdate\", je != null ? je.getEntryDate() : creationDate);\n }\n }\n obj.put(\"amountDueOriginal\", (amountDueOriginal <= 0) ? 0 : authHandler.round(amountDueOriginal, companyid));\n// obj.put(\"amountbeforegst\", gReceipt.getTaxEntry() == null ? invoiceOriginalAmt : (invoiceOriginalAmt - gReceipt.getTaxEntry().getAmount()));\n obj.put(GoodsReceiptCMNConstants.DISCOUNT, gReceipt.getDiscountAmount()); //Discount according to created transaction.\n obj.put(\"discountinbase\", gReceipt.getDiscountAmountInBase()); //Discount according to created transaction.\n obj.put(GoodsReceiptCMNConstants.ISPERCENTDISCOUNT, gReceipt.getDiscount() == null ? false : gReceipt.getDiscount().isInPercent());\n obj.put(GoodsReceiptCMNConstants.DISCOUNTVAL, gReceipt.getDiscount() == null ? 0 : gReceipt.getDiscount().getDiscount());\n obj.put(CCConstants.JSON_costcenterid, je != null ? (je.getCostcenter() == null ? \"\" : je.getCostcenter().getID()) : \"\");\n obj.put(CCConstants.JSON_costcenterName, je != null ? (je.getCostcenter() == null ? \"\" : je.getCostcenter().getName()) : \"\");\n obj.put(\"isfavourite\", gReceipt.isFavourite());\n obj.put(\"isprinted\", gReceipt.isPrinted());\n obj.put(\"isEmailSent\", gReceipt.isIsEmailSent());\n obj.put(\"cashtransaction\", gReceipt.isCashtransaction());\n obj.put(\"archieve\", 0);\n obj.put(\"shipvia\", gReceipt.getShipvia() == null ? \"\" : gReceipt.getShipvia());\n obj.put(\"fob\", gReceipt.getFob() == null ? \"\" : gReceipt.getFob());\n obj.put(\"termdetails\", getPurchaseInvoiceTermDetails(gReceipt.getID(), accGoodsReceiptobj));\n boolean isApplyTaxToTerms=gReceipt.isApplyTaxToTerms();\n obj.put(\"isapplytaxtoterms\", isApplyTaxToTerms);\n if (gReceipt.getTermsincludegst() != null) {\n obj.put(Constants.termsincludegst, gReceipt.getTermsincludegst());\n }\n KwlReturnObject result = accLinkDataDao.checkEntryForTransactionInLinkingTableForForwardReference(\"GoodsReceipt\", gReceipt.getID());\n list = result.getEntityList();\n KwlReturnObject linkedDebitNoteResult = accGoodsReceiptobj.getCreditNoteLinkedWithInvoice(gReceipt.getID(), companyid);\n List listDn = linkedDebitNoteResult.getEntityList();\n\n KwlReturnObject linkedDNForOverchargeResult = accGoodsReceiptobj.getDebitNoteForOverchargedLinkedWithInvoice(gReceipt.getID(), companyid);\n List dnOverchargelist = linkedDNForOverchargeResult.getEntityList();\n\n /*\n * TDS Payment is Done - Set true IsLinkedTransaction \n */\n List listtdspayment = null;\n if (Constants.indian_country_id == countryid) {\n KwlReturnObject linkedTDSPaymentObj = accGoodsReceiptobj.getGoodsReceiptTDSPayment(gReceipt.getID(), companyid);\n listtdspayment = linkedTDSPaymentObj.getEntityList();\n }\n if ((list != null && !list.isEmpty())||(!StringUtil.isNullOrEmpty(landedInvoice))||(!gReceipt.isCashtransaction() && (authHandler.round((Double)invoiceOriginalAmt,companyid)!=authHandler.round(amountdue, companyid))) || (listDn!=null && !listDn.isEmpty()) || (listtdspayment!=null && !listtdspayment.isEmpty()) || (dnOverchargelist != null && !dnOverchargelist.isEmpty())){\n obj.put(Constants.IS_LINKED_TRANSACTION, true);\n } else {\n obj.put(Constants.IS_LINKED_TRANSACTION, false);\n }\n /*\n * Check if invoice is claimed as bad debt\n */\n if(gReceipt.getClaimAmountDue()!= 0){\n obj.put(\"isClaimedTransaction\", true);\n }\n// double termAmount = CommonFunctions.getTotalTermsAmount(getTermDetails(gReceipt.getID(), accGoodsReceiptobj));\n// obj.put(\"termamount\", termAmount);\n obj.put(\"termdays\", gReceipt.getTermid() == null ? 0 : gReceipt.getTermid().getTermdays());\n obj.put(\"termid\", gReceipt.getTermid() == null ? \"\" : gReceipt.getTermid().getID());\n //ERP-20637\n if (gReceipt.getLandedInvoice() != null) {\n Set<GoodsReceipt> landInvoiceSet = gReceipt.getLandedInvoice();\n String landedInvoiceId = \"\", landedInvoiceNumber = \"\";\n for (GoodsReceipt grObj : landInvoiceSet) {\n if (!(StringUtil.isNullOrEmpty(landedInvoiceId) && StringUtil.isNullOrEmpty(landedInvoiceId))) {\n landedInvoiceId += \",\";\n landedInvoiceNumber += \",\";\n }\n landedInvoiceId += grObj.getID();\n landedInvoiceNumber += grObj.getGoodsReceiptNumber();\n }\n obj.put(\"landedInvoiceID\", landedInvoiceId);\n obj.put(\"landedInvoiceNumber\", landedInvoiceNumber);\n }\n// obj.put(\"landedInvoiceID\", gReceipt.getLandedInvoice() == null ? \"\" : gReceipt.getLandedInvoice().getID());\n// obj.put(\"landedInvoiceNumber\", gReceipt.getLandedInvoice() == null ? \"\" : gReceipt.getLandedInvoice().getGoodsReceiptNumber());\n obj.put(\"billto\", gReceipt.getBillTo() == null ? \"\" : gReceipt.getBillTo());\n obj.put(\"shipto\", gReceipt.getShipTo() == null ? \"\" : gReceipt.getShipTo());\n obj.put(\"isCapitalGoodsAcquired\", gReceipt.isCapitalGoodsAcquired());\n obj.put(\"isRetailPurchase\", gReceipt.isRetailPurchase());\n obj.put(\"importService\", gReceipt.isImportService());\n obj.put(\"attachment\", attachemntcount);\n obj.put(Constants.isDraft, gReceipt.isIsDraft());\n obj.put(\"isConsignment\", gReceipt.isIsconsignment());\n obj.put(\"landingCostCategoryCombo\", gReceipt.getLandingCostCategory()!=null?gReceipt.getLandingCostCategory().getId():\"\");\n Set<GoodsReceiptDetail> goodsReceiptDetails = gReceipt.getRows();\n // Calculating total invoice amount in base currency\n KwlReturnObject invoiceTotalAmtInBaseResult=null;\n KwlReturnObject taxTotalAmtInBaseResult=null;\n if (isopeningBalanceInvoice && gReceipt.isConversionRateFromCurrencyToBase()) {// if invoice is opening balance invoice and Conversion rate is taken from user is Currency to base then following method will be called.\n// invoiceTotalAmtInBaseResult = accCurrencyDAOobj.getCurrencyToBaseAmountAccordingToCurrencyToBaseExchangeRate(request, invoiceOriginalAmt, currencyid, creationDate, externalCurrencyRate);\n invoiceTotalAmtInBaseResult = accCurrencyDAOobj.getCurrencyToBaseAmountAccordingToCurrencyToBaseExchangeRate(request, invoiceOriginalAmt, currencyid, gReceipt.getCreationDate(), externalCurrencyRate);\n } else {\n// invoiceTotalAmtInBaseResult = accCurrencyDAOobj.getCurrencyToBaseAmount(request, invoiceOriginalAmt, currencyid, creationDate, externalCurrencyRate);\n invoiceTotalAmtInBaseResult = accCurrencyDAOobj.getCurrencyToBaseAmount(request, invoiceOriginalAmt, currencyid, gReceipt.getCreationDate(), externalCurrencyRate);\n }\n double invoiceTotalAmountInBase=authHandler.round((Double) invoiceTotalAmtInBaseResult.getEntityList().get(0),companyid);\n if (isBadDebtInvoices) {// in case of Malasian Company\n int baddebttype = (Integer) request.get(\"baddebttype\");\n double totalTaxAmt = 0d;\n double totalTaxAmtInBase = 0d;\n String taxId = \"\";\n if (isopeningBalanceInvoice) {\n totalTaxAmt = gReceipt.getTaxamount();\n } else {\n double invoiceLevelTaxAmt = gReceipt.getTaxEntry() == null ? 0 : gReceipt.getTaxEntry().getAmount();\n taxId = gReceipt.getTaxEntry() == null ? \"\" : gReceipt.getTax().getID();\n double rowTaxAmt = 0d;\n for (GoodsReceiptDetail invoiceDetail : goodsReceiptDetails) {\n rowTaxAmt += invoiceDetail.getRowTaxAmount();\n rowTaxAmt += invoiceDetail.getRowTermTaxAmount();\n taxId = (invoiceDetail.getTax() != null) ? invoiceDetail.getTax().getID() : taxId;\n }\n totalTaxAmt = invoiceLevelTaxAmt + rowTaxAmt;\n }\n\n if (totalTaxAmt == 0) {// no need to put invoice in bad debt section if it has tax 0\n continue;\n }\n\n if (isopeningBalanceInvoice) {\n totalTaxAmtInBase = gReceipt.getTaxamountinbase();\n } else {\n taxTotalAmtInBaseResult = accCurrencyDAOobj.getCurrencyToBaseAmount(request, totalTaxAmt, currencyid, gReceipt.getCreationDate(), externalCurrencyRate);\n totalTaxAmtInBase = authHandler.round((Double) taxTotalAmtInBaseResult.getEntityList().get(0), companyid);\n }\n\n// if (baddebttype == 1) {\n // get Paid amount of invoice\n Date badDebtCalculationToDate = null;\n if (request.get(\"badDebtCalculationToDate\") != null) {\n badDebtCalculationToDate = df.parse((String) request.get(\"badDebtCalculationToDate\"));\n }\n KwlReturnObject invoicePaidAmtObj = accPaymentDAOobj.getPaymentFromBadDebtClaimedInvoice(gReceipt.getID(), true, badDebtCalculationToDate);//accPaymentDAOobj.getPaymentAmountofBadDebtGoodsReceipt(gReceipt.getID(),true);\n// double paidAmt = (Double) invoicePaidAmtObj.getEntityList().get(0);\n\n double paidAmt = 0;\n\n List paidList = invoicePaidAmtObj.getEntityList();\n if (paidList != null && !paidList.isEmpty()) {\n Iterator pmtIt = paidList.iterator();\n while (pmtIt.hasNext()) {\n PaymentDetail rd = (PaymentDetail) pmtIt.next();\n\n double paidAmtInPaymentCurrency = rd.getAmount();\n\n// KwlReturnObject bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, paidAmtInPaymentCurrency, rd.getPayment().getCurrency().getCurrencyID(), rd.getPayment().getJournalEntry().getEntryDate(), rd.getPayment().getJournalEntry().getExternalCurrencyRate());\n KwlReturnObject bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, paidAmtInPaymentCurrency, rd.getPayment().getCurrency().getCurrencyID(), rd.getPayment().getCreationDate(), rd.getPayment().getJournalEntry().getExternalCurrencyRate());\n double paidAmtInBase = authHandler.round((Double) bAmt1.getEntityList().get(0), companyid);\n\n paidAmt += paidAmtInBase;\n\n }\n }\n\n // paidAmt should be converted into base currency\n// KwlReturnObject taxObj = accTaxObj.getTaxPercent(companyid, isopeningBalanceInvoice ? gReceipt.getCreationDate() : gReceipt.getJournalEntry().getEntryDate(), taxId);\n KwlReturnObject taxObj = accTaxObj.getTaxPercent(companyid, isopeningBalanceInvoice ? gReceipt.getCreationDate() : gReceipt.getCreationDate(), taxId);\n\n double taxPer = (Double) taxObj.getEntityList().get(0);\n\n// double gstToRecover = paidAmt*taxPer/(100+taxPer);\n // Gst claimable amount\n double grAmountDue = isopeningBalanceInvoice ? gReceipt.getOpeningBalanceAmountDue() : gReceipt.getInvoiceamountdue();\n\n // Converting grAmountDue to base currency\n KwlReturnObject bAmt1 = null;\n String fromcurrencyid = gReceipt.getCurrency().getCurrencyID();\n if (isopeningBalanceInvoice) {\n grAmountDue = gReceipt.getOpeningBalanceBaseAmountDue();\n } else {\n// bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, grAmountDue, fromcurrencyid, gReceipt.getJournalEntry().getEntryDate(), gReceipt.getJournalEntry().getExternalCurrencyRate());\n bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, grAmountDue, fromcurrencyid, gReceipt.getCreationDate(), gReceipt.getJournalEntry().getExternalCurrencyRate());\n grAmountDue = authHandler.round((Double) bAmt1.getEntityList().get(0), companyid);\n }\n\n double gstclaimableamount = 0.0;\n// double gstclaimableamount = grAmountDue * taxPer / (100 + taxPer);\n gstclaimableamount = (totalTaxAmtInBase * grAmountDue) / invoiceTotalAmountInBase;\n gstclaimableamount = authHandler.round(gstclaimableamount, companyid);\n //Calculate Bad Debt Recoverable Amount\n // Get Recovered Amount of invoice\n\n HashMap<String, Object> badMaps = new HashMap<String, Object>();\n badMaps.put(\"companyid\", companyid);\n badMaps.put(\"invoiceid\", invid);\n\n KwlReturnObject badDebtMappingResult = accGoodsReceiptobj.getBadDebtPurchaseInvoiceMappingForGoodsReceipt(badMaps);\n\n Date badDebtClaimedDate = null;\n double totalRecoveredAmt = 0;\n List badDebtMapping = badDebtMappingResult.getEntityList();\n if (!badDebtMapping.isEmpty()) {\n Iterator badIt = badDebtMapping.iterator();\n while (badIt.hasNext()) {\n BadDebtPurchaseInvoiceMapping debtInvoiceMapping = (BadDebtPurchaseInvoiceMapping) badIt.next();\n totalRecoveredAmt += debtInvoiceMapping.getBadDebtAmtRecovered();\n if (debtInvoiceMapping.getBadDebtClaimedDate() != null) {\n badDebtClaimedDate = debtInvoiceMapping.getBadDebtClaimedDate();\n }\n }\n }\n\n // Calculate Recover Amount in base\n if (isopeningBalanceInvoice) {\n if (gReceipt.isConversionRateFromCurrencyToBase()) {\n totalRecoveredAmt = totalRecoveredAmt / gReceipt.getExchangeRateForOpeningTransaction();\n } else {\n totalRecoveredAmt = totalRecoveredAmt * gReceipt.getExchangeRateForOpeningTransaction();\n }\n } else {\n// bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, totalRecoveredAmt, fromcurrencyid, gReceipt.getJournalEntry().getEntryDate(), gReceipt.getJournalEntry().getExternalCurrencyRate());\n bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, totalRecoveredAmt, fromcurrencyid, gReceipt.getCreationDate(), gReceipt.getJournalEntry().getExternalCurrencyRate());\n totalRecoveredAmt = authHandler.round((Double) bAmt1.getEntityList().get(0), companyid);\n }\n\n if (baddebttype == 1) {\n\n// System.out.println(gReceipt.getGoodsReceiptNumber());\n// HashMap<String, Object> hm = new HashMap<String, Object>();\n//\n// hm.put(\"companyid\", companyid);\n// hm.put(\"invoiceId\", gReceipt.getID());\n// // hm.put(\"invoiceId\", invoice.getI);\n//\n// double consumedAmt = accGoodsReceiptCommon.getAmountDueOfGRBeforeClaimedDate(hm);\n// double invoiceOrigAmt = d.getAmount();\n//\n// double remainedAmtBeforeClaim = invoiceOrigAmt - consumedAmt;\n//\n// double claimedGST = remainedAmtBeforeClaim * taxPer/(100+taxPer);\n double claimedGST = 0;\n\n if (!badDebtMapping.isEmpty()) {\n Iterator badIt = badDebtMapping.iterator();\n while (badIt.hasNext()) {\n BadDebtPurchaseInvoiceMapping debtInvoiceMapping = (BadDebtPurchaseInvoiceMapping) badIt.next();\n if (debtInvoiceMapping.getBadDebtType() == 0) {\n claimedGST += debtInvoiceMapping.getBadDebtGSTAmtClaimed();\n }\n }\n }\n\n // converting claimed GST in Base Currency\n// bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, claimedGST, fromcurrencyid, gReceipt.getJournalEntry().getEntryDate(), gReceipt.getJournalEntry().getExternalCurrencyRate());\n bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, claimedGST, fromcurrencyid, gReceipt.getCreationDate(), gReceipt.getJournalEntry().getExternalCurrencyRate());\n claimedGST = authHandler.round((Double) bAmt1.getEntityList().get(0), companyid);\n\n obj.put(\"gstclaimableamount\", claimedGST);\n } else {\n obj.put(\"gstclaimableamount\", gstclaimableamount);\n\n Date selectedCriteriaDate = df.parse((String) request.get(\"selectedCriteriaDate\"));\n int badDebtCriteria = (Integer) request.get(\"badDebtCriteria\");\n\n long diff = 0;\n if (badDebtCriteria == 0 && gReceipt.getDueDate() != null) {// on Invoice Due Date\n diff = selectedCriteriaDate.getTime() - gReceipt.getDueDate().getTime();\n } else if (badDebtCriteria == 1) {// on Invoice Creation Date\n diff = selectedCriteriaDate.getTime() - creationDate.getTime();\n }\n long diffInDays = diff / (24 * 60 * 60 * 1000);\n\n obj.put(\"agingDays\", diffInDays);\n\n }\n\n double gstToRecover = (paidAmt - totalRecoveredAmt) * taxPer / (100 + taxPer);\n double paidAfterClaimed = paidAmt - totalRecoveredAmt;\n\n// obj.put(\"gstclaimableamount\", gstclaimableamount);\n obj.put(\"paidAfterClaimed\", paidAfterClaimed);\n obj.put(\"gstToRecover\", gstToRecover);\n obj.put(\"claimedPeriod\", gReceipt.getClaimedPeriod());\n obj.put(\"badDebtClaimedDate\", (badDebtClaimedDate != null) ? df.format(badDebtClaimedDate) : null);\n\n if (authHandler.round(amountdue, companyid) == 0 && authHandler.round(paidAfterClaimed, companyid) == 0) {// don't put invoices which has amount due zero and whole gst has been recovered\n continue;\n }\n// }\n }\n obj=AccountingAddressManager.getTransactionAddressJSON(obj,gReceipt.getBillingShippingAddresses(),true);\n obj.put(\"sequenceformatid\", gReceipt.getSeqformat() == null ? \"\" : gReceipt.getSeqformat().getID());\n obj.put(\"gstIncluded\", gReceipt.isGstIncluded());\n obj.put(\"selfBilledInvoice\", gReceipt.isSelfBilledInvoice());\n obj.put(\"RMCDApprovalNo\", gReceipt.getRMCDApprovalNo());\n obj.put(\"fixedAssetInvoice\", gReceipt.isFixedAssetInvoice());\n obj.put(\"isConsignment\", gReceipt.isIsconsignment());\n if (gReceipt.isCashtransaction()) {\n obj.put(Constants.IS_PYMENT_STATUS_CLEARED, false);\n PayDetail payDetail = gReceipt.getPayDetail();\n if (payDetail != null) {\n PaymentMethod paymentMethod = payDetail.getPaymentMethod();\n obj.put(\"paymentname\", paymentMethod.getMethodName());\n obj.put(\"methodid\", paymentMethod.getID());\n obj.put(\"detailtype\", paymentMethod.getDetailType());\n if (paymentMethod.getDetailType() == PaymentMethod.TYPE_CARD) {\n Card card = payDetail.getCard();\n obj.put(\"cardno\", card != null ? card.getCardNo() : \"\");\n obj.put(\"nameoncard\", card != null ? card.getCardHolder() : \"\");\n obj.put(\"cardexpirydate\", card != null ? df.format(card.getExpiryDate()) : \"\");\n obj.put(\"cardtype\", card != null ? card.getCardType() : \"\");\n obj.put(\"cardrefno\", card != null ? card.getRefNo() : \"\");\n\n } else if (paymentMethod.getDetailType() == PaymentMethod.TYPE_BANK) {\n Cheque cheque = payDetail.getCheque();\n obj.put(\"chequeno\", cheque != null ? cheque.getChequeNo() : \"\");\n obj.put(\"chequedescription\", cheque != null ? cheque.getDescription() : \"\");\n obj.put(\"bankname\", cheque != null ? cheque.getBankName() : \"\");\n obj.put(\"chequedate\", cheque != null ? df.format(cheque.getDueDate()) : \"\");\n obj.put(\"clearanceDate\", \"\");\n obj.put(\"paymentStatus\", \"Uncleared\");\n if (gReceipt.getPayDetail() != null) {\n KwlReturnObject clearanceDate = accBankReconciliationObj.getBRfromJE(gReceipt.getJournalEntry().getID(), gReceipt.getCompany().getCompanyID(), false);\n if (clearanceDate != null && clearanceDate.getEntityList() != null && clearanceDate.getEntityList().size() > 0) {\n BankReconciliationDetail brd = (BankReconciliationDetail) clearanceDate.getEntityList().get(0);\n if (brd.getBankReconciliation().getClearanceDate() != null) {\n obj.put(\"clearanceDate\", df.format(brd.getBankReconciliation().getClearanceDate()));\n obj.put(\"paymentStatus\", \"Cleared\");\n obj.put(Constants.IS_PYMENT_STATUS_CLEARED, true);// To Disable Feilds in Edit Case for Cleard Cash Payment\n }\n }\n }\n }\n\n } else {\n obj.put(\"paymentname\", \"\");\n obj.put(\"methodid\", \"\");\n }\n } else {\n obj.put(\"paymentname\", \"NA\");\n }\n if (gReceipt.getModifiedby() != null) {\n obj.put(\"lasteditedby\", StringUtil.getFullName(gReceipt.getModifiedby()));\n }\n obj.put(\"createdby\", gReceipt.getCreatedby() == null ? \"\" : StringUtil.getFullName(gReceipt.getCreatedby()));\n if (report) {\n obj.put(\"isreval\", isReval);\n }\n// int pendingApprovalInt = gReceipt.getPendingapproval();\n// obj.put(\"approvalstatusint\", pendingApprovalInt);\n// if (pendingApprovalInt == Constants.LEVEL_ONE) {\n// obj.put(\"approvalstatus\", \"Pending level 1 approval\");\n// } else if (pendingApprovalInt == Constants.LEVEL_TWO) {\n// obj.put(\"approvalstatus\", \"Pending level 2 approval\");\n// } else {\n// obj.put(\"approvalstatus\", \"\");\n// }\n obj.put(\"approvalstatus\", gReceipt.getApprovestatuslevel());\n obj.put(\"isjobworkoutrec\", gReceipt.isIsJobWorkOutInv());\n String approvalStatus=\"\";\n ScriptEngineManager mgr = new ScriptEngineManager();\n ScriptEngine engine = mgr.getEngineByName(\"JavaScript\");\n String multipleRuleids=\"\";\n if(gReceipt.getApprovestatuslevel() < 0){\n approvalStatus=\"Rejected\";\n }else if(gReceipt.getApprovestatuslevel() < 11){\n String ruleid = \"\",userRoleName=\"\";\n HashMap<String, Object> qdDataMap = new HashMap<String, Object>();\n qdDataMap.put(\"companyid\", companyid);\n qdDataMap.put(\"level\",gReceipt.getApprovestatuslevel());\n qdDataMap.put(\"moduleid\", Constants.Acc_Vendor_Invoice_ModuleId);\n KwlReturnObject flowresult = accMultiLevelApprovalDAOObj.getMultiApprovalRuleData(qdDataMap);\n Iterator ruleitr = flowresult.getEntityList().iterator();\n while (ruleitr.hasNext()) {\n Object[] rulerow = (Object[]) ruleitr.next();\n ruleid = rulerow[0].toString();\n boolean sendForApproval = false;\n int appliedUpon = Integer.parseInt(rulerow[5].toString());\n String discountRule = \"\";\n String rule = \"\";\n if (rulerow[2] != null) {\n rule = rulerow[2].toString();\n }\n if (rulerow[7] != null) {\n discountRule = rulerow[7].toString();\n }\n if (appliedUpon == Constants.Total_Amount) {\n /*\n Added to get condition of approval rule i.e set when creating approval rule \n */\n rule = rule.replaceAll(\"[$$]+\", String.valueOf(gReceipt.getInvoiceAmountInBase()));\n } else if (appliedUpon == Constants.Specific_Products || appliedUpon == Constants.Specific_Products_Discount || appliedUpon == Constants.Specific_Products_Category) {\n /*\n Handled for Product,product discount And product category\n */\n HashMap<String, Object> GlobalParams = new HashMap<String, Object>();\n JSONArray productDiscountJArr = new JSONArray();\n Set<GoodsReceiptDetail> grDetails = gReceipt.getRows();\n for (GoodsReceiptDetail grDetail : grDetails) {\n if (grDetail.getInventory() != null) {\n String productId = grDetail.getInventory().getProduct().getID();\n Discount invDiscount = grDetail.getDiscount();\n double discAmountinBase = 0;\n if (invDiscount != null) {\n double discountVal = invDiscount.getDiscountValue();\n KwlReturnObject dAmount = accCurrencyDAOobj.getCurrencyToBaseAmount(request, discountVal, currencyid, gReceipt.getCreationDate(), gReceipt.getExternalCurrencyRate());\n discAmountinBase = (Double) dAmount.getEntityList().get(0);\n }\n discAmountinBase = authHandler.round(discAmountinBase, companyid);\n JSONObject productDiscountObj = new JSONObject();\n productDiscountObj.put(\"productId\", productId);\n productDiscountObj.put(\"discountAmount\", discAmountinBase);\n productDiscountJArr.put(productDiscountObj);\n }\n }\n if (appliedUpon == Constants.Specific_Products || appliedUpon == Constants.Specific_Products_Discount) {\n /*\n * Check If Rule is apply on specefic product\n * and Specific product discount from multiapproverule window\n */\n if (productDiscountJArr != null) {\n sendForApproval = AccountingManager.checkForProductAndProductDiscountRule(productDiscountJArr, appliedUpon, rule, discountRule);\n }\n } else if (appliedUpon == Constants.Specific_Products_Category) {\n /*\n * Check If Rule is apply on product\n * category from multiapproverule window\n */\n sendForApproval = accountingHandlerDAOobj.checkForProductCategoryForProduct(productDiscountJArr, appliedUpon, rule);\n }\n }\n /*\n Added to check if record falls in total amount approval rule \n */\n if (StringUtil.isNullOrEmpty(rule) || sendForApproval || (!StringUtil.isNullOrEmpty(rule) && appliedUpon == Constants.Total_Amount && Boolean.parseBoolean(engine.eval(rule).toString()))) {\n multipleRuleids += ruleid + \",\";\n }\n }\n /*\n Added to get multiple ruleid if record falls in multiple approval rule \n */\n String[] multipleRuleidsArray = multipleRuleids.split(\",\");\n for (int multiRule = 0; multiRule < multipleRuleidsArray.length; multiRule++) {\n ruleid = multipleRuleidsArray[multiRule];\n if (!StringUtil.isNullOrEmpty(ruleid)) {\n qdDataMap.put(\"ruleid\", ruleid);\n KwlReturnObject userResult = accMultiLevelApprovalDAOObj.getApprovalRuleTargetUsers(qdDataMap);\n Iterator useritr = userResult.getEntityList().iterator();\n while (useritr.hasNext()) {\n Object[] userrow = (Object[]) useritr.next();\n String userId = userrow[0].toString();\n\n String fname = userrow[1].toString();\n String lname = userrow[2].toString();\n String userName = fname+\" \"+lname;\n /*\n Addded so duplicate approve's can be eleminated \n */\n if(userRoleName.contains(userName)){\n continue;\n }\n KwlReturnObject kmsg = null;\n String roleName=\"Company User\";\n kmsg = permissionHandlerDAOObj.getRoleofUser(userId);\n Iterator ite2 = kmsg.getEntityList().iterator();\n while (ite2.hasNext()) {\n Object[] row = (Object[]) ite2.next();\n roleName = row[1].toString();\n }\n userRoleName += roleName+\" \"+userName + \",\";\n }\n }\n }\n if (!StringUtil.isNullOrEmpty(userRoleName)) {\n userRoleName = userRoleName.substring(0, userRoleName.length() - 1);\n }\n approvalStatus=\"Pending Approval\" + ( StringUtil.isNullOrEmpty(userRoleName) ? \"\" : \" by \"+userRoleName )+\" at Level - \"+gReceipt.getApprovestatuslevel();\n } else {\n approvalStatus=\"Approved\";\n }\n obj.put(\"approvalstatusinfo\",approvalStatus);\n\n if (request.containsKey(\"pendingapproval\") && request.get(\"pendingapproval\") != null && (Boolean) request.containsKey(\"pendingapproval\")) {\n int nextApprovalLevel = 11;\n HashMap<String, Object> qdDataMap = new HashMap<String, Object>();\n qdDataMap.put(\"companyid\", companyid);\n qdDataMap.put(\"level\", gReceipt.getApprovestatuslevel() + 1);\n qdDataMap.put(\"moduleid\", Constants.Acc_Vendor_Invoice_ModuleId);\n KwlReturnObject flowresult = accMultiLevelApprovalDAOObj.getMultiApprovalRuleData(qdDataMap);\n List<Object[]> approvalRuleItr = flowresult.getEntityList();\n if (approvalRuleItr != null && approvalRuleItr.size() > 0) {\n for (Object[] rowObj : approvalRuleItr) {\n String rule = \"\";\n if (rowObj[2] != null) {\n rule = rowObj[2].toString();\n }\n int appliedUpon = Integer.parseInt(rowObj[5].toString());\n rule = rule.replaceAll(\"[$$]+\", String.valueOf(gReceipt.getInvoiceAmountInBase()));\n if (StringUtil.isNullOrEmpty(rule) || (!StringUtil.isNullOrEmpty(rule) && ( appliedUpon != Constants.Specific_Products && appliedUpon != Constants.Specific_Products_Discount && appliedUpon != Constants.Specific_Products_Category) && Boolean.parseBoolean(engine.eval(rule).toString()))) {\n nextApprovalLevel = gReceipt.getApprovestatuslevel() + 1;\n }\n }\n }\n obj.put(\"isFinalLevelApproval\", nextApprovalLevel == Constants.APPROVED_STATUS_LEVEL ? true : false);\n }\n /*\n * For Product search, add Products details from Invoice\n * details\n */\n\n if (isProduct && gReceipt.isNormalInvoice()) {\n String idvString = isProduct ? oj[4].toString() : \"\"; //as in list invoiedetail id comes 4th\n KwlReturnObject objItrGRD = accountingHandlerDAOobj.getObject(GoodsReceiptDetail.class.getName(), idvString);\n GoodsReceiptDetail idvObj = (GoodsReceiptDetail) objItrGRD.getEntityList().get(0);\n if (idvObj != null) {\n obj.put(\"rowproductname\", idvObj.getInventory().getProduct().getName());\n obj.put(\"rowquantity\", idvObj.getInventory().isInvrecord() ? idvObj.getInventory().getQuantity() : idvObj.getInventory().getActquantity());\n obj.put(\"rowrate\", idvObj.getRate());\n\n Discount disc = idvObj.getDiscount();\n if (disc != null && disc.isInPercent()) {\n obj.put(\"rowprdiscount\", disc.getDiscount()); //product discount in percent\n } else {\n obj.put(\"rowprdiscount\", 0);\n }\n\n double rowTaxPercent = 0;\n if (idvObj.getTax() != null) {\n// KwlReturnObject perresult = accTaxObj.getTaxPercent(companyid, gReceipt.getJournalEntry().getEntryDate(), idvObj.getTax().getID());\n KwlReturnObject perresult = accTaxObj.getTaxPercent(companyid, gReceipt.getCreationDate(), idvObj.getTax().getID());\n rowTaxPercent = (Double) perresult.getEntityList().get(0);\n }\n obj.put(\"rowprtaxpercent\", rowTaxPercent);\n }\n }\n\n //For getting tax in percent applyied on invoice [PS]\n if (gReceipt.getTax() != null) {\n// KwlReturnObject taxresult = accTaxObj.getTaxPercent(companyid, je.getEntryDate(), gReceipt.getTax().getID());\n KwlReturnObject taxresult = accTaxObj.getTaxPercent(companyid, gReceipt.getCreationDate(), gReceipt.getTax().getID());\n taxPercent = (Double) taxresult.getEntityList().get(0);\n }\n obj.put(GoodsReceiptCMNConstants.TAXPERCENT, taxPercent);\n\n //For getting amountdue [PS]\n if (gReceipt.isCashtransaction()) {\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUEINBASE, 0);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE, 0);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUENONNEGATIVE, 0);\n obj.put(GoodsReceiptCMNConstants.INCASH, true);\n } else {\n if ((Constants.InvoiceAmountDueFlag && !isAged) || isopeningBalanceInvoice) {\n if (isopeningBalanceInvoice && gReceipt.isConversionRateFromCurrencyToBase()) {// if invoice is opening balance invoice and Conversion rate is taken from user is Currency to base then following method will be called.\n// bAmt = accCurrencyDAOobj.getCurrencyToBaseAmountAccordingToCurrencyToBaseExchangeRate(request, amountdue, currencyid, creationDate, externalCurrencyRate);\n bAmt = accCurrencyDAOobj.getCurrencyToBaseAmountAccordingToCurrencyToBaseExchangeRate(request, amountdue, currencyid, gReceipt.getCreationDate(), externalCurrencyRate);\n } else {\n// bAmt = accCurrencyDAOobj.getCurrencyToBaseAmount(request, amountdue, currencyid, creationDate, externalCurrencyRate);\n bAmt = accCurrencyDAOobj.getCurrencyToBaseAmount(request, amountdue, currencyid, gReceipt.getCreationDate(), externalCurrencyRate);\n }\n amountInBase = (Double) bAmt.getEntityList().get(0);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUEINBASE, authHandler.round((Double) bAmt.getEntityList().get(0), companyid));\n } else { // For aged we are fetching amount in base as well so no need for calculation\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUEINBASE, amountdueinbase);\n }\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE, authHandler.round(amountdue, companyid));\n /*\n * To calulate exchange rate\n */\n obj.put(\"exchangeratefortransaction\", (amountInBase <= 0 && amountdue <= 0) ? 0 : (amountInBase / amountdue));\n\n if (booleanAged) {//Added for aged payable/receivable\n int datefilter = (request.containsKey(\"datefilter\") && request.get(\"datefilter\") != null) ? Integer.parseInt(request.get(\"datefilter\").toString()) : 0;// 0 = Invoice Due date OR 1 = Invoice date\n Date dueDate = null;\n if (!StringUtil.isNullOrEmpty(df.format(gReceipt.getDueDate()))) {\n dueDate = df.parse(df.format(gReceipt.getDueDate()));\n }\n if (datefilter == 0 || datefilter == Constants.agedDueDate0to30Filter) {\n dueDate = df.parse(df.format(gReceipt.getDueDate()));\n } else {\n dueDate = df.parse(df.format(creationDate));\n }\n// if(startDate!=null && dueDate.before(startDate)){//In Aged Report amountdue goes in Accruade Balance for those transaction whose creation/due date is previous to Start date will goes into the accrued balance, likes opening balance \n// accruedbalance = authHandler.round(amountdue, companyid);\n// } else\n if (dueDate.after(oneDayBeforeCal1Date)) {\n if (dueDate.equals(cal1Date) && (datefilter == Constants.agedDueDate0to30Filter || datefilter == Constants.agedInvoiceDate0to30Filter)) {\n amountdue2 = authHandler.round(amountdue, companyid); // 0-30 Days\n } else {\n amountdue1 = authHandler.round(amountdue, companyid); // Current\n }\n } else if ((cal2Date.before(dueDate) || cal2Date.equals(dueDate)) && cal1Date.after(dueDate)) { // 1-30\n amountdue2 = authHandler.round(amountdue, companyid);\n } else if ((cal3Date.before(dueDate) || cal3Date.equals(dueDate)) && cal2Date.after(dueDate)) { // 31-60\n amountdue3 = authHandler.round(amountdue, companyid);\n } else if ((cal4Date.before(dueDate) || cal4Date.equals(dueDate)) && cal3Date.after(dueDate)) { // 61-90\n amountdue4 = authHandler.round(amountdue, companyid);\n } else if ((cal5Date.before(dueDate) || cal5Date.equals(dueDate)) && cal4Date.after(dueDate)) { // 91-120\n amountdue5 = authHandler.round(amountdue, companyid);\n } else if ((cal6Date.before(dueDate) || cal6Date.equals(dueDate)) && cal5Date.after(dueDate)) { // 121-150\n amountdue6 = authHandler.round(amountdue, companyid);\n } else if ((cal7Date.before(dueDate) || cal7Date.equals(dueDate)) && cal6Date.after(dueDate)) { // 151-180\n amountdue7 = authHandler.round(amountdue, companyid);\n } else if ((cal8Date.before(dueDate) || cal8Date.equals(dueDate)) && cal7Date.after(dueDate)) { // 181-210\n amountdue8 = authHandler.round(amountdue, companyid);\n } else if ((cal9Date.before(dueDate) || cal9Date.equals(dueDate)) && cal8Date.after(dueDate)) { // 211-240\n amountdue9 = authHandler.round(amountdue, companyid);\n } else if ((cal10Date.before(dueDate) || cal10Date.equals(dueDate)) && cal9Date.after(dueDate)) { // 241-270\n amountdue10 = authHandler.round(amountdue, companyid);\n } else { // > 270 \n amountdue11 = authHandler.round(amountdue, companyid);\n }\n \n switch(noOfInterval){\n case 2:\n amountdue3 += amountdue4 + amountdue5 + amountdue6 + amountdue7 + amountdue8 + amountdue9 + amountdue10 + amountdue11;\n amountdue4 = amountdue5 = amountdue6 = amountdue7 = amountdue8 = amountdue9 = amountdue10 = amountdue11 = 0;\n break;\n case 3:\n amountdue4 += amountdue5 + amountdue6 + amountdue7 + amountdue8 + amountdue9 + amountdue10 + amountdue11;\n amountdue5 = amountdue6 = amountdue7 = amountdue8 = amountdue9 = amountdue10 = amountdue11 = 0;\n break;\n case 4:\n amountdue5 += amountdue6 + amountdue7 + amountdue8 + amountdue9 + amountdue10 + amountdue11;\n amountdue6 = amountdue7 = amountdue8 = amountdue9 = amountdue10 = amountdue11 = 0;\n break;\n case 5:\n amountdue6 += amountdue7 + amountdue8 + amountdue9 + amountdue10 + amountdue11;\n amountdue7 = amountdue8 = amountdue9 = amountdue10 = amountdue11 = 0;\n break;\n case 6:\n amountdue7 += amountdue8 + amountdue9 + amountdue10 + amountdue11;\n amountdue8 = amountdue9 = amountdue10 = amountdue11 = 0;\n break;\n case 7:\n amountdue8 += amountdue9 + amountdue10 + amountdue11;\n amountdue9 = amountdue10 = amountdue11 = 0;\n break;\n case 8:\n amountdue9 += amountdue10 + amountdue11;\n amountdue10 = amountdue11 = 0;\n break;\n case 9:\n amountdue10 += amountdue11;\n amountdue11 = 0;\n break;\n }\n }\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUENONNEGATIVE, (amountdue <= 0) ? 0 : authHandler.round(amountdue, companyid));\n }\n boolean includeprotax = false;\n String taxname=\"\";\n double rowTaxAmt = 0d, rowOtherTermNonTaxableAmount = 0;\n boolean isLineLevelTermFlag = false;//To Check Whether LinelevelTerms are applicable or not.\n if(extraCompanyPreferences != null && extraCompanyPreferences.getLineLevelTermFlag()==1){\n isLineLevelTermFlag = true;//If LineLevelTerms are applicable, then update the flag.\n }\n double subtotal=0.0;\n double productTotalAmount=0.0;\n double discountAmount = 0.0;\n// double taxAmountOfTerms=0d;\n if (!gReceipt.isIsExpenseType() && gReceipt.isNormalInvoice()) {\n// Set<GoodsReceiptDetail> goodsReceiptDetails = gReceipt.getRows();\n for (GoodsReceiptDetail goodsReceiptDetail : goodsReceiptDetails) {\n double rowsubtotal = 0d;\n double invquantity = goodsReceiptDetail.getInventory().getQuantity();\n if (goodsReceiptDetail.getGoodsReceipt().isGstIncluded()) {\n rowsubtotal = goodsReceiptDetail.getRateincludegst() * invquantity;\n } else {\n rowsubtotal = goodsReceiptDetail.getRate() * invquantity;\n }\n /**\n * Getting the Discount Value(Amount) and\n * subtracting from subtotal.\n */\n Discount disc = goodsReceiptDetail.getDiscount();\n if (disc != null) {\n discountAmount += disc.getDiscountValue();\n }\n productTotalAmount += authHandler.round(rowsubtotal, companyid);\n if(isLineLevelTermFlag){\n // Append OtherTermNonTaxableAmount for rach row.\n rowOtherTermNonTaxableAmount += goodsReceiptDetail.getOtherTermNonTaxableAmount();\n rowTaxAmt += goodsReceiptDetail.getRowTermAmount();\n rowTaxAmt += goodsReceiptDetail.getRowTermTaxAmount();\n// taxAmountOfTerms += goodsReceiptDetail.getRowTermTaxAmount();\n }else if (goodsReceiptDetail.getTax() != null) {\n includeprotax = true;\n taxname += goodsReceiptDetail.getTax().getName() + \", \";\n rowTaxAmt += goodsReceiptDetail.getRowTaxAmount();\n// rowTaxAmt += goodsReceiptDetail.getRowTermTaxAmount();\n// taxAmountOfTerms += goodsReceiptDetail.getRowTermTaxAmount();\n }\n }\n } else if (gReceipt.isIsExpenseType()) {\n Set<ExpenseGRDetail> expenseGRDetails = gReceipt.getExpenserows();\n for (ExpenseGRDetail expGReceiptDetail : expenseGRDetails) {\n if (!expGReceiptDetail.getGoodsReceipt().isGstIncluded()) {\n productTotalAmount += expGReceiptDetail.isIsdebit() ? expGReceiptDetail.getRate() : -(expGReceiptDetail.getRate());\n } else {\n productTotalAmount += expGReceiptDetail.isIsdebit() ? expGReceiptDetail.getRate() : -(expGReceiptDetail.getRate());\n // productTotalAmount +=expGReceiptDetail.getRate();\n }\n /**\n * Getting the Discount Value(Amount) and\n * subtracting from subtotal.(ERP-38123)\n */\n Discount disc = expGReceiptDetail.getDiscount();\n if (disc != null) {\n if (expGReceiptDetail.isIsdebit()) {\n discountAmount += disc.getDiscountValue();\n } else {\n discountAmount -= disc.getDiscountValue();\n }\n }\n// System.out.println(expGReceiptDetail.getGoodsReceipt().getGoodsReceiptNumber());\n if (expGReceiptDetail.getTax() != null) {\n includeprotax = true;\n taxname += expGReceiptDetail.getTax().getName() + \", \";\n rowTaxAmt += expGReceiptDetail.isIsdebit()?expGReceiptDetail.getRowTaxAmount():-(expGReceiptDetail.getRowTaxAmount());// SDP- 4676 PO/PI Expense type records to show tax amount in report\n }\n }\n }\n obj.put(\"productTotalAmount\", productTotalAmount); \n double termTaxAmount = 0d;\n double termAmountInBase = 0d;\n double termAmount = 0d;\n List receiptTermMapList = kwlCommonTablesDAOObj.getSummationOfTermAmtAndTermTaxAmt(Constants.receipttermsmap, invid);\n if(receiptTermMapList != null && !receiptTermMapList.isEmpty()){\n Iterator termItr = receiptTermMapList.iterator();\n while (termItr.hasNext()) {\n Object[] termObj = (Object[]) termItr.next();\n /* \n * [0] : Sum of termamount \n * [1] : Sum of termamountinbase \n * [2] : Sum of termTaxamount \n * [3] : Sum of termTaxamountinbase \n * [4] : Sum of termamountexcludingtax \n * [5] : Sum of termamountexcludingtaxinbase\n */ \n if (gReceipt.isGstIncluded()) {\n if(termObj[4] != null && termObj[5] != null){\n termAmount += authHandler.round((Double) termObj[4],companyid);\n termAmountInBase += authHandler.round((Double) termObj[5],companyid);\n }\n } else {\n if(termObj[0] != null && termObj[1] != null){\n termAmount += authHandler.round((Double) termObj[0],companyid);\n termAmountInBase += authHandler.round((Double) termObj[1],companyid);\n }\n }\n if(termObj[2] != null){\n termTaxAmount += authHandler.round((Double) termObj[2],companyid);\n }\n }\n }\n \n taxAmt += rowTaxAmt + termTaxAmount;\n if (gReceipt.isGstIncluded()) {\n subtotal = productTotalAmount - discountAmount - rowTaxAmt;\n } else {\n subtotal = productTotalAmount - discountAmount;\n }\n obj.put(\"subtotal\", subtotal);\n obj.put(\"termamount\", termAmount);\n obj.put(\"termamountinBase\", termAmountInBase);\n obj.put(\"amountBeforeTax\", authHandler.formattingDecimalForAmount((subtotal+termAmount),companyid));\n double tdsAmountandOtherCharges = 0.0;\n if (Constants.indian_country_id == countryid) { // For india Company\n tdsAmountandOtherCharges = gReceipt.getTdsAmount() - rowOtherTermNonTaxableAmount;\n obj.put(\"totalAmountWithTDS\", authHandler.round(invoiceOriginalAmt + gReceipt.getTdsAmount(), companyid)); // Amount with TDS\n }\n// obj.put(\"amountbeforegst\", authHandler.round(invoiceOriginalAmt-taxAmt-termAmount+tdsAmountandOtherCharges, 2)); // Amount before both kind of tax row level or transaction level\n obj.put(\"amountbeforegst\", gReceipt.getExcludingGstAmount());\n obj.put(GoodsReceiptCMNConstants.TAXAMOUNT, taxAmt);\n\n //*** For GTA - Start***//\n if (Constants.indian_country_id == countryid && gReceipt.isGtaapplicable() && !gReceipt.isIsExciseInvoice() && taxAmt > 0) { // exclude service tax from totaltax on grid\n obj.put(\"amountbeforegst\", authHandler.round(invoiceOriginalAmt - (taxAmt) - termAmount + tdsAmountandOtherCharges, companyid)); // Amount before both kind of tax row level or transaction level\n }\n //*** For GTA - END***//\n\n if (isLineLevelTermFlag) {\n // If LineLevelTerm is applicable then add the value in JSON Object.\n obj.put(Constants.OtherTermNonTaxableAmount, rowOtherTermNonTaxableAmount);\n }\n// obj.put(\"taxamountinbase\", accCurrencyDAOobj.getCurrencyToBaseAmount(request, taxAmt, currencyid, creationDate, externalCurrencyRate).getEntityList().get(0));\n obj.put(\"taxamountinbase\", gReceipt.getTaxamountinbase());\n// obj.put(\"taxamountsaved\", gReceipt.getTaxamount());\n// obj.put(\"taxamountinbasesaved\", gReceipt.getTaxamountinbase());\n// obj.put(\"excludinggstamountsaved\", gReceipt.getExcludingGstAmount());\n// obj.put(\"excludinggstamountinbasesaved\", gReceipt.getExcludingGstAmountInBase());\n if (includeprotax) {\n obj.put(GoodsReceiptCMNConstants.TAXNAME, taxname.substring(0, taxname.length() > 1 ? taxname.length() - 2 : taxname.length()));\n } else {\n obj.put(GoodsReceiptCMNConstants.TAXNAME, gReceipt.getTax() == null ? \"\" : gReceipt.getTax().getName());\n }\n\n obj.put(\"includeprotax\", includeprotax);\n obj.put(GoodsReceiptCMNConstants.AMOUNT, authHandler.round((Double)invoiceOriginalAmt,companyid)); //actual invoice amount\n obj.put(GoodsReceiptCMNConstants.AMOUNTINBASE, invoiceTotalAmountInBase);\n obj.put(GoodsReceiptCMNConstants.ACCOUNTNAMES, (String) ll.get(2));\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE1, amountdue1);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE2, amountdue2);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE3, amountdue3);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE4, amountdue4);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE5, amountdue5);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE6, amountdue6);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE7, amountdue7);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE8, amountdue8);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE9, amountdue9);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE10, amountdue10);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE11, amountdue11);\n// obj.put(GoodsReceiptCMNConstants.ACCRUEDBALANCE, accruedbalance);\n obj.put(GoodsReceiptCMNConstants.TYPE, \"Purchase Invoice\");\n obj.put(GoodsReceiptCMNConstants.DEDUCTDISCOUNT, deductDiscount);\n\n KwlReturnObject custumObjresult = null;\n if (gReceipt.isNormalInvoice()) {\n// boolean isExport = (request.get(\"isExport\") == null) ? false : (Boolean) request.get(\"isExport\");\n Map<String, Object> variableMap = new HashMap<String, Object>();\n custumObjresult = accountingHandlerDAOobj.getObject(AccJECustomData.class.getName(), je.getID());\n replaceFieldMap = new HashMap<String, String>();\n if (custumObjresult != null && custumObjresult.getEntityList().size() > 0) {\n AccJECustomData jeDetailCustom = (AccJECustomData) custumObjresult.getEntityList().get(0);\n if (jeDetailCustom != null) {\n AccountingManager.setCustomColumnValues(jeDetailCustom, FieldMap, replaceFieldMap, variableMap);\n JSONObject params = new JSONObject();\n params.put(\"companyid\", companyid);\n params.put(Constants.userdf,userDateFormat);\n if (!isExport) {\n isExport = (request.get(\"isAgedPayables\") == null) ? false : (Boolean) request.get(\"isAgedPayables\");\n }\n params.put(\"isExport\", isExport);\n// if (request.containsKey(\"browsertz\") && request.get(\"browsertz\") != null) {\n// params.put(\"browsertz\", request.get(\"browsertz\").toString());\n// }\n fieldDataManagercntrl.addCustomData(variableMap, customFieldMap, customDateFieldMap, obj, params);\n }\n }\n \n \n if (booleanAged ) \n {\n if (!request.containsKey(\"isAgedPayables\") || !(Boolean) request.get(\"isAgedPayables\")) {\n accGoodsReceiptServiceDAO.getCustmDataForPurchaseInvoice(request, jArr, companyid, replaceFieldMap, customFieldMap, customDateFieldMap, FieldMap, replaceFieldMapRows, customFieldMapRows, customDateFieldMapRows, fieldMapRows);\n //getPurchaseInvoiceCustomField(gReceipt,goodsReceiptDetails,fieldMapRows,replaceFieldMapRows,customFieldMapRows,customDateFieldMapRows,obj,userDateFormat);\n }\n }\n }\n RepeatedInvoices repeatedInvoice = gReceipt.getRepeateInvoice();\n obj.put(\"isRepeated\", repeatedInvoice == null ? false : true);\n if (repeatedInvoice != null) {\n obj.put(\"repeateid\", repeatedInvoice.getId());\n obj.put(\"interval\", repeatedInvoice.getIntervalUnit());\n obj.put(\"intervalType\", repeatedInvoice.getIntervalType());\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMMM d, yyyy hh:mm:ss aa\");\n // sdf.setTimeZone(TimeZone.getTimeZone(\"GMT\"+sessionHandlerImpl.getTimeZoneDifference(request)));\n obj.put(\"NoOfpost\", repeatedInvoice.getNoOfInvoicespost());\n obj.put(\"NoOfRemainpost\", repeatedInvoice.getNoOfRemainInvoicespost());\n obj.put(\"startDate\", sdf.format(repeatedInvoice.getStartDate()));\n obj.put(\"nextDate\", sdf.format(repeatedInvoice.getNextDate()));\n obj.put(\"isactivate\", repeatedInvoice.isIsActivate());\n obj.put(\"ispendingapproval\", repeatedInvoice.isIspendingapproval());\n obj.put(\"approver\", repeatedInvoice.getApprover());\n obj.put(\"expireDate\", repeatedInvoice.getExpireDate() == null ? \"\" : sdf.format(repeatedInvoice.getExpireDate()));\n obj.put(\"advancedays\", repeatedInvoice.getAdvanceNoofdays()== 0 ? 0 : repeatedInvoice.getAdvanceNoofdays());\n obj.put(\"advanceDate\", repeatedInvoice.getInvoiceAdvanceCreationDate()== null ? \"\" : sdf.format(repeatedInvoice.getInvoiceAdvanceCreationDate()));\n request.put(\"parentInvoiceId\", gReceipt.getID());\n KwlReturnObject details = accGoodsReceiptobj.getRepeateVendorInvoicesDetails(request);\n List detailsList = details.getEntityList();\n obj.put(\"childCount\", detailsList.size());\n }\n \n\n if (gReceipt.isIsOpeningBalenceInvoice()) {\n Map<String, Object> variableMap = new HashMap<String, Object>();\n custumObjresult = accountingHandlerDAOobj.getObject(OpeningBalanceVendorInvoiceCustomData.class.getName(), gReceipt.getID());\n replaceFieldMap = new HashMap<String, String>();\n if (custumObjresult != null && custumObjresult.getEntityList().size() > 0) {\n OpeningBalanceVendorInvoiceCustomData openingBalanceVendorInvoiceCustomData = (OpeningBalanceVendorInvoiceCustomData) custumObjresult.getEntityList().get(0);\n if (openingBalanceVendorInvoiceCustomData != null) {\n AccountingManager.setCustomColumnValues(openingBalanceVendorInvoiceCustomData, FieldMap, replaceFieldMap, variableMap);\n DateFormat defaultDateFormat=new SimpleDateFormat(Constants.MMMMdyyyy);\n Date dateFromDB=null;\n for (Map.Entry<String, Object> varEntry : variableMap.entrySet()) {\n String coldata = varEntry.getValue() != null ? varEntry.getValue().toString() : \"\";\n if (customFieldMap.containsKey(varEntry.getKey())) {\n KwlReturnObject rdresult = accountingHandlerDAOobj.getObject(FieldComboData.class.getName(), coldata);\n FieldComboData fieldComboData = (FieldComboData) rdresult.getEntityList().get(0);\n if (fieldComboData != null) {\n obj.put(varEntry.getKey(), fieldComboData.getValue() != null ? fieldComboData.getValue() : \"\");\n }\n } else if (customDateFieldMap.containsKey(varEntry.getKey())) {\n DateFormat sdf = userDateFormat != null?userDateFormat:new SimpleDateFormat(\"yyyy-MM-dd\");\n dateFromDB=defaultDateFormat.parse(coldata);\n coldata=sdf.format(dateFromDB);\n obj.put(varEntry.getKey(), coldata);\n } else {\n if (!StringUtil.isNullOrEmpty(coldata)) {\n obj.put(varEntry.getKey(), coldata);\n }\n }\n }\n }\n }\n }\n try { // check if credit/cash purchase is allowed to edit\n // isAllowToEdit= if credit/cash purchase created using auto generate GR option and credit/cash purchase/GR hasn't been forward linked in any document\n result = accGoodsReceiptobj.getAutoGRFromInvoice(gReceipt.getID(), companyid);\n list = result.getEntityList();\n if (list != null && !list.isEmpty()) { // SI/CS created with auto generate DO option\n boolean isDOLinkedInPR = false;\n String groID = \"\";\n Object groid = list.get(0);\n groID = (String) groid;\n KwlReturnObject resultPR = accGoodsReceiptobj.getPurchaseReturnLinkedWithGR(groID, companyid);\n List listPR = resultPR.getEntityList();\n if (!listPR.isEmpty()) { // is DO forward linked in any SR\n isDOLinkedInPR = true;\n }\n if (!isDOLinkedInPR && obj.optDouble(GoodsReceiptCMNConstants.AMOUNTDUEINBASE, 0.0) == obj.optDouble(GoodsReceiptCMNConstants.AMOUNTINBASE, 0.0) && !gReceipt.isCashtransaction()) {\n obj.put(Constants.IS_INVOICE_ALLOW_TO_EDIT, true);\n } else if (gReceipt.isCashtransaction() && !isDOLinkedInPR) {\n obj.put(Constants.IS_INVOICE_ALLOW_TO_EDIT, true);\n } else {\n obj.put(Constants.IS_INVOICE_ALLOW_TO_EDIT, false);\n }\n } else {\n obj.put(Constants.IS_INVOICE_ALLOW_TO_EDIT, false);\n }\n if (!StringUtil.isNullOrEmpty(landedInvoice)) {\n obj.put(Constants.IS_INVOICE_ALLOW_TO_EDIT, false);\n }\n } catch (Exception ex) {\n Logger.getLogger(AccGoodsReceiptServiceImpl.class.getName()).log(Level.WARNING, ex.getMessage());\n obj.put(Constants.IS_INVOICE_ALLOW_TO_EDIT, false);\n }\n if (!(ignoreZero && authHandler.round(amountdue, companyid) <= 0)) {\n jArr.put(obj);\n }\n }\n }\n }\n } catch (Exception ex) {\n throw ServiceException.FAILURE(\"AccGoodsReceiptServiceHandler.getGoodsReceiptsJson : \" + ex.getMessage(), ex);\n }\n return jArr;\n }", "private BigDecimal getCardServiceFeeAmount(final CartReceiptResponse receiptResponse\n , final PdfPTable paymentSectionTable, final PdfPCell blankSpaceCell, final Locale locale) {\n\n \t/* Get funding source from the CART_RECEIPT_REPRINT response */\n final FundingSourceResponse[] fundingSource = receiptResponse.getFundingSources();\n final SubmittedBill[] submittedBills = receiptResponse.getSubmittedBills();\n /* Initializing serviceFee */\n final BigDecimal serviceFee = addServiceFee(submittedBills);\n for (final FundingSourceResponse aFundingSource : fundingSource) {\n /* Check for the DEBIT/CREDIT card instance */\n if (aFundingSource instanceof VestaFundingSourceResponse) {\n /* ServiceFeePercentRate is null treating it as ZERO other wise get the value */\n BigDecimal cardServiceFeePercent = aFundingSource.getServiceFeePercentRate() == null\n ? new BigDecimal(0) : aFundingSource.getServiceFeePercentRate();\n /* In case seviceFee amount is > ZERO then execute the below block of code to display the line above the total bills */\n if (serviceFee.compareTo(BigDecimal.ZERO) > 0 && cardServiceFeePercent.compareTo(BigDecimal.ZERO) > 0) {\n /* Cell for the card service percent label */\n Font font = getFont(null, FONT_SIZE_12, Font.NORMAL);\n String message = getMessage(locale, \"pdf.receipt.serviceFee\", cardServiceFeePercent);\n PdfPCell serviceFeeLabel = new PdfPCell(new Phrase(message, font));\n /* Cell for the card service fee amount */\n PdfPCell serviceFeeTotal = new PdfPCell(\n new Phrase(getFormattedAmount(serviceFee), font));\n /* Adding above cells to table */\n cellAlignment(serviceFeeLabel, Element.ALIGN_LEFT, WHITE_COLOR, 0);\n cellAddingToTable(paymentSectionTable, serviceFeeLabel, Rectangle.NO_BORDER, 2, 15);\n\n cellAlignment(serviceFeeTotal, Element.ALIGN_RIGHT, WHITE_COLOR, 0);\n cellAddingToTable(paymentSectionTable, serviceFeeTotal, Rectangle.NO_BORDER, 0, 0);\n\t\t\t\t\t/* Adding blank space to table */\n cellAlignment(blankSpaceCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n cellAddingToTable(paymentSectionTable, blankSpaceCell, Rectangle.NO_BORDER, 3, 0);\n }\n }\n }\n return serviceFee;\n }", "private void CalculateTotalAmount() {\r\n\r\n double dSubTotal = 0, dTaxTotal = 0, dModifierAmt = 0, dServiceTaxAmt = 0, dOtherCharges = 0, dTaxAmt = 0, dSerTaxAmt = 0, dIGSTAmt=0, dcessAmt=0, dblDiscount = 0;\r\n float dTaxPercent = 0, dSerTaxPercent = 0;\r\n\r\n // Item wise tax calculation ----------------------------\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n TableRow RowItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n if (RowItem.getChildAt(0) != null) {\r\n\r\n TextView ColTaxType = (TextView) RowItem.getChildAt(13);\r\n TextView ColAmount = (TextView) RowItem.getChildAt(5);\r\n TextView ColDisc = (TextView) RowItem.getChildAt(9);\r\n TextView ColTax = (TextView) RowItem.getChildAt(7);\r\n TextView ColModifierAmount = (TextView) RowItem.getChildAt(14);\r\n TextView ColServiceTaxAmount = (TextView) RowItem.getChildAt(16);\r\n TextView ColIGSTAmount = (TextView) RowItem.getChildAt(24);\r\n TextView ColcessAmount = (TextView) RowItem.getChildAt(26);\r\n TextView ColAdditionalCessAmt = (TextView) RowItem.getChildAt(29);\r\n TextView ColTotalCessAmount = (TextView) RowItem.getChildAt(30);\r\n dblDiscount += Double.parseDouble(ColDisc.getText().toString());\r\n dTaxTotal += Double.parseDouble(ColTax.getText().toString());\r\n dServiceTaxAmt += Double.parseDouble(ColServiceTaxAmount.getText().toString());\r\n dIGSTAmt += Double.parseDouble(ColIGSTAmount.getText().toString());\r\n// dcessAmt += Double.parseDouble(ColcessAmount.getText().toString()) + Double.parseDouble(ColAdditionalCessAmt.getText().toString());\r\n dcessAmt += Double.parseDouble(ColTotalCessAmount.getText().toString());\r\n dSubTotal += Double.parseDouble(ColAmount.getText().toString());\r\n\r\n }\r\n }\r\n // ------------------------------------------\r\n\r\n // Bill wise tax Calculation -------------------------------\r\n Cursor crsrtax = dbBillScreen.getTaxConfig(1);\r\n if (crsrtax.moveToFirst()) {\r\n dTaxPercent = crsrtax.getFloat(crsrtax.getColumnIndex(\"TotalPercentage\"));\r\n dTaxAmt += dSubTotal * (dTaxPercent / 100);\r\n }\r\n Cursor crsrtax1 = dbBillScreen.getTaxConfig(2);\r\n if (crsrtax1.moveToFirst()) {\r\n dSerTaxPercent = crsrtax1.getFloat(crsrtax1.getColumnIndex(\"TotalPercentage\"));\r\n dSerTaxAmt += dSubTotal * (dSerTaxPercent / 100);\r\n }\r\n // -------------------------------------------------\r\n\r\n dOtherCharges = Double.valueOf(tvOthercharges.getText().toString());\r\n //String strTax = crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\"));\r\n if (crsrSettings.moveToFirst()) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxTotal + dServiceTaxAmt + dOtherCharges+dcessAmt));\r\n } else {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxAmt + dSerTaxAmt + dOtherCharges+dcessAmt));\r\n }\r\n } else {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n\r\n } else {\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n }\r\n }\r\n tvDiscountAmount.setText(String.format(\"%.2f\", dblDiscount));\r\n }\r\n }", "@Override\n public void bindView(View view, Context context, Cursor data) {\n TextView svcIdTextView = view.findViewById(R.id.text_iteminvoices_svcid);\n TextView medicalServicesTextView = view.findViewById(R.id.text_iteminvoices_medicalservices);\n TextView medicationTextView = view.findViewById(R.id.text_iteminvoices_mediction);\n TextView costTextView = view.findViewById(R.id.text_iteminvoices_cost);\n\n int svcIdColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_SVC_ID);\n int medicalServicesColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_MEDICAL_SERVICES);\n int medicationColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_MEDICATION);\n int costColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_COST);\n\n String svcId = data.getString(svcIdColumnIndex);\n String medicalServices = data.getString(medicalServicesColumnIndex);\n String medication = data.getString(medicationColumnIndex);\n String cost = data.getString(costColumnIndex);\n\n svcIdTextView.setText(svcId);\n medicalServicesTextView.setText(medicalServices);\n medicationTextView.setText(medication);\n costTextView.setText(cost);\n\n/*\n\n int dateOfSvcColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_DATE_OF_SVC);\n int invoiceColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_INVOICE_DATE);\n int dateDueColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_DATE_DUE);\n int billToNameColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_NAME);\n int billToAddressColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_ADDRESS);\n int billToPhoneColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_PHONE);\n int billToFaxColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_FAX);\n int billToEmailColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_EMAIL);\n\n int supTotalColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_SUBTOTAL);\n int taxRateColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_TAX_RATE);\n int totalTaxColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_TOTAL_TAX);\n int otherColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_OTHER);\n int totalColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_TOTAL);\n int questionsNameColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_NAME);\n int questionsEmailColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_EMAIL);\n int questionsPhoneColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_PHONE);\n int questionsWebColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_WEB);\n int procedureColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_PROCEDURE);\n int patientIdColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_PATIENT_ID);\n\n\n String dateOfSvc = data.getString(dateOfSvcColumnIndex);\n String invoice = data.getString(invoiceColumnIndex);\n String dateDue = data.getString(dateDueColumnIndex);\n String billToName = data.getString(billToNameColumnIndex);\n String billToAddress = data.getString(billToAddressColumnIndex);\n String billToPhone = data.getString(billToPhoneColumnIndex);\n String billToFax = data.getString(billToFaxColumnIndex);\n String billToEmail = data.getString(billToEmailColumnIndex);\n String svcId = data.getString(svcIdColumnIndex);\n String medicalServices = data.getString(medicalServicesColumnIndex);\n String medication = data.getString(medicationColumnIndex);\n String cost = data.getString(costColumnIndex);\n String supTotal = data.getString(supTotalColumnIndex);\n String taxRate = data.getString(taxRateColumnIndex);\n String totalTax = data.getString(totalTaxColumnIndex);\n String other = data.getString(otherColumnIndex);\n String total = data.getString(totalColumnIndex);\n String questionsName = data.getString(questionsNameColumnIndex);\n String questionsEmail = data.getString(questionsEmailColumnIndex);\n String questionsPhone = data.getString(questionsPhoneColumnIndex);\n String questionsWeb = data.getString(questionsWebColumnIndex);\n String procedure = data.getString(procedureColumnIndex);\n String patientId = data.getString(patientIdColumnIndex);\n\n\n dateOfSvcTextView.setText(dateOfSvc);\n invoiceDateTextView.setText(invoice);\n dateDueTextView.setText(dateDue);\n\n billFixEditText.setText(billToFax);\n billNameEditText.setText(billToName);\n billAddressEditText.setText(billToAddress);\n billEmailEditText.setText(billToEmail);\n billPhoneEditText.setText(billToPhone);\n\n svcIdEditText.setText(svcId);\n medicalServicesEditText.setText(medicalServices);\n medicationEditText.setText(medication);\n costEditText.setText(cost);\n subtotalEditText.setText(supTotal);\n taxRateEditText.setText(taxRate);\n totalTaxEditText.setText(totalTax);\n otherEditText.setText(other);\n totalEditText.setText(total);\n\n questionsNameEditText.setText(questionsName);\n questionsPhoneEditText.setText(questionsPhone);\n questionEmailEditText.setText(questionsEmail);\n questionsWebEditText.setText(questionsWeb);\n procedureEditText.setText(procedure);\n*/\n }", "private void CalculateTotalAmount()\n {\n double dSubTotal = 0,dTaxTotal = 0, dModifierAmt = 0, dServiceTaxAmt = 0, dOtherCharges = 0, dTaxAmt = 0, dSerTaxAmt = 0;\n float dTaxPercent = 0, dSerTaxPercent = 0;\n double dTotalBillAmount_for_reverseTax =0;\n double dIGSTAmt =0, dcessAmt =0;\n // Item wise tax calculation ----------------------------\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++)\n {\n TableRow RowItem = (TableRow) tblOrderItems.getChildAt(iRow);\n if (RowItem.getChildAt(0) != null)\n {\n TextView ColQuantity = (TextView) RowItem.getChildAt(3);\n TextView ColRate = (TextView) RowItem.getChildAt(4);\n TextView ColTaxType = (TextView) RowItem.getChildAt(13);\n TextView ColAmount = (TextView) RowItem.getChildAt(5);\n TextView ColDisc = (TextView) RowItem.getChildAt(9);\n TextView ColTax = (TextView) RowItem.getChildAt(7);\n TextView ColModifierAmount = (TextView) RowItem.getChildAt(14);\n TextView ColServiceTaxAmount = (TextView) RowItem.getChildAt(16);\n TextView ColIGSTAmount = (TextView) RowItem.getChildAt(24);\n TextView ColcessAmount = (TextView) RowItem.getChildAt(26);\n TextView ColTaxValue = (TextView) RowItem.getChildAt(28);\n dTaxTotal += Double.parseDouble(ColTax.getText().toString());\n dServiceTaxAmt += Double.parseDouble(ColServiceTaxAmount.getText().toString());\n dIGSTAmt += Double.parseDouble(ColIGSTAmount.getText().toString());\n dcessAmt += Double.parseDouble(ColcessAmount.getText().toString());\n if (crsrSettings!=null && crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) // forward tax\n {\n dSubTotal += Double.parseDouble(ColAmount.getText().toString());\n }\n else // reverse tax\n {\n double qty = ColQuantity.getText().toString().equals(\"\")?0.00 : Double.parseDouble(ColQuantity.getText().toString());\n double baseRate = ColRate.getText().toString().equals(\"\")?0.00 : Double.parseDouble(ColRate.getText().toString());\n dSubTotal += (qty*baseRate);\n dTotalBillAmount_for_reverseTax += Double.parseDouble(ColAmount.getText().toString());\n }\n\n }\n }\n // ------------------------------------------\n // Bill wise tax Calculation -------------------------------\n Cursor crsrtax = db.getTaxConfigs(1);\n if (crsrtax.moveToFirst()) {\n dTaxPercent = crsrtax.getFloat(crsrtax.getColumnIndex(\"TotalPercentage\"));\n dTaxAmt += dSubTotal * (dTaxPercent / 100);\n }\n Cursor crsrtax1 = db.getTaxConfigs(2);\n if (crsrtax1.moveToFirst()) {\n dSerTaxPercent = crsrtax1.getFloat(crsrtax1.getColumnIndex(\"TotalPercentage\"));\n dSerTaxAmt += dSubTotal * (dSerTaxPercent / 100);\n }\n // -------------------------------------------------\n\n dOtherCharges = Double.valueOf(textViewOtherCharges.getText().toString());\n //String strTax = crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\"));\n if (crsrSettings.moveToFirst()) {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) // forward tax\n {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\"))\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxTotal + dServiceTaxAmt + dOtherCharges+dcessAmt));\n }\n else\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxAmt + dSerTaxAmt + dOtherCharges+dcessAmt));\n }\n }\n else // reverse tax\n {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) // item wise\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dTotalBillAmount_for_reverseTax + dOtherCharges));\n\n }\n else\n {\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvBillAmount.setText(String.format(\"%.2f\", dTotalBillAmount_for_reverseTax + dOtherCharges));\n }\n }\n }\n }", "@Override\r\n public double purchaseFee(){\r\n return fee;\r\n }", "public Invoice(){\r\n this.userName = \"\";\r\n this.InvoiceCode = \"\";\r\n this.items = new ArrayList<>();\r\n this.amount = 0.0;\r\n \r\n }", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "public Double getRawGross(int month, int day, int year, int storeCode, int...hour ) {\r\n//\t\tString query = \"SELECT SUM(IF(o.RETURN=0,i.SELL_PRICE*i.QUANTITY,p.AMT)) FROM invoice_item i, invoice o, payment_item p WHERE MONTH (o.TRANS_DT) = '\"+month+\"' && YEAR(o.TRANS_DT) = '\"+year+\"' && DAY(o.TRANS_DT) = '\"+day+\"' AND i.OR_NO = o.OR_NO AND p.OR_NO = o.OR_NO AND p.STORE_CODE = o.STORE_CODE AND o.STORE_CODE = '\"+storeCode+\"'\";\r\n\t\tString query = \"SELECT SUM(i.SELL_PRICE*i.QUANTITY) FROM invoice_item i, invoice o WHERE MONTH (o.TRANS_DT) = '\"+month+\"' && YEAR(o.TRANS_DT) = '\"+year+\"' && DAY(o.TRANS_DT) = '\"+day+\"' AND i.OR_NO = o.OR_NO AND i.STORE_CODE = o.STORE_CODE AND o.STORE_CODE = '\"+storeCode+\"'\"\r\n\t\t + \" AND NOT EXISTS (SELECT 1 FROM INVOICE_SET s WHERE s.OR_NO = o.OR_NO) \";\r\n\t\t\r\n\t\tif (hour.length > 0) {\r\n\t\t\tquery += \" AND HOUR(o.TRANS_DT) = \" + hour[0];\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"RAW GROSS QUERY = \" + query);\r\n\t\t\r\n\t\tResultSet rs = Main.getDBManager().executeQuery(query);\r\n//\t\tResultSet rs = Main.getDBManager().executeQuery(\"SELECT sum(p.AMT) from payment_item p WHERE MONTH (p.TRANS_DT) = '\"+month+\"' && YEAR(p.TRANS_DT) = '\"+year+\"' && DAY(p.TRANS_DT) = '\"+day+\"' AND p.STORE_CODE = '\"+storeCode+\"'\");\r\n\t\tDouble dailySale = 0.0d;\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n//\t\t\t\tdouble amount = rs.getDouble(1);\r\n//\t\t\t\tdailySale = amount/getVatRate();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tdailySale = rs.getDouble(1);\r\n\t\t\t\tlogger.debug(\"Raw Gross BEFORE SUBTRACTION: \"+dailySale);\r\n\t\t\t\t\r\n\t\t\t\tdailySale = dailySale - getDeductibles(month, day, year, storeCode) + getCompletedTransactions(month, day, year, storeCode);\r\n\t\t\t\tlogger.debug(\"Raw Gross AFTER SUBTRACTION: \"+dailySale);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tLoggerUtility.getInstance().logStackTrace(e);\r\n\t\t}\r\n//\t\tdailySale = dailySale - getDeductibles(month, day, year, storeCode) + getCompletedTransactions(month, day, year, storeCode);\r\n\t\tlogger.debug(\"Raw Gross: \"+dailySale);\r\n\t\treturn dailySale;\r\n\t}", "BigDecimal getSumOfTransactions(StatisticalDTO dto) throws DaoException;", "public Date getDateInvoice() {\n return dateInvoice;\n }", "public POSLineItemWrapper(POSLineItemDetail detail) {\n this.id = detail.getLineItem().getItem().getId();\n this.desc = detail.getLineItem().getItemDescription();\n this.qty++;\n this.price = detail.getLineItem().getItemRetailPrice();\n this.isReturn = detail.getLineItem() instanceof com.chelseasystems.cr.pos.ReturnLineItem;\n this.vat = detail.getVatAmount();\n this.itemOriginalVat = detail.getLineItem().getNetAmount().multiply(detail.getLineItem().\n getItem().getVatRate().doubleValue()).round();\n Reduction[] reds = detail.getReductionsArray();\n for (int idx = 0; idx < reds.length; idx++) {\n String reason = reds[idx].getReason();\n // if(reason.equalsIgnoreCase(\"PRIVILEGE Discount\"))\n // {\n // privAmt = reds[idx].getAmount();\n // PrivilegeDiscount disc = getPrivilegeDiscount();\n // try\n // {\n // privPct = disc.getPercent(detail.getLineItem(), compositePOSTransaction.getStore().getId());\n // continue;\n // }\n // catch(Exception e)\n // {\n // }\n // }\n // else if(reason.equalsIgnoreCase(\"DRIVERS Discount\"))\n // {\n // coachAmt = reds[idx].getAmount();\n // DriversDiscount disc = getDriversDiscount();\n // try\n // {\n // coachPct = disc.getPercent(detail.getLineItem(), compositePOSTransaction.getStore().getId());\n // continue;\n // }\n // catch(Exception e)\n // {\n // }\n // }\n // else if(reason.equalsIgnoreCase(\"CONCESSIONAIRE Discount\"))\n // {\n // concessAmt = reds[idx].getAmount();\n // ConcessionaireDiscount disc = getConcessionaireDiscount();\n // try\n // {\n // concessPct = disc.getPercent(detail.getLineItem(), compositePOSTransaction.getStore().getId());\n // continue;\n // }\n // catch(Exception e)\n // {\n // }\n // }\n // else if(reason.equalsIgnoreCase(\"SETTLEMENT\"))\n // {\n // settleAmt = reds[idx].getAmount();\n // SettlementDiscount disc = getSettlementDiscount();\n // try\n // {\n // settlePct = disc.getPercent();\n // continue;\n // }\n // catch(Exception e)\n // {\n // }\n // }\n // else\n if (reason.equalsIgnoreCase(\"Manual Markdown\")) {\n manualAmt = reds[idx].getAmount();\n } else {\n promoAmt = reds[idx].getAmount();\n }\n }\n }", "public interface modelPurchasesI {\r\n\t/***\r\n\t * ottiene l'id del record corrente\r\n\t * @return\r\n\t * un integer che contiene l'id\r\n\t */\r\n\tInteger getID();\r\n\t/***\r\n\t * salva la data dell'acquisto\r\n\t * @param data\r\n\t * data di tipo Object sql.date\r\n\t */\r\n void setDate(Date data);\r\n\t/***\r\n\t * settaggio dello sconto per questo acquisto\r\n\t * @param sconto\r\n\t * lo sconto passato come float\r\n\t */\r\n\tvoid setDiscount(float sconto);\r\n\t/***\r\n\t * settaggio del provider di questo acquisto\r\n\t * @param IDProvuder\r\n\t * ID del provider passato come Integer\r\n\t */\r\n\tvoid setProvider(modelProvidersI IDProvider);\r\n\t/***\r\n\t * settaggio del numero della recivuta per questo acquisto(lo stesso usato nello scontrino di questo acquisto)\r\n\t * @param nRicevuta\r\n\t * numero della recivuto passato come integer\r\n\t */\r\n\tvoid setNumberPaymentReceipt(int nRicevuta);\r\n\t/***\r\n\t * settaggio dell'iva per questo acquisto\r\n\t * @param iva\r\n\t * iva passato come float\r\n\t */\r\n\tvoid setIVA(float iva);\r\n\t\r\n\t/***\r\n\t * ottiene il numero della ricevuta dell'acquisto( lo stesso usato nello scontrino per questo acquisto)\r\n\t * @return\r\n\t * un int con il numero della ricevuta\r\n\t */\r\n\tint getNumberPaymentReceipt();\r\n\t/***\r\n\t * ottiene il fornitore di questo acquisto\r\n\t * @return\r\n\t * il fornitore\r\n\t */\r\n\tmodelProvidersI getProvider();\r\n\t/***\r\n\t * ottiene l'iva per questo acquisto\r\n\t * @return\r\n\t * l'iva\r\n\t */\r\n\tfloat getIva();\r\n\t/***\r\n\t * ottiene la data dell'acquisto\r\n\t * @return\r\n\t * una object sql.date che contiene la data dell'acquisto\r\n\t */\r\n\tDate getDate();\r\n\t/***\r\n\t * ottiene lo sconto per l'acquisto\r\n\t * @return\r\n\t * un float con lo sconto dell'acquisto\r\n\t */\r\n\tfloat getDiscount();\r\n\t/***\r\n\t * ottiene una lista con tutti i prodotti acquistati\r\n\t * @return\r\n\t * una lista con i prodotti acquistati altrimenti una lista vuota\r\n\t */\r\n\tList<transactionsProducts> purchasedProducts();\r\n\t/***\r\n\t * ottiene il totale speso per questo acquisto\r\n\t * @return\r\n\t * un double con il totale speso\r\n\t */\r\n\tDouble getTotalSpent();\r\n\t\r\n\t/***\r\n\t * metodo che salva ogni modifica/creazione di un acquisto. \r\n\t * @return\r\n\t * true se e andato a buon fine\r\n\t */\r\n\tboolean update();\r\n\t\r\n\t/***\r\n\t * eliminazione dell'accquisto corrente\r\n\t * @return\r\n\t * true se e andato a buon fine\r\n\t */\r\n\tboolean deletePurchase();\r\n\r\n\t/***\r\n\t * elenco di tutti gli acquisti realizzati\r\n\t * @return\r\n\t * una lista contenente tutti gli acquisti fatti\r\n\t */\r\n\tpublic static List<modelPurchasesI> purchasesList(){\r\n\t\tif(modelUsersI.isLogged()){\r\n\t\t\tDataBaseSearch query = DataBaseSearch.queryDaTabella(\"Acquisti\");\r\n\t\t\ttry {\r\n\t\t\t\treturn query.find().stream()\r\n\t\t\t\t\t\t.map(e -> new modelPurchases(e))\r\n\t\t\t\t\t\t.collect(Collectors.toList());\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\treturn new ArrayList<modelPurchasesI>();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn new ArrayList<modelPurchasesI>();\r\n\t}\r\n\t/***\r\n\t * ricerca di una ricevuta di acquisto tramite il numero\r\n\t * @param nRicevuta\r\n\t * numero della ricevuta passato come int\r\n\t * @return\r\n\t * l'acquisto realizzato altrimenti null\r\n\t */\r\n\tpublic static modelPurchasesI searchPurchase(int nRicevuta){\r\n\t\tif(modelUsersI.isLogged()){\r\n\t\t\treturn modelPurchasesI.purchasesList().stream()\r\n\t\t\t\t.filter(p -> p.getNumberPaymentReceipt() == nRicevuta)\r\n\t\t\t\t.findFirst()\r\n\t\t\t\t.orElse(null);\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}\r\n\t/***\r\n\t * ottiene il report degli acquisti\r\n\t * @return\r\n\t * una lista contenente tutti gli acquisti ordinati in maniera decrescente in base alle spese altrimenti una lista vuota\r\n\t */\r\n\tpublic static List<modelPurchasesI> reportPurchases(){\r\n\t\tif(modelUsersI.isLogged()){\r\n\t\t\tComparator<modelPurchasesI> sort = (primo, secondo) -> Double.compare(primo.getTotalSpent(), secondo.getTotalSpent());\r\n\t\t\t\r\n\t\t\treturn modelPurchasesI.purchasesList().stream()\r\n\t\t\t\t\t.sorted(sort)\r\n\t\t\t\t\t.collect(Collectors.toList());\r\n\t\t}else\r\n\t\t\treturn new ArrayList<modelPurchasesI>();\r\n\t}\r\n\t/***\r\n\t * creazione di un acquisto\r\n\t * @param data\r\n\t * data dell'acquisto\r\n\t * @param sconto\r\n\t * socnto dell'acquisto\r\n\t * @param iva\r\n\t * iva dell'acquisto\r\n\t * @param nRicevuta\r\n\t * numero della ricevuta\r\n\t * @param fornitore\r\n\t * fornitore dell'acquisto\r\n\t * @param prodotti\r\n\t * prodotti dell'acquisto\r\n\t * @return\r\n\t * true se creato altrimenti false\r\n\t */\r\n\tpublic static boolean builder(Date data, float sconto, float iva, int nRicevuta, modelProvidersI fornitore, List<transactionsProductsI> prodotti){\r\n\t\tif(modelUsersI.isLogged())\r\n\t\t{\r\n\t\t\tmodelPurchasesI temp = new modelPurchases();\r\n\t\t\ttemp.setProvider(fornitore);\r\n\t\t\ttemp.setDate(data);\r\n\t\t\ttemp.setDiscount(sconto);\r\n\t\t\ttemp.setIVA(iva);\r\n\t\t\t//salvataggio dei prodotti acquistati\r\n\t\t\tif(modelTransactionsI.transactionsProducts(nRicevuta, prodotti, false))\r\n\t\t\t\treturn temp.update();\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\telse \r\n\t\t\treturn false;\r\n\t}\r\n\t\r\n}", "public void setPriceLastInv (BigDecimal PriceLastInv);", "@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }", "BigDecimal getSumOfTransactionsRest(TransferQuery query);", "public Invoice createInvoice(Order order);", "public JSONArray getGoodsReceiptsJsonForMonthlyAgedPayables(HashMap<String, Object> request, List<GoodsReceipt> list, JSONArray jArr, AccountingHandlerDAO accountingHandlerDAOobj, accCurrencyDAO accCurrencyDAOobj, accGoodsReceiptDAO accGoodsReceiptobj, accAccountDAO accAccountDAOobj, accGoodsReceiptCMN accGoodsReceiptCommon, accTaxDAO accTaxObj) throws ServiceException {\n try {\n String companyid = (String) request.get(GoodsReceiptCMNConstants.COMPANYID);\n String currencyid = (String) request.get(GoodsReceiptCMNConstants.GCURRENCYID);\n DateFormat df = (DateFormat) request.get(GoodsReceiptCMNConstants.DATEFORMAT);\n String only1099AccStr = (String) request.get(GoodsReceiptCMNConstants.ONLY1099ACC);\n List ll = null;\n KwlReturnObject curresult = accountingHandlerDAOobj.getObject(KWLCurrency.class.getName(), currencyid);\n KWLCurrency currency = (KWLCurrency) curresult.getEntityList().get(0);\n boolean isBadDebtInvoices = false;// for Malasian Company\n boolean isproductCategory = false;\n boolean isproductType = false;\n if (request.containsKey(\"isBadDebtInvoices\") && request.get(\"isBadDebtInvoices\") != null) {\n isBadDebtInvoices = (Boolean) request.get(\"isBadDebtInvoices\");\n }\n if (request.containsKey(\"productCategoryid\") && request.get(\"productCategoryid\") != null && !StringUtil.isNullOrEmpty((String) request.get(\"productCategoryid\"))) {\n isproductCategory = true;\n }\n if (request.containsKey(InvoiceConstants.productid) && request.get(InvoiceConstants.productid) != null && !StringUtil.isNullOrEmpty((String) request.get(InvoiceConstants.productid))) {\n isproductType = true;\n }\n boolean belongsTo1099 = false;\n boolean isAged = (request.containsKey(\"isAged\") && request.get(\"isAged\") != null) ? Boolean.parseBoolean(request.get(\"isAged\").toString()) : false;\n boolean only1099Acc = (only1099AccStr != null ? Boolean.parseBoolean(only1099AccStr) : false);\n boolean ignoreZero = request.get(GoodsReceiptCMNConstants.IGNOREZERO) != null;\n boolean onlyAmountDue = request.get(GoodsReceiptCMNConstants.ONLYAMOUNTDUE) != null;\n boolean booleanAged = true;//Added for aged payable/receivable\n List InvoiceList = new ArrayList();\n Calendar oneDayBeforeCal1 = (Calendar) request.get(\"oneDayBeforeCal1\");\n Calendar cal1 = (Calendar) request.get(\"cal1\");\n Calendar cal2 = (Calendar) request.get(\"cal2\");\n Calendar cal3 = (Calendar) request.get(\"cal3\");\n Calendar cal4 = (Calendar) request.get(\"cal4\");\n Calendar cal5 = (Calendar) request.get(\"cal5\");\n Calendar cal6 = (Calendar) request.get(\"cal6\");\n Calendar cal7 = (Calendar) request.get(\"cal7\");\n Date oneDayBeforeCal1Date = null;\n Date cal1Date = null;\n Date cal2Date = null;\n Date cal3Date = null;\n Date cal4Date = null;\n Date cal5Date = null;\n Date cal6Date = null;\n Date cal7Date = null;\n DateFormat dateFormat=(DateFormat) authHandler.getDateOnlyFormat();\n String oneDayBeforeCal1String = dateFormat.format(oneDayBeforeCal1.getTime());\n oneDayBeforeCal1Date = dateFormat.parse(oneDayBeforeCal1String);\n String cal1String = dateFormat.format(cal1.getTime());\n cal1Date = dateFormat.parse(cal1String);\n String cal2String = dateFormat.format(cal2.getTime());\n cal2Date = dateFormat.parse(cal2String);\n String cal3String = dateFormat.format(cal3.getTime());\n cal3Date = dateFormat.parse(cal3String);\n String cal4String = dateFormat.format(cal4.getTime());\n cal4Date = dateFormat.parse(cal4String);\n String cal5String = dateFormat.format(cal5.getTime());\n cal5Date = dateFormat.parse(cal5String);\n String cal6String = dateFormat.format(cal6.getTime());\n cal6Date = dateFormat.parse(cal6String);\n String cal7String = dateFormat.format(cal7.getTime());\n cal7Date = dateFormat.parse(cal7String);\n double amountdue1 = 0;\n double amountdue2 = 0;\n double amountdue3 = 0;\n double amountdue4 = 0;\n double amountdue5 = 0;\n double amountdue6 = 0;\n double amountdue7 = 0;\n double amountdue8 = 0;\n Date asOfDate = null, today = new Date();\n if (request.containsKey(\"asofdate\") && request.get(\"asofdate\") != null) {\n String asOfDateString = (String) request.get(\"asofdate\");\n asOfDate = df.parse(asOfDateString);\n }\n boolean asOfDateEqualsToday = asOfDate != null ? DateUtils.isSameDay(today, asOfDate) : false;\n request.put(\"asOfDateEqualsToday\", asOfDateEqualsToday);\n if (list != null && !list.isEmpty()) {\n for (Object objectArr : list) {\n Object[] oj = (Object[]) objectArr;\n String invid = oj[0].toString();\n amountdue1 = amountdue2 = amountdue3 = amountdue4 = amountdue5 = amountdue6 = amountdue7 = amountdue8 = 0;\n KwlReturnObject objItr = accountingHandlerDAOobj.getObject(GoodsReceipt.class.getName(), invid);\n GoodsReceipt gReceipt = (GoodsReceipt) objItr.getEntityList().get(0);\n //Below If Block code is used to remove duplicate invoice id's when filter on the basis of Product category or Product name\n if (isproductCategory || isproductType) {\n if (InvoiceList.contains(gReceipt.getID())) {\n continue;\n } else {\n InvoiceList.add(gReceipt.getID());\n }\n }\n JournalEntry je = null;\n JournalEntryDetail d = null;\n if (gReceipt.isNormalInvoice()) {\n je = gReceipt.getJournalEntry();\n d = gReceipt.getVendorEntry();\n }\n double invoiceOriginalAmt = 0d;\n double externalCurrencyRate = 0d;\n boolean isopeningBalanceInvoice = gReceipt.isIsOpeningBalenceInvoice();\n Date creationDate = null;\n currencyid = (gReceipt.getCurrency() == null ? currency.getCurrencyID() : gReceipt.getCurrency().getCurrencyID());\n Account account = null;\n creationDate = gReceipt.getCreationDate();\n if (gReceipt.isIsOpeningBalenceInvoice() && !gReceipt.isNormalInvoice()) {\n KwlReturnObject accObjItr = accountingHandlerDAOobj.getObject(Account.class.getName(), gReceipt.getVendor().getAccount().getID());\n account = (Account) accObjItr.getEntityList().get(0);\n externalCurrencyRate = gReceipt.getExchangeRateForOpeningTransaction();\n invoiceOriginalAmt = gReceipt.getOriginalOpeningBalanceAmount();\n } else {\n account = d.getAccount();\n externalCurrencyRate = je.getExternalCurrencyRate();\n// creationDate = je.getEntryDate();\n invoiceOriginalAmt = d.getAmount();\n }\n double amountdue = 0;\n boolean invoiceAmountDueEqualsInvAmount= ((!gReceipt.isIsOpeningBalenceInvoice() && gReceipt.isNormalInvoice()) ? (gReceipt.getInvoiceAmount() == gReceipt.getInvoiceamountdue()) : false);\n request.put(\"invoiceAmtDueEqualsInvoiceAmt\",invoiceAmountDueEqualsInvAmount);\n if (asOfDateEqualsToday || invoiceAmountDueEqualsInvAmount) {\n if (gReceipt.isIsExpenseType()) {\n if (Constants.InvoiceAmountDueFlag && !isAged) {\n ll = accGoodsReceiptCommon.getUpdatedExpGRAmountDue(request, gReceipt);\n } else {\n ll = accGoodsReceiptCommon.getExpGRAmountDue(request, gReceipt);\n }\n if(gReceipt.isIsOpeningBalenceInvoice()){\n amountdue=gReceipt.getOpeningBalanceAmountDue();\n }else{\n amountdue=gReceipt.getInvoiceamountdue();\n }\n belongsTo1099 = (Boolean) ll.get(3);\n } else {\n if (gReceipt.isIsOpeningBalenceInvoice() && !gReceipt.isNormalInvoice()) {\n ll = new ArrayList();\n ll.add(gReceipt.getOriginalOpeningBalanceAmount());\n ll.add(gReceipt.getOpeningBalanceAmountDue());\n ll.add(\"\");\n ll.add(false);\n ll.add(0.0);\n } else {\n if (Constants.InvoiceAmountDueFlag && !isAged) {\n ll = accGoodsReceiptCommon.getInvoiceDiscountAmountInfo(request, gReceipt);\n } else {\n ll = accGoodsReceiptCommon.getGRAmountDueForMonthlyAgedPayable(request, gReceipt);\n }\n }\n\n if (gReceipt.isIsOpeningBalenceInvoice()) {\n amountdue = gReceipt.getOpeningBalanceAmountDue();\n } else {\n amountdue = gReceipt.getInvoiceamountdue();\n }\n belongsTo1099 = (Boolean) ll.get(3);\n }\n } else {\n if (gReceipt.isIsExpenseType()) {\n if (Constants.InvoiceAmountDueFlag && !isAged) {\n ll = accGoodsReceiptCommon.getUpdatedExpGRAmountDue(request, gReceipt);\n } else {\n ll = accGoodsReceiptCommon.getExpGRAmountDue(request, gReceipt);\n }\n amountdue = (Double) ll.get(1);\n belongsTo1099 = (Boolean) ll.get(3);\n } else {\n if (gReceipt.isIsOpeningBalenceInvoice() && !gReceipt.isNormalInvoice()) {\n ll = new ArrayList();\n ll.add(gReceipt.getOriginalOpeningBalanceAmount());\n ll.add(gReceipt.getOpeningBalanceAmountDue());\n ll.add(\"\");\n ll.add(false);\n ll.add(0.0);\n } else {\n if (Constants.InvoiceAmountDueFlag && !isAged) {\n ll = accGoodsReceiptCommon.getInvoiceDiscountAmountInfo(request, gReceipt);\n } else {\n ll = accGoodsReceiptCommon.getGRAmountDueForMonthlyAgedPayable(request, gReceipt);\n }\n }\n amountdue = (Double) ll.get(1);\n belongsTo1099 = (Boolean) ll.get(3);\n }\n }\n if (onlyAmountDue && authHandler.round(amountdue, companyid) == 0 || (only1099Acc && !belongsTo1099)) {//remove //belongsTo1099&&gReceipt.isIsExpenseType()\\\\ in case of viewing all accounts. [PS]\n continue;\n }\n if ((ignoreZero && authHandler.round(amountdue, companyid) <= 0)) {\n continue;\n }\n if (request.containsKey(\"excludeInvoiceId\") && request.get(\"excludeInvoiceId\") != null) {\n String excludeInvoiceId = (String) request.get(\"excludeInvoiceId\");\n if (gReceipt.getGoodsReceiptNumber().equals(excludeInvoiceId)) {\n continue;\n }\n }\n Vendor vendor = gReceipt.getVendor();\n HashMap<String, Object> hashMap = new HashMap<>();\n hashMap.put(\"invoiceID\", gReceipt.getID());\n com.krawler.utils.json.base.JSONObject obj = new com.krawler.utils.json.base.JSONObject();\n obj.put(GoodsReceiptCMNConstants.BILLID, gReceipt.getID());\n obj.put(\"isOpeningBalanceTransaction\", gReceipt.isIsOpeningBalenceInvoice());\n obj.put(\"isNormalTransaction\", gReceipt.isNormalInvoice());\n obj.put(GoodsReceiptCMNConstants.PERSONID, vendor == null ? account.getID() : vendor.getID());\n obj.put(GoodsReceiptCMNConstants.BILLNO, gReceipt.getGoodsReceiptNumber());\n obj.put(GoodsReceiptCMNConstants.CURRENCYID, currencyid);\n obj.put(GoodsReceiptCMNConstants.CURRENCYSYMBOL, (gReceipt.getCurrency() == null ? currency.getSymbol() : gReceipt.getCurrency().getSymbol()));\n obj.put(\"currencyCode\", (gReceipt.getCurrency() == null ? currency.getCurrencyCode() : gReceipt.getCurrency().getCurrencyCode()));\n obj.put(\"currencycode\", (gReceipt.getCurrency() == null ? currency.getCurrencyCode() : gReceipt.getCurrency().getCurrencyCode()));\n obj.put(\"termname\", (gReceipt.getTermid() == null ? vendor.getDebitTerm().getTermname() : gReceipt.getTermid().getTermname()));\n obj.put(GoodsReceiptCMNConstants.CURRENCYNAME, (gReceipt.getCurrency() == null ? currency.getName() : gReceipt.getCurrency().getName()));\n KwlReturnObject bAmt = accCurrencyDAOobj.getBaseToCurrencyAmount(request, 1.0, currencyid, creationDate, 0);\n obj.put(GoodsReceiptCMNConstants.OLDCURRENCYRATE, bAmt.getEntityList().get(0));\n obj.put(GoodsReceiptCMNConstants.DATE, df.format(creationDate));\n obj.put(GoodsReceiptCMNConstants.DUEDATE, df.format(gReceipt.getDueDate()));\n obj.put(GoodsReceiptCMNConstants.PERSONNAME, vendor == null ? account.getName() : vendor.getName());\n obj.put(GoodsReceiptCMNConstants.PERSONINFO, vendor == null ? account.getName() : vendor.getName()+\"(\"+vendor.getAcccode()+\")\");\n obj.put(GoodsReceiptCMNConstants.EXTERNALCURRENCYRATE, externalCurrencyRate);\n obj.put(GoodsReceiptCMNConstants.JOURNALENTRYID, je != null ? je.getID() : \"\"); //'journalentryid' is used to fetch data of this invoice to show in journal entry tab\n obj.put(GoodsReceiptCMNConstants.ENTRYNO, je != null ? je.getEntryNumber() : \"\"); // 'entryno' is used to show journalentry no. in entry no. column\n obj.put(\"cashtransaction\", gReceipt.isCashtransaction());\n obj.put(GoodsReceiptCMNConstants.TYPE, \"Purchase Invoice\");\n Set<GoodsReceiptDetail> goodsReceiptDetails = gReceipt.getRows();\n // Calculating total invoice amount in base currency\n KwlReturnObject invoiceTotalAmtInBaseResult = null;\n if (isopeningBalanceInvoice && gReceipt.isConversionRateFromCurrencyToBase()) {// if invoice is opening balance invoice and Conversion rate is taken from user is Currency to base then following method will be called.\n invoiceTotalAmtInBaseResult = accCurrencyDAOobj.getCurrencyToBaseAmountAccordingToCurrencyToBaseExchangeRate(request, invoiceOriginalAmt, currencyid, creationDate, externalCurrencyRate);\n } else {\n invoiceTotalAmtInBaseResult = accCurrencyDAOobj.getCurrencyToBaseAmount(request, invoiceOriginalAmt, currencyid, creationDate, externalCurrencyRate);\n }\n double invoiceTotalAmountInBase = authHandler.round((Double) invoiceTotalAmtInBaseResult.getEntityList().get(0), companyid);\n if (isBadDebtInvoices) {// in case of Malasian Company\n double totalTaxAmt = 0d;\n double invoiceLevelTaxAmt = gReceipt.getTaxEntry() == null ? 0 : gReceipt.getTaxEntry().getAmount();\n String taxId = gReceipt.getTaxEntry() == null ? \"\" : gReceipt.getTax().getID();\n double rowTaxAmt = 0d;\n for (GoodsReceiptDetail invoiceDetail : goodsReceiptDetails) {\n rowTaxAmt += invoiceDetail.getRowTaxAmount() + invoiceDetail.getRowTermTaxAmount();\n taxId = (invoiceDetail.getTax() != null) ? invoiceDetail.getTax().getID() : taxId;\n }\n totalTaxAmt = invoiceLevelTaxAmt + rowTaxAmt;\n if (totalTaxAmt == 0) {// no need to put invoice in bad debt section if it has tax 0\n continue;\n }\n // get Paid amount of invoice\n Date badDebtCalculationToDate = null;\n if (request.get(\"badDebtCalculationToDate\") != null) {\n badDebtCalculationToDate = df.parse((String) request.get(\"badDebtCalculationToDate\"));\n }\n KwlReturnObject invoicePaidAmtObj = accPaymentDAOobj.getPaymentFromBadDebtClaimedInvoice(gReceipt.getID(), true, badDebtCalculationToDate);//accPaymentDAOobj.getPaymentAmountofBadDebtGoodsReceipt(gReceipt.getID(),true);\n double paidAmt = 0;\n List paidList = invoicePaidAmtObj.getEntityList();\n if (paidList != null && !paidList.isEmpty()) {\n Iterator pmtIt = paidList.iterator();\n while (pmtIt.hasNext()) {\n PaymentDetail rd = (PaymentDetail) pmtIt.next();\n double paidAmtInPaymentCurrency = rd.getAmount();\n// KwlReturnObject bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, paidAmtInPaymentCurrency, rd.getPayment().getCurrency().getCurrencyID(), rd.getPayment().getJournalEntry().getEntryDate(), rd.getPayment().getJournalEntry().getExternalCurrencyRate());\n KwlReturnObject bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, paidAmtInPaymentCurrency, rd.getPayment().getCurrency().getCurrencyID(), rd.getPayment().getCreationDate(), rd.getPayment().getJournalEntry().getExternalCurrencyRate());\n double paidAmtInBase = authHandler.round((Double) bAmt1.getEntityList().get(0), companyid);\n paidAmt += paidAmtInBase;\n\n }\n }\n String fromcurrencyid = gReceipt.getCurrency().getCurrencyID();\n HashMap<String, Object> badMaps = new HashMap<String, Object>();\n badMaps.put(\"companyid\", companyid);\n badMaps.put(\"invoiceid\", invid);\n\n KwlReturnObject badDebtMappingResult = accGoodsReceiptobj.getBadDebtPurchaseInvoiceMappingForGoodsReceipt(badMaps);\n double totalRecoveredAmt = 0;\n List badDebtMapping = badDebtMappingResult.getEntityList();\n if (!badDebtMapping.isEmpty()) {\n Iterator badIt = badDebtMapping.iterator();\n while (badIt.hasNext()) {\n BadDebtPurchaseInvoiceMapping debtInvoiceMapping = (BadDebtPurchaseInvoiceMapping) badIt.next();\n totalRecoveredAmt += debtInvoiceMapping.getBadDebtAmtRecovered();\n }\n }\n // Calculate Recover Amount in base\n// KwlReturnObject bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, totalRecoveredAmt, fromcurrencyid, gReceipt.getJournalEntry().getEntryDate(), gReceipt.getJournalEntry().getExternalCurrencyRate());\n KwlReturnObject bAmt1 = accCurrencyDAOobj.getCurrencyToBaseAmount(request, totalRecoveredAmt, fromcurrencyid, gReceipt.getCreationDate(), gReceipt.getJournalEntry().getExternalCurrencyRate());\n totalRecoveredAmt = authHandler.round((Double) bAmt1.getEntityList().get(0), companyid);\n double paidAfterClaimed = paidAmt - totalRecoveredAmt;\n if (authHandler.round(amountdue, companyid) == 0 && authHandler.round(paidAfterClaimed, companyid) == 0) {// don't put invoices which has amount due zero and whole gst has been recovered\n continue;\n }\n }\n\n //For getting amountdue [PS]\n if (gReceipt.isCashtransaction()) {\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUEINBASE, 0);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE, 0);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUENONNEGATIVE, 0);\n obj.put(GoodsReceiptCMNConstants.INCASH, true);\n } else {\n if (isopeningBalanceInvoice && gReceipt.isConversionRateFromCurrencyToBase()) {// if invoice is opening balance invoice and Conversion rate is taken from user is Currency to base then following method will be called.\n bAmt = accCurrencyDAOobj.getCurrencyToBaseAmountAccordingToCurrencyToBaseExchangeRate(request, authHandler.round(amountdue,companyid), currencyid, creationDate, externalCurrencyRate);\n } else {\n bAmt = accCurrencyDAOobj.getCurrencyToBaseAmount(request, authHandler.round(amountdue,companyid), currencyid, creationDate, externalCurrencyRate);\n }\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUEINBASE, authHandler.round((Double) bAmt.getEntityList().get(0), companyid));\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE, authHandler.round(amountdue, companyid));\n\n if (booleanAged) {//Added for aged payable/receivable\n int datefilter = (request.containsKey(\"datefilter\") && request.get(\"datefilter\") != null) ? Integer.parseInt(request.get(\"datefilter\").toString()) : 0;// 0 = Invoice Due date OR 1 = Invoice date\n Date dueDate = null;\n if (!StringUtil.isNullOrEmpty(df.format(gReceipt.getDueDate()))) {\n dueDate = df.parse(df.format(gReceipt.getDueDate()));\n }\n if (datefilter == 0) {\n dueDate = df.parse(df.format(gReceipt.getDueDate()));\n } else {\n dueDate = df.parse(df.format(creationDate));\n }\n\n if (dueDate.after(oneDayBeforeCal1Date) && (dueDate.before(cal1Date) || dueDate.equals(cal1Date))) {\n amountdue1 = authHandler.round(amountdue, companyid);\n } else if ((cal2Date.before(dueDate) || cal2Date.equals(dueDate)) && cal1Date.after(dueDate)) {\n amountdue2 = authHandler.round(amountdue, companyid);\n } else if ((cal3Date.before(dueDate) || cal3Date.equals(dueDate)) && cal2Date.after(dueDate)) {\n amountdue3 = authHandler.round(amountdue, companyid);\n } else if ((cal4Date.before(dueDate) || cal4Date.equals(dueDate)) && cal3Date.after(dueDate)) {\n amountdue4 = authHandler.round(amountdue, companyid);\n } else if ((cal5Date.before(dueDate) || cal5Date.equals(dueDate)) && cal4Date.after(dueDate)) {\n amountdue5 = authHandler.round(amountdue, companyid);\n } else if ((cal6Date.before(dueDate) || cal6Date.equals(dueDate)) && cal5Date.after(dueDate)) {\n amountdue6 = authHandler.round(amountdue, companyid);\n } else if ((cal7Date.before(dueDate) || cal7Date.equals(dueDate)) && cal6Date.after(dueDate)) {\n amountdue7 = authHandler.round(amountdue, companyid);\n } else {\n amountdue8 = authHandler.round(amountdue, companyid);\n }\n }\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUENONNEGATIVE, (amountdue <= 0) ? 0 : authHandler.round(amountdue, companyid));\n }\n obj.put(GoodsReceiptCMNConstants.AMOUNT, authHandler.round((Double) invoiceOriginalAmt, companyid)); //actual invoice amount\n obj.put(GoodsReceiptCMNConstants.AMOUNTINBASE, invoiceTotalAmountInBase);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE1, amountdue1);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE2, amountdue2);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE3, amountdue3);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE4, amountdue4);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE5, amountdue5);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE6, amountdue6);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE7, amountdue7);\n obj.put(GoodsReceiptCMNConstants.AMOUNTDUE8, amountdue8);\n if (!(ignoreZero && authHandler.round(amountdue, companyid) <= 0)) {\n jArr.put(obj);\n }\n }\n }\n } catch (Exception ex) {\n throw ServiceException.FAILURE(\"accGoodsReceiptController.getGoodsReceiptsJsonForMonthlyAgedPayables : \" + ex.getMessage(), ex);\n }\n return jArr;\n }", "public void showDataInvoiceNo()\n\t{\n\t\ttry {\n\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\tString sql=\"SELECT `Sr_No`, `Products`, `Serial_No`, `Module_No`, `Rate_Rs`, `CGST(%)`, `CGST(Rs)`, `SGST(%)`, `SGST(Rs)`, `GST(%)`, `GST(Rs)`, `Actual_Price`, `Discount(%)`, `Discount(Rs)`, `Quantity`, `Discount_Price`, `Total` FROM `mundheelectronics1`.`productsdata` WHERE Invoice_No=?\";\n\t\t\tps=con.prepareStatement(sql);\n\t\t\tps.setString(1,txtInvoiceNo.getText());\n\t\t\trs=ps.executeQuery();\n\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void testOrderFactoryInvoiceTotal() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n \n // create the invoice\n orderController.addOrderInvoice(orderController.getOrder(1));\n\n // check that the invoice is created\n assertEquals(1, orderController.getOrderInvoices().size());\n assertEquals(3 * MENU_PRICE, orderController.getOrderInvoices().get(0).getSubTotal());\n assertEquals((3 * MENU_PRICE) * 0.1, orderController.getOrderInvoices().get(0).getServiceChargeAmount());\n assertEquals((((3 * MENU_PRICE) * 0.1) + (3 * MENU_PRICE)) * 0.07, orderController.getOrderInvoices().get(0).getGSTAmount());\n assertEquals(((((3 * MENU_PRICE) * 0.1) + (3 * MENU_PRICE)) * 0.07) + ((3 * MENU_PRICE) * 0.1) + (3 * MENU_PRICE), orderController.getOrderInvoices().get(0).getTotal());\n assertEquals(1, orderController.getOrderInvoices().get(0).getOrderId());\n assertEquals(STAFF_NAME, orderController.getOrderInvoices().get(0).getStaffName());\n assertEquals(1, orderController.getOrderInvoices().get(0).getTableId());\n }", "public OrderInventedRecord(Integer id, String orderSn, Integer sellerId, Integer memberId, String memberName, Byte orderState, Timestamp payTime, Byte paymentStatus, Byte invoiceStatus, String invoiceTitle, Byte invioceState, String invoiceType, BigDecimal moneyProduct, BigDecimal moneyOrder, BigDecimal moneyPaidBalance, BigDecimal moneyPaidReality, BigDecimal moneyGiftcardAmount, BigDecimal moneyCouponcode, BigDecimal moneyLowerAmount, BigDecimal moneyBack, Integer moneyIntegral, Integer lowerId, Integer giftcardId, Integer couponcodeId, String ip, String paymentName, String paymentCode, String mobile, String codeExchange, Byte isSuccess, String email, String zipCode, String remark, Timestamp finishTime, String tradeSn, String source, Byte isGiftCardOrder, Integer productCommentsId, Timestamp createTime, Timestamp updateTime) {\n super(OrderInvented.ORDER_INVENTED);\n\n set(0, id);\n set(1, orderSn);\n set(2, sellerId);\n set(3, memberId);\n set(4, memberName);\n set(5, orderState);\n set(6, payTime);\n set(7, paymentStatus);\n set(8, invoiceStatus);\n set(9, invoiceTitle);\n set(10, invioceState);\n set(11, invoiceType);\n set(12, moneyProduct);\n set(13, moneyOrder);\n set(14, moneyPaidBalance);\n set(15, moneyPaidReality);\n set(16, moneyGiftcardAmount);\n set(17, moneyCouponcode);\n set(18, moneyLowerAmount);\n set(19, moneyBack);\n set(20, moneyIntegral);\n set(21, lowerId);\n set(22, giftcardId);\n set(23, couponcodeId);\n set(24, ip);\n set(25, paymentName);\n set(26, paymentCode);\n set(27, mobile);\n set(28, codeExchange);\n set(29, isSuccess);\n set(30, email);\n set(31, zipCode);\n set(32, remark);\n set(33, finishTime);\n set(34, tradeSn);\n set(35, source);\n set(36, isGiftCardOrder);\n set(37, productCommentsId);\n set(38, createTime);\n set(39, updateTime);\n }", "List<ItemPriceDTO> findAll();", "public BigDecimal getPriceLastInv();", "CarPaymentMethod processHotDollars();", "public interface Price {\n\n BigDecimal getSumPrice();\n}", "DocumentTotalsType2 getDocumentTotals();", "@Transactional\n @Override\n public StringBuffer addSalesOrderTparts(String customerID, String cartIDs, String addressID, String paymentType,\n String orderAmount, String scoreAll, String memo, String itemCount, String itemID,\n String supplierID, String itemType, String orderType, String objID, String invoiceType,\n String invoiceTitle, String generateType, String orderID,String memoIDs,String allFreight, String supplierFreightStr) throws Exception {\n \t\n String ids[] = cartIDs.split(\",\");\n String memos[] = memoIDs.split(\",\");\n List<ShoppingCartVO> shopCartList = new ArrayList<ShoppingCartVO>();\n for (String id : ids) {\n ShoppingCartVO shoppingCartVO = shoppingCartDAO.findShoppingCartByID(Long.valueOf(id));\n shopCartList.add(shoppingCartVO);\n }\n Map<String,List<ShoppingCartVO>> maps = new HashMap<String,List<ShoppingCartVO>>();\n for(ShoppingCartVO s:shopCartList){\n \tList<ShoppingCartVO> temp = new ArrayList<ShoppingCartVO>();\n \t String sid1= s.getSupplierID();\n String siname1= s.getSupplierName();\n for(ShoppingCartVO shoppingCartVO1 : shopCartList){\n \t//当前店铺对应的购物车集合\n \tString sid2 = shoppingCartVO1.getSupplierID();\n \tif(sid1.equals(sid2)){\n \t\ttemp.add(shoppingCartVO1);\n \t}\n }\n maps.put(sid1+\"_\"+siname1, temp);\n }\n \n //根据物流模板计算运费\n Map<String, Double> supplierFreightMap = new HashMap<String, Double>();\n String[] supplierFreightAll = null;\n if(StringUtil.isNotEmpty(supplierFreightStr))\n {\n \tsupplierFreightAll = supplierFreightStr.split(\"\\\\|\");\n for (int i = 0; i < supplierFreightAll.length; i++) {\n \tString[] supplierFreight = supplierFreightAll[i].split(\":\");\n \tsupplierFreightMap.put(supplierFreight[0], Double.parseDouble(supplierFreight[1]));\n \t\t} \t\n }\n \n \n StringBuffer ordersList = new StringBuffer();\n int num = 0;\n// cachedClient.delete(customerID + orderID);\n Set<String> set = maps.keySet();\n\t\tfor(String string : set){\n\t\t List<ShoppingCartVO> temp1= maps.get(string);\n\t\t double supplierFreight = 0d;\n\t\t if(supplierFreightMap.size()>0)\n\t\t {\n\t\t\t supplierFreight = supplierFreightMap.get(string);\n\t\t }\n\t\t Double amount = 0d;\n\t\t Integer count = 0;\n Integer score = 0;\n Double weight = 0d;\n\t\t for (ShoppingCartVO shoppingCartVO : temp1) {\n ItemVO itemVO = itemDAO.findItemById(shoppingCartVO.getItemID());\n count += shoppingCartVO.getItemCount();\n // weight += itemVO.getWeight();\n if (shoppingCartVO.getType() == 1) {\n amount += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesPrice();\n } else if (shoppingCartVO.getType() == 2) {\n score += shoppingCartVO.getItemCount() * itemVO.getScore();\n } else if (shoppingCartVO.getType() == 3) {\n amount += shoppingCartVO.getItemCount() * itemVO.getScorePrice();\n score += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesScore();\n }\n }\n\t\t //SalesOrderVO tempOrder = new SalesOrderVO();\n\t /*if (tempOrder == null) {\n\t throw new Exception(\"参数错误\");\n\t }\n\t if (\"012\".indexOf(invoiceType) == -1) {\n\t throw new Exception(\"参数错误\");\n\t }*/\n\t SalesOrderDTO salesOrderDTO = new SalesOrderDTO();\n\t salesOrderDTO.setMainID(randomNumeric());\n\t salesOrderDTO.setCustomerID(customerID);\n\t salesOrderDTO.setPaymentType(Integer.valueOf(paymentType));\n\t salesOrderDTO.setPaymentStatus(0);\n\n\t // salesOrderDTO.setExpressFee(tempOrder.getExpressFee());//运费\n\t salesOrderDTO.setProductAmount(amount);\n\t salesOrderDTO.setTotalAmount(amount + supplierFreight);\n\t salesOrderDTO.setPayableAmount(amount);\n\n\t salesOrderDTO.setOrderType(Integer.valueOf(orderType));\n\t salesOrderDTO.setMemo(getMemoBySupplier(memos,string.split(\"_\")[0]));\n\t salesOrderDTO.setInvoiceType(Integer.parseInt(invoiceType));\n\t salesOrderDTO.setInvoiceTitle(invoiceTitle);\n\t salesOrderDTO.setSupplierID(string);\n\t salesOrderDTO.setExpressFee(supplierFreight);\n\t salesOrderDAO.addSalesOrder(salesOrderDTO);\n\t ordersList.append(salesOrderDTO.getMainID()+\",\");\n\t // 支付方式1:余额支付2:货到付款3:在线支付4:积分礼品5:线下汇款\n\t if(!paymentType.equals(\"3\")){\n\t \t//3:在线支付\n\t \t CustomerDeliveryAddressVO customerDeliveryAddressVO = customerDeliveryAddressDAO.findAddressByID(Long.valueOf(addressID));\n\t \t if (customerDeliveryAddressVO != null) {\n\t \t SalesOrderDeliveryAddressDTO salesOrderDeliveryAddressDTO = new SalesOrderDeliveryAddressDTO();\n\t \t salesOrderDeliveryAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderDeliveryAddressDTO.setName(customerDeliveryAddressVO.getName());\n\t \t salesOrderDeliveryAddressDTO.setCountryID(customerDeliveryAddressVO.getCountryID());\n\t \t salesOrderDeliveryAddressDTO.setProvinceID(customerDeliveryAddressVO.getProvinceID());\n\t \t salesOrderDeliveryAddressDTO.setCityID(customerDeliveryAddressVO.getCityID());\n\t \t salesOrderDeliveryAddressDTO.setDisctrictID(customerDeliveryAddressVO.getDisctrictID());\n\t \t salesOrderDeliveryAddressDTO.setAddress(customerDeliveryAddressVO.getAddress());\n\t \t salesOrderDeliveryAddressDTO.setMobile(customerDeliveryAddressVO.getMobile());\n\t \t salesOrderDeliveryAddressDTO.setTelephone(customerDeliveryAddressVO.getTelephone());\n\t \t if (customerDeliveryAddressVO.getZip() != null) {\n\t \t salesOrderDeliveryAddressDTO.setZip(customerDeliveryAddressVO.getZip());\n\t \t }\n\t \t salesOrderDeliveryAddressDAO.insertSalesOrderDeliveryAddress(salesOrderDeliveryAddressDTO);\n\t \t }\n\t \t ShippingAddressVO shippingAddressVO = shippingAddressDAO.findDefaultShippingAddress();\n\t \t if (shippingAddressVO != null) {\n\t \t SalesOrderShippingAddressDTO salesOrderShippingAddressDTO = new SalesOrderShippingAddressDTO();\n\t \t salesOrderShippingAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderShippingAddressDTO.setName(shippingAddressVO.getName());\n\t \t salesOrderShippingAddressDTO.setCountryID(shippingAddressVO.getCountryID());\n\t \t salesOrderShippingAddressDTO.setProvinceID(shippingAddressVO.getProvinceID());\n\t \t salesOrderShippingAddressDTO.setCityID(shippingAddressVO.getCityID());\n\t \t salesOrderShippingAddressDTO.setDisctrictID(shippingAddressVO.getDisctrictID());\n\t \t salesOrderShippingAddressDTO.setAddress(shippingAddressVO.getAddress());\n\t \t salesOrderShippingAddressDTO.setMobile(shippingAddressVO.getMobile());\n\t \t salesOrderShippingAddressDTO.setTelephone(shippingAddressVO.getTelephone());\n\t \t salesOrderShippingAddressDTO.setZip(shippingAddressVO.getZip());\n\t \t salesOrderShippingAddressDAO.insertSalesOrderShippingAddress(salesOrderShippingAddressDTO);\n\t \t }\n\t }\n\t \n\t ItemDTO itemDTO = new ItemDTO();\n\t SupplierItemDTO supplierItemDTO = new SupplierItemDTO();\n\t SalesOrderLineDTO salesOrderLineDTO = new SalesOrderLineDTO();\n\t if (generateType.equals(\"quickBuy\")) {\n\t generateQuickBuyOrder(itemCount,cartIDs, itemID, supplierID, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"oneKey\")) {\n\t generateOneKeyOrder(customerID, itemCount, itemType, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"shoppingcart\")) {\n\t \tgenarateShoppingCartOrderTparts(customerID, cartIDs, itemCount, itemType, objID, salesOrderDTO, itemDTO,\n\t supplierItemDTO, salesOrderLineDTO);\n\t } else {\n\t throw new Exception(\"订单类型无法确定\");\n\t }\n\t num++;\n\t\t}\n return ordersList;\n }", "public static void main(String args[]) \r\n\t{\n\t\tSystem.out.println(\"Welcome to the Line Item Calculator\"); \r\n\t\tSystem.out.println(); \r\n\t\tScanner sc = new Scanner(System.in); \r\n\t\t\r\n\t\t\r\n\t\tString select_item;\r\n\t\tString choice = \"y\"; \r\n\t\tInvoice item = new Invoice ();\r\n\t\tdouble invoice_Total = 0;\r\n\t\t\r\n\t\tNumberFormat currency = NumberFormat.getCurrencyInstance();\r\n\t\t\r\n\t\twhile (choice.equalsIgnoreCase(\"y\")){ \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// get the input from the user \r\n\t\t\tString productCode = Validator.getString(sc,\"Enter product code: \"); \r\n\t\t\tint quantity = Validator.getInt(sc,\"Enter quantity: \"); \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//get the Product object \r\n\t\t\tProduct product = ProductDB.getProductInfo(productCode); \r\n\t\t\t\r\n\t\t\t\r\n\t\t\tBonus:\r\n\t\t\tfor(int i=0; i < item.get_list().size(); i++){\r\n\t\t\t\tselect_item = item.get_list().get(i) ;\r\n\t\t\t\t\r\n\t\t\t\t//&& i != item.get_list().size()\r\n\t\t\t\tif(select_item.substring(0,2).contains(productCode) && i != item.get_list().size()){\r\n\t\t\t\t\tquantity += Integer.parseInt(select_item.substring(42,43)); //index of the quantity in the list\r\n\t\t\t\t\t//invoice_Total -= Integer.parseInt(select_item\r\n\t\t\t\t\titem.delete_line_item(i);\r\n\t\t\t\t\tbreak Bonus;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t// create the LineItem object and set its fields \r\n\t\t\tLineItem lineItem = new LineItem(); \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tlineItem.setProduct(product); \r\n\t\t\tlineItem.setQuantity(quantity);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//invoice_Total += lineItem.getTotal();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\titem.store_line_item(lineItem.getProduct(), lineItem.getQuantity(), lineItem.getTotal());\r\n\t\t\t\r\n\t\t\r\n\t\t\tSystem.out.println(\"Another line item? (y/n): \"); \r\n\t\t\tchoice = sc.nextLine();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Code Description Price Qty Total \");\r\n\t\tSystem.out.println(\"---- ------------ --------- ----- ------- \");\r\n\t\t\r\n\t\t\r\n\t\tfor (String list:item.get_list()){\r\n\t\t\t\r\n\t\t\r\n\t\t\tinvoice_Total += Double.parseDouble(list.substring(56,61)); //index of the total in the list\r\n\t\t\tSystem.out.println(list);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\" Invoice total: \" + currency.format(invoice_Total));\r\n\t\t\r\n\t}", "int insert(ProcRecInvoice record);", "BigDecimal calculateTotalPrice(Order order);", "public List viewTotalInscritosBD();", "@Transactional\n public OrderViewModel processOrder(OrderViewModel ovm){\n\n //Making sure that the Customer exist\n try{\n customerService.getCustomer(ovm.getCustomerId());\n }catch (RuntimeException e){\n throw new CustomerNotFoundException(\"No Customer found in the database for id #\" + ovm.getCustomerId() + \" !\");\n }\n\n //List to store the ProductsToBuy\n List<ProductToBuyViewModel> productsToBuy = ovm.getProductsToBuy();\n\n //List with uniques ProductsToBuy\n productsToBuy = filterProductsToBuyList(productsToBuy);\n<<<<<<< HEAD\n\n //List InvoiceITems\n List<InvoiceItemViewModel> invoiceItemsList = new ArrayList<>();\n\n<<<<<<< HEAD\n int count = 0;\n\n //The deletion is going to be processed if the Customer does not have any related invoices\n try{\n invoiceService.getInvoicesByCustomerId(id);\n count++;\n }catch (RuntimeException e){\n try{\n levelUpService.getLevelUpAccountByCustomerId(id);\n count++;\n=======\n //Order Total\n double total = 0;\n\n //List that stores the Inventory register that have to be updated\n List<InventoryViewModel> inventoriesToUpdate = new ArrayList<>();\n\n //Getting all the Inventory Rows for the productId\n for(int i = 0; i < productsToBuy.size(); i++){\n\n ProductToBuyViewModel product = productsToBuy.get(i);\n\n int productId = product.getProductId();\n\n //Checking that the product exist\n try{\n productService.getProduct(productId);\n }catch (RuntimeException e){\n throw new ProductNotFoundException(\"Cannot process your order, there is no Product associated with id number \"+ productId+ \" in the database!!\");\n }\n\n //Reading the product Price from the ProductService\n BigDecimal unitPrice = BigDecimal.valueOf(Double.valueOf(productService.getProduct(productId).getListPrice()));\n\n //Reading the Product in Stock from the InventoryService\n List<InventoryViewModel> inventoryList = inventoryService.getAllInventoriesByProductId(product.getProductId());\n\n inventoryList = orderInventoryListByQuantity(inventoryList);\n\n int totalInInventory = 0;\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n=======\n\n //List InvoiceITems\n List<InvoiceItemViewModel> invoiceItemsList = new ArrayList<>();\n\n //Order Total\n double total = 0;\n\n //List that stores the Inventory register that have to be updated\n List<InventoryViewModel> inventoriesToUpdate = new ArrayList<>();\n\n //Getting all the Inventory Rows for the productId\n for(int i = 0; i < productsToBuy.size(); i++){\n\n ProductToBuyViewModel product = productsToBuy.get(i);\n\n int productId = product.getProductId();\n\n //Checking that the product exist\n try{\n productService.getProduct(productId);\n }catch (RuntimeException e){\n throw new ProductNotFoundException(\"Cannot process your order, there is no Product associated with id number \"+ productId+ \" in the database!!\");\n }\n\n //Reading the product Price from the ProductService\n BigDecimal unitPrice = BigDecimal.valueOf(Double.valueOf(productService.getProduct(productId).getListPrice()));\n\n //Reading the Product in Stock from the InventoryService\n List<InventoryViewModel> inventoryList = inventoryService.getAllInventoriesByProductId(product.getProductId());\n\n inventoryList = orderInventoryListByQuantity(inventoryList);\n\n int totalInInventory = 0;\n\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n for (int i2 = 0; i2 < inventoryList.size(); i2++){\n int quantityInInventory = inventoryList.get(i2).getQuantity();\n totalInInventory = totalInInventory + quantityInInventory;\n }\n<<<<<<< HEAD\n<<<<<<< HEAD\n }\n\n if(count != 0){\n throw new DeleteNotAllowedException(\"Impossible Deletion, there is LevelUp Account associated with this Customer\");\n }\n\n }\n=======\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n int quantityToBuy = product.getQuantity();\n\n //Check if there is enough productsToBuy in the inventory.\n if(quantityToBuy > totalInInventory){\n if(totalInInventory == 0){\n throw new OutOfStockException(\"Sorry, we can not process your order the Product with the id \"+product.getProductId() +\" is out of stock!!\");\n }else{\n throw new OutOfStockException(\"Sorry, we can not process your order there is only \"+ totalInInventory +\" units of the Product with the id \" + product.getProductId());\n }\n }\n\n //List<InvoiceItemViewModel> invoiceItemsPerProduct = updateInventory(inventoryList, quantityToBuy);\n\n List<InvoiceItemViewModel> invoiceItemsPerProduct = new ArrayList<>();\n\n<<<<<<< HEAD\n return inventoryService.createInventory(ivm);\n }\n=======\n for(int i3 = 0; i3 < inventoryList.size(); i3++){\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n=======\n\n int quantityToBuy = product.getQuantity();\n\n //Check if there is enough productsToBuy in the inventory.\n if(quantityToBuy > totalInInventory){\n if(totalInInventory == 0){\n throw new OutOfStockException(\"Sorry, we can not process your order the Product with the id \"+product.getProductId() +\" is out of stock!!\");\n }else{\n throw new OutOfStockException(\"Sorry, we can not process your order there is only \"+ totalInInventory +\" units of the Product with the id \" + product.getProductId());\n }\n }\n\n //List<InvoiceItemViewModel> invoiceItemsPerProduct = updateInventory(inventoryList, quantityToBuy);\n\n List<InvoiceItemViewModel> invoiceItemsPerProduct = new ArrayList<>();\n\n for(int i3 = 0; i3 < inventoryList.size(); i3++){\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n InventoryViewModel inventory = inventoryList.get(i3);\n int quantityAvailablePerInventory = inventory.getQuantity();\n\n<<<<<<< HEAD\n<<<<<<< HEAD\n try{\n return inventoryService.getAllInventories();\n }catch (RuntimeException e){\n throw new InventoryNotFoundException(\"The database is empty!!! No Inventory found in the Database\");\n }\n }\n=======\n //Create an InvoiceItem\n InvoiceItemViewModel invoiceItem = new InvoiceItemViewModel();\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n if (quantityToBuy > quantityAvailablePerInventory) {\n\n<<<<<<< HEAD\n try{\n inventoryService.updateInventory(id,ivm);\n }catch (RuntimeException e){\n throw new InventoryNotFoundException(\"Impossible Update, No Inventory found in the Database for id \" + id + \"!\");\n }\n }\n=======\n quantityToBuy = quantityToBuy - quantityAvailablePerInventory;\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n=======\n //Create an InvoiceItem\n InvoiceItemViewModel invoiceItem = new InvoiceItemViewModel();\n\n if (quantityToBuy > quantityAvailablePerInventory) {\n\n quantityToBuy = quantityToBuy - quantityAvailablePerInventory;\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n //If the quantityToBuy is larger than the quantity available, that means that is going to empty that Inventory register\n inventory.setQuantity(0);\n\n<<<<<<< HEAD\n<<<<<<< HEAD\n try{\n return inventoryService.getInventory(id);\n }catch (RuntimeException e){\n throw new InventoryNotFoundException(\"No Inventory found in the Database for id \" + id + \"!\");\n }\n }\n\n //Delete Inventory\n public void deleteInventory(int id){\n inventoryService.deleteInventory(id);\n }\n=======\n //Updating the inventory\n //inventoryService.updateInventory(inventory.getInventoryId(), inventory);\n inventoriesToUpdate.add(inventory);\n\n //Updating the invoiceItem\n invoiceItem.setQuantity(quantityAvailablePerInventory);\n invoiceItem.setInventoryId(inventory.getInventoryId());\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n //Adding the invoice to the List\n invoiceItemsPerProduct.add(invoiceItem);\n\n<<<<<<< HEAD\n try{\n return inventoryService.getAllInventoriesByProductId(productId);\n }", "public List<Meta> obtTotalVentaXLineaProductos(Integer numPeri, Integer idPers) throws SQLException, Exception{\n \n CallableStatement statement = null;\n ResultSet rsConsulta = null;\n Connection cnConexion = null;\n List<Meta> lstResult = new ArrayList<>();\n \n try {\n \n cnConexion = ConexionBD.obtConexion();\n String strFiltro = \"\";\n \n if(idPers > 0 ){\n strFiltro += \" AND S1.ID_PERS = \" + idPers;\n }\n \n String sql = \"SELECT \" +\n \" S1.ID_PERS\\n\" +\n \" ,USU.COD_USUARIO\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END AS COD_STIPOPROD\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END AS DES_STIPOPROD\\n\" +\n \" ,SUM((T1.NUM_VALOR * T1.NUM_CANTIDAD) - (NVL(T1.NUM_MTODSCTO,0) * T1.NUM_CANTIDAD)) AS NUM_TOTALVENTA \\n\" +\n \" FROM SIC3DOCUPROD T1\\n\" +\n \" JOIN SIC1DOCU S1 ON T1.ID_DOCU = S1.ID_DOCU \\n\" +\n \" JOIN SIC1PROD T3 ON T3.ID_PROD = T1.ID_PROD \\n\" +\n \" JOIN VI_SICSTIPOPROD V2 ON V2.ID_STIPOPROD = T3.ID_STIPOPROD\\n\" +\n \" JOIN SIC1STIPODOCU T6 ON T6.ID_STIPODOCU = S1.ID_STIPODOCU\\n\" +\n \" JOIN SIC3DOCUESTA RELESTA ON RELESTA.ID_DOCU = S1.ID_DOCU\\n\" +\n \" AND TO_CHAR(RELESTA.FEC_HASTA,'DD/MM/YYYY') = '31/12/2400' \\n\" +\n \" JOIN VI_SICESTA ESTA ON ESTA.ID_ESTA = RELESTA.ID_ESTADOCU\\n\" +\n \" AND ((ESTA.COD_ESTA = 'VI_SICESTAFINALIZADO' AND T6.COD_STIPODOCU IN ('VI_SICFACTURA','VI_SICBOLETA','VI_SICSINDOCU')))\\n\" +\n \" JOIN SIC1USUARIO USU ON USU.ID_USUARIO = S1.ID_PERS\\n\" +\n \" WHERE S1.ID_SCLASEEVEN = 2 \" + \n \" AND TO_NUMBER(TO_CHAR(S1.FEC_DESDE,'YYYYMM')) = \" + numPeri + strFiltro +\n \" GROUP BY CASE WHEN COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END \" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END \" +\n \" ,USU.COD_USUARIO \" +\n \" ,S1.ID_PERS\";\n \n \n \n statement = cnConexion.prepareCall( sql,\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_READ_ONLY,\n ResultSet.CLOSE_CURSORS_AT_COMMIT ); \n \n rsConsulta = statement.executeQuery(); \n \n while(rsConsulta.next()){\n\n Meta obj = new Meta();\n \n String codStipoprod = rsConsulta.getString(\"COD_STIPOPROD\");\n BigDecimal numTotalVentasMes = rsConsulta.getBigDecimal(\"NUM_TOTALVENTA\");\n \n BigDecimal numPorcAlcanzado;\n if(codStipoprod.equals(\"VI_SICVINILCORTE\")){\n obj.setDesMeta(\"% Logrado Meta(Vinil)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAVINIL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAVINIL));\n }\n else{\n obj.setDesMeta(\"% Logrado Meta(Papel)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAPAPEL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAPAPEL));\n }\n \n Sic1pers objPers = new Sic1pers();\n objPers.setIdPers(rsConsulta.getBigDecimal(\"ID_PERS\"));\n objPers.setDesPers(rsConsulta.getString(\"COD_USUARIO\"));\n \n obj.setCodStipoprod(codStipoprod);\n obj.setDesStipoprod(rsConsulta.getString(\"DES_STIPOPROD\"));\n obj.setNumTotalventalogrado(numTotalVentasMes);\n obj.setNumPorclogrado(numPorcAlcanzado);\n obj.setSic1pers(objPers);\n \n lstResult.add(obj); \n }\n }catch(Exception ex){\n throw new Exception(ex.getMessage());\n }finally{\n if(statement != null)\n statement.close();\n if(rsConsulta != null)\n rsConsulta.close();\n if(cnConexion != null)\n cnConexion.close();\n }\n \n return lstResult;\n }", "public double getInvoiceAmount(){\n\t\t// declare a local variable of type double to store the invoice's total price\n\t\tdouble totalPrice;\n\t\t// the total price is given my multiplying the price per unit with the quantity\n\t\ttotalPrice = price * quantity;\t\t\n\t\t// return the value stored in the local variable totalPrice\n\t\treturn totalPrice;\n\t}", "@Transactional\n @Override\n public StringBuffer addSalesOrder(String customerID, String cartIDs, String addressID, String paymentType,\n String orderAmount, String scoreAll, String memo, String itemCount, String itemID,\n String supplierID, String itemType, String orderType, String objID, String invoiceType,\n String invoiceTitle, String generateType, String orderID, String allFreight, String supplierFreightStr) throws Exception {\n \t\n String ids[] = cartIDs.split(\",\");\n List<ShoppingCartVO> shopCartList = new ArrayList<ShoppingCartVO>();\n for (String id : ids) {\n ShoppingCartVO shoppingCartVO = shoppingCartDAO.findShoppingCartByID(Long.valueOf(id));\n shopCartList.add(shoppingCartVO);\n }\n Map<String,List<ShoppingCartVO>> maps = new HashMap<String,List<ShoppingCartVO>>();\n for(ShoppingCartVO s:shopCartList){\n \tList<ShoppingCartVO> temp = new ArrayList<ShoppingCartVO>();\n \t String sid1= s.getSupplierID();\n String siname1= s.getSupplierName();\n for(ShoppingCartVO shoppingCartVO1 : shopCartList){\n \t//当前店铺对应的购物车集合\n \tString sid2 = shoppingCartVO1.getSupplierID();\n \tif(sid1.equals(sid2)){\n \t\ttemp.add(shoppingCartVO1);\n \t}\n }\n maps.put(sid1+\"_\"+siname1, temp);\n }\n \n //根据物流模板计算运费\n Map<String, Double> supplierFreightMap = new HashMap<String, Double>();\n String[] supplierFreightAll = supplierFreightStr.split(\"\\\\|\");\n for (int i = 0; i < supplierFreightAll.length; i++) {\n \tString[] supplierFreight = supplierFreightAll[i].split(\":\");\n \tsupplierFreightMap.put(supplierFreight[0], Double.parseDouble(supplierFreight[1]));\n\t\t} \n \n StringBuffer ordersList = new StringBuffer();\n// cachedClient.delete(customerID + orderID);\n Set<String> set = maps.keySet();\n\t\tfor(String string : set){\n\t\t List<ShoppingCartVO> temp1= maps.get(string);\n\t\t double supplierFreight = supplierFreightMap.get(string);\n\t\t Double amount = 0d;\n\t\t Integer count = 0;\n Integer score = 0;\n Double weight = 0d;\n\t\t for (ShoppingCartVO shoppingCartVO : temp1) {\n ItemVO itemVO = itemDAO.findItemById(shoppingCartVO.getItemID());\n count += shoppingCartVO.getItemCount();\n // weight += itemVO.getWeight();\n if (shoppingCartVO.getType() == 1) {\n amount += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesPrice();\n } else if (shoppingCartVO.getType() == 2) {\n score += shoppingCartVO.getItemCount() * itemVO.getScore();\n } else if (shoppingCartVO.getType() == 3) {\n amount += shoppingCartVO.getItemCount() * itemVO.getScorePrice();\n score += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesScore();\n }\n }\n\t\t //SalesOrderVO tempOrder = new SalesOrderVO();\n\t /*if (tempOrder == null) {\n\t throw new Exception(\"参数错误\");\n\t }\n\t if (\"012\".indexOf(invoiceType) == -1) {\n\t throw new Exception(\"参数错误\");\n\t }*/\n\t SalesOrderDTO salesOrderDTO = new SalesOrderDTO();\n\t salesOrderDTO.setMainID(randomNumeric());\n\t salesOrderDTO.setCustomerID(customerID);\n\t salesOrderDTO.setPaymentType(Integer.valueOf(paymentType));\n\t salesOrderDTO.setPaymentStatus(0);\n\n\t // salesOrderDTO.setExpressFee(tempOrder.getExpressFee());//运费\n\t salesOrderDTO.setProductAmount(amount);\n\t salesOrderDTO.setTotalAmount(amount + supplierFreight);\n\t salesOrderDTO.setPayableAmount(amount);\n\n\t salesOrderDTO.setOrderType(Integer.valueOf(orderType));\n\t salesOrderDTO.setMemo(memo);\n\t salesOrderDTO.setInvoiceType(Integer.parseInt(invoiceType));\n\t salesOrderDTO.setInvoiceTitle(invoiceTitle);\n\t salesOrderDTO.setSupplierID(string);\n\t salesOrderDTO.setExpressFee(supplierFreight);\n\t salesOrderDAO.addSalesOrder(salesOrderDTO);\n\t ordersList.append(salesOrderDTO.getMainID()+\",\");\n\t if(!paymentType.equals(\"3\")){\n\t \t CustomerDeliveryAddressVO customerDeliveryAddressVO = customerDeliveryAddressDAO.findAddressByID(Long.valueOf(addressID));\n\t \t if (customerDeliveryAddressVO != null) {\n\t \t SalesOrderDeliveryAddressDTO salesOrderDeliveryAddressDTO = new SalesOrderDeliveryAddressDTO();\n\t \t salesOrderDeliveryAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderDeliveryAddressDTO.setName(customerDeliveryAddressVO.getName());\n\t \t salesOrderDeliveryAddressDTO.setCountryID(customerDeliveryAddressVO.getCountryID());\n\t \t salesOrderDeliveryAddressDTO.setProvinceID(customerDeliveryAddressVO.getProvinceID());\n\t \t salesOrderDeliveryAddressDTO.setCityID(customerDeliveryAddressVO.getCityID());\n\t \t salesOrderDeliveryAddressDTO.setDisctrictID(customerDeliveryAddressVO.getDisctrictID());\n\t \t salesOrderDeliveryAddressDTO.setAddress(customerDeliveryAddressVO.getAddress());\n\t \t salesOrderDeliveryAddressDTO.setMobile(customerDeliveryAddressVO.getMobile());\n\t \t salesOrderDeliveryAddressDTO.setTelephone(customerDeliveryAddressVO.getTelephone());\n\t \t if (customerDeliveryAddressVO.getZip() != null) {\n\t \t salesOrderDeliveryAddressDTO.setZip(customerDeliveryAddressVO.getZip());\n\t \t }\n\t \t salesOrderDeliveryAddressDAO.insertSalesOrderDeliveryAddress(salesOrderDeliveryAddressDTO);\n\t \t }\n\t \t ShippingAddressVO shippingAddressVO = shippingAddressDAO.findDefaultShippingAddress();\n\t \t if (shippingAddressVO != null) {\n\t \t SalesOrderShippingAddressDTO salesOrderShippingAddressDTO = new SalesOrderShippingAddressDTO();\n\t \t salesOrderShippingAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderShippingAddressDTO.setName(shippingAddressVO.getName());\n\t \t salesOrderShippingAddressDTO.setCountryID(shippingAddressVO.getCountryID());\n\t \t salesOrderShippingAddressDTO.setProvinceID(shippingAddressVO.getProvinceID());\n\t \t salesOrderShippingAddressDTO.setCityID(shippingAddressVO.getCityID());\n\t \t salesOrderShippingAddressDTO.setDisctrictID(shippingAddressVO.getDisctrictID());\n\t \t salesOrderShippingAddressDTO.setAddress(shippingAddressVO.getAddress());\n\t \t salesOrderShippingAddressDTO.setMobile(shippingAddressVO.getMobile());\n\t \t salesOrderShippingAddressDTO.setTelephone(shippingAddressVO.getTelephone());\n\t \t salesOrderShippingAddressDTO.setZip(shippingAddressVO.getZip());\n\t \t salesOrderShippingAddressDAO.insertSalesOrderShippingAddress(salesOrderShippingAddressDTO);\n\t \t }\n\t }\n\t \n\t ItemDTO itemDTO = new ItemDTO();\n\t SupplierItemDTO supplierItemDTO = new SupplierItemDTO();\n\t SalesOrderLineDTO salesOrderLineDTO = new SalesOrderLineDTO();\n\t if (generateType.equals(\"quickBuy\")) {\n\t generateQuickBuyOrder(itemCount,cartIDs, itemID, supplierID, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"oneKey\")) {\n\t generateOneKeyOrder(customerID, itemCount, itemType, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"shoppingcart\")) {\n\t genarateShoppingCartOrder(customerID, cartIDs, itemCount, itemType, objID, salesOrderDTO, itemDTO,\n\t supplierItemDTO, salesOrderLineDTO);\n\t } else {\n\t throw new Exception(\"订单类型无法确定\");\n\t }\n\t\t}\n return ordersList;\n }", "public int getC_Invoice_ID();", "@Override\n\tpublic void execute(Invoice invoice) {\n\t\t\n\t}", "List<PriceInformation> getPriceForProduct(ProductModel product);", "public void setItemPriceInvoice(float itemPriceInvoice)\n\t{\n\t\tthis.itemPriceInvoice = itemPriceInvoice;\n\t}", "public BigDecimal getPriceEntered();", "int insertSelective(ProcRecInvoice record);", "public void setPriceEntered (BigDecimal PriceEntered);", "public Collection<Payment> getPayments(CustomerItem customerItem);", "@Select({\n \"select\",\n \"ID, SDATE, STYPE, SMONEY, TOUCHING, ACCOUNT, CHECKSTATUS, DEMO1, DEMO2, DEMO3\",\n \"from PURCHASE\",\n \"where ID = #{id,jdbcType=DECIMAL}\"\n })\n @ConstructorArgs({\n @Arg(column=\"ID\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL, id=true),\n @Arg(column=\"SDATE\", javaType=Date.class, jdbcType=JdbcType.TIMESTAMP),\n @Arg(column=\"STYPE\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"SMONEY\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"TOUCHING\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"ACCOUNT\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"CHECKSTATUS\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"DEMO1\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"DEMO2\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"DEMO3\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL)\n })\n Purchase selectByPrimaryKey(BigDecimal id);", "double getTotal_Discount(int job_ID, int customer_acc_no);", "public void createInvoice() {\n\t}", "public static Map<String, Object> createInvoiceForOrder(DispatchContext dctx, Map<String, Object> context) {\n Delegator delegator = dctx.getDelegator();\n LocalDispatcher dispatcher = dctx.getDispatcher();\n GenericValue userLogin = (GenericValue) context.get(\"userLogin\");\n Locale locale = (Locale) context.get(\"locale\");\n if (DECIMALS == -1 || ROUNDING == null) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingAritmeticPropertiesNotConfigured\", locale));\n }\n\n String orderId = (String) context.get(\"orderId\");\n List<GenericValue> billItems = UtilGenerics.cast(context.get(\"billItems\"));\n String invoiceId = (String) context.get(\"invoiceId\");\n\n if (UtilValidate.isEmpty(billItems)) {\n if (Debug.verboseOn()) {\n Debug.logVerbose(\"No order items to invoice; not creating invoice; returning success\", MODULE);\n }\n return ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE,\n \"AccountingNoOrderItemsToInvoice\", locale));\n }\n\n try {\n GenericValue orderHeader = EntityQuery.use(delegator).from(\"OrderHeader\").where(\"orderId\", orderId).queryOne();\n if (orderHeader == null) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingNoOrderHeader\", locale));\n }\n\n // figure out the invoice type\n String invoiceType = null;\n\n String orderType = orderHeader.getString(\"orderTypeId\");\n if (\"SALES_ORDER\".equals(orderType)) {\n invoiceType = \"SALES_INVOICE\";\n } else if (\"PURCHASE_ORDER\".equals(orderType)) {\n invoiceType = \"PURCHASE_INVOICE\";\n }\n\n // Set the precision depending on the type of invoice\n int invoiceTypeDecimals = UtilNumber.getBigDecimalScale(\"invoice.\" + invoiceType + \".decimals\");\n if (invoiceTypeDecimals == -1) {\n invoiceTypeDecimals = DECIMALS;\n }\n\n // Make an order read helper from the order\n OrderReadHelper orh = new OrderReadHelper(orderHeader);\n\n // get the product store\n GenericValue productStore = orh.getProductStore();\n\n // get the shipping adjustment mode (Y = Pro-Rate; N = First-Invoice)\n String prorateShipping = productStore != null ? productStore.getString(\"prorateShipping\") : \"Y\";\n if (prorateShipping == null) {\n prorateShipping = \"Y\";\n }\n\n // get the billing parties\n String billToCustomerPartyId = orh.getBillToParty().getString(\"partyId\");\n String billFromVendorPartyId = orh.getBillFromParty().getString(\"partyId\");\n\n // get some price totals\n BigDecimal shippableAmount = orh.getShippableTotal(null);\n BigDecimal shippableQuantity = orh.getShippableQuantity(null);\n BigDecimal orderSubTotal = orh.getOrderItemsSubTotal();\n BigDecimal orderQuantity = orh.getTotalOrderItemsQuantity();\n\n // these variables are for pro-rating order amounts across invoices, so they should not be rounded off for maximum accuracy\n BigDecimal invoiceShipProRateAmount = BigDecimal.ZERO;\n BigDecimal invoiceShippableQuantity = BigDecimal.ZERO;\n BigDecimal invoiceSubTotal = BigDecimal.ZERO;\n BigDecimal invoiceQuantity = BigDecimal.ZERO;\n\n GenericValue billingAccount = orderHeader.getRelatedOne(\"BillingAccount\", false);\n String billingAccountId = billingAccount != null ? billingAccount.getString(\"billingAccountId\") : null;\n\n Timestamp invoiceDate = (Timestamp) context.get(\"eventDate\");\n if (UtilValidate.isEmpty(invoiceDate)) {\n // TODO: ideally this should be the same time as when a shipment is sent and be passed in as a parameter\n invoiceDate = UtilDateTime.nowTimestamp();\n }\n // TODO: perhaps consider billing account net days term as well?\n Long orderTermNetDays = orh.getOrderTermNetDays();\n Timestamp dueDate = null;\n if (orderTermNetDays != null) {\n dueDate = UtilDateTime.getDayEnd(invoiceDate, orderTermNetDays);\n }\n\n // create the invoice record\n if (UtilValidate.isEmpty(invoiceId)) {\n Map<String, Object> createInvoiceContext = new HashMap<>();\n createInvoiceContext.put(\"partyId\", billToCustomerPartyId);\n createInvoiceContext.put(\"partyIdFrom\", billFromVendorPartyId);\n createInvoiceContext.put(\"billingAccountId\", billingAccountId);\n createInvoiceContext.put(\"invoiceDate\", invoiceDate);\n createInvoiceContext.put(\"dueDate\", dueDate);\n createInvoiceContext.put(\"invoiceTypeId\", invoiceType);\n // start with INVOICE_IN_PROCESS, in the INVOICE_READY we can't change the invoice (or shouldn't be able to...)\n createInvoiceContext.put(\"statusId\", \"INVOICE_IN_PROCESS\");\n createInvoiceContext.put(\"currencyUomId\", orderHeader.getString(\"currencyUom\"));\n createInvoiceContext.put(\"userLogin\", userLogin);\n\n // store the invoice first\n Map<String, Object> createInvoiceResult = dispatcher.runSync(\"createInvoice\", createInvoiceContext);\n if (ServiceUtil.isError(createInvoiceResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceFromOrder\", locale), null, null, createInvoiceResult);\n }\n\n // call service, not direct entity op: delegator.create(invoice);\n invoiceId = (String) createInvoiceResult.get(\"invoiceId\");\n }\n\n // order roles to invoice roles\n List<GenericValue> orderRoles = orderHeader.getRelated(\"OrderRole\", null, null, false);\n Map<String, Object> createInvoiceRoleContext = new HashMap<>();\n createInvoiceRoleContext.put(\"invoiceId\", invoiceId);\n createInvoiceRoleContext.put(\"userLogin\", userLogin);\n for (GenericValue orderRole : orderRoles) {\n createInvoiceRoleContext.put(\"partyId\", orderRole.getString(\"partyId\"));\n createInvoiceRoleContext.put(\"roleTypeId\", orderRole.getString(\"roleTypeId\"));\n Map<String, Object> createInvoiceRoleResult = dispatcher.runSync(\"createInvoiceRole\", createInvoiceRoleContext);\n if (ServiceUtil.isError(createInvoiceRoleResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceFromOrder\", locale), null, null, createInvoiceRoleResult);\n }\n }\n\n // order terms to invoice terms.\n // TODO: it might be nice to filter OrderTerms to only copy over financial terms.\n List<GenericValue> orderTerms = orh.getOrderTerms();\n createInvoiceTerms(delegator, dispatcher, invoiceId, orderTerms, userLogin, locale);\n\n // billing accounts\n // List billingAccountTerms = null;\n // for billing accounts we will use related information\n if (billingAccount != null) {\n /*\n * jacopoc: billing account terms were already copied as order terms\n * when the order was created.\n // get the billing account terms\n billingAccountTerms = billingAccount.getRelated(\"BillingAccountTerm\", null, null, false);\n\n // set the invoice terms as defined for the billing account\n createInvoiceTerms(delegator, dispatcher, invoiceId, billingAccountTerms, userLogin, locale);\n */\n // set the invoice bill_to_customer from the billing account\n List<GenericValue> billToRoles = billingAccount.getRelated(\"BillingAccountRole\", UtilMisc.toMap(\"roleTypeId\", \"BILL_TO_CUSTOMER\"),\n null, false);\n for (GenericValue billToRole : billToRoles) {\n if (!(billToRole.getString(\"partyId\").equals(billToCustomerPartyId))) {\n createInvoiceRoleContext = UtilMisc.toMap(\"invoiceId\", invoiceId, \"partyId\", billToRole.get(\"partyId\"),\n \"roleTypeId\", \"BILL_TO_CUSTOMER\", \"userLogin\", userLogin);\n Map<String, Object> createInvoiceRoleResult = dispatcher.runSync(\"createInvoiceRole\", createInvoiceRoleContext);\n if (ServiceUtil.isError(createInvoiceRoleResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceRoleFromOrder\", locale), null, null, createInvoiceRoleResult);\n }\n }\n }\n\n // set the bill-to contact mech as the contact mech of the billing account\n if (UtilValidate.isNotEmpty(billingAccount.getString(\"contactMechId\"))) {\n Map<String, Object> createBillToContactMechContext = UtilMisc.toMap(\"invoiceId\", invoiceId, \"contactMechId\",\n billingAccount.getString(\"contactMechId\"),\n \"contactMechPurposeTypeId\", \"BILLING_LOCATION\", \"userLogin\", userLogin);\n Map<String, Object> createBillToContactMechResult = dispatcher.runSync(\"createInvoiceContactMech\",\n createBillToContactMechContext);\n if (ServiceUtil.isError(createBillToContactMechResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceContactMechFromOrder\", locale), null, null, createBillToContactMechResult);\n }\n }\n } else {\n List<GenericValue> billingLocations = orh.getBillingLocations();\n if (UtilValidate.isNotEmpty(billingLocations)) {\n for (GenericValue ocm : billingLocations) {\n Map<String, Object> createBillToContactMechContext = UtilMisc.toMap(\"invoiceId\", invoiceId, \"contactMechId\", ocm.getString(\n \"contactMechId\"),\n \"contactMechPurposeTypeId\", \"BILLING_LOCATION\", \"userLogin\", userLogin);\n Map<String, Object> createBillToContactMechResult = dispatcher.runSync(\"createInvoiceContactMech\",\n createBillToContactMechContext);\n if (ServiceUtil.isError(createBillToContactMechResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceContactMechFromOrder\", locale), null, null, createBillToContactMechResult);\n }\n }\n } else {\n Debug.logWarning(\"No billing locations found for order [\" + orderId + \"] and none were created for Invoice [\" + invoiceId\n + \"]\", MODULE);\n }\n }\n\n // get a list of the payment method types\n //DEJ20050705 doesn't appear to be used: List paymentPreferences = orderHeader.getRelated(\"OrderPaymentPreference\", null, null, false);\n\n // create the bill-from (or pay-to) contact mech as the primary PAYMENT_LOCATION of the party from the store\n GenericValue payToAddress = null;\n if (\"PURCHASE_INVOICE\".equals(invoiceType)) {\n // for purchase orders, the pay to address is the BILLING_LOCATION of the vendor\n GenericValue billFromVendor = orh.getPartyFromRole(\"BILL_FROM_VENDOR\");\n if (billFromVendor != null) {\n List<GenericValue> billingContactMechs = billFromVendor.getRelatedOne(\"Party\", false).getRelated(\"PartyContactMechPurpose\",\n UtilMisc.toMap(\"contactMechPurposeTypeId\", \"BILLING_LOCATION\"), null, false);\n if (UtilValidate.isNotEmpty(billingContactMechs)) {\n payToAddress = EntityUtil.getFirst(EntityUtil.filterByDate(billingContactMechs));\n }\n }\n } else {\n // for sales orders, it is the payment address on file for the store\n payToAddress = PaymentWorker.getPaymentAddress(delegator, productStore.getString(\"payToPartyId\"));\n }\n if (payToAddress != null) {\n Map<String, Object> createPayToContactMechContext = UtilMisc.toMap(\"invoiceId\", invoiceId, \"contactMechId\", payToAddress.getString(\n \"contactMechId\"),\n \"contactMechPurposeTypeId\", \"PAYMENT_LOCATION\", \"userLogin\", userLogin);\n Map<String, Object> createPayToContactMechResult = dispatcher.runSync(\"createInvoiceContactMech\", createPayToContactMechContext);\n if (ServiceUtil.isError(createPayToContactMechResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceContactMechFromOrder\", locale), null, null, createPayToContactMechResult);\n }\n }\n\n // sequence for items - all OrderItems or InventoryReservations + all Adjustments\n int invoiceItemSeqNum = 1;\n String invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n\n // create the item records\n for (GenericValue currentValue : billItems) {\n GenericValue itemIssuance = null;\n GenericValue orderItem = null;\n GenericValue shipmentReceipt = null;\n if (\"ItemIssuance\".equals(currentValue.getEntityName())) {\n itemIssuance = currentValue;\n } else if (\"OrderItem\".equals(currentValue.getEntityName())) {\n orderItem = currentValue;\n } else if (\"ShipmentReceipt\".equals(currentValue.getEntityName())) {\n shipmentReceipt = currentValue;\n } else {\n Debug.logError(\"Unexpected entity \" + currentValue + \" of type \" + currentValue.getEntityName(), MODULE);\n }\n\n if (orderItem == null && itemIssuance != null) {\n orderItem = itemIssuance.getRelatedOne(\"OrderItem\", false);\n } else if ((orderItem == null) && (shipmentReceipt != null)) {\n orderItem = shipmentReceipt.getRelatedOne(\"OrderItem\", false);\n }\n\n if (orderItem == null) {\n Debug.logError(\"Cannot create invoice when orderItem, itemIssuance, and shipmentReceipt are all null\", MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingIllegalValuesPassedToCreateInvoiceService\", locale));\n }\n\n GenericValue product = null;\n if (orderItem.get(\"productId\") != null) {\n product = orderItem.getRelatedOne(\"Product\", false);\n }\n\n // get some quantities\n BigDecimal billingQuantity = null;\n if (itemIssuance != null) {\n billingQuantity = itemIssuance.getBigDecimal(\"quantity\");\n BigDecimal cancelQty = itemIssuance.getBigDecimal(\"cancelQuantity\");\n if (cancelQty == null) {\n cancelQty = BigDecimal.ZERO;\n }\n billingQuantity = billingQuantity.subtract(cancelQty).setScale(DECIMALS, ROUNDING);\n } else if (shipmentReceipt != null) {\n billingQuantity = shipmentReceipt.getBigDecimal(\"quantityAccepted\");\n } else {\n BigDecimal orderedQuantity = OrderReadHelper.getOrderItemQuantity(orderItem);\n BigDecimal invoicedQuantity = OrderReadHelper.getOrderItemInvoicedQuantity(orderItem);\n billingQuantity = orderedQuantity.subtract(invoicedQuantity);\n if (billingQuantity.compareTo(BigDecimal.ZERO) < 0) {\n billingQuantity = BigDecimal.ZERO;\n }\n }\n if (billingQuantity == null) {\n billingQuantity = BigDecimal.ZERO;\n }\n\n // check if shipping applies to this item. Shipping is calculated for sales invoices, not purchase invoices.\n boolean shippingApplies = false;\n if ((product != null) && (ProductWorker.shippingApplies(product)) && (\"SALES_INVOICE\".equals(invoiceType))) {\n shippingApplies = true;\n }\n\n BigDecimal billingAmount = BigDecimal.ZERO;\n GenericValue orderAdj = EntityUtil.getFirst(orderItem.getRelated(\"OrderAdjustment\", UtilMisc.toMap(\"orderAdjustmentTypeId\",\n \"VAT_TAX\"), null, false));\n /* Apply formula to get actual product price to set amount in invoice item\n Formula is: productPrice = (productPriceWithTax.multiply(100)) / (orderAdj sourcePercentage + 100))\n product price = (43*100) / (20+100) = 35.83 (Here product price is 43 with VAT)\n */\n if (UtilValidate.isNotEmpty(orderAdj) && (orderAdj.getBigDecimal(\"amount\").signum() == 0)\n && UtilValidate.isNotEmpty(orderAdj.getBigDecimal(\"amountAlreadyIncluded\"))\n && orderAdj.getBigDecimal(\"amountAlreadyIncluded\").signum() != 0) {\n BigDecimal sourcePercentageTotal = orderAdj.getBigDecimal(\"sourcePercentage\").add(new BigDecimal(100));\n billingAmount =\n orderItem.getBigDecimal(\"unitPrice\").divide(sourcePercentageTotal, 100, ROUNDING)\n .multiply(new BigDecimal(100)).setScale(invoiceTypeDecimals, ROUNDING);\n } else {\n billingAmount = orderItem.getBigDecimal(\"unitPrice\").setScale(invoiceTypeDecimals, ROUNDING);\n }\n\n Map<String, Object> createInvoiceItemContext = new HashMap<>();\n createInvoiceItemContext.put(\"invoiceId\", invoiceId);\n createInvoiceItemContext.put(\"invoiceItemSeqId\", invoiceItemSeqId);\n createInvoiceItemContext.put(\"invoiceItemTypeId\", getInvoiceItemType(delegator, orderItem.getString(\"orderItemTypeId\"),\n product == null ? null : product.getString(\"productTypeId\"), invoiceType, \"INV_FPROD_ITEM\"));\n createInvoiceItemContext.put(\"description\", orderItem.get(\"itemDescription\"));\n createInvoiceItemContext.put(\"quantity\", billingQuantity);\n createInvoiceItemContext.put(\"amount\", billingAmount);\n createInvoiceItemContext.put(\"productId\", orderItem.get(\"productId\"));\n createInvoiceItemContext.put(\"productFeatureId\", orderItem.get(\"productFeatureId\"));\n createInvoiceItemContext.put(\"overrideGlAccountId\", orderItem.get(\"overrideGlAccountId\"));\n createInvoiceItemContext.put(\"userLogin\", userLogin);\n\n String itemIssuanceId = null;\n if (itemIssuance != null && itemIssuance.get(\"inventoryItemId\") != null) {\n itemIssuanceId = itemIssuance.getString(\"itemIssuanceId\");\n createInvoiceItemContext.put(\"inventoryItemId\", itemIssuance.get(\"inventoryItemId\"));\n }\n // similarly, tax only for purchase invoices\n if ((product != null) && (\"SALES_INVOICE\".equals(invoiceType))) {\n createInvoiceItemContext.put(\"taxableFlag\", product.get(\"taxable\"));\n }\n\n Map<String, Object> createInvoiceItemResult = dispatcher.runSync(\"createInvoiceItem\", createInvoiceItemContext);\n if (ServiceUtil.isError(createInvoiceItemResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceItemFromOrder\", locale), null, null, createInvoiceItemResult);\n }\n\n // this item total\n BigDecimal thisAmount = billingAmount.multiply(billingQuantity).setScale(invoiceTypeDecimals, ROUNDING);\n\n // add to the ship amount only if it applies to this item\n if (shippingApplies) {\n invoiceShipProRateAmount = invoiceShipProRateAmount.add(thisAmount).setScale(invoiceTypeDecimals, ROUNDING);\n invoiceShippableQuantity = invoiceQuantity.add(billingQuantity).setScale(invoiceTypeDecimals, ROUNDING);\n }\n\n // increment the invoice subtotal\n invoiceSubTotal = invoiceSubTotal.add(thisAmount).setScale(100, ROUNDING);\n\n // increment the invoice quantity\n invoiceQuantity = invoiceQuantity.add(billingQuantity).setScale(invoiceTypeDecimals, ROUNDING);\n\n // create the OrderItemBilling record\n Map<String, Object> createOrderItemBillingContext = new HashMap<>();\n createOrderItemBillingContext.put(\"invoiceId\", invoiceId);\n createOrderItemBillingContext.put(\"invoiceItemSeqId\", invoiceItemSeqId);\n createOrderItemBillingContext.put(\"orderId\", orderItem.get(\"orderId\"));\n createOrderItemBillingContext.put(\"orderItemSeqId\", orderItem.get(\"orderItemSeqId\"));\n createOrderItemBillingContext.put(\"itemIssuanceId\", itemIssuanceId);\n createOrderItemBillingContext.put(\"quantity\", billingQuantity);\n createOrderItemBillingContext.put(\"amount\", billingAmount);\n createOrderItemBillingContext.put(\"userLogin\", userLogin);\n if ((shipmentReceipt != null) && (shipmentReceipt.getString(\"receiptId\") != null)) {\n createOrderItemBillingContext.put(\"shipmentReceiptId\", shipmentReceipt.getString(\"receiptId\"));\n }\n\n Map<String, Object> createOrderItemBillingResult = dispatcher.runSync(\"createOrderItemBilling\", createOrderItemBillingContext);\n if (ServiceUtil.isError(createOrderItemBillingResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingOrderItemBillingFromOrder\", locale), null, null, createOrderItemBillingResult);\n }\n\n if (\"ItemIssuance\".equals(currentValue.getEntityName())) {\n /* Find ShipmentItemBilling based on shipmentId, shipmentItemSeqId, invoiceId, invoiceItemSeqId as\n because if any order item has multiple quantity and reserved by multiple inventories then there will be multiple invoice items.\n In that case ShipmentItemBilling was creating only for one invoice item. Fixed under OFBIZ-6806.\n */\n List<GenericValue> shipmentItemBillings = EntityQuery.use(delegator).from(\"ShipmentItemBilling\")\n .where(\"shipmentId\", currentValue.get(\"shipmentId\"), \"shipmentItemSeqId\", currentValue.get(\"shipmentItemSeqId\"),\n \"invoiceId\", invoiceId, \"invoiceItemSeqId\", invoiceItemSeqId)\n .queryList();\n if (UtilValidate.isEmpty(shipmentItemBillings)) {\n\n // create the ShipmentItemBilling record\n Map<String, Object> shipmentItemBillingCtx = new HashMap<>();\n shipmentItemBillingCtx.put(\"invoiceId\", invoiceId);\n shipmentItemBillingCtx.put(\"invoiceItemSeqId\", invoiceItemSeqId);\n shipmentItemBillingCtx.put(\"shipmentId\", currentValue.get(\"shipmentId\"));\n shipmentItemBillingCtx.put(\"shipmentItemSeqId\", currentValue.get(\"shipmentItemSeqId\"));\n shipmentItemBillingCtx.put(\"userLogin\", userLogin);\n Map<String, Object> result = dispatcher.runSync(\"createShipmentItemBilling\", shipmentItemBillingCtx);\n if (ServiceUtil.isError(result)) {\n return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));\n }\n }\n }\n\n String parentInvoiceItemSeqId = invoiceItemSeqId;\n // increment the counter\n invoiceItemSeqNum++;\n invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n\n // Get the original order item from the DB, in case the quantity has been overridden\n GenericValue originalOrderItem = EntityQuery.use(delegator).from(\"OrderItem\").where(\"orderId\", orderId, \"orderItemSeqId\",\n orderItem.get(\"orderItemSeqId\")).queryOne();\n\n // create the item adjustment as line items\n List<GenericValue> itemAdjustments = OrderReadHelper.getOrderItemAdjustmentList(orderItem, orh.getAdjustments());\n for (GenericValue adj : itemAdjustments) {\n\n // Check against OrderAdjustmentBilling to see how much of this adjustment has already been invoiced\n BigDecimal adjAlreadyInvoicedAmount = null;\n try {\n Map<String, Object> checkResult = dispatcher.runSync(\"calculateInvoicedAdjustmentTotal\", UtilMisc.toMap(\"orderAdjustment\",\n adj));\n if (ServiceUtil.isError(checkResult)) {\n Debug.logError(\"Accounting trouble calling calculateInvoicedAdjustmentTotal service\", MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingTroubleCallingCalculateInvoicedAdjustmentTotalService\", locale));\n }\n adjAlreadyInvoicedAmount = (BigDecimal) checkResult.get(\"invoicedTotal\");\n } catch (GenericServiceException e) {\n Debug.logError(e, \"Accounting trouble calling calculateInvoicedAdjustmentTotal service\", MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingTroubleCallingCalculateInvoicedAdjustmentTotalService\", locale));\n }\n\n // Set adjustment amount as amountAlreadyIncluded to continue invoice item creation process\n boolean isTaxIncludedInPrice = \"VAT_TAX\".equals(adj.getString(\"orderAdjustmentTypeId\"))\n && UtilValidate.isNotEmpty(adj.getBigDecimal(\"amountAlreadyIncluded\"))\n && adj.getBigDecimal(\"amountAlreadyIncluded\").signum() != 0;\n if (isTaxIncludedInPrice && (adj.getBigDecimal(\"amount\").signum() == 0)) {\n adj.set(\"amount\", adj.getBigDecimal(\"amountAlreadyIncluded\"));\n }\n // If the absolute invoiced amount >= the abs of the adjustment amount, the full amount has already been invoiced, so skip this\n // adjustment\n if (isTaxIncludedInPrice && adjAlreadyInvoicedAmount.abs().compareTo(adj.getBigDecimal(\"amount\").setScale(invoiceTypeDecimals,\n ROUNDING).abs()) > 0) {\n continue;\n }\n\n BigDecimal originalOrderItemQuantity = OrderReadHelper.getOrderItemQuantity(originalOrderItem);\n BigDecimal amount = BigDecimal.ZERO;\n if (originalOrderItemQuantity.signum() != 0) {\n if (adj.get(\"amount\") != null) {\n if (\"PROMOTION_ADJUSTMENT\".equals(adj.getString(\"orderAdjustmentTypeId\")) && adj.get(\"productPromoId\") != null) {\n /* Find negative amountAlreadyIncluded in OrderAdjustment to subtract it from discounted amount.\n As we stored negative sales tax amount in order adjustment for discounted\n item.\n */\n List<EntityExpr> exprs = UtilMisc.toList(EntityCondition.makeCondition(\"orderId\", EntityOperator.EQUALS,\n orderItem.getString(\"orderId\")),\n EntityCondition.makeCondition(\"orderItemSeqId\", EntityOperator.EQUALS, orderItem.getString(\"orderItemSeqId\")),\n EntityCondition.makeCondition(\"orderAdjustmentTypeId\", EntityOperator.EQUALS, \"VAT_TAX\"),\n EntityCondition.makeCondition(\"amountAlreadyIncluded\", EntityOperator.LESS_THAN, BigDecimal.ZERO));\n EntityCondition andCondition = EntityCondition.makeCondition(exprs, EntityOperator.AND);\n GenericValue orderAdjustment = EntityUtil.getFirst(delegator.findList(\"OrderAdjustment\", andCondition, null, null,\n null, false));\n if (UtilValidate.isNotEmpty(orderAdjustment)) {\n amount =\n adj.getBigDecimal(\"amount\").subtract(orderAdjustment.getBigDecimal(\"amountAlreadyIncluded\")).setScale(100,\n ROUNDING);\n } else {\n amount = adj.getBigDecimal(\"amount\");\n }\n } else {\n // pro-rate the amount\n // set decimals = 100 means we don't round this intermediate value, which is very important\n if (isTaxIncludedInPrice) {\n BigDecimal priceWithTax = originalOrderItem.getBigDecimal(\"unitPrice\");\n // Get tax included in item price\n amount = priceWithTax.subtract(billingAmount);\n amount = amount.multiply(billingQuantity);\n // get adjustment amount\n /* Get tax amount of other invoice and calculate remaining amount need to store in invoice item(Handle case\n of of partial shipment and promotional item)\n to adjust tax amount in invoice item.\n */\n BigDecimal otherInvoiceTaxAmount = BigDecimal.ZERO;\n GenericValue orderAdjBilling = EntityQuery.use(delegator).from(\"OrderAdjustmentBilling\").where(\n \"orderAdjustmentId\", adj.getString(\"orderAdjustmentId\")).queryFirst();\n if (UtilValidate.isNotEmpty(orderAdjBilling)) {\n //FIXME: Need to check here isTaxIncludedInPrice pass to use cache\n List<GenericValue> invoiceItems = EntityQuery.use(delegator).from(\"InvoiceItem\").where(\"invoiceId\",\n orderAdjBilling.getString(\"invoiceId\"), \"invoiceItemTypeId\", \"ITM_SALES_TAX\", \"productId\",\n originalOrderItem.getString(\"productId\")).cache(isTaxIncludedInPrice).queryList();\n for (GenericValue invoiceItem : invoiceItems) {\n otherInvoiceTaxAmount = otherInvoiceTaxAmount.add(invoiceItem.getBigDecimal(\"amount\"));\n }\n if (otherInvoiceTaxAmount.compareTo(BigDecimal.ZERO) > 0) {\n BigDecimal remainingAmount = adj.getBigDecimal(\"amountAlreadyIncluded\").subtract(otherInvoiceTaxAmount);\n amount = amount.min(remainingAmount);\n }\n }\n amount = amount.min(adj.getBigDecimal(\"amountAlreadyIncluded\")).setScale(100, ROUNDING);\n } else {\n amount = adj.getBigDecimal(\"amount\").divide(originalOrderItemQuantity, 100, ROUNDING);\n amount = amount.multiply(billingQuantity);\n }\n }\n // Tax needs to be rounded differently from other order adjustments\n if (\"SALES_TAX\".equals(adj.getString(\"orderAdjustmentTypeId\"))) {\n amount = amount.setScale(TAX_DECIMALS, TAX_ROUNDING);\n } else {\n amount = amount.setScale(invoiceTypeDecimals, ROUNDING);\n }\n } else if (adj.get(\"sourcePercentage\") != null) {\n // pro-rate the amount\n // set decimals = 100 means we don't round this intermediate value, which is very important\n BigDecimal percent = adj.getBigDecimal(\"sourcePercentage\");\n percent = percent.divide(new BigDecimal(100), 100, ROUNDING);\n amount = billingAmount.multiply(percent);\n amount = amount.divide(originalOrderItemQuantity, 100, ROUNDING);\n amount = amount.multiply(billingQuantity);\n amount = amount.setScale(invoiceTypeDecimals, ROUNDING);\n }\n }\n if (amount.signum() != 0) {\n Map<String, Object> createInvoiceItemAdjContext = new HashMap<>();\n createInvoiceItemAdjContext.put(\"invoiceId\", invoiceId);\n createInvoiceItemAdjContext.put(\"invoiceItemSeqId\", invoiceItemSeqId);\n createInvoiceItemAdjContext.put(\"invoiceItemTypeId\", getInvoiceItemType(delegator, adj.getString(\"orderAdjustmentTypeId\"),\n null, invoiceType, \"INVOICE_ITM_ADJ\"));\n createInvoiceItemAdjContext.put(\"quantity\", BigDecimal.ONE);\n createInvoiceItemAdjContext.put(\"amount\", amount);\n createInvoiceItemAdjContext.put(\"productId\", orderItem.get(\"productId\"));\n createInvoiceItemAdjContext.put(\"productFeatureId\", orderItem.get(\"productFeatureId\"));\n createInvoiceItemAdjContext.put(\"overrideGlAccountId\", adj.get(\"overrideGlAccountId\"));\n createInvoiceItemAdjContext.put(\"parentInvoiceId\", invoiceId);\n createInvoiceItemAdjContext.put(\"parentInvoiceItemSeqId\", parentInvoiceItemSeqId);\n createInvoiceItemAdjContext.put(\"userLogin\", userLogin);\n createInvoiceItemAdjContext.put(\"taxAuthPartyId\", adj.get(\"taxAuthPartyId\"));\n createInvoiceItemAdjContext.put(\"taxAuthGeoId\", adj.get(\"taxAuthGeoId\"));\n createInvoiceItemAdjContext.put(\"taxAuthorityRateSeqId\", adj.get(\"taxAuthorityRateSeqId\"));\n\n // some adjustments fill out the comments field instead\n String description = (UtilValidate.isEmpty(adj.getString(\"description\")) ? adj.getString(\"comments\") : adj.getString(\n \"description\"));\n createInvoiceItemAdjContext.put(\"description\", description);\n\n // invoice items for sales tax are not taxable themselves\n // TODO: This is not an ideal solution. Instead, we need to use OrderAdjustment.includeInTax when it is implemented\n if (!(\"SALES_TAX\".equals(adj.getString(\"orderAdjustmentTypeId\")))) {\n createInvoiceItemAdjContext.put(\"taxableFlag\", product.get(\"taxable\"));\n }\n\n // If the OrderAdjustment is associated to a ProductPromo,\n // and the field ProductPromo.overrideOrgPartyId is set,\n // copy the value to InvoiceItem.overrideOrgPartyId: this\n // represent an organization override for the payToPartyId\n if (UtilValidate.isNotEmpty(adj.getString(\"productPromoId\"))) {\n try {\n GenericValue productPromo = adj.getRelatedOne(\"ProductPromo\", false);\n if (UtilValidate.isNotEmpty(productPromo.getString(\"overrideOrgPartyId\"))) {\n createInvoiceItemAdjContext.put(\"overrideOrgPartyId\", productPromo.getString(\"overrideOrgPartyId\"));\n }\n } catch (GenericEntityException e) {\n Debug.logError(e, \"Error looking up ProductPromo with id [\" + adj.getString(\"productPromoId\") + \"]\", MODULE);\n }\n }\n\n Map<String, Object> createInvoiceItemAdjResult = dispatcher.runSync(\"createInvoiceItem\", createInvoiceItemAdjContext);\n if (ServiceUtil.isError(createInvoiceItemAdjResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceItemFromOrder\", locale), null, null, createInvoiceItemAdjResult);\n }\n\n // Create the OrderAdjustmentBilling record\n Map<String, Object> createOrderAdjustmentBillingContext = new HashMap<>();\n createOrderAdjustmentBillingContext.put(\"orderAdjustmentId\", adj.getString(\"orderAdjustmentId\"));\n createOrderAdjustmentBillingContext.put(\"invoiceId\", invoiceId);\n createOrderAdjustmentBillingContext.put(\"invoiceItemSeqId\", invoiceItemSeqId);\n createOrderAdjustmentBillingContext.put(\"amount\", amount);\n createOrderAdjustmentBillingContext.put(\"userLogin\", userLogin);\n\n Map<String, Object> createOrderAdjustmentBillingResult = dispatcher.runSync(\"createOrderAdjustmentBilling\",\n createOrderAdjustmentBillingContext);\n if (ServiceUtil.isError(createOrderAdjustmentBillingResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingOrderAdjustmentBillingFromOrder\", locale), null, null,\n createOrderAdjustmentBillingContext);\n }\n\n // this adjustment amount\n BigDecimal thisAdjAmount = amount;\n\n // adjustments only apply to totals when they are not tax or shipping adjustments\n if (!\"SALES_TAX\".equals(adj.getString(\"orderAdjustmentTypeId\"))\n && !\"SHIPPING_ADJUSTMENT\".equals(adj.getString(\"orderAdjustmentTypeId\"))) {\n // increment the invoice subtotal\n invoiceSubTotal = invoiceSubTotal.add(thisAdjAmount).setScale(100, ROUNDING);\n\n // add to the ship amount only if it applies to this item\n if (shippingApplies) {\n invoiceShipProRateAmount = invoiceShipProRateAmount.add(thisAdjAmount).setScale(invoiceTypeDecimals, ROUNDING);\n }\n }\n\n // increment the counter\n invoiceItemSeqNum++;\n invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n }\n }\n }\n\n // create header adjustments as line items -- always to tax/shipping last\n Map<GenericValue, BigDecimal> shipAdjustments = new HashMap<>();\n Map<GenericValue, BigDecimal> taxAdjustments = new HashMap<>();\n\n List<GenericValue> headerAdjustments = orh.getOrderHeaderAdjustments();\n for (GenericValue adj : headerAdjustments) {\n\n // Check against OrderAdjustmentBilling to see how much of this adjustment has already been invoiced\n BigDecimal adjAlreadyInvoicedAmount = null;\n try {\n Map<String, Object> checkResult = dispatcher.runSync(\"calculateInvoicedAdjustmentTotal\", UtilMisc.toMap(\"orderAdjustment\", adj));\n if (ServiceUtil.isError(checkResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingTroubleCallingCalculateInvoicedAdjustmentTotalService\", locale));\n }\n adjAlreadyInvoicedAmount = ((BigDecimal) checkResult.get(\"invoicedTotal\")).setScale(invoiceTypeDecimals, ROUNDING);\n } catch (GenericServiceException e) {\n Debug.logError(e, \"Accounting trouble calling calculateInvoicedAdjustmentTotal service\", MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingTroubleCallingCalculateInvoicedAdjustmentTotalService\", locale));\n }\n\n // If the absolute invoiced amount >= the abs of the adjustment amount, the full amount has already been invoiced, so skip this\n // adjustment\n if (adjAlreadyInvoicedAmount.abs().compareTo(adj.getBigDecimal(\"amount\").setScale(invoiceTypeDecimals, ROUNDING).abs()) >= 0) {\n continue;\n }\n\n if (\"SHIPPING_CHARGES\".equals(adj.getString(\"orderAdjustmentTypeId\"))) {\n shipAdjustments.put(adj, adjAlreadyInvoicedAmount);\n } else if (\"SALES_TAX\".equals(adj.getString(\"orderAdjustmentTypeId\"))) {\n taxAdjustments.put(adj, adjAlreadyInvoicedAmount);\n } else {\n // these will effect the shipping pro-rate (unless commented)\n // other adjustment type\n BigDecimal divisor = orderSubTotal;\n BigDecimal multiplier = invoiceSubTotal;\n if (BigDecimal.ZERO.compareTo(multiplier) == 0 && BigDecimal.ZERO.compareTo(divisor) == 0) {\n // if multiplier and divisor are equal to zero then use the quantities instead of the amounts\n // this is useful when the order has free items and misc charges\n divisor = orderQuantity;\n multiplier = invoiceQuantity;\n }\n\n calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId, divisor, multiplier,\n adj.getBigDecimal(\"amount\").setScale(invoiceTypeDecimals, ROUNDING), invoiceTypeDecimals, ROUNDING, userLogin,\n dispatcher, locale);\n // invoiceShipProRateAmount += adjAmount;\n // do adjustments compound or are they based off subtotal? Here we will (unless commented)\n // invoiceSubTotal += adjAmount;\n\n // increment the counter\n invoiceItemSeqNum++;\n invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n }\n }\n\n // next do the shipping adjustments. Note that we do not want to add these to the invoiceSubTotal or orderSubTotal for pro-rating tax\n // later, as that would cause\n // numerator/denominator problems when the shipping is not pro-rated but rather charged all on the first invoice\n for (Map.Entry<GenericValue, BigDecimal> set : shipAdjustments.entrySet()) {\n BigDecimal adjAlreadyInvoicedAmount = set.getValue();\n GenericValue adj = set.getKey();\n\n if (\"N\".equalsIgnoreCase(prorateShipping)) {\n\n // Set the divisor and multiplier to 1 to avoid prorating\n BigDecimal divisor = BigDecimal.ONE;\n BigDecimal multiplier = BigDecimal.ONE;\n\n // The base amount in this case is the adjustment amount minus the total already invoiced for that adjustment, since\n // it won't be prorated\n BigDecimal baseAmount = adj.getBigDecimal(\"amount\").setScale(invoiceTypeDecimals, ROUNDING).subtract(adjAlreadyInvoicedAmount);\n calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId, divisor, multiplier, baseAmount,\n invoiceTypeDecimals, ROUNDING, userLogin, dispatcher, locale);\n } else {\n\n // Pro-rate the shipping amount based on shippable information\n BigDecimal divisor = shippableAmount;\n BigDecimal multiplier = invoiceShipProRateAmount;\n if (BigDecimal.ZERO.compareTo(multiplier) == 0 && BigDecimal.ZERO.compareTo(divisor) == 0) {\n // if multiplier and divisor are equal to zero then use the quantities instead of the amounts\n // this is useful when the order has free items and shipping charges\n divisor = shippableQuantity;\n multiplier = invoiceShippableQuantity;\n }\n\n // The base amount in this case is the adjustment amount, since we want to prorate based on the full amount\n BigDecimal baseAmount = adj.getBigDecimal(\"amount\").setScale(invoiceTypeDecimals, ROUNDING);\n calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId, divisor, multiplier,\n baseAmount, invoiceTypeDecimals, ROUNDING, userLogin, dispatcher, locale);\n }\n\n // Increment the counter\n invoiceItemSeqNum++;\n invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n }\n\n // last do the tax adjustments\n String prorateTaxes = productStore != null ? productStore.getString(\"prorateTaxes\") : \"Y\";\n if (prorateTaxes == null) {\n prorateTaxes = \"Y\";\n }\n for (Map.Entry<GenericValue, BigDecimal> entry : taxAdjustments.entrySet()) {\n GenericValue adj = entry.getKey();\n BigDecimal adjAlreadyInvoicedAmount = entry.getValue();\n BigDecimal adjAmount = null;\n\n if (\"N\".equalsIgnoreCase(prorateTaxes)) {\n\n // Set the divisor and multiplier to 1 to avoid prorating\n BigDecimal divisor = BigDecimal.ONE;\n BigDecimal multiplier = BigDecimal.ONE;\n\n // The base amount in this case is the adjustment amount minus the total already invoiced for that adjustment, since\n // it won't be prorated\n BigDecimal baseAmount = adj.getBigDecimal(\"amount\").setScale(TAX_DECIMALS, TAX_ROUNDING).subtract(adjAlreadyInvoicedAmount);\n adjAmount = calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId,\n divisor, multiplier, baseAmount, TAX_DECIMALS, TAX_ROUNDING, userLogin, dispatcher, locale);\n } else {\n\n // Pro-rate the tax amount based on shippable information\n BigDecimal divisor = orderSubTotal;\n BigDecimal multiplier = invoiceSubTotal;\n\n // The base amount in this case is the adjustment amount, since we want to prorate based on the full amount\n BigDecimal baseAmount = adj.getBigDecimal(\"amount\");\n adjAmount = calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId,\n divisor, multiplier, baseAmount, TAX_DECIMALS, TAX_ROUNDING, userLogin, dispatcher, locale);\n }\n invoiceSubTotal = invoiceSubTotal.add(adjAmount).setScale(invoiceTypeDecimals, ROUNDING);\n\n // Increment the counter\n invoiceItemSeqNum++;\n invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n }\n\n // check for previous order payments\n List<GenericValue> orderPaymentPrefs = EntityQuery.use(delegator).from(\"OrderPaymentPreference\")\n .where(EntityCondition.makeCondition(\"orderId\", EntityOperator.EQUALS, orderId),\n EntityCondition.makeCondition(\"statusId\", EntityOperator.NOT_EQUAL, \"PAYMENT_CANCELLED\")).queryList();\n List<GenericValue> currentPayments = new LinkedList<>();\n for (GenericValue paymentPref : orderPaymentPrefs) {\n List<GenericValue> payments = paymentPref.getRelated(\"Payment\", null, null, false);\n currentPayments.addAll(payments);\n }\n // apply these payments to the invoice if they have any remaining amount to apply\n for (GenericValue payment : currentPayments) {\n if (\"PMNT_VOID\".equals(payment.getString(\"statusId\")) || \"PMNT_CANCELLED\".equals(payment.getString(\"statusId\"))) {\n continue;\n }\n BigDecimal notApplied = PaymentWorker.getPaymentNotApplied(payment);\n if (notApplied.signum() > 0) {\n Map<String, Object> appl = new HashMap<>();\n appl.put(\"paymentId\", payment.get(\"paymentId\"));\n appl.put(\"invoiceId\", invoiceId);\n appl.put(\"billingAccountId\", billingAccountId);\n appl.put(\"amountApplied\", notApplied);\n appl.put(\"userLogin\", userLogin);\n Map<String, Object> createPayApplResult = dispatcher.runSync(\"createPaymentApplication\", appl);\n if (ServiceUtil.isError(createPayApplResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceFromOrder\", locale), null, null, createPayApplResult);\n }\n }\n }\n\n // Should all be in place now. Depending on the ProductStore.autoApproveInvoice setting, set status to INVOICE_READY (unless it's a\n // purchase invoice, which we set to INVOICE_IN_PROCESS)\n String autoApproveInvoice = productStore != null ? productStore.getString(\"autoApproveInvoice\") : \"Y\";\n if (!\"N\".equals(autoApproveInvoice)) {\n String nextStatusId = \"PURCHASE_INVOICE\".equals(invoiceType) ? \"INVOICE_IN_PROCESS\" : \"INVOICE_READY\";\n Map<String, Object> setInvoiceStatusResult = dispatcher.runSync(\"setInvoiceStatus\", UtilMisc.<String, Object>toMap(\"invoiceId\",\n invoiceId, \"statusId\", nextStatusId, \"userLogin\", userLogin));\n if (ServiceUtil.isError(setInvoiceStatusResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceFromOrder\", locale), null, null, setInvoiceStatusResult);\n }\n }\n\n Map<String, Object> resp = ServiceUtil.returnSuccess();\n resp.put(\"invoiceId\", invoiceId);\n resp.put(\"invoiceTypeId\", invoiceType);\n return resp;\n } catch (GenericEntityException e) {\n Debug.logError(e, \"Entity/data problem creating invoice from order items: \" + e.toString(), MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingEntityDataProblemCreatingInvoiceFromOrderItems\",\n UtilMisc.toMap(\"reason\", e.toString()), locale));\n } catch (GenericServiceException e) {\n Debug.logError(e, \"Service/other problem creating invoice from order items: \" + e.toString(), MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingServiceOtherProblemCreatingInvoiceFromOrderItems\",\n UtilMisc.toMap(\"reason\", e.toString()), locale));\n }\n }", "ItemPriceDTO findOne(Long id);", "public PaymentRequestItem(OleInvoiceItem poi, OlePaymentRequestDocument preq, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList) {\r\n\r\n // copy base attributes w/ extra array of fields not to be copied\r\n PurApObjectUtils.populateFromBaseClass(PurApItemBase.class, poi, this, PurapConstants.PREQ_ITEM_UNCOPYABLE_FIELDS);\r\n\r\n setItemDescription(poi.getItemDescription());\r\n\r\n //New Source Line should be set for PaymentRequestItem\r\n resetAccount();\r\n\r\n // set up accounts\r\n List accounts = new ArrayList();\r\n\r\n for (PurApAccountingLine account : poi.getSourceAccountingLines()) {\r\n InvoiceAccount poa = (InvoiceAccount) account;\r\n\r\n // check if this account is expired/closed and replace as needed\r\n SpringContext.getBean(AccountsPayableService.class).processExpiredOrClosedAccount(poa, expiredOrClosedAccountList);\r\n\r\n //KFSMI-4522 copy an accounting line with zero dollar amount if system parameter allows\r\n if (poa.getAmount().isZero()) {\r\n if (SpringContext.getBean(AccountsPayableService.class).canCopyAccountingLinesWithZeroAmount()) {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n } else {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n }\r\n\r\n this.setSourceAccountingLines(accounts);\r\n this.getUseTaxItems().clear();\r\n //List<PurApItemUseTax> newUseTaxItems = new ArrayList<PurApItemUseTax>();\r\n /// this.setUseTaxItems(newUseTaxItems);\r\n //copy use tax items over, and blank out keys (useTaxId and itemIdentifier)\r\n /*\r\n this.getUseTaxItems().clear();\r\n for (PurApItemUseTax useTaxItem : poi.getUseTaxItems()) {\r\n PaymentRequestItemUseTax newItemUseTax = new PaymentRequestItemUseTax(useTaxItem);\r\n this.getUseTaxItems().add(newItemUseTax);\r\n\r\n }\r\n */\r\n\r\n // clear amount and desc on below the line - we probably don't need that null\r\n // itemType check but it's there just in case remove if it causes problems\r\n // also do this if of type service\r\n if ((ObjectUtils.isNotNull(this.getItemType()) && this.getItemType().isAmountBasedGeneralLedgerIndicator())) {\r\n // setting unit price to be null to be more consistent with other below the line\r\n // this.setItemUnitPrice(null);\r\n }\r\n\r\n // copy custom\r\n /*Modified for the jira -5458*/\r\n this.purchaseOrderItemUnitPrice = poi.getPurchaseOrderItem()!=null ? poi.getPurchaseOrderItem().getItemUnitPrice() : null;\r\n// this.purchaseOrderCommodityCode = poi.getPurchaseOrderCommodityCd();\r\n\r\n // set doc fields\r\n this.setPurapDocumentIdentifier(preq.getPurapDocumentIdentifier());\r\n this.setPurapDocument(preq);\r\n }", "public double getTotalPayments(){return this.total;}", "InvoiceDTO fetchByID(int id);", "com.felania.msldb.MsgPriceOuterClass.MsgPrice getPrice();", "void PurshaseToDonate(Integer Id_Member, Integer Id_Product, Integer Quantity);", "public static List<InvoiceDto> createRevenueFinancialSummary(List<InvoiceDto> dtos)\n {\n HashMap<String, InvoiceDto> map = new HashMap<String, InvoiceDto>();\n List<InvoiceDto> retList = new ArrayList<InvoiceDto>();\n\n for (InvoiceDto dto : dtos) {\n\n String key = String.valueOf(dto.getMonthYear().getYear()) + \"01\";\n\n InvoiceDto entry = null;\n if (map.containsKey(key)) {\n entry = map.get(key);\n } else {\n entry = new InvoiceDto();\n entry.setMonthYear(new MonthYear(key));\n\n entry.setHours(0.0);\n entry.setTotalGross(0.0);\n entry.setTotalRecvGross(0.0);\n map.put(key, entry);\n }\n\n entry.setHours(entry.getHours() + dto.getHours());\n\n entry.setTotalGross(entry.getTotalGross() + dto.getTotalGross());\n if (!DateTimeUtils.isNullDate(dto.getReceivedDate()))\n {\n entry.setTotalRecvGross(entry.getTotalRecvGross() + dto.getTotalGross());\n }\n }\n\n for (String key : map.keySet())\n {\n retList.add(map.get(key));\n }\n\n SortUtils.sortFinancialDto(retList, false);\n\n return retList;\n }", "public CashInvoice(int id, ArrayList<Food> foods, int totalCashInvoice, Customer customer, int deliveryFee) {\n super(id, foods, totalCashInvoice, customer);\n this.deliveryFee = deliveryFee;\n //setTotalPrice();\n }", "private void poTableEdited(javax.swing.event.TableModelEvent evt){\n \tString[] tmp0=new String[18];\n \tint r=evt.getFirstRow();\n \tint c=evt.getColumn();\n \tjavax.swing.table.TableModel m=(javax.swing.table.TableModel)evt.getSource();\n \tfor (int i = 0; i<18; i++){\n \t\ttmp0[i]=m.getValueAt(r, i).toString();\n \t}\n \t\n \tObject[] tmp1=new inventorycontroller.function.PurchaseOrderProcessor(dbInterface1)\n \t .calculateNetAmt(tmp0, c);\n \tfor (int i = 0; i<18; i++){\n \t\tm.setValueAt(tmp1[i], r, i);\n \t}\n \tupdatePoTotal();\n }", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "public static void addArticle() {\n double summe = 0.0;\n if (!payProcessStarted) {\n int[] indexes = taArtikel.getSelectedRows();\n for (int index : indexes) {\n GUIOperations.getRecorderXml().setIsPayment(true);\n //Artikel, der eingefügt wird\n Article tmp = atm.getFilteredArtikels().get(index);\n double price = 0.0;\n if (tmp.getPreis() == 0.0) {\n try {\n int help = Integer.parseInt(\n JOptionPane.showInputDialog(mainframe.getParent(),\n \"Bitte geben Sie den Preis für das Produkt \" + tmp.getArticleName() + \" ein (in Cent)\"));\n price = help / 100.0;\n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(mainframe.getParent(), \"Artikel konnte nicht eingefügt werden, \"\n + \"da keine valide Zahl eingegeben worden ist\");\n continue;\n }\n } else {\n price = tmp.getPreis();\n }\n if (recorderXml.getBonStornoType() != -1) {\n WarenruecknahmePreisDlg wpdlg = new WarenruecknahmePreisDlg(mainframe, true, tmp.getPreis());\n wpdlg.setVisible(true);\n price = wpdlg.getPreis();\n price *= -1;\n }\n\n if (tmp.getCategory().equalsIgnoreCase(\"Preis EAN\")) {\n price = -1;\n do {\n try {\n price = Integer.parseInt(JOptionPane.showInputDialog(mainframe, \"Geben Sie den Preis für diesen Artikel mit Preis EAN ein\"));\n } catch (NumberFormatException ex) {\n int cancel = JOptionPane.showConfirmDialog(mainframe, \"Es wurde keine gültige Zahl eingeben! Wollen Sie den Kassiervorgang dieses Artikels abbrechen?\");\n if (cancel == 0) {\n return;\n }\n }\n } while (price == -1);\n price = price / 100;\n }\n\n int amount = -1;\n if (tmp.getCategory().equalsIgnoreCase(\"Gewichts EAN\")) {\n do {\n try {\n amount = Integer.parseInt(JOptionPane.showInputDialog(mainframe, \"Geben Sie die Menge für diesen Artikel mit Gewichts EAN ein (in Gramm)\"));\n } catch (NumberFormatException ex) {\n int cancel = JOptionPane.showConfirmDialog(mainframe, \"Es wurde keine gültige Zahl eingeben! Wollen Sie den Kassiervorgang dieses Artikels abbrechen?\");\n if (cancel == 0) {\n return;\n }\n }\n } while (amount == -1);\n }\n\n Article art = new Article(tmp.getXmlArticleName(), tmp.isLeergut(),\n tmp.isJugendSchutz(), tmp.getEan(), tmp.getArticleName(),\n tmp.isPfand(), tmp.getPfandArtikel(), price, tmp.isRabatt(), tmp.getUst(),\n tmp.isWeight(), tmp.getCategory(), tmp.isEloading(), tmp.isSerialNrRequired());\n art.setIsAbfrage(tmp.isIsAbfrage());\n if (amount != -1) {\n art.setGewichts_ean_menge(amount);\n }\n JugendschutzDlg jdlg = null;\n if (tmp.isJugendSchutz() && !tmp.isIsAbfrage()) {\n jdlg = new JugendschutzDlg(mainframe, true);\n jdlg.setVisible(true);\n if (jdlg.isOk()) {\n art.setJugendSchutzOk(true);\n }\n }\n if (tmp.isEloading()) {\n if (dlm.getAmount() <= 1) {\n if (tmp.isJugendSchutz() && !tmp.isIsAbfrage()) {\n if (jdlg.isOk()) {\n String status = null;\n do {\n ELoadingDlg edlg = new ELoadingDlg(mainframe, true);\n edlg.setVisible(true);\n status = edlg.getStatus();\n } while (status == null);\n art.setEloadingState(status);\n if (status.equalsIgnoreCase(\"server_offline\") || status.equalsIgnoreCase(\"aufladung_nok\")) {\n art.setPriceZero(true);\n }\n }\n } else {\n String status = null;\n if (!tmp.isIsAbfrage()) {\n do {\n ELoadingDlg edlg = new ELoadingDlg(mainframe, true);\n edlg.setVisible(true);\n status = edlg.getStatus();\n\n } while (status == null);\n art.setEloadingState(status);\n if (status.equalsIgnoreCase(\"server_offline\") || status.equalsIgnoreCase(\"aufladung_nok\")) {\n art.setPriceZero(true);\n }\n }\n }\n } else {\n JOptionPane.showMessageDialog(mainframe, \"E-Loading Artikel können nicht mit einer Menge > 1 eingefügt werden\");\n art.setEloadingAmmountOk(false);\n }\n }\n\n int weight = -1;\n Path weight_path = null;\n if (tmp.isWeight() && !tmp.isIsAbfrage()) {\n int result = JOptionPane.showConfirmDialog(mainframe, \"Es wurde ein Gewichtsartikel ausgewählt. Wollen sie diesen \"\n + \"Artikel mithilfe einer Tastatureingabe abwiegen?\");\n if (result == 0) {\n do {\n try {\n weight = Integer.parseInt(JOptionPane.showInputDialog(mainframe, \"Geben Sie bitte das Gewicht für den Artikel ein\"));\n } catch (NumberFormatException ex) {\n int cancel = JOptionPane.showConfirmDialog(mainframe, \"Es wurde keine gültige Zahl eingeben! Wollen Sie den Kassiervorgang dieses Artikels abbrechen?\");\n if (cancel == 0) {\n return;\n }\n }\n } while (weight == -1);\n } else {\n JFileChooser fc = new JFileChooser(System.getProperty(\"user.home\") + File.separator + \"Documents\");\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"txt-Dateien\", \"txt\");\n fc.setFileFilter(filter);\n if (fc.showOpenDialog(mainframe) == JFileChooser.APPROVE_OPTION) {\n weight_path = fc.getSelectedFile().toPath();\n } else {\n JOptionPane.showMessageDialog(mainframe, \"Es wurde keine Datei ausgewählt! Der Kassiervorgang dieses Artikels wird abgebrochen\");\n return;\n }\n }\n }\n\n if (tmp.isSerialNrRequired() && !tmp.isIsAbfrage()) {\n //Seriennummer einlesen\n if ((tmp.isJugendSchutzOk() && tmp.isJugendSchutz()) || !tmp.isJugendSchutz()) {\n String serNr;\n do {\n serNr = JOptionPane.showInputDialog(null,\n \"Bitte geben Sie eine Seriennummer ein:\");\n } while (serNr == null || serNr.equals(\"\") || !serNr.matches(\"[0-9]+\"));\n art.setSerialNr(serNr);\n }\n }\n if (tmp.isWeight()) {\n if (weight == -1) {\n art.setWeigthArticles(weight_path);\n } else {\n art.setWeigthArticles(weight);\n }\n }\n int tmp_pfand_amount = -1;\n if (tmp.isPfand()) {\n tmp_pfand_amount = dlm.getAmount();\n }\n dlm.addArtikel(art);\n if (tmp.isPfand() && (art.isJugendSchutzOk() || !tmp.isJugendSchutz())) {\n for (Article arti : atm.getAllArtikels()) {\n if (arti.getXmlArticleName().equals(art.getPfandArtikel())) {\n Article newA = new Article(arti.getXmlArticleName(), arti.isLeergut(), arti.isJugendSchutz(), arti.getEan(), arti.getArticleName(), arti.isPfand(), arti.getPfandArtikel(), arti.getPreis(), arti.isRabatt(), arti.getUst(), arti.isWeight(), arti.getCategory(), arti.isEloading());\n dlm.setAmount(tmp_pfand_amount);\n newA.setInXml(false);\n dlm.addArtikel(newA);\n tmp_pfand_amount = -1;\n }\n }\n }\n JButton btBonSt = paArticle.getBtBonstorno();\n if (btBonSt.isEnabled()) {\n btBonSt.setEnabled(false);\n }\n\n JButton btWrue = paArticle.getBtWRUE();\n if (btWrue.isEnabled()) {\n btWrue.setEnabled(false);\n }\n }\n\n setPrice();\n setBonStarted(true);\n tfDigitField.setText(\"\");\n money = 0;\n }\n }", "public BigDecimal getPriceListEntered();", "void newSale(double totalWithTaxes);", "public interface IOaOffPriceService {\n\n /**\n * 查询批量特价调整单明细List\n * @param map\n * @return\n * @throws Exception\n * @author limin\n * @date Mar 9, 2015\n */\n public PageData selectOaOffPriceDetailList(PageMap map) throws Exception;\n\n /**\n * 新增批量特价调整单\n * @param price\n * @param list\n * @return\n * @author limin\n * @date Mar 10, 2015\n */\n public int addOaOffPrice(OaOffPrice price, List<OaOffPriceDetail> list) throws Exception;\n\n /**\n * 修改批量特价调整单\n * @param price\n * @param list\n * @return\n * @author limin\n * @date Mar 10, 2015\n */\n public int editOaOffPrice(OaOffPrice price, List<OaOffPriceDetail> list) throws Exception;\n\n /**\n * 查询批量特价申请单\n * @param id\n * @return\n * @throws Exception\n * @author limin\n * @date Mar 10, 2015\n */\n public OaOffPrice selectOaOffPrice(String id) throws Exception;\n\n /**\n * 查询批量特价调整单明细List\n * @param billid\n * @return\n * @throws Exception\n * @author limin\n * @date Mar 10, 2015\n */\n public List<OaOffPriceDetail> selectOaOffPriceDetailListByBillid(String billid) throws Exception;\n\n /**\n * 查询商品\n *\n * @param pageMap\n * @return\n * @throws Exception\n * @author limin\n * @date Sep 30, 2015\n */\n public PageData getGoodsList(PageMap pageMap) throws Exception;\n}", "public void bldCrtnDspl() {\r\n ArrayList<PtkCarton> ptkCrtnList;\r\n ObservableList<PickTicketDetailByCartonRow> ptktCrtnDetailRow = FXCollections.observableArrayList();\r\n ptkCrtnList = ptktsum.getPtkCartonList();\r\n BigDecimal totU = BigDecimal.ZERO;\r\n BigDecimal totD = BigDecimal.ZERO;\r\n BigDecimal ptkSv = BigDecimal.ZERO;\r\n int totCtn = 0;\r\n int totPck = 0;\r\n Locale enUSLocale\r\n = new Locale.Builder().setLanguage(\"en\").setRegion(\"US\").build();\r\n NumberFormat currencyFormatter\r\n = NumberFormat.getCurrencyInstance(enUSLocale);\r\n DecimalFormat numFormatter = new DecimalFormat(\"#,###\");\r\n\r\n for (PtkCarton ptkCrt : ptkCrtnList) {\r\n if (fltrPtktCrt(ptkCrt)) {\r\n ptktCrtnDetailRow.add(new PickTicketDetailByCartonRow(ptkCrt));\r\n if (ptkSv.compareTo(ptkCrt.getPtktNo()) != 0) {\r\n totPck++;\r\n ptkSv = ptkCrt.getPtktNo();\r\n }\r\n totU = totU.add(ptkCrt.getTotu());\r\n totD = totD.add(ptkCrt.getTotd());\r\n totCtn++;\r\n }\r\n }\r\n lblPtkCnt.setText(numFormatter.format(totPck));\r\n lblTotU.setText(numFormatter.format(totU));\r\n lblTotD.setText(currencyFormatter.format(totD));\r\n lblCtnCnt.setText(numFormatter.format(totCtn));\r\n if (!ptktCrtnDetailRow.isEmpty()) {\r\n btnExport.setDisable(false);\r\n }\r\n\r\n tcPtkt.setCellValueFactory(cellData -> cellData.getValue().getPtktNo());\r\n tcCrtn.setCellValueFactory(cellData -> cellData.getValue().getCrtnNo().asObject());\r\n tcCrtn.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double crtn, boolean empty) {\r\n super.updateItem(crtn, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"#########\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n setText(numFormatter.format(crtn));\r\n }\r\n }\r\n });\r\n tcOrder.setCellValueFactory(cellData -> cellData.getValue().getOrdNo());\r\n tcSoldTo.setCellValueFactory(cellData -> cellData.getValue().getSoldTo());\r\n tcShipTo.setCellValueFactory(cellData -> cellData.getValue().getShipTo());\r\n tcCustNam.setCellValueFactory(cellData -> cellData.getValue().getCusName());\r\n tcShpNam.setCellValueFactory(cellData -> cellData.getValue().getShpName());\r\n tcOrTyp.setCellValueFactory(cellData -> cellData.getValue().getOrdType());\r\n tcShipVia.setCellValueFactory(cellData -> cellData.getValue().getsVia());\r\n tcWhse.setCellValueFactory(cellData -> cellData.getValue().getWhse());\r\n tcSku.setCellValueFactory(cellData -> cellData.getValue().getTotSku().asObject());\r\n tcUnits.setCellValueFactory(cellData -> cellData.getValue().getUnits().asObject());\r\n tcUnits.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double units, boolean empty) {\r\n super.updateItem(units, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"###,###,###\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n setText(numFormatter.format(units));\r\n }\r\n }\r\n });\r\n tcDollars.setCellValueFactory(cellData -> cellData.getValue().getDollars().asObject());\r\n tcDollars.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double dlrs, boolean empty) {\r\n DecimalFormat numFormatter = new DecimalFormat(\"$#,###.00\");\r\n super.updateItem(dlrs, empty);\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n setText(numFormatter.format(dlrs));\r\n }\r\n }\r\n });\r\n tcStat.setCellValueFactory(cellData -> cellData.getValue().getStatus());\r\n tcCtnStat.setCellValueFactory(ctData -> ctData.getValue().getCtnStat());\r\n tcStDat.setCellValueFactory(value -> value.getValue().getStgSDate().asObject());\r\n tcStDat.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double stDat, boolean empty) {\r\n super.updateItem(stDat, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"00000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sDat = numFormatter.format(stDat);\r\n String sYr = sDat.substring(0, 4);\r\n String sMo = sDat.substring(4, 6);\r\n String sDa = sDat.substring(6, 8);\r\n setText(sMo + \"/\" + sMo + \"/\" + sYr);\r\n }\r\n }\r\n });\r\n tcStTim.setCellValueFactory(cellData -> cellData.getValue().getStgSTime().asObject());\r\n tcStTim.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double stTim, boolean empty) {\r\n super.updateItem(stTim, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sTim = numFormatter.format(stTim);\r\n String sHr = sTim.substring(0, 2);\r\n String sMn = sTim.substring(2, 4);\r\n String sSec = sTim.substring(4, 6);\r\n setText(sHr + ':' + sMn + ':' + sSec);\r\n }\r\n }\r\n });\r\n tcCtnCmpDat.setCellValueFactory(ctData -> ctData.getValue().getStgCmpDat().asObject());\r\n tcCtnCmpDat.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double cmpDat, boolean empty) {\r\n super.updateItem(cmpDat, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"00000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n if (cmpDat == 0) {\r\n setText(\"\");\r\n } else {\r\n String sDat = numFormatter.format(cmpDat);\r\n String sYr = sDat.substring(0, 4);\r\n String sMo = sDat.substring(4, 6);\r\n String sDa = sDat.substring(6, 8);\r\n setText(sMo + \"/\" + sMo + \"/\" + sYr);\r\n }\r\n }\r\n }\r\n });\r\n tcCtnCmpTim.setCellValueFactory(cData -> cData.getValue().getStgCmpTim().asObject());\r\n tcCtnCmpTim.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double cmpTim, boolean empty) {\r\n super.updateItem(cmpTim, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"000000\");\r\n if (empty || cmpTim == 0) {\r\n setText(null);\r\n } else {\r\n String sTim = numFormatter.format(cmpTim);\r\n String sHr = sTim.substring(0, 2);\r\n String sMn = sTim.substring(2, 4);\r\n String sSec = sTim.substring(4, 6);\r\n setText(sHr + ':' + sMn + ':' + sSec);\r\n }\r\n }\r\n });\r\n tcDur.setCellValueFactory(cellData -> cellData.getValue().getDur().asObject());\r\n tcDur.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Long>() {\r\n @Override\r\n public void updateItem(Long dur, boolean empty) {\r\n super.updateItem(dur, empty);\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n long hrs = (long) dur / 3600;\r\n int min = (int) (dur % 3600) / 60;\r\n\r\n setText(String.format(\"%d Hrs %d Min\", hrs, min));\r\n }\r\n }\r\n });\r\n tcOpr.setCellValueFactory(cellData -> cellData.getValue().getOperator());\r\n tcStrDt.setCellValueFactory(cellData -> cellData.getValue().getOrStrDt().asObject());\r\n tcStrDt.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double stDat, boolean empty) {\r\n super.updateItem(stDat, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"00000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sDat = numFormatter.format(stDat);\r\n String sYr = sDat.substring(0, 4);\r\n String sMo = sDat.substring(4, 6);\r\n String sDa = sDat.substring(6, 8);\r\n setText(sMo + \"/\" + sMo + \"/\" + sYr);\r\n }\r\n }\r\n });\r\n tcCmpDt.setCellValueFactory(cellData -> cellData.getValue().getOrCmpDt().asObject());\r\n tcCmpDt.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double cmpDt, boolean empty) {\r\n super.updateItem(cmpDt, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"00000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sDat = numFormatter.format(cmpDt);\r\n String sYr = sDat.substring(0, 4);\r\n String sMo = sDat.substring(4, 6);\r\n String sDa = sDat.substring(6, 8);\r\n setText(sMo + \"/\" + sMo + \"/\" + sYr);\r\n }\r\n }\r\n });\r\n tcPrtDt.setCellValueFactory(cellData -> cellData.getValue().getPrtDate().asObject());\r\n tcPrtDt.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double prtDat, boolean empty) {\r\n super.updateItem(prtDat, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"00000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sDat = numFormatter.format(prtDat);\r\n String sYr = sDat.substring(0, 4);\r\n String sMo = sDat.substring(4, 6);\r\n String sDa = sDat.substring(6, 8);\r\n setText(sMo + \"/\" + sMo + \"/\" + sYr);\r\n }\r\n }\r\n });\r\n tcPrtTime.setCellValueFactory(cellData -> cellData.getValue().getPrtTime().asObject());\r\n tcPrtTime.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double prtTime, boolean empty) {\r\n super.updateItem(prtTime, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sTim = numFormatter.format(prtTime);\r\n String sHr = sTim.substring(0, 2);\r\n String sMn = sTim.substring(2, 4);\r\n String sSec = sTim.substring(4, 6);\r\n setText(sHr + ':' + sMn + ':' + sSec);\r\n }\r\n }\r\n });\r\n\r\n tblPtkDtl.setItems(ptktCrtnDetailRow);\r\n\r\n }", "@Test\n public void testOrderFactoryInvoiceMemberTotal() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order with member\n orderController.addOrder(STAFF_NAME, 1, true, orderItems, setOrderItems);\n \n // create the invoice\n orderController.addOrderInvoice(orderController.getOrder(1));\n\n // check that the invoice is created\n assertEquals(1, orderController.getOrderInvoices().size());\n assertEquals(3 * MENU_PRICE * 0.8, orderController.getOrderInvoices().get(0).getSubTotal());\n assertEquals((3 * MENU_PRICE * 0.8) * 0.1, orderController.getOrderInvoices().get(0).getServiceChargeAmount());\n assertEquals((((3 * MENU_PRICE * 0.8) * 0.1) + (3 * MENU_PRICE * 0.8)) * 0.07, orderController.getOrderInvoices().get(0).getGSTAmount());\n assertEquals(((((3 * MENU_PRICE * 0.8) * 0.1) + (3 * MENU_PRICE * 0.8)) * 0.07) + ((3 * MENU_PRICE * 0.8) * 0.1) + (3 * MENU_PRICE * 0.8), orderController.getOrderInvoices().get(0).getTotal());\n }", "public interface ShoppingCartService {\n ShoppingCartDetail getShoppingCartDetailWithAmount(BigDecimal quantity,\n Product product);\n BigDecimal calculateAmount(BigDecimal quantity, Product product);\n}", "double GetTaskPrice(int Catalog_ID);", "public static Documento calcularExcento(Documento doc, List<DocumentoDetalleVo> productos) {\n\t\tDouble totalReal = 0.0, exectoReal = 0.0;\n\t\tDouble gravado = 0.0;\n\t\tDouble ivatotal = 0.0;\n\t\tDouble peso = 0.0;\n\t\tDouble iva5 = 0.0;\n\t\tDouble iva19 = 0.0;\n\t\tDouble base5 = 0.0;\n\t\tDouble base19 = 0.0;\n\t\tDouble costoTotal =0.0;\n\t\t//este campo es para retencion del hotel\n\t\tDouble retencion =0.0;\n\t\t// aqui voy toca poner a sumar las variables nuebas para que se reflejen\n\t\t// en el info diario\n\t\tfor (DocumentoDetalleVo dDV : productos) {\n\t\t\tLong productoId = dDV.getProductoId().getProductoId();\n\t\t\tDouble costoPublico = dDV.getParcial();\n\t\t\tDouble costo = (dDV.getProductoId().getCosto()==null?0.0:dDV.getProductoId().getCosto())*dDV.getCantidad();\n\t\t\tDouble iva1 = dDV.getProductoId().getIva().doubleValue() / 100;\n\t\t\tDouble peso1 = dDV.getProductoId().getPeso() == null ? 0.0 : dDV.getProductoId().getPeso();//\n\t\t\tpeso1 = peso1 * dDV.getCantidad();\n\t\t\ttotalReal += costoPublico;\n\t\t\tcostoTotal+=costo;\n\t\t\tdouble temp;\n\t\t\tivatotal = ivatotal + ((costoPublico / (1 + iva1)) * iva1);\n\t\t\tpeso = peso + peso1;\n\t\t\t// si es iva del 19 se agrega al documento junto con la base\n\t\t\tif (iva1 == 0.19) {\n\t\t\t\tiva19 = iva19 + ((costoPublico / (1 + iva1)) * iva1);\n\t\t\t\tbase19 = base19 + (costoPublico / (1 + iva1));\n\t\t\t}\n\t\t\t// si es iva del 5 se agrega al documento junto con la base\n\t\t\tif (iva1 == 0.05) {\n\t\t\t\tiva5 = iva5 + ((costoPublico / (1 + iva1)) * iva1);\n\t\t\t\tbase5 = base5 + (costoPublico / (1 + iva1));\n\t\t\t}\n\t\t\tif (iva1 > 0.0) {\n\t\t\t\ttemp = costoPublico / (1 + iva1);\n\t\t\t\tgravado += temp;\n\n\t\t\t} else {\n\t\t\t\ttemp = costoPublico;\n\t\t\t\t//no suma el excento si es producto retencion\n\t\t\t\tif( productoId!=6l && productoId!=7l) {\n\t\t\t\t\texectoReal += temp;\n\t\t\t\t}else {\n\t\t\t\t\tretencion+= temp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tdoc.setTotal(totalReal);\n\t\tdoc.setSaldo(totalReal);\n\t\tdoc.setExcento(exectoReal);\n\t\tdoc.setGravado(gravado);\n\t\tdoc.setIva(ivatotal);\n\t\tdoc.setPesoTotal(peso);\n\t\tdoc.setIva5(iva5);\n\t\tdoc.setIva19(iva19);\n\t\tdoc.setBase5(base5);\n\t\tdoc.setBase19(base19);\n\t\tdoc.setTotalCosto(costoTotal);\n\t\tdoc.setRetefuente(retencion);\n\t\treturn doc;\n\t}", "public void calculatePayment() {}" ]
[ "0.6194851", "0.6090489", "0.597968", "0.5802026", "0.57701135", "0.573129", "0.5653428", "0.5602208", "0.5595203", "0.555251", "0.55475205", "0.5542057", "0.55168855", "0.55114645", "0.5463676", "0.54626435", "0.54250634", "0.5407149", "0.54027987", "0.5360669", "0.5325589", "0.5314844", "0.5310963", "0.5297202", "0.52837074", "0.5281499", "0.52591777", "0.5228005", "0.52268875", "0.52245045", "0.5216103", "0.5207403", "0.519977", "0.51981425", "0.51866907", "0.5179656", "0.51734996", "0.5164366", "0.5163011", "0.51604235", "0.51600546", "0.51445585", "0.5135989", "0.5135023", "0.51238257", "0.5118037", "0.51159054", "0.50983", "0.50961924", "0.5092364", "0.5091827", "0.5089516", "0.50805736", "0.5078387", "0.5078227", "0.50629205", "0.5056371", "0.50549746", "0.50549424", "0.5048799", "0.50430614", "0.5039583", "0.5039024", "0.503778", "0.50341475", "0.50281495", "0.5018013", "0.5017756", "0.50162417", "0.501597", "0.50157535", "0.50144506", "0.50142133", "0.49991986", "0.49938172", "0.4991958", "0.49869245", "0.4985232", "0.4983707", "0.4977749", "0.49769253", "0.49751425", "0.49730468", "0.49715433", "0.49707812", "0.4968623", "0.49670205", "0.49666905", "0.49656743", "0.49652523", "0.4965052", "0.49579424", "0.49525052", "0.49518794", "0.4949918", "0.49478772", "0.4946117", "0.49459434", "0.49376264", "0.49342903", "0.49316043" ]
0.0
-1
Conventions: Each execution (both query and nonquery shall return an nonnegative execution ID(execId). Negative execution IDs are reserved for error handling. User shall be able to query the status of an execution even after it's finished, so the executor shall keep record of all the execution unless being asked to remove them ( when removeExecution is called.) IMPORTANT: An executor shall support two ways of supplying data: 1. Say user selects profiles of users who visited LinkedIn in the last 5 mins. There could be millions of rows, but the UI only need to show a small fraction. That's retrieveQueryResult, accepting a row range (startRow and endRow). Note that UI may ask for the same data over and over, like when user switches from page 1 to page 2 and data stream changes at the same time, the two pages may actually have overlapped or even same data. 2. Say user wants to see clicks on a LinkedIn page of certain person from now on. In this mode consumeQueryResult shall be used. UI can keep asking for new rows, and once the rows are consumed, it's no longer necessary for the executor to keep them. If lots of rows come in, the UI may be only interested in the last certain rows (as it's in a logview mode), so all data older can be dropped.
public interface SqlExecutor { /** * SqlExecutor shall be ready to accept all other calls after start() is called. * However, it shall NOT store the ExecutionContext for future use, as each * call will be given an ExecutionContext which may differ from this one. * * @param context The ExecutionContext at the time of the call. * @throws ExecutorException if the Executor encounters an error. */ void start(ExecutionContext context) throws ExecutorException; /** * Indicates no further calls will be made thus it's safe for the executor to clean up. * * @param context The ExecutionContext at the time of the call. * @throws ExecutorException if the Executor encounters an error. */ void stop(ExecutionContext context) throws ExecutorException; /** * * @return An EnvironmentVariableHandler that handles executor specific environment variables */ EnvironmentVariableHandler getEnvironmentVariableHandler(); /** * @param context The ExecutionContext at the time of the call. * @return A list of table names. Could be empty. * @throws ExecutorException if the Executor encounters an error. */ List<String> listTables(ExecutionContext context) throws ExecutorException; /** * @param context The ExecutionContext at the time of the call. * @param tableName Name of the table to get the schema for. * @return Schema of the table. * @throws ExecutorException if the Executor encounters an error. */ SqlSchema getTableSchema(ExecutionContext context, String tableName) throws ExecutorException; /** * @param context The ExecutionContext at the time of the call. * @param statement statement to execute * @return The query result. * @throws ExecutorException if the Executor encounters an error. */ QueryResult executeQuery(ExecutionContext context, String statement) throws ExecutorException; /** * @return how many rows available for reading. * @throws ExecutorException if the Executor encounters an error. */ int getRowCount() throws ExecutorException; /** * Row starts at 0. Executor shall keep the data retrieved. * For now we get strings for display but we might want strong typed values. * * @param context The ExecutionContext at the time of the call. * @param startRow Start row index (inclusive) * @param endRow End row index (inclusive) * @return A list of row data represented by a String array. * @throws ExecutorException if the Executor encounters an error. */ List<String[]> retrieveQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException; /** * Consumes rows from query result. Executor shall drop them, as "consume" indicates. * ALL data before endRow (inclusive, including data before startRow) shall be deleted. * * @param context The ExecutionContext at the time of the call. * @param startRow Start row index (inclusive) * @param endRow End row index (inclusive) * @return available data between startRow and endRow (both are inclusive) * @throws ExecutorException if the Executor encounters an error. */ List<String[]> consumeQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException; /** * Executes all the NON-QUERY statements in the sqlFile. * Query statements are ignored as it won't make sense. * * @param context The ExecutionContext at the time of the call. * @param file A File object to read statements from. * @return Execution result. * @throws ExecutorException if the Executor encounters an error. */ NonQueryResult executeNonQuery(ExecutionContext context, File file) throws ExecutorException; /** * @param context The ExecutionContext at the time of the call. * @param statements A list of non-query sql statements. * @return Execution result. * @throws ExecutorException if the Executor encounters an error. */ NonQueryResult executeNonQuery(ExecutionContext context, List<String> statements) throws ExecutorException; /** * @param context The ExecutionContext at the time of the call. * @param exeId Execution ID. * @throws ExecutorException if the Executor encounters an error. */ void stopExecution(ExecutionContext context, int exeId) throws ExecutorException; /** * Removing an ongoing execution shall result in an error. Stop it first. * * @param context The ExecutionContext at the time of the call * @param exeId Execution ID. * @throws ExecutorException if the Executor encounters an error. */ void removeExecution(ExecutionContext context, int exeId) throws ExecutorException; /** * @param execId Execution ID. * @return ExecutionStatus. * @throws ExecutorException if the Executor encounters an error. */ ExecutionStatus queryExecutionStatus(int execId) throws ExecutorException; /** * @param context The ExecutionContext at the time of the call. * @return A list of SqlFunction. * @throws ExecutorException if the Executor encounters an error. */ List<SqlFunction> listFunctions(ExecutionContext context) throws ExecutorException; /** * Gets the version of this executor. * @return A String representing the version of the executor. This function does NOT throw an * ExecutorException as the caller has nothing to do to "recover" if the function fails. */ String getVersion(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public QueryExecution createQueryExecution(Query qry);", "public interface QueryExecutor<V> {\n\n /**\n * Executes the query represented by a specified expression tree.\n *\n * @param timelyQuery The timely query\n */\n void execute(TimelyQuery timelyQuery, GraphSchema schema, long timeout, String queryId);\n\n /**\n * Executes the query represented by a specified expression tree.\n *\n * @param timelyQuery An expression tree.\n */\n void execute(TimelyQuery timelyQuery, ExecuteConfig executeConfig, GraphSchema schema, long timeout, String queryId);\n\n /**\n * PREPARE the query\n *\n * @param prepareId The prepare query id\n * @param timelyQuery The given expression tree\n * @param executeConfig The config of execute\n * @return The instance of PrepareStoreEntity\n */\n void prepare(String prepareId, TimelyQuery timelyQuery, ExecuteConfig executeConfig);\n\n /**\n * @param prepareId\n * @param timelyQuery\n * @param schema\n */\n void executePrepare(String prepareId, TimelyQuery timelyQuery, GraphSchema schema, String queryId);\n\n /**\n * Query current process list.\n */\n void showProcessList(TimelyResultProcessor resultProcessor);\n\n /**\n * Cancel a running dataflow.\n */\n void cancelDataflow(TimelyResultProcessor resultProcessor, String queryId);\n}", "cn.infinivision.dataforce.busybee.pb.meta.Execution getExecution();", "public interface Executor {\n <E> E query(String statement, String paramter);\n}", "public Hashtable getExecutions()\n {\n return m_executions;\n }", "List<String[]> consumeQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;", "List<String[]> retrieveQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;", "@Test\n public void tryMeExecutionCrud() {\n final Endpoint endpoint = em.createQuery(\"select e from Endpoint e\", Endpoint.class).setMaxResults(1).getSingleResult();\n { // count with no execution\n assertEquals(0, client.countExecutions(endpoint.getId()));\n }\n { // one execution\n final GenericClientService.Request request = new GenericClientService.Request();\n request.setUrl(\"http://test\");\n request.setMethod(\"POST\");\n request.setHeaders(new HashMap<String, String>() {{\n put(\"Some-Header\", \"Value\");\n }});\n final TryMeExecution out = client.save(endpoint.getId(), request, new GenericClientService.Response(204, new HashMap<String, String>() {{\n put(\"Some-Header\", \"Value\");\n }}, \"{}\", 0), null);\n assertEquals(1, client.countExecutions(endpoint.getId()));\n\n // check we can find pages\n final Collection<TryMeExecution> executions = client.findExecutions(endpoint.getId(), 0, 2);\n assertNotNull(executions);\n assertEquals(1, executions.size());\n\n // we can find item\n final TryMeExecution execution = client.find(out.getId());\n Stream.of(execution.getRequest(), execution.getResponse(), execution.getCreatedBy(), execution.getUpdatedBy(), execution.getUpdatedAt(), execution.getCreatedAt())\n .forEach(Assert::assertNotNull);\n\n assertEquals(executions.iterator().next().getId(), execution.getId());\n\n // check we can deserialize\n final GenericClientService.Request loadedRequest = client.loadExecutionMember(GenericClientService.Request.class, execution.getRequest());\n assertEquals(\"POST\", loadedRequest.getMethod());\n assertEquals(new HashMap<String, String>() {{\n put(\"Some-Header\", \"Value\");\n }}, loadedRequest.getHeaders());\n assertEquals(\"http://test\", loadedRequest.getUrl());\n assertNull(loadedRequest.getPayload());\n }\n }", "void execute(TimelyQuery timelyQuery, ExecuteConfig executeConfig, GraphSchema schema, long timeout, String queryId);", "public QueryExecution createQueryExecution(String qryStr);", "public interface OInternalExecutionPlan extends OExecutionPlan {\n\n public static final String JAVA_TYPE = \"javaType\";\n\n void close();\n\n /**\n * if the execution can still return N elements, then the result will contain them all. If the\n * execution contains less than N elements, then the result will contain them all, next result(s)\n * will contain zero elements\n *\n * @param n\n * @return\n */\n OResultSet fetchNext(int n);\n\n void reset(OCommandContext ctx);\n\n long getCost();\n\n default OResult serialize() {\n throw new UnsupportedOperationException();\n }\n\n default void deserialize(OResult serializedExecutionPlan) {\n throw new UnsupportedOperationException();\n }\n\n default OInternalExecutionPlan copy(OCommandContext ctx) {\n throw new UnsupportedOperationException();\n }\n\n boolean canBeCached();\n\n default String getStatement() {\n return null;\n }\n\n default void setStatement(String stm) {}\n\n default String getGenericStatement() {\n return null;\n }\n\n default void setGenericStatement(String stm) {}\n}", "ExecutionResult<Void> execute();", "public abstract ResultList executeQuery(DatabaseQuery query);", "public interface QueryEvaluatorStructure {\n\n long getResultCount();\n\n void setResultCount(long count);\n\n TupleExpr getPlan();\n\n void setPlan(TupleExpr tupleExpr);\n\n void setTime(long time);\n\n long getTime();\n}", "@Override\n public final QueryResult execute(String queryId, LogicalWorkflow workflow) throws ConnectorException {\n QueryResult result = null;\n Long time = null;\n try {\n for (LogicalStep project : workflow.getInitialSteps()) {\n ClusterName clusterName = ((Project) project).getClusterName();\n connectionHandler.startJob(clusterName.getName());\n }\n if (logger.isDebugEnabled()) {\n logger.debug(\"Executing [\" + workflow.toString() + \"]\");\n }\n time = System.currentTimeMillis();\n result = executeWorkFlow(workflow);\n\n if (logger.isDebugEnabled()) {\n logger.debug(\n \"The query has finished. The result form the query [\" + workflow.toString() + \"] has returned \"\n + \"[\" +\n result\n .getResultSet()\n .size() + \"] rows\");\n\n }\n } finally {\n for (LogicalStep project : workflow.getInitialSteps()) {\n connectionHandler.endJob(((Project) project).getClusterName().getName());\n }\n if (time != null) {\n logger.info(\"TIME - The execute time has been [\" + (System.currentTimeMillis() - time) + \"]\");\n }\n }\n return result;\n }", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "@Override\n public int getExecutionIndex()\n {\n return executionIndex;\n }", "interface RequestExecution\n\t{\n\t\tvoid execute(AbstractResponseBuilder response);\n\t}", "CommandResult execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "cn.infinivision.dataforce.busybee.pb.meta.ExecutionOrBuilder getExecutionOrBuilder();", "private QuerySet execute( TaskKey aTaskKey ) {\n DataSetArgument lDataSetArgument = new DataSetArgument();\n lDataSetArgument.add( aTaskKey, \"aTaskDbId\", \"aTaskId\" );\n\n return QueryExecutor.executeQuery( getClass(), lDataSetArgument );\n }", "public interface ExecutionQueueRepository {\n\n List<ExecutionMessage> poll(Date createDate, String workerId, int maxSize, ExecStatus... statuses);\n\n\tList<ExecutionMessage> poll(String workerId, int maxSize, ExecStatus... statuses);\n\n\tList<ExecutionMessage> pollMessagesWithoutAck(int maxSize,long minVersionAllowed);\n\n Integer countMessagesWithoutAckForWorker(int maxSize, long minVersionAllowed, String workerUuid);\n\n\tlong generateExecStateId();\n\n\tvoid insertExecutionStates(final List<ExecutionMessage> stateMessages);\n\n\tvoid insertExecutionQueue(final List<ExecutionMessage> messages,long version);\n\n\tMap<Long,Payload> findPayloadByExecutionIds(Long ... ids);\n\n void deleteFinishedSteps(Set<Long> ids);\n\n Set<Long> getFinishedExecStateIds();\n\n\tList<ExecutionMessage> findByStatuses(int maxSize, ExecStatus... statuses);\n}", "public int execute();", "public interface CommandExecutor {\r\n\r\n /**\r\n * Executes command in a given context.\r\n * @param command Command to execute.\r\n * @param state Starting state.\r\n * @return State after the execution, or <b>State.INVALID</b>, or <b>State.END</b>.\r\n */\r\n public State execute(int command, State state);\r\n\r\n}", "public interface HiveQueryExecutor {\n /**\n * Execute the specified quer(y|ies).\n *\n * @param q Query to be executed. Queries may include \\n and mutliple, ;-delimited\n * statements. The entire string is passed to Hive.\n *\n * @throws HiveQueryExecutionException if Hive cannont execute a query.\n */\n public void executeQuery(String q) throws HiveQueryExecutionException;\n\n /**\n * Redirect the query execution's stdout\n *\n * @param out\n */\n public void setOut(PrintStream out);\n\n /**\n * Redirect the query execution's stdin\n *\n * @param in\n */\n public void setIn(InputStream in);\n\n /**\n * Redirect the query execution's stderr\n *\n * @param err\n */\n public void setErr(PrintStream err);\n}", "public ExecutionMetadata getExecutionMetadata();", "protected abstract QueryResult executeWorkFlow(LogicalWorkflow workflow) throws ConnectorException;", "void runQueries();", "public interface ExecutionPlan extends Describable {\n /**\n * Selects a work item to run, returns null if there is no work remaining _or_ if no queued work is ready to run.\n */\n @Nullable\n Node selectNext(WorkerLeaseRegistry.WorkerLease workerLease, ResourceLockState resourceLockState);\n\n void finishedExecuting(Node node);\n\n void abortAllAndFail(Throwable t);\n\n void cancelExecution();\n\n /**\n * Returns the node for the supplied task that is part of this execution plan.\n *\n * @throws IllegalStateException When no node for the supplied task is part of this execution plan.\n */\n TaskNode getNode(Task task);\n\n /**\n * @return The set of all available tasks. This includes tasks that have not yet been executed, as well as tasks that have been processed.\n */\n Set<Task> getTasks();\n\n /**\n * @return The set of all filtered tasks that don't get executed.\n */\n Set<Task> getFilteredTasks();\n\n /**\n * Collects the current set of task failures into the given collection.\n */\n void collectFailures(Collection<? super Throwable> failures);\n\n boolean allNodesComplete();\n\n boolean hasNodesRemaining();\n\n /**\n * Returns the number of work items in the plan.\n */\n int size();\n}", "protected abstract void execute();", "private void executeQuery() {\n }", "interface WriteExecutor<R> {\n /**\n * Execute previously defined operation\n */\n R execute();\n }", "default void getExecution(\n com.google.cloud.aiplatform.v1.GetExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetExecutionMethod(), responseObserver);\n }", "public com.google.cloud.aiplatform.v1.Execution getExecution(\n com.google.cloud.aiplatform.v1.GetExecutionRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetExecutionMethod(), getCallOptions(), request);\n }", "@Override\n public boolean execute(String sql) throws SQLException {\n if (isClosed) {\n throw new SQLException(\"Can't execute after statement has been closed\");\n }\n stmtCompleted = false;\n if (resultSet != null) {\n // As requested by the Statement interface javadoc, \"All execution methods in the Statement interface\n // implicitly close a statement's current ResultSet object if an open one exists\"\n resultSet.close();\n resultSet = null;\n }\n\n // TODO in future, the polling logic should be in another SyncExploreClient\n try {\n stmtHandle = exploreClient.execute(sql);\n Status status = ExploreClientUtil.waitForCompletionStatus(exploreClient, stmtHandle, 200,\n TimeUnit.MILLISECONDS, MAX_POLL_TRIES);\n stmtCompleted = true;\n switch (status.getStatus()) {\n case FINISHED:\n resultSet = new ExploreQueryResultSet(exploreClient, this, stmtHandle);\n // NOTE: Javadoc states: \"returns false if the first result is an update count or there is no result\"\n // Here we have a result, it may contain rows or may be empty, but it exists.\n return true;\n case CANCELED:\n return false;\n default:\n // Any other state can be considered as a \"database\" access error\n throw new SQLException(String.format(\"Statement '%s' execution did not finish successfully. \" +\n \"Got final state - %s\", sql, status.getStatus().toString()));\n }\n } catch (HandleNotFoundException e) {\n // Cannot happen unless explore server restarted.\n LOG.error(\"Error executing query\", e);\n throw new SQLException(\"Unknown state\");\n } catch (InterruptedException e) {\n LOG.error(\"Caught exception\", e);\n Thread.currentThread().interrupt();\n return false;\n } catch (ExploreException e) {\n LOG.error(\"Caught exception\", e);\n throw new SQLException(e);\n }\n }", "boolean hasExecution();", "public interface ExecutorListener {\n\n void invokeMethod(int id, ExecutorObject object, ExecuteRunType type, User user, String uniqueMethodId, Method method);\n\n}", "private QueryExecution returnQueryExecObject(String coreQuery) {\n\t\tStringBuffer queryStr = new StringBuffer();\n\t\t// Establish Prefixes\n\t\tfor(String prefix:neededPrefixesForQueries)\n\t\t{\n\t\t\tqueryStr.append(\"prefix \" + prefix);\n\t\t}\n\n\t\tqueryStr.append(coreQuery);\n\n\t\tQuery query = QueryFactory.create(queryStr.toString());\n\t\tQueryExecution qexec = QueryExecutionFactory.create(query, this.model);\n\n\t\treturn qexec;\n\t}", "public ExecutionResults getExecutionResults() {\n\t\treturn results ;\n\t}", "abstract protected void execute();", "@GET\n @Path(\"/executions\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getExecutionForDeployment(\n @Context HttpServletRequest request, @HeaderParam(\"authorization\") String authString,\n @HeaderParam(\"userid\") String userid) {\n\n String url;\n\n if (request.getQueryString() == null) {\n logger.info(\"Received request for list execution\");\n url = \"/executions\";\n } else {\n logger.info(\"Received request for list execution with query paramters = \" + request.getQueryString());\n url = \"/executions?\" + request.getQueryString();\n }\n\n if (!APIHConfig.getInstance().validateUser(authString, userid, \"GET\")) {\n return Response.status(401).entity(UNAUTHORIZED).build();\n }\n\n JSONObject result = CloudifyClient.getInstance().doGET(url);\n logger.info(\"Handled get Execution API Request\");\n return handleResponse(result);\n }", "void execute(TimelyQuery timelyQuery, GraphSchema schema, long timeout, String queryId);", "private QuerySet execute( TaskKey aTaskKey ) {\n DataSetArgument lDataSetArgument = new DataSetArgument();\n lDataSetArgument.add( \"aTaskDbId\", aTaskKey.getDbId() );\n lDataSetArgument.add( \"aTaskId\", aTaskKey.getId() );\n\n return QueryExecutor.executeQuery( getClass(), lDataSetArgument );\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.aiplatform.v1.Execution>\n getExecution(com.google.cloud.aiplatform.v1.GetExecutionRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getGetExecutionMethod(), getCallOptions()), request);\n }", "@Override\n\tpublic List<String> execute(Environment environment) throws Exception {\n\t\tIUser userService = (IUser) SpringUtil.getBean(\"userService\");\n\t\tList<UserInfo> us = userService.findAll();\n\t\tJpaDbSessionImpl impl = (JpaDbSessionImpl) environment.get(DbSession.class);\n\t\tEntityManager entityManager = impl.getEntityManager();\n\t\tString countSql = \"select COUNT(*) as c from (select distinct(a.EXECUTION_) from JBPM4_HIST_TASK a,JBPM4_HIST_ACTINST b \" +\n\t\t\t\t\"where a.DBID_ = b.HTASK_ and ASSIGNEE_ = '\"+userId+\"' and STATE_ ='completed' and ACTIVITY_NAME_ != '发起流程') v\";\n\t\tString listSql = \"select tv.instanceId \" +\n\t\t\t\t\"from (select a.EXECUTION_ instanceId,MAX(a.END_) endTime,MAX(a.DBID_) htask from JBPM4_HIST_TASK a,JBPM4_HIST_ACTINST b \" +\n\t\t\t\t\"where a.DBID_ = b.HTASK_ and ASSIGNEE_ = '\"+userId+\"' and STATE_ ='completed' and ACTIVITY_NAME_ != '发起流程' \" +\n\t\t\t\t\"GROUP BY A.EXECUTION_) v,tb_cbb_workflow_var tv where v.instanceId = tv.instanceId order by v.endTime desc\";\n\t\t\n\t\tint count=(Integer) entityManager.createNativeQuery(countSql).getSingleResult();\n\t\t\n\t\t/*page.setTotalCount(count);\n\t\tint currentPage = page.getPageNo()-1;*/\n\t\tint currentPage = page.getPageNumber()-1;\n\t\tint beginNum = currentPage*page.getPageSize();\n\t\t\n\t\tList<String> list = entityManager.createNativeQuery(listSql).setFirstResult(beginNum)\n\t\t\t\t.setMaxResults(page.getPageSize()).getResultList();\n\t\treturn list;\n\t}", "NonQueryResult executeNonQuery(ExecutionContext context, File file) throws ExecutorException;", "public void executeQuery(String q) throws HiveQueryExecutionException;", "boolean execute();", "public UUID executionId();", "public abstract void execute();", "public abstract void execute();", "public abstract void execute();", "public abstract int execute();", "public interface RecipeExecutor {\n\n /**\n * Submit a Test recipe for asynchronous execution.\n *\n * @param recipe Test recipe to be executed.\n * @return an instance of <code>Execution</code> containing the current state of execution\n */\n Execution submitRecipe(TestRecipe recipe);\n\n /**\n * Submit a Test recipe for synchronous execution.\n *\n * @param recipe Test recipe to be executed.\n * @return an instance of <code>Execution</code> containing the execution result\n */\n Execution executeRecipe(TestRecipe recipe);\n\n /**\n * @return List of all the execution stored on server\n */\n// List<Execution> getExecutions();\n\n /**\n * Adds an execution listener, used when a recipe is submitted for asynchronous execution.\n *\n * @param listener listener to be added\n */\n void addExecutionListener(ExecutionListener listener);\n\n /**\n * Removes the provided listener\n *\n * @param listener listener to be removed\n */\n void removeExecutionListener(ExecutionListener listener);\n\n /**\n * Adds a recipe filter for preprocessing generated recipes\n *\n * @param recipeFilter\n */\n\n void addRecipeFilter(RecipeFilter recipeFilter);\n\n /**\n * Removes an existing recipe filter\n *\n * @param recipeFilter\n */\n\n void removeRecipeFilter(RecipeFilter recipeFilter);\n\n /**\n * @return executionMode <code>ExecutionMode.LOCAL</code> if running locally, <code>ExecutionMode.LOCAL</code> otherwise (when running on TestEngine)\n */\n ExecutionMode getExecutionMode();\n}", "@Override\n public void execute() {}", "public int getExecutionInstance() {\n return executionInstance;\n }", "protected void execute() {}", "public int getExecutionType() {\n\t\treturn 0;\n\t}", "protected abstract void pagedExecuteWorkFlow(String queryId, LogicalWorkflow workflow, IResultHandler resultHandler,\n int pageSize) throws ConnectorException\n ;", "public boolean execute();", "public interface QueryExecutor {\n \n /**\n * Execute query that has neither request nor response\n *\n * @param noParamQuery query as velocity template string, it may depend on database type or other context parameters\n * @param conn connection to execute query\n */\n void executeUpdate(String noParamQuery, Connection conn);\n \n /**\n * Execute query that has no response parameters\n *\n * @param reqQuery query as velocity template string\n * @param req request query parameters\n * @param conn connection to execute query\n * @param <T> type of request\n */\n <T extends BaseDto> void executeUpdate(String reqQuery, T req, Connection conn);\n \n /**\n * Execute query that has no request parameters\n *\n * @param resQuery query as velocity template string\n * @param transformer transformer for query result\n * @param conn connection to execute query\n * @param <T> type of result\n * @return list of query results\n */\n <T extends BaseDto> List<T> executeQuery(String resQuery, QueryResultTransformer<T> transformer, Connection conn);\n \n /**\n * Execute query that has request and response\n *\n * @param reqResQuery query as velocity template string\n * @param req request query parameters\n * @param transformer transformer for query result\n * @param conn connection to execute query\n * @param <T> type of result\n * @param <V> type of request\n *\n * @return list of query results\n */\n <T extends BaseDto, V extends BaseDto> List<T> executeQuery(String reqResQuery, V req, QueryResultTransformer<T> transformer, Connection conn);\n \n /**\n * Query runner\n *\n * @return instance of query runner\n */\n default QueryRunner getQueryRunner() {\n return new QueryRunner();\n }\n\n}", "private void storeExecutionStatus(FederatedQueryExecutionStatus executionStatus) throws ResourceException {\n managedResource.setFederatedQueryExecutionStatus(executionStatus);\n }", "private TupleSet evaluate(Long time, Program program, Query query, TableName name, TupleSet insertions, TupleSet deletions)\n\t\tthrows UpdateException {\n\t\t\tMap<String, Tuple> continuations = new HashMap<String, Tuple>();\n\n\t\t\tWatchTable watch = (WatchTable) context.catalog().table(WatchTable.TABLENAME);\n\t\t\tOperator watchInsert = watch.watched(program.name(), name, Watch.Modifier.INSERT);\n\t\t\tOperator watchDelete = watch.watched(program.name(), name, Watch.Modifier.DELETE);\n\n\t\t\tif (insertions.size() > 0) {\n\t\t\t\tif (deletions.size() > 0) {\n\t\t\t\t\t/* We're not going to deal with the deletions yet. */\n\t\t\t\t\tcontinuation(continuations, time, program.name(), name, Predicate.Event.DELETE, deletions);\n\t\t\t\t}\n\n\t\t\t\tif (query.event() != Predicate.Event.DELETE) {\n\t\t\t\t\tif (watchInsert != null) {\n\t\t\t\t\t\ttry { watchInsert.rule(query.rule()); watchInsert.evaluate(insertions);\n\t\t\t\t\t\t} catch (JolRuntimeException e) {\n\t\t\t\t\t\t\tSystem.err.println(\"WATCH INSERTION FAILURE ON \" + name + \"!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (query.isAsync()) {\n\t\t\t\t\t\tthis.executor.execute(new AsyncQueryEval(query, insertions.clone(), !query.isDelete()));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tTupleSet result = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresult = query.evaluate(insertions);\n\t\t\t\t\t\t} catch (JolRuntimeException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n throw new RuntimeException(e);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (result.size() > 0) {\n\t\t\t\t\t\t Predicate.Event eventType;\n\t\t\t\t\t\t if (query.isDelete())\n\t\t\t\t\t\t eventType = Predicate.Event.DELETE;\n\t\t\t\t\t\t else\n\t\t\t\t\t\t eventType = Predicate.Event.INSERT;\n\n continuation(continuations, time, program.name(),\n \t\t query.output().name(), eventType, result);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (deletions.size() > 0) {\n\t\t\t\tTable output = context.catalog().table(query.output().name());\n\t\t\t\tif (query.event() == Predicate.Event.DELETE ||\n\t\t\t\t\t\t(output.type() == Table.Type.TABLE &&\n\t\t\t\t\t\t\t\tquery.event() != Predicate.Event.INSERT)) {\n\t\t\t\t\tif (watchDelete != null) {\n\t\t\t\t\t\ttry { watchDelete.rule(query.rule()); watchDelete.evaluate(deletions);\n\t\t\t\t\t\t} catch (JolRuntimeException e) { }\n\t\t\t\t\t}\n\n\t\t\t\t\tPredicate.Event resultType = Predicate.Event.DELETE;\n\t\t\t\t\tif (!query.isDelete() && output.type() == Table.Type.EVENT) {\n\t\t\t\t\t\tresultType = Predicate.Event.INSERT;\n\t\t\t\t\t}\n\t\t\t\t\telse if (output.type() == Table.Type.EVENT) {\n\t\t\t\t\t\tthrow new UpdateException(\"Query \" + query +\n\t\t\t\t\t\t\t\t\" is trying to delete from table \" + output.name() + \"?\");\n\t\t\t\t\t}\n\n\t\t\t\t\tif (query.isAsync()) {\n\t\t\t\t\t\tthis.executor.execute(\n\t\t\t\t\t\t\t\tnew AsyncQueryEval(query, insertions.clone(),\n\t\t\t\t\t\t\t\t\t\tresultType == Predicate.Event.INSERT));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tTupleSet result = query.evaluate(deletions);\n\t\t\t\t\t\t\tif (result.size() > 0) {\n\t\t\t\t\t\t\t\tcontinuation(continuations, time, program.name(),\n\t\t\t\t\t\t\t\t\t\t output.name(), resultType, result);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JolRuntimeException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n throw new RuntimeException(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tTupleSet delta = new BasicTupleSet();\n\t\t\tfor (Tuple continuation : continuations.values()) {\n\t\t\t\tTupleSet ins = (TupleSet) continuation.value(Field.INSERTIONS.ordinal());\n\t\t\t\tTupleSet dels = (TupleSet) continuation.value(Field.DELETIONS.ordinal());\n\t\t\t\tif (ins.size() > 0 || dels.size() > 0) {\n\t\t\t\t\tdelta.add(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn delta;\n\t\t}", "public void execute() {\n // empty\n }", "public interface Executor {\n\n void setAction(Action action);\n boolean execute( Map<String,String> values, MODE mode) throws IOException;\n}", "public abstract IStatus performQuery(AbstractRepositoryQuery query, TaskRepository repository,\n \t\t\tIProgressMonitor monitor, ITaskCollector resultCollector);", "public void execute(){\n\t\t\n\t}", "public void ensureExecuted(Executor executor, ContextValue context) {\n if (isExecuted()) return;\n StopWatchSet.begin(\"Executor.execute\");\n if (opts.showExecutions)\n LogInfo.logs(\"%s - %s\", canonicalUtterance, formula);\n Executor.Response response = executor.execute(formula, context);\n StopWatchSet.end();\n value = response.value;\n executorStats = response.stats;\n }", "Row<K, C> execute();", "public void execute() {\n\t\t\n\t}", "public interface ExecutionValidator {\n\n /**\n * Validates if a job can run more executions.\n *\n * @param job the job reference\n * @param retry if the validation should consider retry.\n * @param prevId The previous id un case of retry.\n * @return true if the job has multiple executions enabled and the executions limit has not been reached. false otherwise.\n */\n public boolean canRunMoreExecutions(JobValidationReference job, boolean retry, long prevId);\n\n}", "public BulkItemResponse getExecutionResult() {\n assert assertInvariants(ItemProcessingState.EXECUTED);\n return executionResult;\n }", "@Override\n public int[] executeBatch() {\n if (this.batchPos == 0) {\n return new int[0];\n }\n try {\n int[] arrn = this.db.executeBatch(this.pointer, this.batchPos / this.paramCount, this.batch);\n return arrn;\n }\n finally {\n this.clearBatch();\n }\n }", "public interface Executor<E>{\n\t\tvoid execute(E object);\n\t}", "default void updateExecution(\n com.google.cloud.aiplatform.v1.UpdateExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateExecutionMethod(), responseObserver);\n }", "R execute();", "void queryDone(String queryId);", "public com.google.cloud.aiplatform.v1.Execution updateExecution(\n com.google.cloud.aiplatform.v1.UpdateExecutionRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getUpdateExecutionMethod(), getCallOptions(), request);\n }", "public ResultStatus getExecutionProgressStatus();", "public void execute() {\n }", "long execute() throws EvaluationException\n\t\t{\n\t\t\tList<IQuery> queries = mParser.getQueries();\n\t\t\t\n\t\t\tif( queries.size() != 1 )\n\t\t\t\tthrow new RuntimeException( \"The input program must contain exactly one query.\" );\n\t\t\t\n\t\t\tIQuery query = queries.get( 0 );\n\t\t\tlong elapsedTime = -System.currentTimeMillis();\n\t\t\tfinal IKnowledgeBase mKB = KnowledgeBaseFactory.createKnowledgeBase( mParser.getFacts(), mParser.getRules() );\n\t\t\tmKB.execute( query );\n\t\t\telapsedTime += System.currentTimeMillis();\n\n\t\t\treturn elapsedTime;\n\t\t}", "public void execute(){\n\n }", "private List<Map<String, PrimitiveTypeProvider>> executeQuery(QueryMessage qm) {\r\n ListenableFuture<QueryResultsMessage> f = this.adampro.standardQuery(qm);\r\n QueryResultsMessage result;\r\n try {\r\n result = f.get();\r\n } catch (InterruptedException | ExecutionException e) {\r\n LOGGER.error(LogHelper.getStackTrace(e));\r\n return new ArrayList<>(0);\r\n }\r\n\r\n if (result.getAck().getCode() != AckMessage.Code.OK) {\r\n LOGGER.error(result.getAck().getMessage());\r\n }\r\n\r\n if (result.getResponsesCount() == 0) {\r\n return new ArrayList<>(0);\r\n }\r\n\r\n QueryResultInfoMessage response = result.getResponses(0); // only head (end-result) is important\r\n\r\n List<QueryResultTupleMessage> resultList = response.getResultsList();\r\n return resultsToMap(resultList);\r\n }", "public com.google.cloud.aiplatform.v1.Execution createExecution(\n com.google.cloud.aiplatform.v1.CreateExecutionRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateExecutionMethod(), getCallOptions(), request);\n }", "public interface StepExecutor {\n ExecutionResult execute(StepExecutionContext context) throws Exception;\n}", "public PaxosExecution getExecution(PaxosMessage a_msg)\n {\n PaxosExecution result = (PaxosExecution) m_executions.get(a_msg.getInitiator());\n if (result == null)\n {\n error(\"Unknown PaxosExecution requested! (\" + a_msg.getInitiator()\n + \"), problably inconsistent InfoService\");\n }\n return result;\n }", "public void execute() {\r\n\t\r\n\t}", "void saveOrUpdateExecution(Execution request);", "default void listExecutions(\n com.google.cloud.aiplatform.v1.ListExecutionsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListExecutionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListExecutionsMethod(), responseObserver);\n }", "@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}" ]
[ "0.6371646", "0.6357317", "0.6229312", "0.60675365", "0.6026892", "0.5975691", "0.5891391", "0.5861866", "0.5836933", "0.5833849", "0.5789275", "0.5744305", "0.57432276", "0.57174516", "0.5716043", "0.57041496", "0.57041496", "0.57041496", "0.57041496", "0.56761265", "0.56645393", "0.56619334", "0.565097", "0.565097", "0.565097", "0.565097", "0.565097", "0.565097", "0.565097", "0.5630222", "0.56112", "0.5603233", "0.55998194", "0.55873835", "0.55685073", "0.5556154", "0.55503243", "0.5536663", "0.55341953", "0.5524408", "0.5493537", "0.5489217", "0.5467663", "0.5464172", "0.54589164", "0.5456951", "0.5453551", "0.5451175", "0.54411846", "0.5435074", "0.5429444", "0.54203767", "0.5402496", "0.53975135", "0.53922296", "0.5390577", "0.53868973", "0.53847665", "0.53836775", "0.5369268", "0.5369268", "0.5369268", "0.53692394", "0.53680384", "0.53382903", "0.53201336", "0.52900046", "0.52882147", "0.52723086", "0.5270324", "0.52632684", "0.52537346", "0.5246705", "0.52368873", "0.521992", "0.5219019", "0.52163535", "0.52158225", "0.5199678", "0.519116", "0.51826656", "0.5177016", "0.5171221", "0.51674145", "0.5164099", "0.51568127", "0.51505315", "0.51391375", "0.5133684", "0.5127787", "0.51256704", "0.51205254", "0.510706", "0.5102245", "0.5097371", "0.5089648", "0.5082313", "0.50821483", "0.5060632", "0.5055149" ]
0.65099365
0
SqlExecutor shall be ready to accept all other calls after start() is called. However, it shall NOT store the ExecutionContext for future use, as each call will be given an ExecutionContext which may differ from this one.
void start(ExecutionContext context) throws ExecutorException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface SqlExecutor {\n /**\n * SqlExecutor shall be ready to accept all other calls after start() is called.\n * However, it shall NOT store the ExecutionContext for future use, as each\n * call will be given an ExecutionContext which may differ from this one.\n *\n * @param context The ExecutionContext at the time of the call.\n * @throws ExecutorException if the Executor encounters an error.\n */\n void start(ExecutionContext context) throws ExecutorException;\n\n /**\n * Indicates no further calls will be made thus it's safe for the executor to clean up.\n *\n * @param context The ExecutionContext at the time of the call.\n * @throws ExecutorException if the Executor encounters an error.\n */\n void stop(ExecutionContext context) throws ExecutorException;\n\n /**\n *\n * @return An EnvironmentVariableHandler that handles executor specific environment variables\n */\n EnvironmentVariableHandler getEnvironmentVariableHandler();\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @return A list of table names. Could be empty.\n * @throws ExecutorException if the Executor encounters an error.\n */\n List<String> listTables(ExecutionContext context) throws ExecutorException;\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @param tableName Name of the table to get the schema for.\n * @return Schema of the table.\n * @throws ExecutorException if the Executor encounters an error.\n */\n SqlSchema getTableSchema(ExecutionContext context, String tableName) throws ExecutorException;\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @param statement statement to execute\n * @return The query result.\n * @throws ExecutorException if the Executor encounters an error.\n */\n QueryResult executeQuery(ExecutionContext context, String statement) throws ExecutorException;\n\n\n /**\n * @return how many rows available for reading.\n * @throws ExecutorException if the Executor encounters an error.\n */\n int getRowCount() throws ExecutorException;\n\n /**\n * Row starts at 0. Executor shall keep the data retrieved.\n * For now we get strings for display but we might want strong typed values.\n *\n * @param context The ExecutionContext at the time of the call.\n * @param startRow Start row index (inclusive)\n * @param endRow End row index (inclusive)\n * @return A list of row data represented by a String array.\n * @throws ExecutorException if the Executor encounters an error.\n */\n List<String[]> retrieveQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;\n\n\n /**\n * Consumes rows from query result. Executor shall drop them, as \"consume\" indicates.\n * ALL data before endRow (inclusive, including data before startRow) shall be deleted.\n *\n * @param context The ExecutionContext at the time of the call.\n * @param startRow Start row index (inclusive)\n * @param endRow End row index (inclusive)\n * @return available data between startRow and endRow (both are inclusive)\n * @throws ExecutorException if the Executor encounters an error.\n */\n List<String[]> consumeQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;\n\n /**\n * Executes all the NON-QUERY statements in the sqlFile.\n * Query statements are ignored as it won't make sense.\n *\n * @param context The ExecutionContext at the time of the call.\n * @param file A File object to read statements from.\n * @return Execution result.\n * @throws ExecutorException if the Executor encounters an error.\n */\n NonQueryResult executeNonQuery(ExecutionContext context, File file) throws ExecutorException;\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @param statements A list of non-query sql statements.\n * @return Execution result.\n * @throws ExecutorException if the Executor encounters an error.\n */\n NonQueryResult executeNonQuery(ExecutionContext context, List<String> statements) throws ExecutorException;\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @param exeId Execution ID.\n * @throws ExecutorException if the Executor encounters an error.\n */\n void stopExecution(ExecutionContext context, int exeId) throws ExecutorException;\n\n\n /**\n * Removing an ongoing execution shall result in an error. Stop it first.\n *\n * @param context The ExecutionContext at the time of the call\n * @param exeId Execution ID.\n * @throws ExecutorException if the Executor encounters an error.\n */\n void removeExecution(ExecutionContext context, int exeId) throws ExecutorException;\n\n /**\n * @param execId Execution ID.\n * @return ExecutionStatus.\n * @throws ExecutorException if the Executor encounters an error.\n */\n ExecutionStatus queryExecutionStatus(int execId) throws ExecutorException;\n\n /**\n * @param context The ExecutionContext at the time of the call.\n * @return A list of SqlFunction.\n * @throws ExecutorException if the Executor encounters an error.\n */\n List<SqlFunction> listFunctions(ExecutionContext context) throws ExecutorException;\n\n /**\n * Gets the version of this executor.\n * @return A String representing the version of the executor. This function does NOT throw an\n * ExecutorException as the caller has nothing to do to \"recover\" if the function fails.\n */\n String getVersion();\n}", "public interface Sql extends Terminable {\n\n /**\n * Gets the Hikari instance backing the datasource\n *\n * @return the hikari instance\n */\n @Nonnull\n HikariDataSource getHikari();\n\n /**\n * Gets a connection from the datasource.\n *\n * <p>The connection should be returned once it has been used.</p>\n *\n * @return a connection\n */\n @Nonnull\n Connection getConnection() throws SQLException;\n\n /**\n * Gets a {@link SqlStream} instance for this {@link Sql}.\n *\n * @return a instance of the stream library for this connection.\n */\n @Nonnull\n SqlStream stream();\n\n /**\n * Executes a database statement with no preparation.\n *\n * <p>This will be executed on an asynchronous thread.</p>\n *\n * @param statement the statement to be executed\n * @return a Promise of an asynchronous database execution\n * @see #execute(String) to perform this action synchronously\n */\n @Nonnull\n default Promise<Void> executeAsync(@Language(\"MySQL\") @Nonnull String statement) {\n return Schedulers.async().run(() -> this.execute(statement));\n }\n\n /**\n * Executes a database statement with no preparation.\n *\n * <p>This will be executed on whichever thread it's called from.</p>\n *\n * @param statement the statement to be executed\n * @see #executeAsync(String) to perform the same action asynchronously\n */\n default void execute(@Language(\"MySQL\") @Nonnull String statement) {\n this.execute(statement, stmt -> {});\n }\n\n /**\n * Executes a database statement with preparation.\n *\n * <p>This will be executed on an asynchronous thread.</p>\n *\n * @param statement the statement to be executed\n * @param preparer the preparation used for this statement\n * @return a Promise of an asynchronous database execution\n * @see #executeAsync(String, SqlConsumer) to perform this action synchronously\n */\n @Nonnull\n default Promise<Void> executeAsync(@Language(\"MySQL\") @Nonnull String statement, @Nonnull SqlConsumer<PreparedStatement> preparer) {\n return Schedulers.async().run(() -> this.execute(statement, preparer));\n }\n\n /**\n * Executes a database statement with preparation.\n *\n * <p>This will be executed on whichever thread it's called from.</p>\n *\n * @param statement the statement to be executed\n * @param preparer the preparation used for this statement\n * @see #executeAsync(String, SqlConsumer) to perform this action asynchronously\n */\n void execute(@Language(\"MySQL\") @Nonnull String statement, @Nonnull SqlConsumer<PreparedStatement> preparer);\n\n /**\n * Executes a database query with no preparation.\n *\n * <p>This will be executed on an asynchronous thread.</p>\n *\n * <p>In the case of a {@link SQLException} or in the case of\n * no data being returned, or the handler evaluating to null,\n * this method will return an {@link Optional#empty()} object.</p>\n *\n * @param query the query to be executed\n * @param handler the handler for the data returned by the query\n * @param <R> the returned type\n * @return a Promise of an asynchronous database query\n * @see #query(String, SqlFunction) to perform this query synchronously\n */\n default <R> Promise<Optional<R>> queryAsync(@Language(\"MySQL\") @Nonnull String query, @Nonnull SqlFunction<ResultSet, R> handler) {\n return Schedulers.async().supply(() -> this.query(query, handler));\n }\n\n /**\n * Executes a database query with no preparation.\n *\n * <p>This will be executed on whichever thread it's called from.</p>\n *\n * <p>In the case of a {@link SQLException} or in the case of\n * no data being returned, or the handler evaluating to null,\n * this method will return an {@link Optional#empty()} object.</p>\n *\n * @param query the query to be executed\n * @param handler the handler for the data returned by the query\n * @param <R> the returned type\n * @return the results of the database query\n * @see #queryAsync(String, SqlFunction) to perform this query asynchronously\n */\n default <R> Optional<R> query(@Language(\"MySQL\") @Nonnull String query, @Nonnull SqlFunction<ResultSet, R> handler) {\n return this.query(query, stmt -> {}, handler);\n }\n\n /**\n * Executes a database query with preparation.\n *\n * <p>This will be executed on an asynchronous thread.</p>\n *\n * <p>In the case of a {@link SQLException} or in the case of\n * no data being returned, or the handler evaluating to null,\n * this method will return an {@link Optional#empty()} object.</p>\n *\n * @param query the query to be executed\n * @param preparer the preparation used for this statement\n * @param handler the handler for the data returned by the query\n * @param <R> the returned type\n * @return a Promise of an asynchronous database query\n * @see #query(String, SqlFunction) to perform this query synchronously\n */\n default <R> Promise<Optional<R>> queryAsync(@Language(\"MySQL\") @Nonnull String query, @Nonnull SqlConsumer<PreparedStatement> preparer, @Nonnull SqlFunction<ResultSet, R> handler) {\n return Schedulers.async().supply(() -> this.query(query, preparer, handler));\n }\n /**\n * Executes a database query with preparation.\n *\n * <p>This will be executed on whichever thread it's called from.</p>\n *\n * <p>In the case of a {@link SQLException} or in the case of\n * no data being returned, or the handler evaluating to null,\n * this method will return an {@link Optional#empty()} object.</p>\n *\n * @param query the query to be executed\n * @param preparer the preparation used for this statement\n * @param handler the handler for the data returned by the query\n * @param <R> the returned type\n * @return the results of the database query\n * @see #queryAsync(String, SqlFunction) to perform this query asynchronously\n */\n <R> Optional<R> query(@Language(\"MySQL\") @Nonnull String query, @Nonnull SqlConsumer<PreparedStatement> preparer, @Nonnull SqlFunction<ResultSet, R> handler);\n\n /**\n * Executes a batched database execution.\n *\n * <p>This will be executed on an asynchronous thread.</p>\n *\n * <p>Note that proper implementations of this method should determine\n * if the provided {@link BatchBuilder} is actually worth of being a\n * batched statement. For instance, a BatchBuilder with only one\n * handler can safely be referred to {@link #executeAsync(String, SqlConsumer)}</p>\n *\n * @param builder the builder to be used.\n * @return a Promise of an asynchronous batched database execution\n * @see #executeBatch(BatchBuilder) to perform this action synchronously\n */\n default Promise<Void> executeBatchAsync(@Nonnull BatchBuilder builder) {\n return Schedulers.async().run(() -> this.executeBatch(builder));\n }\n\n /**\n * Executes a batched database execution.\n *\n * <p>This will be executed on whichever thread it's called from.</p>\n *\n * <p>Note that proper implementations of this method should determine\n * if the provided {@link BatchBuilder} is actually worth of being a\n * batched statement. For instance, a BatchBuilder with only one\n * handler can safely be referred to {@link #execute(String, SqlConsumer)}</p>\n *\n * @param builder the builder to be used.\n * @see #executeBatchAsync(BatchBuilder) to perform this action asynchronously\n */\n void executeBatch(@Nonnull BatchBuilder builder);\n\n /**\n * Gets a {@link BatchBuilder} for the provided statement.\n *\n * @param statement the statement to prepare for batching.\n * @return a BatchBuilder\n */\n BatchBuilder batch(@Language(\"MySQL\") @Nonnull String statement);\n}", "private void ejecutorDeServicio(){\r\n dbExeccutor = Executors.newFixedThreadPool(\r\n 1, \r\n new databaseThreadFactory()\r\n ); \r\n }", "public void startExecuting() {}", "@Override\n public void suspend() {\n super.suspend();\n if (executor != null) executor.shutdownNow();\n executorQueued.set(false);\n }", "@Override\r\n\tpublic ResultSet call() throws Exception {\n\t\tif (statement.execute()) {\r\n\t\t\tpool.checkIn(conn);\r\n\t\t\treturn statement.getResultSet();\r\n\t\t}\r\n\t\tpool.checkIn(conn); // Release the connection back to the pool\r\n\t\treturn null;\r\n\t}", "public interface ExecutionContext {\n}", "public interface TargetDAOListener {\n public void beforeOpenConnection() throws InterruptedException;\n\n public void beforeOpenPreparedStatement(Connection connection) throws InterruptedException;\n\n public void beforeExecuteSql(PreparedStatement preparedStatement) throws InterruptedException;\n\n public void afterExecuteSql(PreparedStatement preparedStatement) throws InterruptedException;\n \n public void afterClosePreparedStatement() throws InterruptedException;\n \n public void afterCloseConnection() throws InterruptedException;\n}", "public void execute() {\n // empty\n }", "public ExecutionContext getContext();", "protected void executeThread() {\n if (thread == null || !thread.isAlive()) {\n thread = new Thread(() -> {\n while (!queries.isEmpty() && !disconnect) {\n queries.remove().execute(queryRunner, connection);\n }\n if (disconnect) {\n disconnect();\n }\n });\n thread.start();\n }\n }", "@Override\n public void execute() {}", "public Promise<Void> execute() {\n\t\tcheckInReactorThread(this);\n\t\tMap<Partition, List<Node>> nodesByPartition = getNodesByPartition();\n\t\tlong taskId = ThreadLocalRandom.current().nextInt() & (Integer.MAX_VALUE >>> 1);\n\t\treturn connect(nodesByPartition.keySet())\n\t\t\t.then(sessions ->\n\t\t\t\tPromises.all(\n\t\t\t\t\t\tsessions.stream()\n\t\t\t\t\t\t\t.map(session -> session.execute(taskId, nodesByPartition.get(session.partition))))\n\t\t\t\t\t.whenException(() -> sessions.forEach(PartitionSession::close)));\n\t}", "@Override\n public void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@SuppressWarnings(\"unchecked\")\n public void execute() {\n execute(null, null);\n }", "public void execute() {\n execute0();\n }", "protected void execute() {\n \t\n }", "protected void execute() {\n \t\n }", "@Override\r\n\tpublic void execute() {\n\t}", "@Override\r\n\tpublic void execute() {\n\t}", "protected void execute() {}", "@Override\n\tpublic void execute() {\n\t}", "public void execute() {\n EventExecutor executor = this.ctx.executor();\n if (executor.inEventLoop()) {\n DefaultChannelPipeline.this.callHandlerAdded0(this.ctx);\n return;\n }\n try {\n executor.execute(this);\n } catch (RejectedExecutionException e) {\n if (DefaultChannelPipeline.logger.isWarnEnabled()) {\n DefaultChannelPipeline.logger.warn(\"Can't invoke handlerAdded() as the EventExecutor {} rejected it, removing handler {}.\", executor, this.ctx.name(), e);\n }\n DefaultChannelPipeline.remove0(this.ctx);\n this.ctx.setRemoved();\n }\n }", "List<String[]> consumeQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;", "public void startExecuting()\n {\n super.startExecuting();\n }", "protected void execute()\n {\n }", "void execute(Context context) throws SQLException;", "public void execute() {\n }", "@Override\r\n\tpublic void execute() {\n }", "@Override\r\n\tpublic void execute() throws Exception {\n\t\t\r\n\t}", "protected org.apache.spark.sql.catalyst.rules.RuleExecutor<org.apache.spark.sql.execution.SparkPlan> prepareForExecution () { throw new RuntimeException(); }", "void executionSetStarted(ExecutionSet es);", "public abstract void run(Context context) throws SQLException;", "protected void execute() {\n\t}", "protected void execute() {\r\n }", "public QueryCore executionQ() throws SQLException\n {\n rs = prepStm.executeQuery();\n return this;\n }", "@Override\n protected void execute() {\n \n }", "protected EventExecutor executor()\r\n/* 49: */ {\r\n/* 50: 87 */ return this.executor;\r\n/* 51: */ }", "@Override\r\n\tpublic void executer() {\n\t}", "public interface QueryExecutor<V> {\n\n /**\n * Executes the query represented by a specified expression tree.\n *\n * @param timelyQuery The timely query\n */\n void execute(TimelyQuery timelyQuery, GraphSchema schema, long timeout, String queryId);\n\n /**\n * Executes the query represented by a specified expression tree.\n *\n * @param timelyQuery An expression tree.\n */\n void execute(TimelyQuery timelyQuery, ExecuteConfig executeConfig, GraphSchema schema, long timeout, String queryId);\n\n /**\n * PREPARE the query\n *\n * @param prepareId The prepare query id\n * @param timelyQuery The given expression tree\n * @param executeConfig The config of execute\n * @return The instance of PrepareStoreEntity\n */\n void prepare(String prepareId, TimelyQuery timelyQuery, ExecuteConfig executeConfig);\n\n /**\n * @param prepareId\n * @param timelyQuery\n * @param schema\n */\n void executePrepare(String prepareId, TimelyQuery timelyQuery, GraphSchema schema, String queryId);\n\n /**\n * Query current process list.\n */\n void showProcessList(TimelyResultProcessor resultProcessor);\n\n /**\n * Cancel a running dataflow.\n */\n void cancelDataflow(TimelyResultProcessor resultProcessor, String queryId);\n}", "@Override\n protected void execute() {\n\n }", "@Override\r\n\tprotected void execute() {\r\n\t}", "@Override\r\n\tpublic void execute() {\n\r\n\t}", "protected void execute() {\n\n\t}", "public void run() {\n startConnectionToMSSQL();\n }", "public void fireOnExecute(final SqlContext context){\r\n\t\tnotify(new ListenerCaller(){\r\n\t\t\tpublic void call(DBListener listener){\r\n\t\t\t\tlistener.onExecute(context);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Nonnull\n default Promise<Void> executeAsync(@Language(\"MySQL\") @Nonnull String statement, @Nonnull SqlConsumer<PreparedStatement> preparer) {\n return Schedulers.async().run(() -> this.execute(statement, preparer));\n }", "@Override\n\tpublic Executor getExecutor() {\n\t\treturn null;\n\t}", "@NonNull\n public Executor getExecutor() {\n return mExecutor;\n }", "@Override\n\tpublic void execute() {\n\t\t\n\t}", "public ExecutorService createExecutor() {\n return getCamelContext().getExecutorServiceManager().newThreadPool(this, endpointName,\n 1, 5);\n }", "protected void execute()\n\t{\n\t}", "public void execute() {\n\n\t}", "protected void execute() {\n\t\t\n\t}", "@Quando(\"executá-lo$\")\n\tpublic void executáLo() throws Throwable{\n\t\tthrow new PendingException();\n\t}", "@Inject\n public DatabaseExecutionContext(ActorSystem actorSystem) {\n super(actorSystem, \"database.dispatcher\");\n }", "List<String[]> retrieveQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;", "public Executor getExecutor() {\n return execution.getExecutor();\n }", "public Executor getExecutor() {\n return executor;\n }", "public void execute() throws SQLException {\n\t\tif (this.ds == null) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\"Please pass a DataSource to the ListSqlHelper!\");\n\t\t}\n\t\t\n\t\texecuteCountSql();\n\t\texecuteItemRangeSql();\n\t}", "@Override\n protected void execute() {\n \n }", "public void prepareExecuteSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteSelect();\n }", "protected abstract void executeInternal(JobExecutionContext context) throws JobExecutionException;", "@Override\n\tpublic void execute() {\n\t\trecevier.doSomething();\n\t}", "protected DdlExecutorImpl() {\n }", "protected void execute() {\n\n\n \n }", "public void execute() {\n setExecuted(true);\n }", "public final void execute() {\n\t\tLogUtils.i(TAG, \"execute\");\n\t\tpurelySetState(TaskState.Preparing);\n\t\tTaskQueue.addTask(this);\n\t}", "@Override\n protected void init() {\n if (!initialized) {\n \n ExecutorService executor = Executors.newFixedThreadPool(10);\n \n \n \n \n // ThreadGroup group = new ThreadGroup(this.toString());\n\n ArrayList<ParallelHelper> threadlist = new ArrayList<ParallelHelper>();\n\n for (QueryIterator qi : iterators) {\n\n ParallelHelper h = new ParallelHelper(qi);\n /* Thread t = new Thread(group, h);\n t.start(); */\n threadlist.add(h);\n \n executor.submit(h);\n \n\n }\n executor.shutdown();\n \n while (!executor.isTerminated()) {\n try {\n executor.awaitTermination(3600, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n throw new ARQInternalErrorException(e);\n }\n }\n\n/* try {\n join(group);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n*/\n boolean error = false;\n\n for (ParallelHelper h : threadlist) {\n if (h.isError()) {\n error = true;\n throw new QueryExecException(\"Error: \"+h.getException().getMessage());\n }\n }\n \n \n if (!error) {\n for (ParallelHelper h : threadlist) {\n\n try {\n super.add(h.getResultIterator());\n } catch (Exception e) {\n throw new QueryExecException(e);\n }\n }\n super.init();\n }\n initialized = true;\n }\n }", "private void executeQuery() {\n }", "public void setExecutor(QueryExecutor executor) {\r\n\t\tthis.executor = executor;\r\n\t}", "protected void addToThreadExecutionContext(ExecutionContext threadContext, Partition partition) {\n // There is not any default implementation.\n }", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "protected void execute() {\n \t// literally still do nothing\n }", "@Override\n public boolean execute(String sql) throws SQLException {\n if (isClosed) {\n throw new SQLException(\"Can't execute after statement has been closed\");\n }\n stmtCompleted = false;\n if (resultSet != null) {\n // As requested by the Statement interface javadoc, \"All execution methods in the Statement interface\n // implicitly close a statement's current ResultSet object if an open one exists\"\n resultSet.close();\n resultSet = null;\n }\n\n // TODO in future, the polling logic should be in another SyncExploreClient\n try {\n stmtHandle = exploreClient.execute(sql);\n Status status = ExploreClientUtil.waitForCompletionStatus(exploreClient, stmtHandle, 200,\n TimeUnit.MILLISECONDS, MAX_POLL_TRIES);\n stmtCompleted = true;\n switch (status.getStatus()) {\n case FINISHED:\n resultSet = new ExploreQueryResultSet(exploreClient, this, stmtHandle);\n // NOTE: Javadoc states: \"returns false if the first result is an update count or there is no result\"\n // Here we have a result, it may contain rows or may be empty, but it exists.\n return true;\n case CANCELED:\n return false;\n default:\n // Any other state can be considered as a \"database\" access error\n throw new SQLException(String.format(\"Statement '%s' execution did not finish successfully. \" +\n \"Got final state - %s\", sql, status.getStatus().toString()));\n }\n } catch (HandleNotFoundException e) {\n // Cannot happen unless explore server restarted.\n LOG.error(\"Error executing query\", e);\n throw new SQLException(\"Unknown state\");\n } catch (InterruptedException e) {\n LOG.error(\"Caught exception\", e);\n Thread.currentThread().interrupt();\n return false;\n } catch (ExploreException e) {\n LOG.error(\"Caught exception\", e);\n throw new SQLException(e);\n }\n }", "public TransactionContext startTransaction() {\n MyConnection connection;\n try {\n connection = supplyConnection();\n } catch (SQLException e) {\n throw new UncheckedSQLException(e);\n }\n return new TransactionContext(connection);\n }", "protected void execSQL(String sql) throws Exception {\n\t\tPreparedStatement statement = null;\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(sql);\n\t\t\tstatement.execute();\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tPersistenceUtils.closeStatement(statement);\n\t\t}\n\n\t}", "public void execute() {\r\n\t\r\n\t}", "public void beforeExecution(PreparedStatement stmt, StatementContext ctx) throws SQLException\n {\n }", "public void runInExecutor() {\n this.executor.execute(this.callback);\n }", "public void execute() {\n\t\t\n\t}", "@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}", "@Override\n\tfinal public void execute(IContext context) {\n\t\tsuper.execute(context);\n\t}" ]
[ "0.7614018", "0.57460266", "0.5595664", "0.5412609", "0.5366386", "0.52985746", "0.52799344", "0.52451515", "0.5228137", "0.5227979", "0.51913476", "0.51839423", "0.518289", "0.51668566", "0.51667565", "0.51667565", "0.51667565", "0.51667565", "0.51667565", "0.51667565", "0.51667565", "0.51667565", "0.51667565", "0.51667565", "0.51667565", "0.51667565", "0.5138523", "0.5138523", "0.5138523", "0.51316375", "0.51289093", "0.51262003", "0.51262003", "0.51113373", "0.51113373", "0.5110413", "0.51025134", "0.5097412", "0.50960094", "0.5094211", "0.5073546", "0.50587815", "0.5057219", "0.5054307", "0.50522536", "0.5051254", "0.5048929", "0.5034474", "0.503392", "0.5016764", "0.50098944", "0.50070226", "0.50033915", "0.49985516", "0.49631155", "0.4962561", "0.4948898", "0.49433345", "0.4941609", "0.49358183", "0.49270633", "0.49225932", "0.4916032", "0.49150962", "0.49104732", "0.48979056", "0.48976898", "0.48917586", "0.48808327", "0.48790863", "0.48783526", "0.4875195", "0.48695955", "0.48685822", "0.4865406", "0.48640406", "0.4852802", "0.48511845", "0.48436552", "0.48324934", "0.48256367", "0.48222306", "0.48078364", "0.47950554", "0.47780892", "0.4772877", "0.47653815", "0.47621724", "0.47621724", "0.47621724", "0.47603878", "0.4758652", "0.47543365", "0.4752354", "0.47504658", "0.47495973", "0.47295126", "0.47279015", "0.4718748", "0.47174388" ]
0.6337296
1
Indicates no further calls will be made thus it's safe for the executor to clean up.
void stop(ExecutionContext context) throws ExecutorException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tprotected void finalize() throws Throwable {\n\t\t\tif (pool != null) {\n\t\t\t\tdone();\n\t\t\t\tpool = null;\n\t\t\t}\n\t\t}", "@Override\n public void close() {\n executor.shutdown();\n }", "@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}", "protected void finalize () throws Throwable\n\t{\n\t\tcheckforLogout(true);\n\t\tscheduledExecutorService.shutdown();\n\t}", "@PreDestroy\n\tpublic void destroy() {\n\t\tthis.executorService.shutdown();\n\t}", "@Override\n protected void performCleanup() {\n }", "protected void cleanup() {\n finished = true;\n thread = null;\n }", "public void testUnconfigurableExecutorService() {\n final ExecutorService e = Executors.unconfigurableExecutorService(Executors.newFixedThreadPool(2));\n try (PoolCleaner cleaner = cleaner(e)) {\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n }\n }", "public void finalize() throws Throwable {\n try {\n if (!pool.isTerminated()) {\n // Try to stop all workers within 10 seconds\n stop(10);\n }\n } catch (Exception e) {\n log.error(\"An error occurred when stopping the pool while finalizing\");\n }\n \n super.finalize();\n }", "@Override\n public void cleanup() {\n \n }", "@Override\n public void cleanup() {\n \n }", "@Override\r\n\tprotected void finalize() throws Exception\r\n\t{\r\n\t\tif(!this.cleanUpDone )\r\n\t\t\tthis.terminate();\r\n\t}", "public boolean isReleasable() { return isDone(); }", "@Override\n public void cleanup() {\n }", "public void shutdown() {\n // From this point forward, only return a poison pill for this retrieval\n // manager, which will cause threads attempting to receive bandwidth\n // allocations to die\n this.shutdown = true;\n }", "@Override\n protected void finalize() throws Throwable {\n if (_disposed) {\n return;\n }\n\n synchronized (RedisConnector.class) {\n if (_disposed) {\n return;\n }\n\n super.finalize();\n\n if (_redisClient != null) {\n _redisClient.shutdown();\n }\n\n _disposed = true;\n }\n }", "@Override\n public void onClosing() {\n shutdown(\"Executor closing\", true);\n }", "@Override\r\n public void cleanup() {\n }", "@Override\n\tpublic boolean Unexecute() \n\t{\n\t\treturn false;\n\t}", "@Override\n\tpublic void cleanup() {\n\t\tstopThread=true;\n\t\texecutorService.shutdown();\n\t\t//LOG.info(\"ratioCalculateInteger:\"+ratioCalculateInteger.get());\n\t}", "protected void completeFuturesForFauxInstances() {\n }", "@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}", "@Override\n protected void cleanup() {\n bundle.setParameter(BundleParameter.NODE_BUNDLE_ELAPSED_PARAM, accumulatedElapsed.get());\n this.dataProvider = null;\n usedClassLoader.dispose();\n usedClassLoader = null;\n //taskNotificationDispatcher.setBundle(this.bundle = null);\n this.taskList = null;\n this.uuidList = null;\n setJobCancelled(false);\n this.taskWrapperList = null;\n timeoutHandler.clear();\n }", "public void cleanup() {\r\n }", "public void cleanup() {\n }", "public void testNewSingleThreadExecutor1() {\n final ExecutorService e = Executors.newSingleThreadExecutor();\n try (PoolCleaner cleaner = cleaner(e)) {\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n }\n }", "@Override\n\tprotected Object run() {\n\t\treturn null;\n\t}", "public void finalize() {\r\n\tif (this.taskGroup!=null) this.taskGroup.interruptAll();\r\n}", "public void tryTerminate() {\n if (wip.decrementAndGet() != 0) {\n return;\n }\n if (queue.isEmpty()) {\n completableSubscriber.onCompleted();\n } else {\n completableSubscriber.onError(CompletableOnSubscribeMerge.collectErrors(queue));\n }\n }", "private void cleanup() throws RemoteException {\n log.info(\"GP run complete.\");\n running = false;\n\n log.info(\"Releasing clients.\");\n for (IClient client : clients)\n client.release();\n clients.clear();\n\n writeCheckpoint(\"final_generation\");\n }", "protected void m1659a() {\n try {\n this.f1529q.b_();\n } catch (Throwable e) {\n this.f1513a.m261a(\"IOException releasing connection\", e);\n }\n this.f1529q = null;\n }", "public void cleanup() {\n\t}", "protected void execute() {\n \t// literally still do nothing\n }", "@PreDestroy\r\n public void destroy() {\r\n log.info(\"Executor will be shut down\");\r\n\r\n executor.shutdown();\r\n try {\r\n if (!executor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n executor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n executor.shutdownNow();\r\n }\r\n\r\n brokerExecutor.shutdown();\r\n try {\r\n if (!brokerExecutor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n brokerExecutor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n brokerExecutor.shutdownNow();\r\n }\r\n\r\n logExecutor.shutdown();\r\n try {\r\n if (!logExecutor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n logExecutor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n logExecutor.shutdownNow();\r\n }\r\n\r\n log.info(\"Executor shutdown complete!\");\r\n }", "void tryCleanup() throws Exception;", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "public void initialExecutionResourcesExhausted() {\n \n \t\t// if (this.environment.getExecutingThread() != Thread.currentThread()) {\n \t\t// throw new ConcurrentModificationException(\n \t\t// \"initialExecutionResourcesExhausted must be called from the task that executes the user code\");\n \t\t// }\n \n \t\t// Construct a resource utilization snapshot\n \t\tfinal long timestamp = System.currentTimeMillis();\n \t\t// Get CPU-Usertime in percent\n \t\tThreadMXBean threadBean = ManagementFactory.getThreadMXBean();\n \t\tlong userCPU = (threadBean.getCurrentThreadUserTime() / NANO_TO_MILLISECONDS) * 100\n \t\t\t/ (timestamp - this.startTime);\n \n \t\t// collect outputChannelUtilization\n \t\tfinal Map<ChannelID, Long> channelUtilization = new HashMap<ChannelID, Long>();\n \t\tlong totalOutputAmount = 0;\n \t\tfor (int i = 0; i < this.environment.getNumberOfOutputGates(); ++i) {\n \t\t\tfinal OutputGate<? extends Record> outputGate = this.environment.getOutputGate(i);\n \t\t\tfor (int j = 0; j < outputGate.getNumberOfOutputChannels(); ++j) {\n \t\t\t\tfinal AbstractOutputChannel<? extends Record> outputChannel = outputGate.getOutputChannel(j);\n \t\t\t\tchannelUtilization.put(outputChannel.getID(),\n \t\t\t\t\tLong.valueOf(outputChannel.getAmountOfDataTransmitted()));\n \t\t\t\ttotalOutputAmount += outputChannel.getAmountOfDataTransmitted();\n \t\t\t}\n \t\t}\n \t\tlong totalInputAmount = 0;\n \t\tfor (int i = 0; i < this.environment.getNumberOfInputGates(); ++i) {\n \t\t\tfinal InputGate<? extends Record> inputGate = this.environment.getInputGate(i);\n \t\t\tfor (int j = 0; j < inputGate.getNumberOfInputChannels(); ++j) {\n \t\t\t\tfinal AbstractInputChannel<? extends Record> inputChannel = inputGate.getInputChannel(j);\n \t\t\t\tchannelUtilization.put(inputChannel.getID(),\n \t\t\t\t\tLong.valueOf(inputChannel.getAmountOfDataTransmitted()));\n \t\t\t\ttotalInputAmount += inputChannel.getAmountOfDataTransmitted();\n \n \t\t\t}\n \t\t}\n \t\tBoolean force = null;\n \n \t\tif (this.environment.getInvokable().getClass().isAnnotationPresent(Stateful.class)\n \t\t\t&& !this.environment.getInvokable().getClass().isAnnotationPresent(Stateless.class)) {\n \t\t\t// Don't checkpoint statefull tasks\n \t\t\tforce = false;\n \t\t} else {\n \t\t\t// look for a forced decision from the user\n \t\t\tForceCheckpoint forced = this.environment.getInvokable().getClass().getAnnotation(ForceCheckpoint.class);\n \t\t\tif (forced != null) {\n \t\t\t\tforce = forced.checkpoint();\n \t\t\t}\n \t\t}\n \t\tfinal ResourceUtilizationSnapshot rus = new ResourceUtilizationSnapshot(timestamp, channelUtilization, userCPU,\n \t\t\tforce, totalInputAmount, totalOutputAmount);\n \n \t\t// Notify the listener objects\n \t\tfinal Iterator<ExecutionListener> it = this.registeredListeners.iterator();\n \t\twhile (it.hasNext()) {\n \t\t\tit.next().initialExecutionResourcesExhausted(this.environment.getJobID(), this.vertexID, rus);\n \t\t}\n \n \t\t// Finally, propagate event to the job manager\n \t\tthis.taskManager.initialExecutionResourcesExhausted(this.environment.getJobID(), this.vertexID, rus);\n \t}", "protected abstract void cleanup() throws Throwable;", "public void shutdown() {\n lock.lock();\n try {\n state = State.SHUTDOWN;\n if (serialExecutorMap.isEmpty()) {\n executor.shutdown();\n }\n } finally {\n lock.unlock();\n }\n }", "private void doCleanup() {\n Log.INFO(\"Final cleanup\");\n try { // return to full-cluster-running state\n restartNode(); \n } catch (HoneycombTestException e) {\n Log.ERROR(\"Final cleanup failed: \" + e);\n }\n }", "public final void finalize() {\n if (!this.f5341c) {\n mo12514a(\"Request on the loose\");\n C1264ee.m6818c(\"Marker log finalized without finish() - uncaught exit point for request\", new Object[0]);\n }\n }", "protected abstract void cleanup();", "public void shutdown() {\n // no-op\n }", "@Override\n\tpublic void cleanup() {\n\n\t}", "@Override\n\tpublic void cleanup() {\n\n\t}", "public void shutdown()\n {\n valid = false;\n quitSafely();\n\n synchronized (loading) {\n loading.clear();\n }\n synchronized (toLoad) {\n toLoad.clear();\n }\n synchronized (tilesByFetchRequest) {\n tilesByFetchRequest.clear();\n }\n }", "@Override\r\n\tpublic void run() {\n\t\tthis.rs=null;\r\n\t}", "public void cerrarPool() {\n if (pool != null) {\n pool.shutdown();\n }\n }", "void destroyForCurrentThread() {\n holderInstance.remove();\n parentHolderInstanceStack.remove();\n }", "@Override\n\tprotected void finalize() {\n\t\tif(refcount>0){\n\t\t\tprint(\"Error \"+refcount+\"Shared \"+id+\"objects in use\");\n\t\t}\n\t}", "public void unExecute()\n\t{\n\t}", "public void toss() {\n\t\t\tif (pool != null) {\n\t\t\t\tpool.creator.destroy(content);\n\t\t\t}\n\t\t\t// Don't allow finalize to put it back in.\n\t\t\tpool = null;\n\t\t}", "protected void finalize() throws Throwable {\n clear();\n }", "@Override\n public boolean needsToRunAfterFinalized() {\n return false;\n }", "public void finalize() {\n\t\ttry {\n\t\t\tif (!socket.isClosed()) { \n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t} catch(Exception ex) {\n\t\t\tLOG.info(\"finalizedSanityCheckFailed\", ex);\n\t\t}\n\t}", "public void clean() {\n\tmTaskCompletedCallback = null;\n\tmTaskUpdateCallback = null;\n\tmIsDirty = false;\n }", "public void doCure();", "protected void synchronizationDone() {\n }", "public void finalize() throws Throwable {\n synchronized (HiviewLooperCheck.class) {\n if (sThreadLoopers != null) {\n sThreadLoopers.remove(this.mKey);\n }\n }\n super.finalize();\n }", "public void destroy() {\n/* 157 */ this.mDisposable.clear();\n/* */ }", "protected void finalize() { \n \tstopSelf(); \n }", "@Nullable\n public abstract Object finalizeComputation(@Nullable Object object);", "public void finalize() throws Throwable {\n try {\n shutdown();\n } finally {\n super.finalize();\n }\n }", "public void finalize() throws Throwable {\n try {\n shutdown();\n } finally {\n super.finalize();\n }\n }", "public void finalize() {\n if (SinkHolder.sink != null || SinkHolder.finalize_count <= 0) {\n SinkHolder.access$008();\n return;\n }\n throw new AssertionError((Object) \"Can't get here\");\n }", "boolean finalise();", "@Override\n\tprotected void finalize() throws Throwable {\n\t\ttry {\n\t\t\tsuper.finalize();\n\t\t\t(new ClearClipBoardTask()).run();\n\t\t} catch (Exception ex) {\n\t\t\tLogger.getLogger(this.getClass().getName()).severe(ex.getMessage());\n\t\t}\n\t}", "void handleSubchannelTerminated() {\n executorPool.returnObject(executor);\n terminatedLatch.countDown();\n }", "@Override\n public void suspend() {\n super.suspend();\n if (executor != null) executor.shutdownNow();\n executorQueued.set(false);\n }", "@Override\n public boolean isDone() {\n return false;\n }", "public void testNewSingleThreadExecutor2() {\n final ExecutorService e = Executors.newSingleThreadExecutor(new SimpleThreadFactory());\n try (PoolCleaner cleaner = cleaner(e)) {\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n }\n }", "public void mo130409d() {\n this.f110664a.dispose();\n Future<?> future = this.f110668e;\n if (future != null) {\n future.cancel(true);\n }\n ScheduledExecutorService scheduledExecutorService = this.f110667d;\n if (scheduledExecutorService != null) {\n scheduledExecutorService.shutdownNow();\n }\n }", "void executionOver() {\n this.reporter = null;\n this.options = null;\n this.executorEngine = null;\n this.progressSuppressingEventHandler = null;\n this.outputService = null;\n this.buildActionMap = null;\n this.completedAndResetActions = null;\n this.lostDiscoveredInputsMap = null;\n this.actionCacheChecker = null;\n this.outputDirectoryHelper = null;\n }", "public void cleanup();", "private void processDispose(final boolean finalized) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n Thread.currentThread().setName(\"Dispose_Thread\");\n Log.d(TAG, \"Processing dispose with \" + finalized + \" from \"\n + Thread.currentThread().getName());\n disposeInternal(finalized);\n }\n }).start();\n }", "@Override\n\tpublic void destroy() throws Exception\n\t{\n\t\tlog.debug(\"Shutdown threadpool\");\n\t\tpool.shutdownNow(); // disable new tasks from being submitted and interrupt running threads.\n\n\t\t// Wait briefly for tasks to respond to being cancelled\n\t\tif (!pool.awaitTermination(1, TimeUnit.SECONDS))\n\t\t{\n\t\t\tlog.error(\"Threads still running\");\n\t\t}\n\t\tsuper.destroy();\n\t\tlog.debug(\"Leaving servlet destroy\");\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\texecutorService.execute(new Runnable() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tagentResourceQuotas.remove(agentId);\n\t\t\t\t\t\tagentResourceUsages.remove(agentId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsynchronized (DefaultResourceAllocator.this) {\n\t\t\t\t\t\t\tfor (QueryCache cache: queryCaches.values())\n\t\t\t\t\t\t\t\tcache.result.remove(agentId);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t}", "public void estDisponible() {\n\n\t}", "@Override\n\tprotected void doDispose() {\n\t}", "protected void finalize() throws Throwable\n\t{\n\t\tsuper.finalize();\n\t\tfinaliseHandle();\n\t\tfinaliseLoggerReference();\n\t}", "public void terminateAllCalls();", "@PreDestroy\n public void preDestroy() {\n scheduledFuture.cancel(true);\n execService.shutdown();\n }", "public void finalize() {\n acquire.release();\n }", "public void finalize() {\n acquire.release();\n }", "public void onCancelled() {\n super.onCancelled();\n AsyncTask unused = KeyguardIndicationController.this.mChargeAsyncTask = null;\n }", "private void shutdown() {\n try {\n LOGGER.debug(\"Shutting down executor service\");\n this.executorService.shutdown();\n LOGGER.debug(\"Waiting for termination of executor\");\n this.executorService.awaitTermination(15, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n LOGGER.warn(\"Interrupted while waiting for Executor to shut down!\");\n } finally {\n for (Extractor extractor : this.extractors) {\n try {\n extractor.finish();\n } catch (Exception e) {\n LOGGER.error(\"Error while shutting down extractor {} : {}\",\n extractor.getClass().getSimpleName(), LogHelper.getStackTrace(e));\n }\n }\n LOGGER.debug(\"All extractors termination, executor service terminated. Exiting shutdown.\");\n }\n }", "public void cleanShutDown () {\n shutdown = true;\n }", "@Override\n protected void cleanUp() throws AbortException {\n }", "public void forceClose()\n {\n if (_isClosed)\n return;\n \n _isClosed = true;\n \n if (log.isLoggable(Level.FINE))\n log.fine(\"closing pool \" + getName());\n }", "public void dispose()\n {\n while( m_count > 0 )\n {\n int i = m_count - 1;\n try\n {\n m_factory.decommission( m_pool[ i ] );\n }\n catch( Exception e )\n {\n // To be backwards compatible, we have to support the logger having not been set.\n if( ( getLogger() != null ) && ( getLogger().isDebugEnabled() ) )\n {\n getLogger().debug( \"Error decommissioning object\", e );\n }\n }\n m_pool[ i ] = null;\n m_count--;\n }\n }", "public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n mask = null;\r\n\r\n if (keepProgressBar == false) {\r\n disposeProgressBar();\r\n }\r\n\r\n try {\r\n super.finalize();\r\n } catch (Throwable er) { }\r\n }", "@Override\n public boolean isDone()\n {\n return false;\n }", "@Override()\r\n protected void finalize() {\r\n destroy();\r\n }", "public void finalize() {\n\n if (mBtManager != null) {\n //mBtManager.stop();\n mBtManager.setHandler(null);\n }\n mBtManager = null;\n mContext = null;\n mConnectionInfo = null;\n }", "protected void finalize() {\n this.asClient.close();\n this.asClient = null;\n }", "void finalizeBath(boolean isCancelled);", "public abstract void finalizeIt();", "public void cleanup()\n {\n CogTool.delayedWorkMgr.doDelayedWork(true);\n }", "protected void handleCleanup() {\r\n\t\t// Implement in subclass\r\n\t}" ]
[ "0.69159484", "0.6382258", "0.6356778", "0.6314074", "0.6260665", "0.6251856", "0.6223216", "0.61743075", "0.61630607", "0.61599153", "0.61599153", "0.6127626", "0.61247724", "0.61243147", "0.6112302", "0.61091626", "0.60831964", "0.60670537", "0.6045196", "0.6030364", "0.60239077", "0.60224307", "0.6008508", "0.5994946", "0.59549344", "0.5950573", "0.5934874", "0.59337723", "0.59314907", "0.5919128", "0.590688", "0.58966476", "0.58952403", "0.5885306", "0.58705837", "0.58400947", "0.58400947", "0.58400947", "0.5831301", "0.5830738", "0.582322", "0.582146", "0.5819714", "0.58169776", "0.58122927", "0.5809727", "0.5809727", "0.58044934", "0.5800303", "0.57993627", "0.57884455", "0.57750285", "0.5773038", "0.57702917", "0.5765553", "0.57617897", "0.5761772", "0.5758611", "0.57568145", "0.57469106", "0.57408214", "0.57327735", "0.57221544", "0.5718436", "0.5704175", "0.5704175", "0.5704087", "0.5699057", "0.56966287", "0.56837773", "0.5676585", "0.5671764", "0.56716776", "0.56714857", "0.5670821", "0.56680787", "0.56677955", "0.5662776", "0.566254", "0.5659141", "0.5653642", "0.56532776", "0.56515056", "0.5646036", "0.5642773", "0.5642773", "0.5639616", "0.56384313", "0.5625463", "0.5614478", "0.5611913", "0.5607178", "0.5606973", "0.5605788", "0.5603284", "0.5600955", "0.5600471", "0.55903393", "0.55899924", "0.55823576", "0.55752945" ]
0.0
-1
Row starts at 0. Executor shall keep the data retrieved. For now we get strings for display but we might want strong typed values.
List<String[]> retrieveQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "R getOneRowOrThrow();", "public abstract String getCurrentRow();", "T getRowData(int rowNumber);", "@Override\n public Object getValueAt(int row, int column) {\n return sessionRow.get(row * column);\n }", "io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row getRow(int index);", "public Object get(int row) {\n\t\treturn null;\n\t}", "public int getRow() { return _row; }", "Object getDataValue(String column, int row);", "public Object getValueAt( int row, int column ) \r\n throws IllegalStateException\r\n {\r\n if ( !connectedToDatabase ) \r\n throw new IllegalStateException( \"Not Connected to Database\" );\r\n try \r\n {\r\n resultSet.absolute( row + 1 );\r\n return resultSet.getObject( column + 1 );\r\n }\r\n catch ( SQLException sqlException ) \r\n {\r\n sqlException.printStackTrace();\r\n }\r\n \r\n return \"\";\r\n }", "public int getRow(){\r\n // return statement\r\n return row;\r\n }", "public long rows() { return _rows; }", "public Relatorio get(int row){\n\t\t\t\t\n\t\t\t\treturn valores.get(row);\n\t\t\t}", "R getFirstRowOrThrow();", "@Override\n\tpublic Row next(){\n\t\treturn res;\n\t}", "Object[] getDataRow(final int index);", "public int GetRow(){\n return row;\n }", "public int[] getRow() { return _row; }", "public Object getValue(int aRow, int aColumn, String type) throws RowOutOfRangeException, ColumnOutOfRangeException {\n if (aRow < 0 || aRow >= rowCount) {\n throw new RowOutOfRangeException(aRow, rowCount);\n }\n if (aColumn < 0 || aColumn >= columnCount) {\n throw new ColumnOutOfRangeException(aColumn, columnCount);\n }\n \n if (aRow >= m_fetchedRowCount)\n {\n //System.out.println(\"NOT FETCHED: col = \" + aColumn + \", row = \" + aRow);\n return new WaitData(\"waiting for data...\");\n }\n \n return cellData[aRow][aColumn];\n }", "public T getRow(int row) {\r\n\t\t\r\n\t\tlogger.trace(\"Enter getRow\");\r\n\t\t\r\n\t\tif (row >= getRowCount() || row < 0) {\r\n\t\t\tlogger.trace(\"Exit getRow - row >= getRowCount() || row < 0\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tlogger.trace(\"Exit getRow\");\r\n\t\treturn data.get(row);\r\n\t}", "Object getDataValue(final int row, final int column);", "public List<String> getRows();", "public Object[] getData() {\n return rowData;\n }", "@Override\n public Object getValueAt(int row, int column) { return data[row][column]; }", "public int getRow()\n {\n return row;\n }", "public int getRow() {\n // YOUR CODE HERE\n return this.row;\n }", "List<C> getRow() throws Exception;", "byte[] getRow() {\r\n return delete.getRow();\r\n }", "private int getRow() {\n return binaryPartition(row);\n }", "public List getRows() \n {\n return rows;\n }", "String getRows(int index);", "public Row[] getRows() {return rows;}", "public int getRow()\n {\n return row;\n }", "java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> \n getRowList();", "public int getRow()\r\n {\r\n return row;\r\n }", "public abstract String[] getRowValues(Cursor c);", "public Row getValue()\n\t{\n\t\treturn valueList;\n\t}", "public Integer getRows() {\n return this.rows;\n }", "public Integer getRows() {\n return this.rows;\n }", "public Row getRow (int line) {\n return rowCache.get(line);\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "@Override\r\n public Object getValueAt(int rowIndex, int columnIndex) {\n Hashtable rowData = fixHashtables[rowIndex];\r\n return rowData.get(getColumnName(columnIndex));\r\n }", "public int getRow() {\r\n return row;\r\n }", "@Override\r\n public int getRow() {\r\n return this.row;\r\n }", "@NonNull\n Collection<TObj> getRowItems(int row) {\n Collection<TObj> result = new LinkedList<>();\n SparseArrayCompat<TObj> array = mData.get(row);\n for (int count = array.size(), i = 0; i < count; i++) {\n int key = array.keyAt(i);\n TObj columnObj = array.get(key);\n if (columnObj != null) {\n result.add(columnObj);\n }\n\n }\n return result;\n }", "private Object getEntry( Object[] row, String rrName ) {\n Integer icol = colMap_.get( rrName );\n return icol == null ? null : row[ icol.intValue() ];\n }", "public int getRow() {\r\n return this.row;\r\n }", "public int getRow(){\r\n\t\treturn this.row;\r\n\t}", "public String getRows(int index) {\n return rows_.get(index);\n }", "protected int getRow() {\r\n\t\treturn this.row;\r\n\t}", "public int getRow() {\n return this.row;\n }", "public int getRow() {\n return this.row;\n }", "private void readData () throws SQLException {\n int currentFetchSize = getFetchSize();\n setFetchSize(0);\n close();\n setFetchSize(currentFetchSize);\n moveToInsertRow();\n\n CSVRecord record;\n\n for (int i = 1; i <= getFetchSize(); i++) {\n lineNumber++;\n try {\n\n if (this.records.iterator().hasNext()) {\n record = this.records.iterator().next();\n\n for (int j = 0; j <= this.columnsTypes.length - 1; j++) {\n\n switch (this.columnsTypes[j]) {\n case \"VARCHAR\":\n case \"CHAR\":\n case \"LONGVARCHAR\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n case \"INTEGER\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateInt(j + 1, Integer.parseInt(record.get(j)));\n break;\n case \"TINYINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateByte(j + 1, Byte.parseByte(record.get(j)));\n break;\n case \"SMALLINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateShort(j + 1, Short.parseShort(record.get(j)));\n break;\n case \"BIGINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateLong(j + 1, Long.parseLong(record.get(j)));\n break;\n case \"NUMERIC\":\n case \"DECIMAL\":\n /*\n * \"0\" [0,0]\n * \"0.00\" [0,2]\n * \"123\" [123,0]\n * \"-123\" [-123,0]\n * \"1.23E3\" [123,-1]\n * \"1.23E+3\" [123,-1]\n * \"12.3E+7\" [123,-6]\n * \"12.0\" [120,1]\n * \"12.3\" [123,1]\n * \"0.00123\" [123,5]\n * \"-1.23E-12\" [-123,14]\n * \"1234.5E-4\" [12345,5]\n * \"0E+7\" [0,-7]\n * \"-0\" [0,0]\n */\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBigDecimal(j + 1, new BigDecimal(record.get(j)));\n break;\n case \"DOUBLE\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDouble(j + 1, Double.parseDouble(record.get(j)));\n break;\n case \"FLOAT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateFloat(j + 1, Float.parseFloat(record.get(j)));\n break;\n case \"DATE\":\n // yyyy-[m]m-[d]d\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDate(j + 1, Date.valueOf(record.get(j)));\n break;\n case \"TIMESTAMP\":\n // yyyy-[m]m-[d]d hh:mm:ss[.f...]\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTimestamp(j + 1, Timestamp.valueOf(record.get(j)));\n break;\n case \"TIME\":\n // hh:mm:ss\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTime(j + 1, Time.valueOf(record.get(j)));\n break;\n case \"BOOLEAN\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBoolean(j + 1, convertToBoolean(record.get(j)));\n break;\n default:\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n }\n }\n\n insertRow();\n incrementRowCount();\n }\n } catch (Exception e) {\n LOG.error(\"An error has occurred reading line number {} of the CSV file\", lineNumber, e);\n throw e;\n }\n }\n\n moveToCurrentRow();\n beforeFirst(); \n }", "public int getRow() {\n return mRow;\n }", "RowValue createRowValue();", "public abstract void emitRawRow();", "public String getRows(int index) {\n return rows_.get(index);\n }", "io.dstore.engine.procedures.OmModifyCampaignsAd.Response.Row getRow(int index);", "public io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row getRow(int index) {\n return row_.get(index);\n }", "@Override\n public Object getValueAt(int row, int column) {\n return this.data[row][column];\n }", "@Override\n public Object getValueAt(int row, int column) {\n if (row >= blockList.size())\n return null;\n Object value;\n Response block = blockList.get(row);\n //\n // Get the value for the requested cell\n //\n switch (column) {\n case 0: // Date\n value = new Date(block.getLong(\"timestamp\") * 1000 + Nxt.getEpoch());\n break;\n case 1: // Height\n value = block.getInt(\"height\");\n break;\n case 2: // Block identifier\n value = block.getString(\"block\");\n break;\n case 3: // Block version\n value = block.getInt(\"version\");\n break;\n case 4: // Block transaction count\n value = block.getInt(\"numberOfTransactions\");\n break;\n case 5: // Block generator\n value = block.getString(\"generatorRS\");\n break;\n default:\n throw new IndexOutOfBoundsException(\"Table column \"+column+\" is not valid\");\n }\n return value;\n }", "public ResultRow getRow(int rowIdx) {\r\n return rows.get(rowIdx);\r\n }", "String getValue(String column, int row);", "public double[] getRowData(int row) {\n return data[row];\n }", "protected abstract List<?> getRowValues(T dataObject);", "@Override\n\t\t\tpublic int getRow() {\n\t\t\t\treturn count;\n\t\t\t}", "@Override\n\tprotected Object[] readCursor(ResultSet rs, int currentRow)\n\t\t\tthrows SQLException {\n\t\treturn super.readCursor(rs, currentRow);\n\t}", "private ArrayList<String[]> getTableRowData() \n {\n int numRow, numCol;\n ArrayList<String[]> data = new ArrayList<>();\n numRow = jtModel.getRowCount(); \n numCol = jtModel.getColumnCount();\n String[] row;\n for(int i = 0; i< numRow; i++)\n {\n row = new String[numCol];\n for(int j = 0; j< numCol; j++)\n {\n row[j] = jtModel.getValueAt(i, j).toString();\n } \n data.add(row);\n } \n return data;\n }", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow() {\r\n\t\treturn this.row;\r\n\t}", "public Table<Integer, Integer, String> getData();", "public java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> getRowList() {\n return row_;\n }", "public int getRow()\r\n\t{\r\n\t\treturn this.row;\r\n\t}", "io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row getRow(int index);", "public java.util.List<com.randioo.tiger_server.protocol.Entity.RowData> getRowDataList() {\n return java.util.Collections.unmodifiableList(result.rowData_);\n }", "public int getRow() {\n\t\treturn row; \n\t}", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "@Override\n public Object getValueAt(int aRow, int aColumn) {\n return model.getValueAt(aRow, aColumn); \n }", "public int getRow() {\n\t\treturn row;\n\t}", "public int getRow() {\n\t\treturn row;\n\t}", "public int getRows(){\n return _rows;\n }", "public io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row getRow(int index) {\n if (rowBuilder_ == null) {\n return row_.get(index);\n } else {\n return rowBuilder_.getMessage(index);\n }\n }", "private RowData() {\n initFields();\n }", "@Override\r\n public Object getValueAt(int rowIndex, int columnIndex) {\n Hashtable rowData = chineseHashtables[rowIndex];\r\n return rowData.get(getColumnName(columnIndex));\r\n }", "public Object[] retrieveRowFromCache(int rowIndex) {\n\t ensureRowCached(rowIndex);\n\t return (Object[])data[getIndexOfRowInCache(rowIndex)];\n }", "@Override\r\n\tpublic Object getValueAt(int arg0, int arg1) {\n\t\treturn rowData[arg0][arg1];\r\n\t}", "@Override\n public int getRowCount() { return data.length; }", "public Object getValueAt(int row, int column){\n return dataEntries[row][column];\n }", "public Row getRow() {\n\treturn new Row(rowIndex); \n }", "public Object getValueAt(int row, int col) {\n\n Download download = downloadList.get(row);\n switch (col) {\n case 0: // Handled by a separate thread.\n break;\n case 1: // page label\n return download.getLabel();\n case 2: // URL\n return download.getUrl();\n case 3: // Size\n long size = download.getSize();\n return (size == -1) ? \"\" : Long.toString(size);\n case 4: // Progress\n return download.getProgress();\n case 5: // Status\n if (download.getStatus() == Download.ERROR) {\n return download.getErrorMessage();\n } else\n return Download.STATUSES[download.getStatus()];\n }\n return \"\";\n }", "RowValues createRowValues();", "public int getRow() {\n\t\t\treturn row;\n\t\t}", "public int getRow() {\n\t\t\treturn row;\n\t\t}", "@Override\n\tpublic Object getValueAt(int row, int col) {\n\t\treturn data[row][col];\n\t}" ]
[ "0.66906625", "0.65710175", "0.65613174", "0.65176797", "0.6502886", "0.6450028", "0.6448477", "0.6389881", "0.6352854", "0.63161755", "0.63152486", "0.63049054", "0.6289705", "0.62781036", "0.6273437", "0.6225696", "0.6223106", "0.61970043", "0.618811", "0.61705583", "0.61687195", "0.6161357", "0.61503375", "0.61480993", "0.61279154", "0.612481", "0.6116941", "0.6110992", "0.6108431", "0.61079067", "0.6079575", "0.60779953", "0.6060749", "0.6051332", "0.60427487", "0.60413307", "0.6020773", "0.6020773", "0.60087484", "0.5993302", "0.5993302", "0.5993302", "0.5993302", "0.5993302", "0.5993302", "0.5987003", "0.5982108", "0.59820044", "0.59734225", "0.5958012", "0.59534276", "0.59501773", "0.59446424", "0.5933758", "0.5924957", "0.5924957", "0.590731", "0.5902636", "0.590111", "0.58998793", "0.58977777", "0.58931655", "0.5889839", "0.5888874", "0.58712506", "0.5859949", "0.5848723", "0.5848594", "0.58469903", "0.5846792", "0.58288836", "0.5828108", "0.58252746", "0.58252746", "0.58252746", "0.58107626", "0.5810116", "0.58031", "0.57927334", "0.5791344", "0.57911193", "0.57865036", "0.5786032", "0.5786032", "0.57798195", "0.5776325", "0.5776325", "0.5775273", "0.5767063", "0.57587594", "0.57505184", "0.5749851", "0.5748254", "0.57400596", "0.57329524", "0.57314914", "0.57230186", "0.57212156", "0.5700298", "0.5700298", "0.5698395" ]
0.0
-1
Consumes rows from query result. Executor shall drop them, as "consume" indicates. ALL data before endRow (inclusive, including data before startRow) shall be deleted.
List<String[]> consumeQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void prepareCursorSelectAllRows() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareCursorSelectAllRows();\n }", "List<String[]> retrieveQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;", "public void prepareSelectAllRows() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareSelectAllRows();\n }", "public abstract void rowsDeleted(int firstRow, int endRow);", "void removeRowsLock();", "public DResult delete(byte[] row, long startId) throws IOException;", "protected abstract void rowArrived(QueryDataBatch queryDataBatch);", "@Override\n public void clearRowsWithChanges() {\n }", "public List<Transaction> getAllReserveTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "@Override\n\t\t\t\tpublic void rowsDeleted(int firstRow, int endRow) {\n\n\t\t\t\t}", "public void clearBatch() throws SQLException {\n\r\n }", "void scanDataBufferForEndOfData() {\n while (!allRowsReceivedFromServer() &&\n (dataBuffer_.readerIndex() != lastValidBytePosition_)) {\n stepNext(false);\n }\n }", "public List<TransactionReportRow> generateReportOnAllUncommittedTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "@Override\n public void clearBatch() throws SQLException {\n throw new SQLException(\"tinySQL does not support clearBatch.\");\n }", "private void doRecoveryRead() {\n if (!promise.isDone()) {\n startEntryToRead = endEntryToRead + 1;\n endEntryToRead = endEntryToRead + clientCtx.getConf().recoveryReadBatchSize;\n new RecoveryReadOp(lh, clientCtx, startEntryToRead, endEntryToRead, this, null)\n .initiate();\n }\n }", "public final void flushRows() {\n if (myRowCount > 0) {\n Object[][] array = new Object[myRowCount][];\n for (int i = 0; i < array.length; i++) {\n array[i] = myLoadArray[i];\n }\n Object[][] temp = myLoadArray;\n // this changes myLoadArray to array for loading\n loadArray(array);\n // now change it back for future loading\n myLoadArray = temp;\n myRowCount = 0;\n // now clear the array\n for (int i = 0; i < myMaxRowsInBatch; i++) {\n myLoadArray[i] = null;\n }\n }\n }", "int cacheRowsWhenScan();", "public List<TransactionReportRow> generateReportOnAllReserveTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "private void cleanUpConsumedEsnRecords() {\n\t\tesnInfoRepository.findAllByIsConsumed(true).removeIf(item -> (Days\n\t\t\t\t.daysBetween(new DateTime(item.getDateImported()), new DateTime()).isGreaterThan(Days.days(30))));\n\t}", "@Override\n public long readBatchData() throws SQLException {\n return (-1);\n }", "public List<Transaction> getAllDepositTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "public void onResultConsumed() {\n }", "@Override\n\tpublic boolean hasNext() {\n\t\tthis.res = new Row();\n\t\ttry{\n\t\t\twhile(index < dataCopy.size()){\n\t\t\t\tdata2 = dataCopy.get(index++);\t\t\t\t\t\t\t\n\t\t\t\tif(whereExp != null && !eval1.eval(whereExp).toBool()) continue;\t\n\t\t\t\t\n\t\t\t\tTableContainer.orderByData.add(new Row());\n\t\t\t\tfor(PrimitiveValue v : data2.rowList)\n\t\t\t\t\tTableContainer.orderByData.get(count).rowList.add(v);\t\n\t\t\t\tcount++;\n\t\t\t\n\t\t\t\t/*if the query is SELECT * FROM R*/\n\t\t\t\tif(flag2){\n\t\t\t\t\tres = data2;\n\t\t\t\t}else{\n\t\t\t\t\t/*if it is the regular query*/\n\t\t\t\t\tfor (int i = 0; i < itemLen; i++) res.rowList.add(eval1.eval((selectItemsExpression.get(i))));\n\t\t\t\t}\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public void clearRows()\n\t{\n\t\tif(this.Rows != null)\n\t\t{\n\t\t\tsynchronizeInversesRemoveRows(this.Rows);\n\t\t\tthis.Rows.clear();\n\t\t\tfireChangeEvent();\n\t\t}\n\t}", "@Test\n\tpublic void cursorDirtyRead() throws IOException {\n\t\tfinal ArangoCursor<VPackSlice> cursor = arango.db().query(\"FOR i IN 1..4 RETURN i\",\n\t\t\tnew AqlQueryOptions().batchSize(1).allowDirtyRead(true), VPackSlice.class);\n\t\t// get the initial result\n\t\tassertThat(cursor.hasNext(), is(true));\n\t\tassertThat(cursor.next().isInteger(), is(true));\n\t\t// get the second batch\n\t\tassertThat(cursor.hasNext(), is(true));\n\t\tassertThat(cursor.next().isInteger(), is(true));\n\t\t// close the cursor before fetching the all batches\n\t\tcursor.close();\n\t}", "private void checkForSplitRowAndComplete(int length, int index) {\n // For singleton select, the complete row always comes back, even if\n // multiple query blocks are required, so there is no need to drive a\n // flowFetch (continue query) request for singleton select.\n //while ((position_ + length) > lastValidBytePosition_) {\n while (dataBuffer_.readableBytes() > lastValidBytePosition_) {\n // Check for ENDQRYRM, throw SQLException if already received one.\n checkAndThrowReceivedEndqryrm();\n\n // Send CNTQRY to complete the row/rowset.\n int lastValidByteBeforeFetch = completeSplitRow(index);\n\n // If lastValidBytePosition_ has not changed, and an ENDQRYRM was\n // received, throw a SQLException for the ENDQRYRM.\n checkAndThrowReceivedEndqryrm(lastValidByteBeforeFetch);\n }\n }", "private void removeRow() {\n gridHeight--; \n for (EscapeBlock block : grid.get(gridHeight)) { // for each block from the last row\n block.disconnectAll();\n this.remove(block); // remove it from the UI\n }\n\n grid.remove(gridHeight); // remove the row\n }", "public void run() {\n\t\t\t//\t\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\tint no = 0;\n\t\t\tdataSql = getSQL();\n\t\t\t//\tRow\n\t\t\tint row = 0;\n\t\t\t//\tDelete Row\n\t\t\tdetail.setRowCount(row);\n\t\t\ttry {\n\t\t\t\tm_pstmt = getStatement(dataSql);\n\t\t\t\tlog.fine(\"Start query - \"\n\t\t\t\t\t\t+ (System.currentTimeMillis() - start) + \"ms\");\n\t\t\t\tm_rs = m_pstmt.executeQuery();\n\t\t\t\tlog.fine(\"End query - \" + (System.currentTimeMillis() - start)\n\t\t\t\t\t\t+ \"ms\");\n\t\t\t\t//\tLoad Table\n\t\t\t\trow = detail.loadTable(m_rs);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, dataSql, e);\n\t\t\t}\n\t\t\tclose();\n\t\t\t//\n\t\t\t//no = detail.getRowCount();\n\t\t\tlog.fine(\"#\" + no + \" - \" + (System.currentTimeMillis() - start)\n\t\t\t\t\t+ \"ms\");\n\t\t\tdetail.autoSize();\n\t\t\t//\n\t\t\tm_frame.setCursor(Cursor.getDefaultCursor());\n\t\t\tsetStatusLine(\n\t\t\t\t\tInteger.toString(no) + \" \"\n\t\t\t\t\t\t\t+ Msg.getMsg(Env.getCtx(), \"SearchRows_EnterQuery\"),\n\t\t\t\t\tfalse);\n\t\t\tsetStatusDB(Integer.toString(no));\n\t\t\tif (no == 0)\n\t\t\t\tlog.fine(dataSql);\n\t\t\telse {\n\t\t\t\tdetail.getSelectionModel().setSelectionInterval(0, 0);\n\t\t\t\tdetail.requestFocus();\n\t\t\t}\n\t\t\tisAllSelected = isSelectedByDefault();\n\t\t\tselectedRows(detail);\n\t\t\t//\tSet Collapsed\n\t\t\tif(row > 0)\n\t\t\t\tcollapsibleSearch.setCollapsed(isCollapsibleByDefault());\n\t\t}", "public O consume(BoundedInMemoryQueue<?, I> queue) throws Exception {\n Iterator<I> iterator = queue.iterator();\n\n while (iterator.hasNext()) {\n consumeOneRecord(iterator.next());\n }\n\n // Notifies done\n finish();\n\n return getResult();\n }", "private void triggerConsumer(RowConsumer consumer, BatchIterator<Row> fullResult, ScrollMode mode, long lCount) {\n if (lCount == Long.MAX_VALUE) {\n lCount = Integer.MAX_VALUE;\n }\n if (lCount == - Long.MAX_VALUE) {\n lCount = - Integer.MAX_VALUE;\n }\n int count = (int) lCount;\n boolean moveForward = ((mode == ScrollMode.MOVE || mode == ScrollMode.RELATIVE) && count >= 0) ||\n mode == ScrollMode.ABSOLUTE && count > cursorPosition;\n if (!moveForward && !scroll) {\n throw new IllegalArgumentException(\"Cannot move backward if cursor was created with NO SCROLL\");\n }\n resetCursorToMaxBufferedRowsPlus1();\n\n if (mode == ScrollMode.ABSOLUTE) {\n // Absolute jumps to a position and returns that row (or none if before start; after end)\n\n if (count < rows.size()) {\n cursorPosition = Math.max(count, 0);\n consumer.accept(bufferedRowOrNone(count - 1), null);\n } else {\n int steps = count - cursorPosition + 1;\n fullResult.move(steps, row -> {}, err -> {\n if (err == null) {\n if (count > rows.size()) {\n consumer.accept(null, new IllegalArgumentException(String.format(Locale.ENGLISH,\n \"Cannot return row: %s, total rows: %s\", count, rows.size())));\n } else {\n consumer.accept(bufferedRowOrNone(count - 1), null);\n cursorPosition = count;\n }\n } else {\n consumer.accept(null, err);\n }\n });\n }\n } else if (mode == ScrollMode.RELATIVE) {\n // Relative jumps to a position relative to cursorPosition\n // and returns that row (or none if before start; after end)\n\n int newCursorPosition = newCursorPosition(count);\n if (newCursorPosition < rows.size()) {\n cursorPosition = Math.max(newCursorPosition, 0);\n consumer.accept(bufferedRowOrNone(cursorPosition - 1), null);\n } else {\n int steps = newCursorPosition - cursorPosition + 1;\n fullResult.move(steps, row -> {}, err -> {\n if (err == null) {\n cursorPosition = newCursorPosition;\n consumer.accept(bufferedRowOrNone(cursorPosition - 1), null);\n } else {\n consumer.accept(null, err);\n }\n });\n }\n } else if (moveForward) {\n if (count == 0) {\n int idx = cursorPosition - 1;\n if (cursorPosition > rows.size()) {\n idx--;\n }\n consumer.accept(bufferedRowOrNone(idx), null);\n return;\n }\n BatchIterator<Row> delegate;\n if (!scroll || cursorPosition >= rows.size()) {\n delegate = fullResult;\n } else {\n // Cursor and resultBatchIterator position can go out of sync due to backward movement\n // Need to re-use buffered results to fill the gap between cursor and resultBatchIterator\n List<Object[]> items = rows.subList(cursorPosition, rows.size());\n BatchIterator<Row> bufferedBi = biFromItems(items);\n delegate = CompositeBatchIterator.seqComposite(bufferedBi, fullResult);\n }\n\n cursorPosition = newCursorPosition(count);\n consumer.accept(LimitingBatchIterator.newInstance(delegate, count), null);\n } else {\n int start = cursorPosition + count;\n assert start < cursorPosition : \"count must be negative\";\n List<Object[]> items = Lists2.reverse(rows.subList(Math.max(start - 1, 0), Math.max(cursorPosition - 1, 0)));\n BatchIterator<Row> bi = biFromItems(items);\n cursorPosition = Math.max(start, 0);\n consumer.accept(bi, null);\n }\n }", "private void reallocateUnConsumedEsnRecords() {\n\t\tesnInfoRepository\n\t\t\t\t.findAllByIsConsumed(false).stream().filter(item -> (Days\n\t\t\t\t\t\t.daysBetween(new DateTime(item.getDateClaimed()), new DateTime()).isGreaterThan(Days.days(2))))\n\t\t\t\t.forEach(item -> {\n\t\t\t\t\titem.setUserClaimed(null);\n\t\t\t\t\titem.setDateClaimed(null);\n\t\t\t\t});\n\t}", "public QueryResult withConsumedCapacity(ConsumedCapacity consumedCapacity) {\n setConsumedCapacity(consumedCapacity);\n return this;\n }", "public List<TransactionReportRow> generateReportOnAllWithdrawalTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "private void queryFlat(int columnCount, ResultTarget result, long limitRows) {\n if (limitRows > 0 && offsetExpr != null) {\r\n int offset = offsetExpr.getValue(session).getInt();\r\n if (offset > 0) {\r\n limitRows += offset;\r\n }\r\n }\r\n int rowNumber = 0;\r\n prepared.setCurrentRowNumber(0);\r\n int sampleSize = getSampleSizeValue(session);\r\n while (topTableFilter.next()) {\r\n prepared.setCurrentRowNumber(rowNumber + 1);\r\n if (condition == null ||\r\n Boolean.TRUE.equals(condition.getBooleanValue(session))) {\r\n Value[] row = new Value[columnCount];\r\n for (int i = 0; i < columnCount; i++) {\r\n Expression expr = expressions.get(i);\r\n row[i] = expr.getValue(session);\r\n }\r\n result.addRow(row);\r\n rowNumber++;\r\n if ((sort == null) && limitRows > 0 &&\r\n result.getRowCount() >= limitRows) {\r\n break;\r\n }\r\n if (sampleSize > 0 && rowNumber >= sampleSize) {\r\n break;\r\n }\r\n }\r\n }\r\n }", "public int[] executeBatch() throws SQLException {\n return null;\r\n }", "private void fillIncoming(int runId, long duration, long commitRows, long sleepMs, int payloadColumns) {\n long currentRows = 0;\n long startTime = System.currentTimeMillis();\n long durationMs = duration * 60000;\n\n String sql = buildInsertSql(STRESS_TEST_ROW_INCOMING, payloadColumns);\n while (System.currentTimeMillis() - startTime < durationMs) {\n for (long commitRow = 0; commitRow < commitRows; commitRow++) {\n insert(sql, currentRows + commitRow, runId, payloadColumns);\n }\n currentRows += commitRows;\n AppUtils.sleep(sleepMs);\n }\n }", "private void fetchMoreRows() throws SQLException {\n/* 370 */ if (this.lastRowFetched) {\n/* 371 */ this.fetchedRows = new ArrayList<ResultSetRow>(0);\n/* */ \n/* */ return;\n/* */ } \n/* 375 */ synchronized (this.owner.connection.getConnectionMutex()) {\n/* 376 */ boolean oldFirstFetchCompleted = this.firstFetchCompleted;\n/* */ \n/* 378 */ if (!this.firstFetchCompleted) {\n/* 379 */ this.firstFetchCompleted = true;\n/* */ }\n/* */ \n/* 382 */ int numRowsToFetch = this.owner.getFetchSize();\n/* */ \n/* 384 */ if (numRowsToFetch == 0) {\n/* 385 */ numRowsToFetch = this.prepStmt.getFetchSize();\n/* */ }\n/* */ \n/* 388 */ if (numRowsToFetch == Integer.MIN_VALUE)\n/* */ {\n/* */ \n/* 391 */ numRowsToFetch = 1;\n/* */ }\n/* */ \n/* 394 */ this.fetchedRows = this.mysql.fetchRowsViaCursor(this.fetchedRows, this.statementIdOnServer, this.metadata, numRowsToFetch, this.useBufferRowExplicit);\n/* */ \n/* 396 */ this.currentPositionInFetchedRows = -1;\n/* */ \n/* 398 */ if ((this.mysql.getServerStatus() & 0x80) != 0) {\n/* 399 */ this.lastRowFetched = true;\n/* */ \n/* 401 */ if (!oldFirstFetchCompleted && this.fetchedRows.size() == 0) {\n/* 402 */ this.wasEmpty = true;\n/* */ }\n/* */ } \n/* */ } \n/* */ }", "public void consumeEnergy() {\n\t if (!world.isRemote && this.getEnergyCost() > 0 &&\n\t this.getEnergyCurrent() >= this.getEnergyCost()) {\n\t this.energyStorage.extractEnergy(this.getEnergyCost(), false);\n\t //it drained, notify client \n\t this.markDirty();\n\t }\n\t }", "public abstract boolean isConsumed();", "@Test\n public void testDeleteSeveral() throws Exception {\n int theTaskId = 440;\n String query = String.format(\"select * from %s.%s where taskId like '%s'\",\n tableSchema.schemaName, TASK_TABLE_NAME, \"4%\");\n\n TestConnection connection = methodWatcher.getOrCreateConnection();\n connection.setAutoCommit(false);\n\n PreparedStatement ps;\n int rows;\n int total = 10;\n for (int i=0; i<total; i++) {\n // insert good data\n ps = methodWatcher.prepareStatement(\n String.format(\"insert into %s.%s (taskId, empId, startedAt, finishedAt) values (?,?,?,?)\",\n tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setString(1, Integer.toString(theTaskId + i));\n ps.setInt(2, 100+i);\n ps.setInt(3, 0600+i);\n ps.setInt(4, 0700+i);\n rows = ps.executeUpdate();\n Assert.assertEquals(1, rows);\n }\n connection.commit();\n\n ResultSet rs = connection.createStatement().executeQuery(query);\n Assert.assertEquals(10, SpliceUnitTest.resultSetSize(rs));\n connection.commit();\n\n ps = methodWatcher.prepareStatement(\n String.format(\"delete from %s.%s where taskId like ?\", tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setString(1, \"4%\");\n rows = ps.executeUpdate();\n Assert.assertEquals(10, rows);\n connection.commit();\n\n rs = connection.createStatement().executeQuery(query);\n Assert.assertFalse(\"No rows expected.\", rs.next());\n connection.commit();\n }", "private PipelineResult runRead() {\n PCollection<TestRow> namesAndIds =\n pipelineRead\n .apply(\n JdbcIO.<TestRow>read()\n .withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create(dataSource))\n .withQuery(String.format(\"select name,id from %s;\", tableName))\n .withRowMapper(new JdbcTestHelper.CreateTestRowOfNameAndId())\n .withCoder(SerializableCoder.of(TestRow.class)))\n .apply(ParDo.of(new TimeMonitor<>(NAMESPACE, \"read_time\")));\n\n PAssert.thatSingleton(namesAndIds.apply(\"Count All\", Count.globally()))\n .isEqualTo((long) numberOfRows);\n\n PCollection<String> consolidatedHashcode =\n namesAndIds\n .apply(ParDo.of(new TestRow.SelectNameFn()))\n .apply(\"Hash row contents\", Combine.globally(new HashingFn()).withoutDefaults());\n PAssert.that(consolidatedHashcode)\n .containsInAnyOrder(TestRow.getExpectedHashForRowCount(numberOfRows));\n\n PCollection<List<TestRow>> frontOfList = namesAndIds.apply(Top.smallest(500));\n Iterable<TestRow> expectedFrontOfList = TestRow.getExpectedValues(0, 500);\n PAssert.thatSingletonIterable(frontOfList).containsInAnyOrder(expectedFrontOfList);\n\n PCollection<List<TestRow>> backOfList = namesAndIds.apply(Top.largest(500));\n Iterable<TestRow> expectedBackOfList =\n TestRow.getExpectedValues(numberOfRows - 500, numberOfRows);\n PAssert.thatSingletonIterable(backOfList).containsInAnyOrder(expectedBackOfList);\n\n return pipelineRead.run();\n }", "public abstract void rowsInserted(int firstRow, int endRow);", "public void processResult(String sql, Consumer<ResultSet> resultSetConsumer) throws SQLException {\n processResult(sql, resultSetConsumer, (x) -> true, AppConstants.DEFAULT_FETCH_SIZE, ResultSet.FETCH_FORWARD);\n }", "public QueryCore executionQ(ThrowingConsumer throwingConsumer) throws SQLException\n {\n rs = prepStm.executeQuery();\n throwingConsumer.accept(rs);\n return this;\n }", "public void remove() {\n throw new UnsupportedOperationException(\n \"DataSource records may only ever be read once.\");\n }", "public List<SSTableReader> finish()\n {\n super.finish();\n return finished();\n }", "List<C> getRow() throws Exception;", "private void endRow() throws TableFormatException {\n if ( readCol == 0 ) {\n return;\n }\n int nrow = rows.size();\n if ( nrow == 1 ) {\n ncol = ((List) rows.get( 0 )).size();\n }\n else if ( readCol != ncol ) {\n throw new TableFormatException( \n \"Column number mismatch in row \" + ( nrow - 1 ) +\n \" (\" + readCol + \" != \" + ncol + \")\" );\n }\n readCol = 0;\n }", "private static void flushResult(IQueryResult result) throws IOException\n {\n while (result.next()) {\n System.out.println(result.getValueArray().toString());\n }\n }", "protected boolean areResultSetRowsTransformedImmediately() {\n \t\treturn false;\n \t}", "@ParameterizedTest\n @MethodSource(\"randomRecord\")\n public void testRowsVisibleAfterFlush(Fixture fixture,\n Integer offset,\n Row row,\n SinkRecord record) {\n Map<String, String> props = fixture.props;\n props.put(ConnectorUtils.TABLE_FROM_TOPIC_CONFIG, \"true\");\n\n this.task.start(props);\n this.task.put(Collections.singletonList(record));\n this.task.flush(new HashMap<>());\n\n // Sleep 1 second, our flush interval\n try {\n Thread.sleep(1100);\n } catch (Exception e) {\n throw new Error(\"Unexpected exception\", e);\n }\n\n String tableName = record.topic();\n\n Timespec ts = new Timespec(record.timestamp());\n TimeRange[] ranges = { new TimeRange(ts, ts.plusNanos(1)) };\n\n Reader reader = Table.reader(TestUtils.createSession(), tableName, ranges);\n assertEquals(true, reader.hasNext());\n\n Row row2 = reader.next();\n assertEquals(row, row2);\n assertEquals(false, reader.hasNext());\n\n this.task.stop();\n }", "private void advance(final ResultSet rs, final RowSelection selection)\n \t\t\tthrows SQLException {\n \n-\t\tfinal int firstRow = getFirstRow( selection );\n+\t\tfinal int firstRow = LimitHelper.getFirstRow( selection );\n \t\tif ( firstRow != 0 ) {\n \t\t\tif ( getFactory().getSettings().isScrollableResultSetsEnabled() ) {\n \t\t\t\t// we can go straight to the first required row\n \t\t\t\trs.absolute( firstRow );\n \t\t\t}\n \t\t\telse {\n \t\t\t\t// we need to step through the rows one row at a time (slow)\n \t\t\t\tfor ( int m = 0; m < firstRow; m++ ) rs.next();\n \t\t\t}\n \t\t}\n \t}", "private void checkAndThrowReceivedEndqryrm() {\n // If we are in a split row, and before sending CNTQRY, check whether an ENDQRYRM\n // has been received.\n // TODO: check for ENDQRYRM before throwing exception\n throw new IllegalStateException(\"SQLState.NET_QUERY_PROCESSING_TERMINATED\");\n// if (!netResultSet_.openOnServer_) {\n// SQLException SQLException = null;\n// int sqlcode = Utils.getSqlcodeFromSqlca(\n// netResultSet_.queryTerminatingSqlca_);\n//\n// if (sqlcode < 0) {\n// SQLException = new SQLException(agent_.logWriter_, netResultSet_.queryTerminatingSqlca_);\n// } else {\n// SQLException = new SQLException(agent_.logWriter_,\n// new ClientMessageId(SQLState.NET_QUERY_PROCESSING_TERMINATED));\n// }\n// try {\n// netResultSet_.closeX(); // the auto commit logic is in closeX()\n// } catch (SQLException e) {\n// SQLException.setNextException(e);\n// }\n// throw SQLException;\n// }\n }", "private Dataset<Row> takeRowsSecondWay(Dataset<Row> input) {\n\t\t\n\t\tString[] colulmsString = input.columns();\n\t\t\n\t\tfor( int i = 0; i < colulmsString.length; i++) {\n\t\t\t\n\t\t\tif ( !(i >= this.indexFrom && i <= this.indexTo))\n\t\t\t\t// drop column\n\t\t\t\tinput = input.drop(input.col(colulmsString[i]));\n\t\t\n\t\t}\n\t\treturn input;\n\t}", "public int clearRows() {\n\n\t\tint rowsCleared = 0;\n committed = false;\n\t\tArrayList<Integer> clearList = new ArrayList<>();\n\t\t//Initialize the list to store the rows that we are going to clear\n\t\tfor (int y = 0; y < getMaxHeight(); y++) {\n\t\t\tif (getRowWidth(y) == width) {\n\t\t\t\tclearList.add(y);\n\t\t\t}\n\t\t}\n\t\trowsCleared = clearList.size();\n\t\t\n\t\t//The number of rows that we are going to clear\n\t\tint start = 0;\n\t\tfor (int r = 0; r < getMaxHeight(); r++) {\n\t\t\tif (!clearList.contains(r)) {\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tgrid[i][start] = grid[i][r];\n\t\t\t\t}\n\t\t\t\twidths[start] = widths[r];\n\t\t\t\t//Change the board widths info of the rows shifted down\n\t\t\t\tstart++;\n\t\t\t}\n\t\t}\n\t\t//Clear the rows that are in the list by shift the rows above down\n\t\t\n\t\tfor(int j = start; j < getMaxHeight(); j++) {\n\t\t\tfor(int i = 0; i < width; i++) {\n\t\t\t\tgrid[i][j] = false;\n\t\t\t}\n\t\t\twidths[j] = 0;\n\t\t\t// Reset their widths\n\t\t}\n\t\t//Fill the rows above the last row after clearing with false\n\n\t\tmaxHeight = 0;\n\n\t\tfor(int i = 0; i < width; i++) {\n\t\t\tboolean zero = true;\n\t\t\tfor(int j = heights[i]-1; j >= 0; j--) {\n\t\t\t\tif(grid[i][j]) {\n\t\t\t\t\theights[i] = j + 1;\n\t\t\t\t\t//Recalculate the height of specific column\n\t\t\t\t\tmaxHeight = Math.max(maxHeight,heights[i]);\n\t\t\t\t\t//Recalculate the max height\n\t\t\t\t\tzero = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If the zero flag is true, this column is 0 high\n\t\t\tif (zero){\n\t\t\t\theights[i] = 0;\n\t\t\t}\n\t\t}\n\t\tsanityCheck();\n\t\treturn rowsCleared;\n\t}", "protected final void collect(T row) {\n collector.collect(row);\n }", "public void testDeleteRecordsAtEnd() {\n deleteAllRecords();\n }", "@Override\n\tpublic Row next(){\n\t\treturn res;\n\t}", "@Override\n\tprotected Object[] readCursor(ResultSet rs, int currentRow)\n\t\t\tthrows SQLException {\n\t\treturn super.readCursor(rs, currentRow);\n\t}", "public void RemoveRowsIfStackedTooHigh() {\n \t\t\n while (rowHasBlocks(Parameters.RemoveBiggestPartialRowIfBlockInRow)) {\n int NoOfPiecesRemoved = \n eraseBiggestRowGreaterThan(Parameters.RemoveBiggestPartialRowIfBlockInRow);\n //remove points for each empty square\n ComputeScoreAndDelay(-(COLUMNS - NoOfPiecesRemoved) * Parameters.PointsSubtractedPerEmptySpaceFromPartialRow);\n \n }\n game_grid.repaint();\n LogEvent(\"row_removed\");\n }", "public void consume() throws InterruptedException {\n int count = 0;\n while (true) {\n synchronized (this) {\n // consumer thread waits while list\n // is empty\n while (hydrogen.size() <= 1 || oxygen.size() == 0)\n wait();\n\n // to retrive the ifrst job in the list\n hydrogen.removeFirst();\n hydrogen.removeFirst();\n oxygen.removeFirst();\n count += 1;\n\n\n System.out.println(\"Consumer consumed-\"\n + count);\n\n // Wake up producer thread\n notify();\n\n // and sleep\n Thread.sleep(5000);\n }\n }\n }", "public final void incrementRowsReadEvent() {\n rowsRead_++;\n }", "byte[] getRow() {\r\n return delete.getRow();\r\n }", "@SuppressWarnings(\"UnusedReturnValue\")\n Sql returnsRows(String... rows) {\n return returnsRows(false, rows);\n }", "java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> \n getRowList();", "@Nullable\n\tprotected abstract T readCursor(ResultSet rs, int currentRow) throws SQLException;", "@Override\n\tpublic IDBResultSet selectByLimit(ITableDBContext context, Table table, IDBFilter filter, long startRow, int count)\n\t\t\tthrows Throwable {\n\t\tthrow new Warning(\"not impl\");\n\t}", "void deleteRow(int rowPos)\n {\n System.out.println(\n \"@deleteRow rowPos: \" + rowPos + \", vs stackSize: \" + compositeRowStack.size());\n if(rowPos > 0) transferChildren(rowPos, rowPos - 1);\n if(rowPos < compositeRowStack.size())\n {\n compositeRowStack.remove(rowPos);\n }\n }", "@Override\n public boolean hasNext() {\n return nextRowSet || setNextObject();\n }", "@Override\n\tpublic void process(StreamingInput<Tuple> stream, Tuple tuple)\n\t\t\tthrows Exception {\n\t\tHTableInterface myTable = connection.getTable(tableNameBytes);\n\t\tbyte row[] = getRow(tuple);\n\t\tDelete myDelete = new Delete(row);\n\n\t\tif (DeleteMode.COLUMN_FAMILY == deleteMode) {\n\t\t\tbyte colF[] = getColumnFamily(tuple);\n\t\t\tmyDelete.deleteFamily(colF);\n\t\t} else if (DeleteMode.COLUMN == deleteMode) {\n\t\t\tbyte colF[] = getColumnFamily(tuple);\n\t\t\tbyte colQ[] = getColumnQualifier(tuple);\n\t\t\tif (deleteAll) {\n\t\t\t\tmyDelete.deleteColumns(colF, colQ);\n\t\t\t} else {\n\t\t\t\tmyDelete.deleteColumn(colF, colQ);\n\t\t\t}\n\t\t}\n\n\t\tboolean success = false;\n\t\tif (checkAttr != null) {\n\t\t\tTuple checkTuple = tuple.getTuple(checkAttrIndex);\n\t\t\t// the check row and the row have to match, so don't use the\n\t\t\t// checkRow.\n\t\t\tbyte checkRow[] = getRow(tuple);\n\t\t\tbyte checkColF[] = getBytes(checkTuple, checkColFIndex,\n\t\t\t\t\tcheckColFType);\n\t\t\tbyte checkColQ[] = getBytes(checkTuple, checkColQIndex,\n\t\t\t\t\tcheckColQType);\n\t\t\tbyte checkValue[] = getCheckValue(checkTuple);\n\t\t\tsuccess = myTable.checkAndDelete(checkRow, checkColF, checkColQ,\n\t\t\t\t\tcheckValue, myDelete);\n\t\t} else if (batchSize == 0) {\n\t\t\tlogger.debug(\"Deleting \" + myDelete);\n\t\t\tmyTable.delete(myDelete);\n\t\t} else {\n\t\t\tsynchronized (listLock) {\n\t\t\t\tdeleteList.add(myDelete);\n\t\t\t\tif (deleteList.size() >= batchSize) {\n\t\t\t\t\tmyTable.delete(deleteList);\n\t\t\t\t\tdeleteList.clear();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Checks to see if an output tuple is necessary, and if so,\n\t\t// submits it.\n\t\tsubmitOutputTuple(tuple, success);\n\t\tmyTable.close();\n\t}", "public Row[] getRows() {return rows;}", "private final Object[] inMemory(TransactionInternal txn, ReusableBuffer payload) \n throws BabuDBException {\n \n List<Object> operationResults = new ArrayList<Object>();\n \n // in memory processing\n for (int i = 0; i < txn.size(); i++) {\n try {\n OperationInternal operation = txn.get(i);\n txn.lockResponsibleWorker(operation.getDatabaseName());\n operationResults.add(\n inMemoryProcessing.get(operation.getType()).process(operation));\n \n } catch (BabuDBException be) {\n \n // have there already been some successful executions?\n if (i > 0) {\n \n // trim the transaction\n txn.cutOfAt(i, be);\n \n try {\n payload.shrink(txn.getSize());\n break;\n } catch (IOException ioe) {\n \n BufferPool.free(payload);\n throw new BabuDBException(ErrorCode.IO_ERROR, ioe.getMessage(), ioe);\n }\n } else {\n \n // no operation could have been executed so far\n BufferPool.free(payload);\n throw be;\n }\n }\n }\n \n return operationResults.toArray();\n }", "private List<ToDoItem> refreshItemsFromMobileServiceTable() throws ExecutionException, InterruptedException {\n //List list = mToDoTable.where ( ).field (\"complete\").eq(val(false)).execute().get();\n return mToDoTable.where ().field (\"userId\").eq (val (userId)).and(mToDoTable.where ( ).field (\"complete\").eq(val(false))).execute().get();\n }", "protected abstract E handleRow(ResultSet rs) throws SQLException;", "public List<RecordReturn> findAllRecordReturns(Integer startResult, Integer maxRows);", "public void consume() throws InterruptedException {\n\n\t\tRandom random = new Random();\n\t\twhile (true) {\n\t\t\tsynchronized (lock) {\n\t\t\t\twhile (buffer.size() == 0) {\n\t\t\t\t\tlock.wait();\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"Consumed : \" + buffer.removeFirst());\n\t\t\t\tlock.notify();\n\n\t\t\t}\n\t\t\tThread.sleep(random.nextInt(1000));\n\t\t}\n\n\t}", "public abstract void rowsUpdated(int firstRow, int endRow);", "@Override\n\tpublic Long getTotalRow() throws Exception {\n\t\treturn null;\n\t}", "private BulkApiInfoContainerBatch getAllRecordsFromRestApi(String entityName, String selectQueryFragment, Date startDate, Date endDate, String userSessionId, String historicProcessId, Date processStartDate) throws Exception {\r\n\t\tLOGGER.trace(\"Entrando en getAllRecordsFromRestApi para obtener los registros del objeto \" + entityName);\r\n\t\t//0.0. Se rellenan los datos del proceso de actualizacion de objetos para cargarlos a la tabla de historico\r\n\t\tHistoricBatchVO apiSearchingHistoricProcessInfo = new HistoricBatchVO();\r\n\t\tapiSearchingHistoricProcessInfo.setStartDate(new Date());\r\n\t\tapiSearchingHistoricProcessInfo.setProcessId(historicProcessId);\r\n\t\tapiSearchingHistoricProcessInfo.setOperation(ConstantesBatch.API_QUERY_PROCESS);\r\n\t\tapiSearchingHistoricProcessInfo.setObject(objectsMapper.getObjectHistoricNamesMap().get(entityName));\r\n\t\t\t\t\r\n\t\tboolean processOk = false;\r\n\t\tString processErrorCause = \"\";\r\n\t\tBulkApiInfoContainerBatch bulkApiContainer = null;\r\n\t\tHttpClient httpClient = null;\r\n\t\tHttpGet get = null;\r\n\r\n\t\tif (!Utils.isNullOrEmptyString(userSessionId)) {\r\n\t\t\tString completeQuery = buildSoqlQuery(entityName, selectQueryFragment, startDate, endDate);\r\n\t\t\tStringBuilder queryAllUrl = new StringBuilder(\"\");\r\n\t\t\tqueryAllUrl.append(ConstantesSalesforceLogin.DEV_LOGIN_SALESFORCE_INSTANCE_URL);\r\n\t\t\tqueryAllUrl.append(ConstantesBulkApi.REST_API_QUERY_ALL_URL);\r\n\t\t\tqueryAllUrl.append(\"?q=\");\r\n\t\t\tqueryAllUrl.append(Utils.parseSqlQueryToUrlQuery(completeQuery.toString()));\r\n\t\t\t\r\n\t\t\tURI uri = new URI(queryAllUrl.toString());\r\n\t\t\thttpClient = HttpClientBuilder.create().build();\r\n\t\t\tget = new HttpGet(uri);\r\n\t\t\tget.setHeader(ConstantesSalesforceLogin.DEV_REST_SALESFORCE_AUTHORIZATION_HEADER_KEY, \"Bearer \" + userSessionId);\r\n\t\t\tget.setHeader(ConstantesSalesforceLogin.DEV_REST_SALESFORCE_CONTENT_TYPE_HEADER_KEY, ConstantesSalesforceLogin.DEV_REST_SALESFORCE_JSON_CONTENT_TYPE);\r\n\t\t\tget.setHeader(ConstantesSalesforceLogin.DEV_REST_SALESFORCE_ACCEPT_HEADER_KEY, ConstantesSalesforceLogin.DEV_REST_SALESFORCE_JSON_CONTENT_TYPE);\r\n\t\t\t\r\n\t\t\tHttpResponse response = httpClient.execute(get);\r\n\t\t\tif (HttpStatus.SC_OK == response.getStatusLine().getStatusCode()) {\r\n\t\t\t\tLOGGER.info(\"Respuesta del servidor correcta\");\r\n\t\t\t\tHttpEntity entity = response.getEntity();\r\n\t\t\t\tString entityResponse = EntityUtils.toString(entity);\r\n\t\t\t\tif (!Utils.isNullOrEmptyString(entityResponse)) {\r\n\t\t\t\t\tbulkApiContainer = objectsParser.populateObjectListFromJsonObject(entityName, entityResponse, objectsMapper, historicProcessId, processStartDate);\r\n\t\t\t\t\tapiSearchingHistoricProcessInfo.setTotalRecords(bulkApiContainer.getTotalRecords());\r\n\t\t\t\t\tprocessOk = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tLOGGER.error(\"Datos de la respuesta vacios. No es posible actualizar el objeto\");\r\n\t\t\t\t\tprocessOk = false;\r\n\t\t\t\t\tprocessErrorCause = ConstantesBatch.ERROR_SALESFORCE_NULL_RESPONSE;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tLOGGER.info(\"Error en la peticion. Status: \" + response.getStatusLine());\r\n\t\t\t\tprocessOk = false;\r\n\t\t\t\tprocessErrorCause = ConstantesBatch.ERROR_SALESFORCE_RESPONSE_STATUS_NO_OK + response.getStatusLine().getStatusCode();\r\n\t\t\t}\r\n\t\t\tget.releaseConnection();\r\n\t\t} else {\r\n\t\t\tLOGGER.error(\"Imposible realizar la conexion. El sessionId es nulo\");\r\n\t\t\tprocessOk = false;\r\n\t\t\tprocessErrorCause = ConstantesBatch.ERROR_SALESFORCE_NULL_USER_SESSION_ID;\r\n\t\t}\r\n\t\tapiSearchingHistoricProcessInfo.setSuccess(processOk);\r\n\t\tapiSearchingHistoricProcessInfo.setErrorCause(processOk ? null : processErrorCause);\r\n\t\tapiSearchingHistoricProcessInfo.setEndDate(new Date());\r\n\t\thistoricBatchDao.insertHistoric(apiSearchingHistoricProcessInfo);\r\n\t\treturn bulkApiContainer;\r\n\t}", "private void moveCursorToRow(int row) {\n\t\ttry {\n\t\t\tint count = 0;\n\t\t\twhile (row != count && rs.next()) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException se) {\n\t\t\tthrow getExceptionTranslator().translate(\"Attempted to move ResultSet to last committed row\", getSql(), se);\n\t\t}\n\t}", "@Test\n// @Ignore(\"KnownBug: ACCUMULO-3646\")\n public void testInjectOnScan_Empty() throws Exception {\n Connector conn = tester.getConnector();\n\n // create table, add table split, write data\n final String tableName = getUniqueNames(1)[0];\n SortedSet<Text> splitset = new TreeSet<>();\n splitset.add(new Text(\"f\"));\n TestUtil.createTestTable(conn, tableName, splitset);\n\n // expected data back\n Map<Key, Value> expect = new HashMap<>(HardListIterator.allEntriesToInject);\n\n // attach InjectIterator\n IteratorSetting itset = new IteratorSetting(15, InjectIterator.class);\n conn.tableOperations().attachIterator(tableName, itset, EnumSet.of(IteratorUtil.IteratorScope.scan));\n itset = new IteratorSetting(16, DebugIterator.class);\n conn.tableOperations().attachIterator(tableName, itset, EnumSet.of(IteratorUtil.IteratorScope.scan));\n\n // read back both tablets in parallel\n BatchScanner scan = conn.createBatchScanner(tableName, Authorizations.EMPTY, 2);\n// Key startKey = new Key(new Text(\"d\"), cf, cq);\n Range rng = new Range();\n scan.setRanges(Collections.singleton(rng));\n log.debug(\"Results of scan on table \" + tableName + ':');\n Map<Key, Value> actual = new TreeMap<>(TestUtil.COMPARE_KEY_TO_COLQ); // only compare row, colF, colQ\n for (Map.Entry<Key, Value> entry : scan) {\n Key k = entry.getKey();\n Value v = entry.getValue();\n log.debug(k + \" \" + v);\n // fails on BatchScanner when iterator generates entries past its range\n Assert.assertFalse(\"Duplicate entry found: \" + k, actual.containsKey(k));\n actual.put(k, v);\n }\n Assert.assertEquals(expect, actual);\n\n // delete test data\n conn.tableOperations().delete(tableName);\n }", "@SneakyThrows(SQLException.class)\r\n public static int executeQuery(ResultSet rs, QueryConsumer consumer) {\r\n AtomicInteger result = new AtomicInteger();\r\n try {\r\n while (rs.next()) {\r\n consumer.accept(rs);\r\n result.incrementAndGet();\r\n }\r\n } finally {\r\n rs.close();\r\n }\r\n return result.get();\r\n }", "public Path execute() throws IOException{\n //exclude the header line, and process from the second line\n long actualTotalRead = totalRecords + 1;\n RangeRead seedRangeRead = this.totalRecords > BATCH_SIZE_TO_READ ?\n new RangeRead(2, BATCH_SIZE_TO_READ + 2)\n : new RangeRead(2, actualTotalRead );\n //separate the total records into range to read and process\n List<RangeRead> rangeReads = new LinkedList<>();\n Stream.iterate(seedRangeRead,\n rangeRead -> new RangeRead(rangeRead.getExcludeEndPos(),\n rangeRead.getExcludeEndPos() + BATCH_SIZE_TO_READ))\n .filter(rangeRead -> {\n boolean isStillLessThan = rangeRead.getExcludeEndPos() <= actualTotalRead;\n if(isStillLessThan) {\n rangeReads.add(rangeRead);\n }\n return rangeRead.getExcludeEndPos() > actualTotalRead;\n }).findFirst().get();\n\n RangeRead lastRangeRead = rangeReads.get(rangeReads.size() - 1);\n if(lastRangeRead.getExcludeEndPos() < actualTotalRead) {\n rangeReads.add(new RangeRead(lastRangeRead.getExcludeEndPos(), actualTotalRead));\n }\n\n AtomicInteger batchNumberIndex = new AtomicInteger(0);\n List<RangeRead> bulkRangeReads = new ArrayList<>();\n Set<String>allPhoneNumberSet = new HashSet<>();\n rangeReads.forEach(rangeRead -> {\n bulkRangeReads.add(rangeRead);\n if(batchNumberIndex.incrementAndGet() == NUMBER_OF_BATCH_TO_PROCESS) {\n allPhoneNumberSet.addAll(processRangeRead(bulkRangeReads));\n batchNumberIndex.set(1);\n bulkRangeReads.clear();\n }\n });\n if(bulkRangeReads.size() > 0) {\n allPhoneNumberSet.addAll(processRangeRead(bulkRangeReads));\n }\n return this.writeResultsToOuput(allPhoneNumberSet);\n }", "private void consumeImpl(Consumer<String, String> messageReader) {\n int pollTimeout = environment.getProperty(\"app.kafka.pull.timeout\", Integer.class);\n long timeoutNoMessages = environment.getProperty(\"app.kafka.timeout.no.messages\", Long.class);\n\n long timeoutNoMessagesMark = System.currentTimeMillis();\n while (true) {\n ConsumerRecords<String, String> records = messageReader.poll(pollTimeout);\n\n if (records.count() == 0) {\n if ((timeoutNoMessagesMark + timeoutNoMessages) < System.currentTimeMillis()) {\n LOG.debug(\"Timeout after \" + timeoutNoMessages + \" milliseconds, terminating.\");\n break;\n }\n\n continue;\n }\n\n timeoutNoMessagesMark = System.currentTimeMillis();\n\n for (ConsumerRecord<String, String> record : records) {\n ++totalConsumed;\n\n consumeRecord(record);\n }\n }\n }", "private void readData () throws SQLException {\n int currentFetchSize = getFetchSize();\n setFetchSize(0);\n close();\n setFetchSize(currentFetchSize);\n moveToInsertRow();\n\n CSVRecord record;\n\n for (int i = 1; i <= getFetchSize(); i++) {\n lineNumber++;\n try {\n\n if (this.records.iterator().hasNext()) {\n record = this.records.iterator().next();\n\n for (int j = 0; j <= this.columnsTypes.length - 1; j++) {\n\n switch (this.columnsTypes[j]) {\n case \"VARCHAR\":\n case \"CHAR\":\n case \"LONGVARCHAR\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n case \"INTEGER\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateInt(j + 1, Integer.parseInt(record.get(j)));\n break;\n case \"TINYINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateByte(j + 1, Byte.parseByte(record.get(j)));\n break;\n case \"SMALLINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateShort(j + 1, Short.parseShort(record.get(j)));\n break;\n case \"BIGINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateLong(j + 1, Long.parseLong(record.get(j)));\n break;\n case \"NUMERIC\":\n case \"DECIMAL\":\n /*\n * \"0\" [0,0]\n * \"0.00\" [0,2]\n * \"123\" [123,0]\n * \"-123\" [-123,0]\n * \"1.23E3\" [123,-1]\n * \"1.23E+3\" [123,-1]\n * \"12.3E+7\" [123,-6]\n * \"12.0\" [120,1]\n * \"12.3\" [123,1]\n * \"0.00123\" [123,5]\n * \"-1.23E-12\" [-123,14]\n * \"1234.5E-4\" [12345,5]\n * \"0E+7\" [0,-7]\n * \"-0\" [0,0]\n */\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBigDecimal(j + 1, new BigDecimal(record.get(j)));\n break;\n case \"DOUBLE\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDouble(j + 1, Double.parseDouble(record.get(j)));\n break;\n case \"FLOAT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateFloat(j + 1, Float.parseFloat(record.get(j)));\n break;\n case \"DATE\":\n // yyyy-[m]m-[d]d\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDate(j + 1, Date.valueOf(record.get(j)));\n break;\n case \"TIMESTAMP\":\n // yyyy-[m]m-[d]d hh:mm:ss[.f...]\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTimestamp(j + 1, Timestamp.valueOf(record.get(j)));\n break;\n case \"TIME\":\n // hh:mm:ss\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTime(j + 1, Time.valueOf(record.get(j)));\n break;\n case \"BOOLEAN\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBoolean(j + 1, convertToBoolean(record.get(j)));\n break;\n default:\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n }\n }\n\n insertRow();\n incrementRowCount();\n }\n } catch (Exception e) {\n LOG.error(\"An error has occurred reading line number {} of the CSV file\", lineNumber, e);\n throw e;\n }\n }\n\n moveToCurrentRow();\n beforeFirst(); \n }", "@SuppressWarnings({ \"deprecation\", \"serial\" })\n\tprivate void doBatchCompute() {\n\t\tHConnection hConnection = null;\n\t\tHTableInterface hTableInterface = null;\n\t\tHBaseAdmin admin = null;\n\t\ttry {\n\t\t\t//scan the events table\n\t\t\thConnection = HConnectionManager.createConnection(conf);\n\t\t\thTableInterface = hConnection.getTable(DashboardUtils.curatedEvents);\n\t\t\tadmin = new HBaseAdmin(conf);\n\t\t\t\n\t\t\t//create an empty dataset here and do union or intersections in subsequent nested iterations\n\t\t\tList<DatasetBean> emptyFeed = new ArrayList<DatasetBean>();\n\t\t\tDatasetBean datasetBean = new DatasetBean();\n\t\t\t\n\t\t\t//start scanning through the table\n\t\t\tScan scan = new Scan();\n\t\t\tResultScanner scanner = hTableInterface.getScanner(scan);\n\t\t\tfor(Result r = scanner.next(); r != null; r = scanner.next()) {\n\t\t\t\t//to stop scanner from creating too many threads\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t} catch(InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//cumulative set which is empty containing the DatasetBean class object\n\t\t\t\tDataset<Row> cumulativeSet = sparkSession.createDataFrame(emptyFeed, datasetBean.getClass());\n\t\t\t\t\n\t\t\t\t//scan through every row of feedEvents table and process each corresponding event\n\t\t\t\tif(!r.isEmpty()) {\n\t\t\t\t\teventTable = Bytes.toString(r.getRow());\n\t\t\t\t\t\n\t\t\t\t\t//create table if it didn't already exist\n\t\t\t\t\tif(!admin.tableExists(eventTable)) {\n\t\t\t\t\t\tHTableDescriptor creator = new HTableDescriptor(eventTable);\n\t\t\t\t\t\tcreator.addFamily(new HColumnDescriptor(DashboardUtils.eventTab_cf));\n\t\t\t\t\t\tadmin.createTable(creator);\n\t\t\t\t\t\tlogger.info(\"**************** just created the following table in batch process since it didn't exist: \" + eventTable);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//declare the dataset storing the data from betaFeed\n\t\t\t\t\tDataset<Row> feedDataSet;\n\t\t\t\t\t//long eventdatacount = eventmap.get(eventTable);\n\t\t\t\t\t\n\t\t\t\t\tcurrentStore = RSSFeedUtils.betatable;\n\t\t\t\t\t//this dataset is populated with betaFeed data\n\t\t\t\t\tfeedDataSet = loadbetaFeed();\n\t\t\t\t\t\n\t\t\t\t\t//store the data as a temporary table to process via sparkSQL\n\t\t\t\t\tfeedDataSet.createOrReplaceTempView(currentStore);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tfeedevents = Job.getInstance(conf);\n\t\t\t\t\tfeedevents.getConfiguration().set(TableOutputFormat.OUTPUT_TABLE, eventTable);\n\t\t\t\t\tfeedevents.setOutputFormatClass(TableOutputFormat.class);\n\t\t\t\t\t\n\t\t\t\t\t//read the tags attribute of the event, and start reading it from left to right....tags are in format as in the documentation\n\t\t\t\t\t//break the OR tag, followed by breaking the AND tag, followed by processing each tag or event contained in it\n\t\t\t\t\tString tags = \"\";\n\t\t\t\t\tif(r.containsColumn(Bytes.toBytes(DashboardUtils.curatedEvents_cf), Bytes.toBytes(DashboardUtils.curatedTags))) {\n\t\t\t\t\t\ttags = Bytes.toString(r.getValue(Bytes.toBytes(DashboardUtils.curatedEvents_cf), Bytes.toBytes(DashboardUtils.curatedTags)));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tString backupTagStr = tags;\n\t\t\t\t\t\n\t\t\t\t\twhile(tags.contains(\")\")) {\n\t\t\t\t\t\tString threstr=null;\n\t\t\t\t\t\tSystem.out.println(\"tags:\" + tags.trim());\n\t\t\t\t\t\t\n\t\t\t\t\t\tString[] ortagstrings = tags.trim().split(\"OR\");\n\t\t\t\t\t\tfor(String ortag : ortagstrings) {\n\t\t\t\t\t\t\tSystem.out.println(\"val of ortag:\" + ortag);\n\t\t\t\t\t\t\tthrestr = ortag.trim();\n\t\t\t\t\t\t\t//these are the parameters being fetched and populated in the events...i.e, feedname,totle,link,description,categories and date\n\t\t\t\t\t\t\tString qry =\"SELECT rssFeed, title, articleLink, description, categories, articleDate FROM \" + currentStore + \" WHERE \";\n\t\t\t\t\t\t\tStringBuilder querybuilder = new StringBuilder(qry);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(\"tag:\"+ortag.trim());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] andtagstrings = ortag.trim().split(\"AND\");\n\t\t\t\t\t\t\tDataset<Row> andSet = sparkSession.createDataFrame(emptyFeed, datasetBean.getClass());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString proctag=null;\n\t\t\t\t\t\t\tfor(int i=0; i<andtagstrings.length; i++) {\n\t\t\t\t\t\t\t\tproctag = andtagstrings[i];\n\t\t\t\t\t\t\t\tSystem.out.println(\"process tag:\" + proctag);\n\t\t\t\t\t\t\t\t//if the part of the tag being processed is an event, open up a second stream to load data from corresponding table\n\t\t\t\t\t\t\t\tif(proctag.trim().replaceAll(\"\\\\(\", \"\").startsWith(\"EVENT\")) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"qwerty:\" + proctag.trim());\n\t\t\t\t\t\t\t\t\tString curatedevent = proctag.trim().substring(6, proctag.trim().length()).trim().replaceAll(\" \", \"__\").replaceAll(\"\\\\)\", \"\");\n\t\t\t\t\t\t\t\t\tlogger.info(\"################################################################################# event:\"+curatedevent);\n\t\t\t\t\t\t\t\t\t//dataset comes here\n\t\t\t\t\t\t\t\t\tif(admin.tableExists(curatedevent)) {\n\t\t\t\t\t\t\t\t\t\tDataset<Row> eventdataset = loadcuratedEvent(curatedevent);\n\t\t\t\t\t\t\t\t\t\tlogger.info(\"**************************************************** event:\" + curatedevent + \" while processing:\"+eventTable);\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(i==0) {\n\t\t\t\t\t\t\t\t\t\t\tandSet = eventdataset.union(andSet);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(andSet.count() == 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tandSet = eventdataset.union(andSet);\n\t\t\t\t\t\t\t\t\t\t\t} else if(andSet.count() > 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tandSet = eventdataset.intersect(andSet);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tlogger.info(\"*************************** event \" + curatedevent + \" does not exist *********************************\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//if it's a normal tag, make a sparkSQL query out of it\n\t\t\t\t\t\t\t\t} else if(!proctag.trim().replaceAll(\"\\\\(\", \"\").startsWith(\"EVENT\")) {\n\t\t\t\t\t\t\t\t\tquerybuilder.append(\"categories RLIKE '\" + proctag.trim().replaceAll(\"\\\\(\", \"\").replaceAll(\"\\\\)\", \"\") + \"' AND \");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//once the tag is fully processed, merge all data points and store in a resultant dataset\n\t\t\t\t\t\t\tif(querybuilder.toString().length() > qry.length()) {\n\t\t\t\t\t\t\t\t//logger.info(\"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ inside query string ###############################\");\n\t\t\t\t\t\t\t\tquerybuilder = new StringBuilder(querybuilder.toString().substring(0, querybuilder.toString().length() -5));\n\t\t\t\t\t\t\t\t//dataset comes here\n\t\t\t\t\t\t\t\tDataset<Row> queryset = sparkSession.sql(querybuilder.toString());\n\n\t\t\t\t\t\t\t\t//id the set it empty, fill it with the single data point\n\t\t\t\t\t\t\t\tif(andSet.count() == 0 && !backupTagStr.contains(\"EVENT\")) {\n\t\t\t\t\t\t\t\t\tandSet = queryset.union(andSet);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tlogger.info(\"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ doing query string with zero count:\" + eventTable);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tlogger.info(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ doing intersect for query:\" + eventTable);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tandSet.createOrReplaceTempView(\"andSet1\");\n\t\t\t\t\t\t\t\t\tqueryset.createOrReplaceTempView(\"querySet1\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tDataset<Row> fSet = sparkSession.sql(\"SELECT DISTINCT(a.*) FROM andSet1 a INNER JOIN querySet1 b ON a.title = b.title\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tandSet = fSet;\n\t\t\t\t\t\t\t\t\tqueryset.unpersist();\n\t\t\t\t\t\t\t\t\tfSet.unpersist();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcumulativeSet = andSet.union(cumulativeSet);\n\t\t\t\t\t\t\tandSet.unpersist();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttags = tags.substring(threstr.length(), tags.length()).trim().replaceAll(\"\\\\)\", \"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"########################################################################################################### table:\"+eventTable);\n\t\t\t\t\t\n\t\t\t\t\tcumulativeSet.createOrReplaceTempView(\"cumulativeEvent\");\n\t\t\t\t\n\t\t\t\t\t//as a double check, only fetch distinct records from all the merges...done via sparkSQL\n\t\t\t\t\tDataset<Row> finalSet = sparkSession.sql(\"SELECT DISTINCT(*) FROM cumulativeEvent\");\n\t\t\t\t\t\n\t\t\t\t\tJavaRDD<Row> eventRDD = finalSet.toJavaRDD();\n\t\t\t\t\tJavaPairRDD<ImmutableBytesWritable, Put> eventpairRDD = eventRDD.mapToPair(new PairFunction<Row, ImmutableBytesWritable, Put>() {\n\n\t\t\t\t\t\tpublic Tuple2<ImmutableBytesWritable, Put> call(Row arg0) throws Exception {\n\t\t\t\t\t\t\tObject link = arg0.getAs(\"articleLink\");\n\t\t\t\t\t\t\tif((String)link != null) {\n\t\t\t\t\t\t\t\t//parameters being populated into the events table\n\t\t\t\t\t\t\t\treturn DashboardUtils.objectsofCuratedEvents(arg0.getAs(\"rssFeed\"), arg0.getAs(\"title\"), link, arg0.getAs(\"description\"), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\targ0.getAs(\"categories\"), arg0.getAs(\"articleDate\"));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn DashboardUtils.objectsofCuratedEvents(arg0.getAs(\"rssFeed\"), arg0.getAs(\"title\"), \"link not available\", arg0.getAs(\"description\"), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\targ0.getAs(\"categories\"), arg0.getAs(\"articleDate\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"******************************** going to dump curated events data in hbase for event: \" + eventTable);\n\t\t\t\t\teventpairRDD.saveAsNewAPIHadoopDataset(feedevents.getConfiguration());\n\t\t\t\t\t\n\t\t\t\t\teventRDD.unpersist();\n\t\t\t\t\tfinalSet.unpersist();\n\t\t\t\t\tcumulativeSet.unpersist();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tscanner.close();\n\t\t\thTableInterface.close();\n\t\t\thConnection.close();\n\t\t\t\n\t\t} catch(IOException e) {\n\t\t\tlogger.info(\"error while establishing Hbase connection...\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void oldconsume() {\n\t\tfor (;;) {\n\t\t\tif (printoldline > oldinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tprintnewline = oldinfo.other[printoldline];\n\t\t\tif (printnewline < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse showmove();\n\t\t}\n\t}", "@Override\n public Iterator<Space> iterator() {\n return row.iterator();\n }", "public QueryCore executionQ(ThrowingBiconsumer throwingConsumer, String e) throws SQLException\n {\n rs = prepStm.executeQuery();\n throwingConsumer.accept(rs,e);\n return this;\n }", "@Override\r\n\tpublic void run() {\n\t\tthis.rs=null;\r\n\t}", "public void removeRow(int ind) throws SQLException {\n/* 417 */ notSupported();\n/* */ }", "void onEnqueue(boolean success, long rowCount);", "public List getRows() \n {\n return rows;\n }", "@Override\n public Collection<T_ROW_ELEMENT_PM> getSelectedRows() {\n return null;\n }", "java.util.List<io.dstore.engine.procedures.OmModifyCampaignsAd.Response.Row> \n getRowList();", "public Builder clearRows() {\n rows_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public boolean isGatheredAllRows() {\r\n return isFinalRowCount() && getTotalRowCount() == getActualRowCount();\r\n }", "@Override\n public int[] executeBatch() {\n if (this.batchPos == 0) {\n return new int[0];\n }\n try {\n int[] arrn = this.db.executeBatch(this.pointer, this.batchPos / this.paramCount, this.batch);\n return arrn;\n }\n finally {\n this.clearBatch();\n }\n }", "private int batchDeletionAttempt(BiFunction<Session, String, Integer> recordsSelector, Holder<Integer> totalCountHolder,\n long batchStart, Dialect dialect, OperationResult subResult) {\n\n Session session = null;\n try {\n session = baseHelper.beginTransaction();\n\n TemporaryTableDialect ttDialect = TemporaryTableDialect.getTempTableDialect(dialect);\n\n\t\t\t// create temporary table\n\t\t\tfinal String tempTable = ttDialect.generateTemporaryTableName(RAuditEventRecord.TABLE_NAME);\n\t\t\tcreateTemporaryTable(session, dialect, tempTable);\n\t\t\tLOGGER.trace(\"Created temporary table '{}'.\", tempTable);\n\n\t\t\tint count = recordsSelector.apply(session, tempTable);\n\t\t\tLOGGER.trace(\"Inserted {} audit record ids ready for deleting.\", count);\n\n\t\t\t// drop records from m_audit_item, m_audit_event, m_audit_delta, and others\n\t\t\tsession.createNativeQuery(createDeleteQuery(RAuditItem.TABLE_NAME, tempTable,\n\t\t\t\t\tRAuditItem.COLUMN_RECORD_ID)).executeUpdate();\n\t\t\tsession.createNativeQuery(createDeleteQuery(RObjectDeltaOperation.TABLE_NAME, tempTable,\n\t\t\t\t\tRObjectDeltaOperation.COLUMN_RECORD_ID)).executeUpdate();\n\t\t\tsession.createNativeQuery(createDeleteQuery(RAuditPropertyValue.TABLE_NAME, tempTable,\n\t\t\t\t\tRAuditPropertyValue.COLUMN_RECORD_ID)).executeUpdate();\n\t\t\tsession.createNativeQuery(createDeleteQuery(RAuditReferenceValue.TABLE_NAME, tempTable,\n\t\t\t\t\tRAuditReferenceValue.COLUMN_RECORD_ID)).executeUpdate();\n\t\t\tsession.createNativeQuery(createDeleteQuery(RAuditEventRecord.TABLE_NAME, tempTable, \"id\"))\n\t\t\t\t\t.executeUpdate();\n\n\t\t\t// drop temporary table\n\t\t\tif (ttDialect.dropTemporaryTableAfterUse()) {\n\t\t\t\tLOGGER.debug(\"Dropping temporary table.\");\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tsb.append(ttDialect.getDropTemporaryTableString());\n\t\t\t\tsb.append(' ').append(tempTable);\n\n\t\t\t\tsession.createNativeQuery(sb.toString()).executeUpdate();\n }\n\n session.getTransaction().commit();\n int totalCount = totalCountHolder.getValue() + count;\n totalCountHolder.setValue(totalCount);\n LOGGER.debug(\"Audit cleanup batch finishing successfully in {} milliseconds; total count = {}\",\n System.currentTimeMillis() - batchStart, totalCount);\n return count;\n } catch (RuntimeException ex) {\n LOGGER.debug(\"Audit cleanup batch finishing with exception in {} milliseconds; exception = {}\",\n System.currentTimeMillis() - batchStart, ex.getMessage());\n baseHelper.handleGeneralRuntimeException(ex, session, subResult);\n throw new AssertionError(\"We shouldn't get here.\");\n } finally {\n baseHelper.cleanupSessionAndResult(session, subResult);\n }\n }", "@Override\r\n\tpublic List loadMasterDataSet(int pageSize, int startRow) {\n\t\treturn null;\r\n\t}" ]
[ "0.5461806", "0.53794897", "0.53638405", "0.5352731", "0.5342667", "0.52516323", "0.52249074", "0.5199882", "0.5195573", "0.5031139", "0.5004595", "0.49921533", "0.49859163", "0.49807534", "0.49761462", "0.49264637", "0.489054", "0.48706245", "0.48482603", "0.48354873", "0.48243394", "0.48099875", "0.48038885", "0.48026925", "0.48024216", "0.47982836", "0.47862315", "0.47850952", "0.47847873", "0.47789755", "0.47675815", "0.47586823", "0.47446615", "0.47443044", "0.4742334", "0.47400355", "0.4729728", "0.4706518", "0.47000745", "0.467995", "0.46689275", "0.46640462", "0.4663976", "0.46584415", "0.46521917", "0.46504006", "0.46349055", "0.4623278", "0.46229738", "0.46195406", "0.46075234", "0.46045846", "0.45876953", "0.45846418", "0.45741448", "0.45680696", "0.45592093", "0.4558062", "0.45407042", "0.4536699", "0.45360586", "0.45295143", "0.45107374", "0.45088956", "0.45025098", "0.44983208", "0.44861615", "0.44860244", "0.4482885", "0.44701675", "0.44700587", "0.4466244", "0.44649005", "0.44607833", "0.44575393", "0.44562566", "0.4454968", "0.44497642", "0.44413885", "0.44324705", "0.44280297", "0.4425572", "0.44212455", "0.44075936", "0.44052112", "0.43972215", "0.4395686", "0.43940458", "0.43922305", "0.43907428", "0.43893242", "0.4380646", "0.43773323", "0.43748778", "0.4372912", "0.43701792", "0.4364171", "0.4358625", "0.43579927", "0.4356271" ]
0.6644871
0
Executes all the NONQUERY statements in the sqlFile. Query statements are ignored as it won't make sense.
NonQueryResult executeNonQuery(ExecutionContext context, File file) throws ExecutorException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void executeSQL(Connection connection, String file)\n\t\t\tthrows Exception {\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = connection.createStatement();\n\n\t\t\tString[] values = readFile(file).split(\";\");\n\n\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\tString sql = values[i].trim();\n\t\t\t\tif ((sql.length() != 0) && (!sql.startsWith(\"#\"))) {\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}", "private void runSqlFromFile(String fileName) throws IOException {\n String[] sqlStatements = StreamUtils.copyToString( new ClassPathResource(fileName).getInputStream(), Charset.defaultCharset()).split(\";\");\n for (String sqlStatement : sqlStatements) {\n sqlStatement = sqlStatement.replace(\"CREATE TABLE \", \"CREATE TABLE OLD\");\n sqlStatement = sqlStatement.replace(\"REFERENCES \", \"REFERENCES OLD\");\n sqlStatement = sqlStatement.replace(\"INSERT INTO \", \"INSERT INTO OLD\");\n jdbcTemplate.execute(sqlStatement);\n }\n }", "public void executeTransaction(List<String> sql) throws SQLException {\n try (Connection connection = getConnection()) {\n\n Statement statement = connection.createStatement();\n\n String into = \"\";\n\n //connection.setAutoCommit(false);\n for (String s : sql) {\n if (s.trim().equals((\"\")) || s.trim().startsWith(\"/*\")) {\n continue;\n }\n into += s;\n\n if (s.endsWith(\";\")) {\n statement.addBatch(into);\n into = \"\";\n }\n }\n\n statement.executeBatch();\n\n statement.close();\n\n //connection.commit();\n }\n }", "public SimpleDatabase executeSqlFile(SQLiteDatabase db, @RawRes int id) {\n Scanner scan = context.openInternalFileScanner(id);\n String query = \"\";\n if (logging) Log.d(\"SimpleDB\", \"start reading file\");\n int queryCount = 0;\n while (scan.hasNextLine()) {\n String line = scan.nextLine().trim();\n if (line.startsWith(\"--\") || line.isEmpty()) {\n continue;\n } else {\n query += line + \"\\n\";\n }\n\n if (query.endsWith(\";\\n\")) {\n if (logging) Log.d(\"SimpleDB\", \"query: \\\"\" + query + \"\\\"\");\n db.execSQL(query);\n query = \"\";\n queryCount++;\n }\n }\n if (logging) Log.d(\"SimpleDB\", \"done reading file\");\n if (logging) Log.d(\"SimpleDB\", \"performed \" + queryCount + \" queries.\");\n return this;\n }", "public static void executeSQLScript(Connection conn, String file) throws Exception{\n\t\tFileInputStream fis=new FileInputStream(file);\n\t\tBufferedInputStream bis=new BufferedInputStream(fis);\n\t\tStringBuffer sb=new StringBuffer(); \n\t\tbyte[] bytes=new byte[1024];\n\t\twhile (bis.available()!=0){\n\t\t\tint length=fis.read(bytes);\n\t\t\tif (length!=1024){\n\t\t\t\tbyte[] smallBytes=new byte[length];\n\t\t\t\tSystem.arraycopy(bytes,0,smallBytes,0,length);\n\t\t\t\tbytes=smallBytes;\n\t\t\t}\t\n\t\t\tsb.append(new String(bytes));\n\t\t}\n\t\tStringTokenizer st = new StringTokenizer(sb.toString(),\";\",false);\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString token=st.nextToken().trim();\t\n\t\t\tif (!token.equals(\"\")){\n\t\t\t\tif (token.equalsIgnoreCase(\"commit\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.commit();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e){\n\t\t\t\t\t\tDataAccessObject.rollback(conn);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (token.equalsIgnoreCase(\"quit\")){\n\t\t\t\t\t//do nothing\n\t\t\t\t}\t\t\t\t\n\t\t\t\telse if (token.substring(0,2).equals(\"--\")){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\texecuteSQLStatement(conn,token);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void runQueries();", "public static List<SQLquery> updateQueryList() throws IOException {\n\n List<String> querynames = new ArrayList<String>();\n List<SQLquery> queries = new ArrayList<SQLquery>();\n File curDir = new File(\".\");\n String[] fileNames = curDir.list();\n\n for (int i = 0; i <= fileNames.length - 1; i++) {\n\n /**\n * SELECT ONLY .XYZ FILES FROM FOLDER\n */\n System.out.println(fileNames[i]);\n if (fileNames[i].contains(\".xyz\")) {\n\n querynames.add(fileNames[i]);\n\n }\n\n }\n\n /**\n * create SQLquery objects with appropriate name and query string\n */\n for ( String querypath : querynames ) {\n\n String content = new String(Files.readAllBytes(Paths.get(querypath)));\n SQLquery newquery = new SQLquery(querypath.replace(\".xyz\",\"\"),content);\n queries.add(newquery);\n\n }\n\n /**\n * return query list\n */\n return queries;\n\n }", "public void executeFile(String fileName) {\n String file = \"\";\r\n String lign;\r\n try (BufferedReader br = new BufferedReader(new FileReader(fileName))) {\r\n while ((lign = br.readLine()) != null) {\r\n file += \" \" + lign;\r\n }\r\n\r\n String[] commands = file.split(\";\");\r\n for (int i = 0; i < commands.length; i++) {\r\n executeUpdate(commands[i]);\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public SimpleDatabase executeSqlFile(String name) {\n // possibly trim .sql extension\n if (name.toLowerCase().endsWith(\".sql\")) {\n name = name.substring(0, name.length() - 4);\n }\n SQLiteDatabase db = context.openOrCreateDatabase(name);\n int id = context.getResourceId(name, \"raw\");\n return executeSqlFile(db, id);\n }", "private static boolean isIgnoreSQL(String sql) {\n if (sql.length() == 0) {\n return true;\n }\n\n String lowerSQL = sql.toLowerCase();\n for (String ignoreSQL : ignoreSQLs) {\n if (lowerSQL.startsWith(ignoreSQL)) {\n return true;\n }\n }\n return false;\n }", "private void getSelectStatements()\n\t{\n\t\tString[] sqlIn = new String[] {m_sqlOriginal};\n\t\tString[] sqlOut = null;\n\t\ttry\n\t\t{\n\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\tthrow new IllegalArgumentException(m_sqlOriginal);\n\t\t}\n\t\t//\ta sub-query was found\n\t\twhile (sqlIn.length != sqlOut.length)\n\t\t{\n\t\t\tsqlIn = sqlOut;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\t\tthrow new IllegalArgumentException(sqlOut.length + \": \"+ m_sqlOriginal);\n\t\t\t}\n\t\t}\n\t\tm_sql = sqlOut;\n\t\t/** List & check **\n\t\tfor (int i = 0; i < m_sql.length; i++)\n\t\t{\n\t\t\tif (m_sql[i].indexOf(\"SELECT \",2) != -1)\n\t\t\t\tlog.log(Level.SEVERE, \"#\" + i + \" Has embedded SQL - \" + m_sql[i]);\n\t\t\telse\n\t\t\t\tlog.fine(\"#\" + i + \" - \" + m_sql[i]);\n\t\t}\n\t\t/** **/\n\t}", "public void executeSql(String sql) throws SQLException {\n executeSql(sql, true, AppConstants.DEFAULT_FETCH_SIZE, AppConstants.DEFAULT_FETCH_DIRN);\n }", "protected static void execute(ReviewDb db, String sql) throws SQLException {\n try (Statement s = newStatement(db)) {\n s.execute(sql);\n }\n }", "public void ignoreQuery(OwnerQueryStatsDTO queryDto) {\n\t\ttry (Config config = ConfigFactory.get()) {\n\t\t\tconfig.get().commit();\n\t\t\tqueries = null;\n\t\t\tflagQuery(queryDto, Flag.IGNORED);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void sourceExecuteWithLog(final String sql) throws SQLException {\n log.info(\"source execute :{}\", sql);\n try (Connection connection = sourceDataSource.getConnection()) {\n connection.createStatement().execute(sql);\n }\n }", "public int undateExec(String sql) {\n\t\tint rows = 0;\n\t\ttry {\n\t\t\tjava.sql.Statement st = conn.createStatement();\n\t\t\trows = st.executeUpdate(sql);\n\t\t\tif (st != null) {\n\t\t\t\tst.close();\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"ステートメント実行エラーが発生しました/Statement execution Error Occured\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn rows;\n\n\t}", "public void prepareExecuteNoSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteNoSelect();\n }", "public void exec(String sql) {\r\n try (Statement stmt = connection.createStatement()) {\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n throw new DbException(connectionString + \"\\nError executing \" + sql, e);\r\n }\r\n }", "private void executeRequest(String sql) {\n\t}", "public void runStatement(final QueriesConfig qryConfig, final String statement) throws DBMissingValueException {\n final var dataSource = getDataSource(qryConfig);\n Connection conn = null;\n PreparedStatement stmt = null;\n try {\n conn = dataSource.getConnection();\n stmt = conn.prepareStatement(statement);\n\n switch (new QueryModeWrapper(qryConfig.getMode()).getMode()) {\n case QUERY:\n case SINGLE_QUERY_SCRIPT:\n final ResultSet rs = stmt.executeQuery();\n final var metaData = rs.getMetaData();\n long rsCount = 0;\n try {\n var firstLoad = true;\n final var listeners = qryConfig.getListeners();\n\n while (rs.next()) {\n rsCount++;\n StringBuilder sbHdr = new StringBuilder();\n StringBuilder sbRec = new StringBuilder();\n\n for (int idx = 1; idx <= metaData.getColumnCount(); idx++) {\n sbHdr.append(sbHdr.length()>0?\",\":\"\").append(metaData.getColumnName(idx));\n sbRec.append(sbRec.length()>0?\",\":\"\").append(rs.getString(idx));\n }\n\n if (firstLoad) {\n final var rawHdr = sbHdr.toString();\n LOG.info(String.format(\"[%s] [HDR]: %s\", qryConfig.getDescription(), rawHdr));\n\n if (listeners.getOnHeader()!=null) {\n runCmd(qryConfig, listeners.getOnHeader(), qryConfig.getDescription(), statement, rawHdr);\n }\n }\n final var rawData = sbRec.toString();\n LOG.info(String.format(\"[%s] [REC]: %s\", qryConfig.getDescription(), rawData));\n\n if (listeners.getOnData()!=null) {\n runCmd(qryConfig, listeners.getOnData(), qryConfig.getDescription(), statement, rawData);\n }\n firstLoad = false;\n }\n }\n finally {\n LOG.info(String.format(\"[%s] %s rows\", qryConfig.getDescription(), rsCount));\n try {rs.close();} catch (Exception e) {}\n }\n break;\n default:\n stmt.execute();\n try {LOG.info(String.format(\"[%s] %s rows affected\", qryConfig.getDescription(), stmt.getUpdateCount()));}\n catch(Exception e) {}\n break;\n }\n } catch (SQLException | QueryModeException e) {\n throw new RuntimeException(e);\n } finally {\n try {stmt.close();} catch (Exception e) {}\n try {conn.close();} catch (Exception e) {}\n }\n }", "public void runScript(String sqlScript) throws DataAccessLayerException {\n Session session = null;\n Transaction trans = null;\n Connection conn = null;\n\n Statement stmt = null;\n try {\n session = getSession(true);\n trans = session.beginTransaction();\n conn = session.connection();\n stmt = conn.createStatement();\n } catch (SQLException e) {\n throw new DataAccessLayerException(\n \"Unable to create JDBC statement\", e);\n }\n boolean success = true;\n String[] scriptContents = sqlScript.split(\";\");\n for (String line : scriptContents) {\n if (!line.isEmpty()) {\n try {\n stmt.addBatch(line + \";\");\n\n } catch (SQLException e1) {\n logger.warn(\"Script execution failed. Rolling back transaction\");\n trans.rollback();\n try {\n if (!conn.isClosed()) {\n conn.close();\n }\n } catch (SQLException e2) {\n logger.error(\"Cannot close database connection!!\", e2);\n }\n if (session.isOpen()) {\n session.close();\n }\n throw new DataAccessLayerException(\n \"Cannot execute SQL statement: \" + line, e1);\n }\n }\n }\n try {\n stmt.executeBatch();\n } catch (SQLException e1) {\n success = false;\n trans.rollback();\n logger.error(\"Error executing script.\", e1);\n }\n\n try {\n stmt.close();\n } catch (SQLException e1) {\n success = false;\n trans.rollback();\n logger.error(\"Unable to close JDBC statement!\", e1);\n }\n\n if (success) {\n trans.commit();\n }\n try {\n if (!conn.isClosed()) {\n conn.close();\n }\n } catch (SQLException e) {\n logger.error(\"Cannot close database connection!!\", e);\n }\n if (session.isOpen()) {\n session.close();\n }\n }", "public String readSQLFile(String filename) {\n\t\tString query = null;\n\t\ttry (BufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(\n\t\t\t\t\t\tgetClass().getResourceAsStream(\"/sql/\" + filename + \".sql\")))) {\n\t\t\tList<String> lines = reader.lines().collect(Collectors.toList());\n\t\t\tquery = join(\" \", lines).replaceAll(\"\\\\s+\", \" \");\n\t\t} catch (IOException e) {\n\t\t\tString msg = \"Can't read SQL file \" + filename;\n\t\t\tlogger.error(msg, e);\n\t\t\tthrow new RuntimeException(msg, e);\n\t\t}\n\t\treturn query;\n\t}", "public void toSql(String baseDir, String out) throws IOException {\n Path pBase = Paths.get(baseDir);\n final String format = \"insert into files values(null,'%s','%s');\";\n List<String> files = new ArrayList<>();\n Files.walkFileTree(pBase, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n String fileName = file.getFileName().toString();\n String path = file.toAbsolutePath().toString();\n if (filter(path) || filter(fileName)) {\n return FileVisitResult.CONTINUE;\n }\n if (fileName.length() > 128 || path.length() > 8096) {\n System.out.println(String.format(\"warning : %s %s exced the limit\", fileName, path));\n }\n\n\n String insert = String.format(format, fileName, path);\n files.add(insert);\n if (files.size() >= 10240) {\n write2File(out, files);\n files.clear();\n }\n return FileVisitResult.CONTINUE;\n }\n });\n write2File(out, files);\n }", "protected void execSQL(String sql) throws Exception {\n\t\tPreparedStatement statement = null;\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(sql);\n\t\t\tstatement.execute();\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tPersistenceUtils.closeStatement(statement);\n\t\t}\n\n\t}", "protected void execute() {\n \t// literally still do nothing\n }", "@Override\n\tpublic Map<String, TableImportResult> importData(String databaseServer,\n\t\t\tString databaseName, File file) {\n\t\t// intialise the results map\n\t\t//\n\t\tMap<String, TableImportResult> results = new HashMap<String, TableImportResult>();\n\n\t\t//\n\t\t// Check we have a file\n\t\t//\n\t\tif (file == null || !file.exists()) {\n\t\t\tlog.debug(\"No database was supplied for data import\");\n\t\t\treturn results;\n\t\t}\n\n\t\t//\n\t\t// Open the DB\n\t\t//\n\t\ttry {\n\t\t\tDatabase database = DatabaseBuilder.open(file);\n\t\t\tList<String> tablesToOmit = new ArrayList<String>();\n\n\t\t\t//\n\t\t\t// First, do a dry run\n\t\t\t//\n\t\t\t//AuthenticationDetails ad = new AuthenticationDetails();\n\t\t\tresults = importData(databaseServer, databaseName, database,tablesToOmit, true);\n\n\t\t\t//\n\t\t\t// Identify tables with problems; we'll omit these\n\t\t\t//\n\t\t\tfor (String key : results.keySet()) {\n\t\t\t\tif (results.get(key).getDataImportResult() == TableImportResult.FAILED) {\n\t\t\t\t\ttablesToOmit.add(key);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlog.debug(\"import preflight complete; \" + tablesToOmit.size()\n\t\t\t\t\t+ \" tables to omit in full run\");\n\n\t\t\t//\n\t\t\t// Now re-run and commit. This should ensure all data is imported\n\t\t\t// that passed preflight.\n\t\t\t//\n\t\t\tMap<String, TableImportResult> finalResults = importData(\n\t\t\t\t\tdatabaseServer, databaseName, database, tablesToOmit, false);\n\n\t\t\t//\n\t\t\t// Merge results\n\t\t\t//\n\t\t\tfor (String key : results.keySet()) {\n\t\t\t\tif (finalResults.containsKey(key)) {\n\t\t\t\t\tresults.get(key).merge(finalResults.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//\n\t\t\t// Now lets verify the import. While we know how many rows we\n\t\t\t// INSERTed in the batches,\n\t\t\t// once we committed them Postgres will discard rows that break any\n\t\t\t// table constraints.\n\t\t\t//\n\t\t\tfor (String tableName : results.keySet()) {\n\t\t\t\tQueryRunner qr = new QueryRunner(databaseServer, databaseName);\n\t\t\t\tqr.runDBQuery(String.format(\"SELECT COUNT(*) FROM \\\"%s\\\"\",\n\t\t\t\t\t\tgetNormalisedTableName(tableName)));\n\t\t\t\tTableData tableData = qr.getTableData();\n\t\t\t\tint rowsVerified = Integer.parseInt(tableData.rows.iterator()\n\t\t\t\t\t\t.next().cell.get(\"count\").getValue());\n\t\t\t\tresults.get(tableName).setRowsVerified(rowsVerified);\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t// Finally, we have to update the sequences\n\t\t\t//\n\t\t\tfor (Pair<String, String> sequence : sequences){\n\t\t\t\tQueryRunner qr = new QueryRunner(databaseServer, databaseName);\n\t\t\t\tString key = getNormalisedColumnName(sequence.getLeft());\n\t\t\t\tString table = getNormalisedTableName(sequence.getRight());\n\t\t\t\tString sql = \"SELECT pg_catalog.setval(pg_get_serial_sequence('%s', '%s'), MAX(\\\"%s\\\")) FROM \\\"%s\\\";\";\n\t\t\t\tqr.runDBQuery(String.format(sql, table, key, key, table));\n\t\t\t}\n\n\t\t} catch (IOException | SQLException | ClassNotFoundException\n\t\t\t\t| NumberFormatException e) {\n\t\t\tlog.debug(\"Error importing database file\", e);\n\t\t}\n\t\treturn results;\n\t}", "public ReadOnlyIterator<Statement> getAllStatements();", "void collect() throws SQLException, IOException {\n\t\t// Open connection to the evaluation db with query classifications\n\t\tconn = DriverManager.getConnection(connectionString, user, pwd);\n\t\tconn.setCatalog(database);\n\t\t\n\t\t/*\nSELECT DISTINCT system, processNo\nFROM evaluationAverage\nWHERE algorithm = 'evosql' AND coverage < 1\n\t\t */\n\t\tPreparedStatement stmt = conn.prepareStatement(\"SELECT DISTINCT system, processNo FROM evaluationAverage WHERE algorithm = 'evosql' AND coverage < 1\");\n\t\tResultSet result = stmt.executeQuery();\n\t\t\n\t\tString lastSystem = \"\";\n\t\tPrintStream output = null;\n\t\twhile (result.next()) {\n\t\t\tString system = result.getString(1);\n\t\t\tint processNo = result.getInt(2);\n\t\t\t\n\t\t\tif (!system.equals(lastSystem)) {\n\t\t\t\tif (output != null) output.close();\n\t\t\t\toutput = new PrintStream(outputPrefix + system + \".sql\");\n\t\t\t\tlastSystem = system;\n\t\t\t}\n\t\t\tcollectScenario(system, processNo, output);\n\t\t}\n\t\toutput.close();\n\t\t\n\t\tconn.close();\n\t\t\n\t\tSystem.out.println(queriesExists);\n\t\tSystem.out.println(pathsExists);\n\t}", "protected void runSQL(String sql) throws SystemException {\n try {\n DataSource dataSource = libroPersistence.getDataSource();\n\n SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n sql, new int[0]);\n\n sqlUpdate.update();\n } catch (Exception e) {\n throw new SystemException(e);\n }\n }", "protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = monthlyTradingPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}", "@Test\n public void testNotEquals2() throws Exception {\n String sql = \"SELECT a from db.g where a != 'value'\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.NE.name());\n verifyElementSymbol(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, \"a\");\n verifyConstant(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, \"value\");\n \n verifySql(\"SELECT a FROM db.g WHERE a <> 'value'\", fileNode);\n }", "public int[] batch(String[] sqls) throws SQLException {\n Statement st = null;\n try {\n st = conn.createStatement();\n for (String sql : sqls) {\n logger.debug(\"SQL= \\n\" + sql);\n st.addBatch(sql);\n }\n return st.executeBatch();\n } catch (SQLException e) {\n throw e;\n } finally {\n if (st != null) {\n st.close();\n }\n }\n }", "protected void runSQL(String sql) throws SystemException {\n try {\n DataSource dataSource = barPersistence.getDataSource();\n\n SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n sql, new int[0]);\n\n sqlUpdate.update();\n } catch (Exception e) {\n throw new SystemException(e);\n }\n }", "private void printSQLCommands(ArrayList<Map> fieldValues, ArrayList<Map> fieldAttribs, String tableName,\n String fileName){\n ArrayList<String> commands = new ArrayList<String>();\n for(Map record : fieldValues){\n String command = \"INSERT INTO \" + tableName + \" ( \";\n for(Map attrib : fieldAttribs){\n command += attrib.get(\"name\").toString() + \", \";\n }\n command = command.substring(0,command.length()-2);\n command += \" ) VALUES ( \";\n for(Map attrib : fieldAttribs){\n String column = attrib.get(\"name\").toString();\n String value = record.get(column).toString();\n if(attrib.get(\"type\").equals(\"string\")){\n command += \"\\\"\" + value + \"\\\", \";\n }else {\n command += value + \", \";\n }\n }\n command = command.substring(0,command.length()-2);\n command += \" );\";\n commands.add(command);\n }\n String currentDatabasePath = this.findCurrentDBPath();\n File file = new File(currentDatabasePath + \"/\" + fileName);\n try {\n if(!file.exists()) {\n boolean flag = file.createNewFile();\n if(flag) { System.out.println(fileName + \" created!\"); }\n else { System.out.println(\"***Error- \" + fileName + \" can not be created!\"); }\n }\n PrintWriter tableWriter = new PrintWriter(new FileWriter(file, true));\n for (String query : commands) {\n tableWriter.append(query).append(\"\\n\");\n }\n tableWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws InterruptedException, FileNotFoundException, IOException {\n for (int i = 0; i < args.length; i++) {\n //System.out.println(args[i]);\n }\n RunSQL2 r = new RunSQL2();\n r.ReadCatalog(args[0]);\n String lines;\n String mainQuery = \"\";\n List<String> tokens = new ArrayList<String>();\n List<String> select = new ArrayList<String>();\n List<String> from = new ArrayList<String>();\n List<String> where = new ArrayList<String>();\n StringBuilder line = new StringBuilder();\n List<String> colName = new ArrayList<String>();\n List<String> ttable = new ArrayList<String>();\n String path = args[1];\n tt1 = new ArrayList<String>();\n tt2 = new ArrayList<String>();\n tt3 = new ArrayList<String>();\n tt4 = new ArrayList<String>();\n tt5 = new ArrayList<String>();\n String tname;\n int tCount = 0;\n int ttCount = 0;\n BufferedReader br = new BufferedReader(new FileReader(path));\n while ((lines = br.readLine()) != null) {\n line.append(lines + \" \");\n }\n if (line.lastIndexOf(\";\") > -1) {\n line.deleteCharAt(line.lastIndexOf(\";\"));\n }\n mainQuery = line.toString();\n StringTokenizer st = new StringTokenizer(line.toString(), \" \");\n while (st.hasMoreTokens()) {\n tokens.add(st.nextToken());\n }\n for (int i = 0; i < tokens.size(); i++) { // SELECTED ATTRIBUTES\n if (tokens.get(i).equalsIgnoreCase(\"select\")) {\n if (tokens.get(i + 1) != null) {\n int j = i;\n while (!tokens.get(j + 1).equalsIgnoreCase(\"from\")) {\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n select.add(sb.toString());\n } else {\n select.add(tokens.get(j + 1));\n }\n j++;\n }\n }\n }\n if (tokens.get(i).equalsIgnoreCase(\"from\")) {\n // TODO: SQL TABLE FROM CLAUSE FORMAT [TABLE S], OR [TABLE]\n if (tokens.get(i + 2) != null) {\n int j = i;\n while (!tokens.get(j + 2).equalsIgnoreCase(\"where\")) {\n //TODO QUERY ERROR IF NO WHERE CLAUSE\n //System.out.println(j);\n //System.out.println(tokens.get(j).toString());\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n from.add(sb.toString());\n } else {\n from.add(tokens.get(j + 1));\n }\n if (j > tokens.size() - 1) {\n break;\n }\n j++;\n }\n }\n }\n }\n\n try {\n String query = \"\";\n List<String> columnNames = new ArrayList<String>();\n Class.forName(driver).newInstance();\n Connection conn;\n Statement stmt = null;\n conn = DriverManager.getConnection(connUrl + \"?verifyServerCertificate=false&useSSL=true\", connUser, connPwd);\n br = new BufferedReader(new FileReader(path));\n query = \"SELECT * FROM DTABLES\";\n PreparedStatement statement = conn\n .prepareStatement(query);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n if (rs.getString(\"TNAME\") != null) {\n tname = rs.getString(\"TNAME\").replaceAll(\"\\\\s+\", \"\");\n if (tname.equalsIgnoreCase(from.get(0))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n t1.add(tname);\n t2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n t3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n t4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n t5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n tCount++;\n }\n if (tname.equalsIgnoreCase(from.get(2))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n tt1.add(tname);\n tt2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n tt3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n tt4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n tt5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n ttCount++;\n }\n }\n }\n conn.close();\n\n // GET ATTRIBUTES FROM THE FIRST TABLE IN ORDER TO CREATE TEMP TABLE\n Class.forName(t2.get(0)).newInstance();\n conn = DriverManager.getConnection(t3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(0), t5.get(0));\n query = \"SELECT * FROM \" + t1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb = new StringBuilder();\n StringBuilder sb1 = new StringBuilder();\n String name;\n String export;\n String tempQuery = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name = rsmd.getColumnName(i);\n sb1.append(name + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb.append(name + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb.append(name + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb.append(name + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb.append(name + \" DECIMAL (15, 2), \");\n }\n }\n sb1.setLength(sb1.length() - 2);\n sb.setLength(sb.length() - 2);\n tempQuery = sb.toString();\n export = sb1.toString();\n\n //System.out.println(sb.toString());\n conn.close();\n\n Class.forName(tt2.get(0)).newInstance();\n conn = DriverManager.getConnection(tt3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(0), tt5.get(0));\n query = \"SELECT * FROM \" + tt1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n columnCount = rsmd.getColumnCount();\n StringBuilder sb2 = new StringBuilder();\n StringBuilder sb3 = new StringBuilder();\n String name1;\n String export1;\n String tempQuery1 = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name1 = rsmd.getColumnName(i);\n sb3.append(name1 + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb2.append(name1 + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb2.append(name1 + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb2.append(name1 + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb2.append(name1 + \" DECIMAL (15, 2), \");\n }\n }\n sb3.setLength(sb3.length() - 2);\n sb2.setLength(sb2.length() - 2);\n tempQuery1 = sb2.toString();\n export1 = sb3.toString();\n //System.out.println(tempQuery1);\n\n //System.out.println(sb.toString());\n conn.close();\n\n // FOR TESTING\n for (int x = 0; x < tt1.size(); x++) {\n //System.out.println(tt1.get(x));\n }\n\n // MAIN\n // CREATE TEMP TABLE FIRST AND JOIN TABLES\n // NOTE: CLOSING CONNECTION WILL DELETE TEMP TABLE\n Class.forName(localdriver).newInstance();\n // NEW CONNECTION (DO NOT USE CONN OR ELSE TEMP TABLE MIGHT DROP)\n final Connection iconn = DriverManager.getConnection(localconnUrl + \"?verifyServerCertificate=false&useSSL=true\", localconnUser, localconnPwd);\n query = \"CREATE TEMPORARY TABLE \" + t1.get(0) + \" (\" + tempQuery + \")\"; // TEMP TABLE FOR TABLE 1\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n query = \"CREATE TEMPORARY TABLE \" + tt1.get(0) + \" (\" + tempQuery1 + \")\"; // TEMP TABLE FOR TABLE 2\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n Thread thread1[] = new Thread[tCount];\n Thread thread2[] = new Thread[ttCount];\n\n for (int z = 0; z < tCount; z++) {\n final int c = z;\n final String d = export;\n // EXPORT ALL DATA TO TEMP TABLE\n thread1[z] = new Thread(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"Working on \" + Thread.currentThread());\n try {\n // EXPORT CONNECTION \n //System.out.println(t3.get(c));\n Class.forName(t2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(t3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(c), t5.get(c));\n //System.out.println(t1.get(c));\n // GETTING DATA FROM TABLE 1\n String exportQuery = \"SELECT * FROM \" + t1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n int columnCount = rsmd.getColumnCount();\n for (int i = 1; i <= columnCount; i++) {\n columnNames.add(rsmd.getColumnName(i));\n }\n //System.out.println(sb.toString());\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + t1.get(0) + \" (\" + d + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getFloat(k + 1);\n //System.out.println(\"temp \" + temp);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n //System.out.println(sb.toString());\n String query2 = sb.toString();\n //System.out.println(query2);\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n\n }\n \n } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n } finally {\n //System.out.println();\n }\n\n }\n });\n thread1[z].start();\n }\n\n // CREATE TEMP TABLE FOR SECOND TABLE\n for (int i = 0; i < ttCount; i++) {\n final int c = i;\n thread2[i] = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n //System.out.println(\"Working on \" + Thread.currentThread());\n // THIS PART WILL INSERT TABLE 2 DATA TO A NODE\n //if (tt3.get(c).compareToIgnoreCase(localconnUrl) != 0) {\n //System.out.println(tt3.get(c));\n //System.out.println(localconnUrl);\n Class.forName(tt2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(tt3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(c), tt5.get(c));\n String exportQuery = \"SELECT * FROM \" + tt1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n String name = null;\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb1 = new StringBuilder();\n for (int i = 1; i <= columnCount; i++) {\n //System.out.println(rsmd.getColumnName(i));\n columnNames.add(rsmd.getColumnName(i));\n sb1.append(rsmd.getColumnName(i) + \", \");\n }\n sb1.setLength(sb1.length() - 2);\n name = sb1.toString();\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + tt1.get(0) + \" (\" + name + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getDouble(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n String query2 = sb.toString();\n //System.out.println(query2);\n\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n }\n //}\n\n } catch (Exception e) {\n System.err.println(e);\n } finally {\n //System.out.println(\"Done with \" + Thread.currentThread());\n }\n }\n });\n thread2[i].start();\n }\n\n //System.out.println(mainQuery);\n for (int z = 0; z < tCount; z++) {\n thread1[z].join();\n }\n\n for (int z = 0; z < ttCount; z++) {\n thread2[z].join();\n }\n\n // JOIN SQL PERFORMS HERE\n //System.out.println(mainQuery);\n statement = iconn\n .prepareStatement(mainQuery);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n Object temp;\n String output;\n columnCount = rsmd.getColumnCount();\n double temp1;\n while (rs.next()) {\n StringBuilder sbb = new StringBuilder();\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER || rsmd.getColumnType(k + 1) == Types.BIGINT) {\n temp = rs.getInt(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.FLOAT || rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp1 = rs.getDouble(k + 1);\n sbb.append(temp1 + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sbb.append(temp + \" | \");\n } else {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n }\n }\n sbb.setLength(sbb.length() - 1);\n output = sbb.toString();\n System.out.println(output);\n }\n\n conn.close();\n iconn.close();\n } catch (IOException | ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n }\n }", "public void makeSQLSinonimos(String insertStament, boolean[] isString, String patho, String nameFile, int columnaActive, HashSet<String> listaDrogasID, HashSet<String> listaDrogasIDTermino){ \n\t\tFile[] listOfFiles = new File(patho).listFiles();\n\t\tint i=0;\n\t\twhile ( i<listOfFiles.length && !listOfFiles[i].toString().contains(nameFile) )\n\t\t\ti++;\n\n\t\t// Si encontre el archivo creo la tabla, genero un scrip de insertar, lo ejecuto desde la consola y lo borro e inserto los datos\n\t\tif (i<listOfFiles.length){\n\n\n\t\t\tif (managerDB.createExecutorFile(\"C:\\\\\", \"prueba\")){\n\t\t\t\tParserSNOMED.fileToSqlScriptSinonimos(patho,listOfFiles[i].getName().toString(),insertStament, columnaActive, listaDrogasID, listaDrogasIDTermino);\n\t\t\t\tSystem.out.println(patho + listOfFiles[i].getName().toString());\n\t\t\t\ttry{\n\t\t\t\t\tThread.sleep(1000); \n\n\t\t\t\t\tRuntime.getRuntime().exec(\"cmd /c start C:\\\\prueba.bat\");\n\t\t\t\t\tmanagerDB.waitUntisFinishConsole(\"C://\",\"done.prov\" );\n\n\t\t\t\t\t// Borro todos los archivos luego de que termine el script\n\t\t\t\t\tFile file = new File(\"C:\\\\done.prov\"); \tfile.delete();\n\t\t\t\t\t//\t\t\tfile = new File(\"C:\\\\auxFile.sql\"); \tfile.delete();\n\t\t\t\t\tfile = new File(\"C:\\\\prueba.bat\");\t\tfile.delete();\n\t\t\t\t}\n\t\t\t\tcatch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();}\t\t\t\t}\n\t\t}\n\t}", "public void clearStatement() {\n // Only clear the statement if it is an expression query, otherwise the statement may still be needed.\n if (isExpressionQueryMechanism()) {\n setSQLStatement(null);\n setSQLStatements(null);\n }\n }", "public void execute (String query) throws java.sql.SQLException {\n try {\n /*\n if (query.indexOf('(') != -1)\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query.substring(0,query.indexOf('(')) + \"...\\\")\");\n else\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query.substring(0,20) + \"...\\\")\");\n */\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query + \"\\\")\");\n \n Statement statement = dbConnection.createStatement();\n statement.setQueryTimeout(30);\n dbConnection.setAutoCommit(false);\n statement.executeUpdate(query);\n dbConnection.commit();\n dbConnection.setAutoCommit(true);\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n throw e;\n }\n }", "private void traceSqlRequest(String sql) {\n\t\tDatabaseInfo databaseInfo = oneAgentSdk.createDatabaseInfo(\"myCoolDatabase\", \"UnsupportedDatabaseVendor\", ChannelType.TCP_IP, \"theDbHost.localdomain:3434\");\n\t\tDatabaseRequestTracer databaseRequestTracer = oneAgentSdk.traceSqlDatabaseRequest(databaseInfo, sql);\n\t\tdatabaseRequestTracer.start();\n\t\ttry {\n\t\t\texecuteRequest(sql);\n\t\t} catch(Exception e) {\n\t\t\tdatabaseRequestTracer.error(e);\n\t\t\t// handle or re-throw exception!\n\t\t} finally {\n\t\t\tdatabaseRequestTracer.end();\n\t\t}\n\t}", "private void executeQuery() {\n }", "private static void deploy(SQLiteDatabase sqlLiteDb, InputStreamReader dbReader) throws IOException {\n String sqlLine = null;\n StringBuffer sqlBuffer = new StringBuffer();\n BufferedReader bufferedReader = new BufferedReader(dbReader);\n\n sqlLiteDb.beginTransaction();\n try {\n while ((sqlLine = bufferedReader.readLine()) != null) {\n String sql = sqlLine.trim();\n if (!isIgnoreSQL(sql)) {\n if (sql.endsWith(\";\")) {\n sqlBuffer.append(sql);\n String execSQL = sqlBuffer.toString();\n Log.d(TAG, \"running sql=>\" + execSQL);\n sqlLiteDb.execSQL(execSQL);\n sqlBuffer.delete(0, sqlBuffer.length());\n } else {\n if (sqlBuffer.length() > 0) {\n sqlBuffer.append(' ');\n }\n sqlBuffer.append(sql);\n }\n }\n }\n sqlLiteDb.setTransactionSuccessful();\n } finally {\n sqlLiteDb.endTransaction();\n }\n }", "@Override\n\tprotected String findAllStatement() {\n\t\treturn null;\n\t}", "public void runScript(File script) throws DataAccessLayerException {\n byte[] bytes = null;\n try {\n bytes = FileUtil.file2bytes(script);\n } catch (FileNotFoundException e) {\n throw new DataAccessLayerException(\n \"Unable to open input stream to sql script: \" + script);\n } catch (IOException e) {\n throw new DataAccessLayerException(\n \"Unable to read script contents for script: \" + script);\n }\n runScript(new StringBuffer().append(new String(bytes)));\n }", "public void ExecuteCypherQueryNoReturn(String cypherQuery) {\r\n\t\tExecutionEngine engine = new ExecutionEngine( _db );\r\n\t\tExecutionResult result = null;\r\n\t\tTransaction tx = _db.beginTx();\r\n\t\ttry {\r\n\t\t engine.execute(cypherQuery);\r\n\t\t tx.success();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.out.print(\"issues with fetching node and its relations\");\r\n\t\t\ttx.failure();\r\n\t\t\t//return \"failed\";\r\n\t\t} finally {\r\n\t\t\ttx.close();\r\n\t\t}\r\n\t}", "public abstract ResultList executeSQL(RawQuery rawQuery);", "protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = wfms_Position_AuditPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}", "protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = localRichPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}", "public void run(File sqlLiteFile, List<String> colNames) {\n String status = \"\\nConverting Data Format ...\";\n processController.appendStatus(status + \"<br>\");\n\n Connection connection = new Connection(sqlLiteFile);\n String mappingFilepath = getMapping(connection, colNames);\n getTriples(mappingFilepath);\n }", "public void executeSql(String sql, boolean doCommit, int fetchSize, int fetchDirn) throws SQLException {\n\n connectionCheck();\n blankStringCheck(sql, \"DB : Cannot execute null or empty SQL.\");\n\n LOGGER.info(\"DB : Executing the SQL : {}\", sql);\n\n Statement stmt = connection.createStatement();\n stmt.setFetchDirection(fetchDirn);\n stmt.setFetchSize(fetchSize);\n stmt.executeUpdate(sql);\n stmt.close();\n\n if (doCommit) {\n LOGGER.info(\"DB : Committing the changes.\");\n connection.commit();\n }\n }", "@Override\n public int[] executeBatch() throws SQLException {\n throw new SQLException(\"tinySQL does not support executeBatch.\");\n }", "private boolean loadAndExecuteFromFile(Connection conn, String file) {\n String sql;\n BufferedReader in;\n try {\n in = new BufferedReader(new FileReader(file));\n for (;;) {\n sql = in.readLine();\n if (sql == null)\n break;\n try {\n PreparedStatement loadStmt = conn.prepareStatement(sql);\n loadStmt.execute();\n loadStmt.close();\n } catch (java.sql.SQLException e) {\n logger.log(\"Error executing \" + sql);\n logger.log(e);\n return (false);\n }\n logger.log(\"Successfully executed: \" + sql);\n }\n in.close();\n }catch (Exception e) {\n logger.log(\"Error Loading from \" + file);\n logger.log(e.toString());\n return (false);\n }\n return (true);\n }", "boolean getMissingStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "public ArrayList bteqBridge(List sqlList, String fileName) throws MDSException {\r\n\r\n\t\tsqlNum = sqlList.size();\r\n\r\n\t\t// PropertiesLoader bootProps;\r\n\t\t// try {\r\n\t\t// bootProps = PropertiesLoader.getLoader(\"tap.properties\");\r\n\t\t// String limit = bootProps.getProperty(\"SQL_NUM_LIMIT\");\r\n\t\t// if ( limit != null && limit.length() >0 )\r\n\t\t// sql_num_limit = Integer.parseInt(limit);\r\n\t\t// else\r\n\t\t// sql_num_limit = 100000;\r\n\t\t// } catch (Exception e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t\tsql_num_limit = 100000; // modified by MarkDong\r\n\r\n\t\tint pos = fileName.indexOf(\".log\");\r\n\t\tif (pos > 0)\r\n\t\t\tfileName = fileName.substring(0, pos);\r\n\t\tString scriptID = getScriptID(fileName);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < sqlList.size(); i++) {\r\n\t\t\t\tArrayList sourceTables = new ArrayList();\r\n\t\t\t\tsqlIndex = i;\r\n\t\t\t\tString sql = (String) sqlList.get(i);\r\n\t\t\t\tSQL parser = new SQL(getStream(sql));\r\n\t\t\t\tStatementTree statement;\r\n\t\t\t\tstatement = parser.Statement();\r\n\t\t\t\tif (statement.getClassName().equals(\"com.teradata.sqlparser.interpret.Select\")) {\r\n\t\t\t\t\tparseSelect(statement);\r\n\t\t\t\t}\r\n\t\t\t\tif (statement.getClassName().equals(\"com.teradata.sqlparser.interpret.Delete\")) {\r\n\t\t\t\t\tparseDelete(statement);\r\n\t\t\t\t}\r\n\t\t\t\tif (statement.getClassName().equals(\"com.teradata.sqlparser.interpret.Insert\")) {\r\n\t\t\t\t\tsourceTables = parseInsert(statement);\r\n\t\t\t\t\tif (sourceTables == null) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor (int t = 0; t < sourceTables.size(); t++) {\r\n\t\t\t\t\t\tHashMap resultTable = (HashMap) sourceTables.get(t);\r\n\t\t\t\t\t\tString targetTable = (String) resultTable.get(\"targetTable\");\r\n\t\t\t\t\t\tString sourceTable = (String) resultTable.get(\"sourceTable\");\r\n\t\t\t\t\t\t// System.out.println(targetTable + \" \" + sourceTable + \" \" + expression);\r\n\r\n\t\t\t\t\t\tString[] target = targetTable.split(\"\\\\.\");\r\n\t\t\t\t\t\tString[] source = sourceTable.split(\"\\\\.\");\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// target table info\r\n\t\t\t\t\t\t\tMDSDbVO targetUnit = getUnitObject(target[0], target[1]);\r\n\t\t\t\t\t\t\tString targetGlobalID = targetUnit.getMETA_GLOBAL_ID();\r\n\t\t\t\t\t\t\t// source table info\r\n\t\t\t\t\t\t\tMDSDbVO sourceUnit = getUnitObject(source[0], source[1]);\r\n\t\t\t\t\t\t\tString globalID = sourceUnit.getMETA_GLOBAL_ID();\r\n\r\n\t\t\t\t\t\t\t// relation type and comment\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * String commentID = (String) resultTable.get(\"expression\"); String relationComm =\r\n\t\t\t\t\t\t\t * commentID; if ( sqlNum > sql_num_limit ) relationComm = getComment(commentID);\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tString relationID = \"13\";\r\n\r\n\t\t\t\t\t\t\taddRelation(globalID\r\n\t\t\t\t\t\t\t\t\t , targetGlobalID\r\n\t\t\t\t\t\t\t\t\t , \"\"\r\n\t\t\t\t\t\t\t\t\t , relationID\r\n\t\t\t\t\t\t\t\t\t , \"1\"\r\n\t\t\t\t\t\t\t\t\t , scriptID,fileName);\r\n\r\n\t\t\t\t\t\t} catch (MDSException e) {\r\n\t\t\t\t\t\t\t// logger.error(e.getMessage());\r\n\t\t\t\t\t\t\tthrow new MDSException(e);\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t// logger.error(e.getMessage());\r\n\t\t\t\t\t\t\tthrow new MDSException(\"table : \" + sourceTable + \" or table: \" + targetTable\r\n\t\t\t\t\t\t\t\t\t+ \" without database reference!\", e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (statement.getClassName().equals(\"com.teradata.sqlparser.interpret.ViewManager\")) {\r\n\t\t\t\t\tsourceTables = parseCreateView(statement, fileName);\r\n\t\t\t\t\tif (sourceTables == null) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor (int t = 0; t < sourceTables.size(); t++) {\r\n\t\t\t\t\t\tHashMap resultTable = (HashMap) sourceTables.get(t);\r\n\t\t\t\t\t\tString targetTable = (String) resultTable.get(\"targetTable\");\r\n\t\t\t\t\t\tString sourceTable = (String) resultTable.get(\"sourceTable\");\r\n\t\t\t\t\t\tString[] target = targetTable.split(\"\\\\.\");\r\n\t\t\t\t\t\tString[] source = sourceTable.split(\"\\\\.\");\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// target table info\r\n\t\t\t\t\t\t\tMDSDbVO targetUnit = getUnitObject(target[0], target[1]);\r\n\t\t\t\t\t\t\tString targetGlobalID = targetUnit.getMETA_GLOBAL_ID();\r\n\t\t\t\t\t\t\t// source table info\r\n\t\t\t\t\t\t\tMDSDbVO sourceUnit = getUnitObject(source[0], source[1]);\r\n\t\t\t\t\t\t\tString globalID = sourceUnit.getMETA_GLOBAL_ID();\r\n\r\n\t\t\t\t\t\t\tString relationID = \"13\";\r\n\t\t\t\t\t\t\t//String relSrcID = getObjID(fileName, target[1]);\r\n\t\t\t\t\t\t\tString relSrcID = getObjID(target[0], target[1]);\t//edit by markdong\r\n\t\t\t\t\t\t\taddRelation(globalID, targetGlobalID, \"\", relationID, \"1\", relSrcID, targetTable);\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t// logger.error(e.getMessage());\r\n\t\t\t\t\t\t\tthrow new MDSException(\"table : \" + source[0] + \" OR table : \" + target[0]\r\n\t\t\t\t\t\t\t\t\t+ \" without database reference!\", e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (statement.getClassName().equals(\"com.teradata.sqlparser.interpret.CreateTable\")) {\r\n\t\t\t\t\t// get all volitale tables\r\n\t\t\t\t\tHashMap tableInfo = parseCreateTable(statement);\r\n\t\t\t\t\tif (tableInfo == null) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tBoolean ifVolitale = (Boolean) tableInfo.get(\"volatile\");\r\n\t\t\t\t\tif (ifVolitale.booleanValue())\r\n\t\t\t\t\t\tvolatileTableList.add(tableInfo);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcommonTableList.add(tableInfo);\r\n\t\t\t\t}\r\n\t\t\t\tif (statement.getClassName().equals(\"com.teradata.sqlparser.interpret.UpdateTable\")) {\r\n\t\t\t\t\tparseUpdate(statement);\r\n\t\t\t\t}\r\n\t\t\t\tif (statement.getClassName().equals(\"com.teradata.sqlparser.interpret.AlterTable\"))\r\n\t\t\t\t\tparseAlterTable(statement);\r\n\t\t\t\tif (sourceTables != null)\r\n\t\t\t\t\tsourceTables.clear();\r\n\t\t\t\tparser = null;\r\n\t\t\t\tstatement = null;\r\n\t\t\t}\r\n\t\t} catch (Throwable e) {\r\n\t\t\tthrow new MDSException(fileName + \" parse error\", e);\r\n\t\t}\r\n\t\treturn this.insertArray;\r\n\t}", "public void runScript(StringBuffer sqlScript)\n throws DataAccessLayerException {\n runScript(sqlScript.toString());\n }", "Result execute(String sql) {\n\n Result result;\n String token;\n int cmd;\n\n JavaSystem.gc();\n\n result = null;\n cmd = Token.UNKNOWNTOKEN;\n\n try {\n tokenizer.reset(sql);\n\n while (true) {\n tokenizer.setPartMarker();\n session.setScripting(false);\n\n token = tokenizer.getSimpleToken();\n\n if (token.length() == 0) {\n session.endSchemaDefinition();\n\n break;\n }\n\n cmd = Token.get(token);\n\n if (cmd == Token.SEMICOLON) {\n session.endSchemaDefinition();\n\n continue;\n }\n\n result = executePart(cmd, token);\n\n if (result.isError()) {\n session.endSchemaDefinition();\n\n break;\n }\n\n if (session.getScripting()) {\n database.logger.writeToLog(session,\n tokenizer.getLastPart());\n }\n }\n } catch (Throwable t) {\n try {\n if (session.isSchemaDefintion()) {\n HsqlName schemaName = session.getSchemaHsqlName(null);\n\n database.schemaManager.dropSchema(schemaName.name, true);\n database.logger.writeToLog(session,\n Token.T_DROP + ' '\n + Token.T_SCHEMA + ' '\n + schemaName.statementName\n + ' ' + Token.T_CASCADE);\n database.logger.synchLog();\n session.endSchemaDefinition();\n }\n } catch (HsqlException e) {}\n\n result = new Result(t, tokenizer.getLastPart());\n }\n\n return result == null ? Session.emptyUpdateCount\n : result;\n }", "public static void main(String [] filenames) throws Exception {\n for(String filename : filenames) {\n Files.lines(Paths.get(filename)).forEach(LanguageModel::parseDocument);\n }\n\n // Read user queries\n Scanner input = new Scanner(System.in);\n while(true) {\n System.out.print(\"Enter a query (exit to quit): \");\n String query = input.nextLine();\n\n if(\"exit\".equals(query)) {\n break;\n } else {\n executeQuery(query);\n }\n }\n }", "public static void statements(CommonTree ast, IRTree irt)\n {\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == BEGIN) {\n int n = ast.getChildCount();\n if (n == 0) {\n irt.setOp(\"NOOP\");\n }\n else {\n CommonTree ast1 = (CommonTree)ast.getChild(0);\n statements1(ast, 0, n-1, irt);\n }\n }\n else {\n error(tt);\n }\n }", "protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = itemPublicacaoPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}", "private void getMap(String sqlFile) throws IOException {\r\n\r\n\t\tLOG.info(\"getMap\");\r\n\r\n\t\tString fileContent = loadFile(sqlFile);\r\n\t\tString[] querys = getStringArray(fileContent, END_QUERY_PATTERN);\r\n\t\tfillMap(querys);\r\n\r\n\t\tLOG.info(\"END getMap\");\r\n\t\t\r\n\t}", "private void parseSql() throws IOException {\n for (int i = 0;i < 100;i++) {\n feltJusteringTegn[i] = TEXTFORMAT;\n feltLengde[i] = 0;\n }\n\n sqlStatement = \"\";\n\n mld(\"J\", \"\\n SQL statement som kjøres:\");\n\n mld(\"J\", \"_________________________________________________\");\n\n BufferedReader sqlfil = Text.open(sqlfilNavn);\n \n try {\n String linje = sqlfil.readLine();\n\n String tekst = \"\";\n int startPos = 0, sluttPos = 0;\n\n if (linje.length() > 16) tekst = linje.substring(0, 16);\n\n// sett feltformat ut fra definisjoner fra inputfil\n if (tekst.equals(\"-- fieldlengths=\")) {\n startPos = 16;\n index = 0;\n tegn = linje.charAt(startPos);\n sqlStmLength = linje.length() + 1;\n\n while (startPos < sqlStmLength && (linje.charAt(startPos) != ' ')){\n sluttPos = startPos + 3;\n\n// mld(\"J\",\"lengde feltnr. \" + index + \": \" + linje.substring(startPos, sluttPos));\n\n feltJusteringTegn[index] = linje.charAt(startPos);\n \n char c = feltJusteringTegn[index]; \n \n if (feltJusteringTegn[index] == VENSTREJUSTERT || feltJusteringTegn[index] == TEXTFORMAT) {\n \t feltJusteringTegn[index] = TEXTFORMAT;\n \t } else {\n \t\t if (feltJusteringTegn[index] == HOYREJUSTERT || feltJusteringTegn[index] == NUMERICFORMAT) {\n \t\t\t feltJusteringTegn[index] = NUMERICFORMAT;\n \t\t } else {\n \t\t\t feltJusteringTegn[index] = GENERELLFORMAT;\n \t\t\t }\n \t\t }\n\n feltLengde[index] = Integer.parseInt(linje.substring(startPos + 1, sluttPos));\n\n// mld(\"J\",\"lengde feltnr. \" + index + \": \" + feltJusteringTegn[index] + \"/\" + feltLengde[index]);\n\n startPos = startPos + 4;\n\n index ++;\n } // end while\n\n// maksAntFeltLengder = index - 1;\n\n linje = sqlfil.readLine();\n } // end if\n\n// les inn SQL linje for linje og bygg opp felttabell\n while (linje != null) {\n mld(\"J\", linje);\n \n startPos = linje.indexOf(\"--\");\n \n if (startPos > 0) {\n linje = linje.substring(0, startPos); \t \n }\n\n if (!(startPos==0)) {\n sqlStatement = sqlStatement + linje.trim() + \" \" ;\n }\n\n linje = sqlfil.readLine();\n }\n\n mld(\"J\", \"_________________________________________________\");\n\n// Text.prompt(\"Trykk enter for å fortsette!\");\n// inn.readLine();\n\n if (mldInd.equals(\"J\")) System.out.println(\"Startpos for select er : \" + startPos );\n\n startPos = 6;\n sluttPos = 0;\n \n sqlStmLength = sqlStatement.length() + 1;\n\n int fromPos = sqlStatement.indexOf(\" from \");\n \n int fromPos2 = sqlStatement.indexOf(\" FROM \");\n \n if (fromPos < 0) fromPos = sqlStmLength;\n if (fromPos2 < 0) fromPos2 = sqlStmLength;\n if (fromPos2 < fromPos) fromPos = fromPos2;\n\n while ((startPos < fromPos) & antFelt < 99){\n \t boolean isAsFelt = false;\n \t // finn først kommaposisjonen som skiller mot neste felt\n \t \n tegn = sqlStatement.charAt(startPos);\n int pos = startPos;\n int antParenteser = 0;\n\t\t\twhile ((!(tegn == ',') || antParenteser > 0) && pos < fromPos) {\n \tif (tegn == '(') {\n \t\tantParenteser++;\n \t isAsFelt = true;\n\t\t\t}\n \telse\n \t\tif (tegn == ')') {antParenteser--;}\n\t\t\t\tpos++;\n\t\t\t\ttegn = sqlStatement.charAt(pos);\n }\n\t\t\t\n\t\t\tint kommaPos = Math.min(pos, fromPos); \n \n int asPos = sqlStatement.substring(startPos, fromPos).indexOf(\" as \");\n if (asPos < 0) asPos = fromPos; else asPos = asPos + startPos;\n \n \n int asPos2 = sqlStatement.substring(startPos, fromPos).indexOf(\" AS \");\n if (asPos2 < 0) asPos2 = fromPos; else asPos2 = asPos2 + startPos;\n \n if (asPos2 < asPos) asPos = asPos2;\n \n if (isAsFelt) {\n \t kommaPos = sqlStatement.substring(asPos, fromPos).indexOf(\",\");\n \t if (kommaPos < 0) kommaPos = fromPos; else kommaPos = kommaPos + asPos;\n }\n\n if ((asPos < kommaPos)) \n \t startPos = asPos + 3;\n\n \n while (tegn == ' ' & startPos < sqlStmLength){\n startPos ++;\n\n if (mldInd.equals(\"J\")) System.out.println(tegn);\n\n tegn = sqlStatement.charAt(startPos);\n }\n\n if (kommaPos < fromPos) \n \t sluttPos = kommaPos;\n else \n \t sluttPos = fromPos;\n\n String feltNavn = sqlStatement.substring((startPos), sluttPos).trim();\n\n feltTab [antFelt] = feltNavn;\n\n antFelt ++;\n\n startPos = sluttPos + 1;\n } // end while\n\n\n } // try\n catch (NullPointerException e) {\n mld(mldInd, \" NullPointerException!\");\n } finally {\n sqlfil.close();\n }\n\t\n}", "void execute() throws TMQLLexerException;", "void removeAll(Iterator<? extends Statement> statements)\r\n\t\t\tthrows ModelRuntimeException;", "public void execSQL(String sql) {\n\t\ttry ( Connection con = getConnection() ){\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tstmt.execute(sql);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(\"SQL error (SQLException)\", e);\n\t\t}\n\t}", "public void createNoFlushQuery(String s) throws HibException;", "public String getQuery(String queryName, String sqlFile) throws IOException {\r\n\r\n\t\tLOG.info(\"getQuery\");\r\n\r\n\t\tgetQuerys(sqlFile);\r\n\r\n\t\tString query = querysMap.get(queryName);\r\n\r\n\t\tLOG.debug(querysMap.containsKey(queryName));\r\n\r\n\t\tLOG.info(\"\\nQuery [\" + query + \"]\");\r\n\r\n\t\treturn query;\r\n\t\t\r\n\t}", "public boolean startImport(List<String> sqlList ) {\n DBConnectionManager dbconn = WriterDBClientUtil.getDbConnectionManager();\n\n SQLoption sqlOption = new SQLoption(dbconn, getConnName());\n boolean isSuccess=sqlOption.batchExecute(sqlList);\n\n if (isSuccess) {\n log.info(\"Success Import DB \");\n return true;\n } else{\n log.error(\"Import DB Error\");\n setException(sqlOption.getException());\n return false;\n }\n\n }", "public synchronized void writeFromFileIntoDB()throws IOWrapperException, IOIteratorException{\r\n \r\n fromFile_Name=Controller.CLASSES_TMP_FILENAME;\r\n iow_ReadFromFile = new IOWrapper();\r\n \r\n //System.out.println(\"Readin' from \"+fromFile_Name);\r\n \r\n iow_ReadFromFile.setupInput(fromFile_Name,0);\r\n \r\n iter_ReadFromFile = iow_ReadFromFile.getLineIterator();\r\n iow_ReadFromFile.setupOutput(this.dbname,this.username,this.password,this.hostname,this.port);\r\n \r\n iow_ReadFromFile.sendOutputQuery(\"DROP TABLE IF EXISTS \"+outtable);\r\n \r\n iow_ReadFromFile.sendOutputQuery(\r\n \"CREATE TABLE IF NOT EXISTS \"\r\n +outtable+\" (\"\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[0]+\" int(10) NOT NULL AUTO_INCREMENT, \"//wort_nr\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[1]+\" varchar(225), \"//wort_alph\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[2]+\" int(10), \"//krankheit \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[3]+\" int(10), \"//farbe1 \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[4]+\" real(8,2), \"//farbe1prozent\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[5]+\" int(10), \"//farbe2\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[6]+\" real(8,2), \"//farbe2prozent\r\n +\"PRIMARY KEY (\"+Controller.COLUMN_NAMES_FOR_DB_OUT[0]+\")) \"\r\n +\"ENGINE=MyISAM\"\r\n );\r\n while(iter_ReadFromFile.hasNext()){\r\n singleProgress+=1;\r\n String[] data = (String[])iter_ReadFromFile.next();\r\n \r\n //System.out.println(\"--> processing line \"+data);\r\n //escape quotes ' etc for SQL query\r\n if(data[1].matches(\".*'.*\")||data[1].matches(\".*\\\\.*\")){\r\n int sl = data[1].length();\r\n String escapedString = \"\";\r\n \r\n for (int i = 0; i < sl; i++) {\r\n char ch = data[1].charAt(i);\r\n switch (ch) {\r\n case '\\'':\r\n escapedString +='\\\\';\r\n escapedString +='\\'';\r\n break;\r\n case '\\\\':\r\n escapedString +='\\\\';\r\n escapedString +='\\\\';\r\n break;\r\n default :\r\n escapedString +=ch;\r\n break;\r\n }\r\n }\r\n data[1]=escapedString;\r\n }\r\n \r\n String insertStatement=\"INSERT INTO \"\r\n +outtable+\" (\"\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[0]+\", \"//node id\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[1]+\", \"//label\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[2]+\", \"//class id \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[3]+\", \"//class id 1 \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[4]+\", \"//percent\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[5]+\", \"//class id 2\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[6]+\") \"//percent \r\n +\"VALUES ('\"\r\n +data[0]+\"', '\"\r\n +data[1]+\"', '\"\r\n +data[2]+\"', '\"\r\n +data[3]+\"', '\"\r\n +data[4]+\"', '\"\r\n +data[5]+\"', '\"\r\n +data[6]+\"')\";\r\n \r\n //System.out.println(\"Sending insert statement:\"+insertStatement);\r\n iow_ReadFromFile.sendOutputQuery(insertStatement);\r\n }\r\n \r\n \r\n //iow_ReadFromFile.closeOutput();\r\n \r\n this.stillWorks=false;\r\n writeIntoDB=false;\r\n System.out.println(\"*\\tData written into database.\");\r\n\t}", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n Recover recover0 = new Recover();\n recover0.openFile(\"databene\", (String) null, true);\n ErrorHandler errorHandler0 = ErrorHandler.getDefault();\n DBExecutionResult dBExecutionResult0 = DBUtil.runScript(\"databene\", (String) null, '<', (Connection) null, false, errorHandler0);\n assertNotNull(dBExecutionResult0);\n }", "public static void main(String args[]){\n String sql = \"select * from TBLS limit 2\";\n String sqlComplex = \"select testpartition.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from testpartition join format_ on (testpartition.filename=format_.s) \" +\n \"join title on (testpartition.filename=title.s) \" +\n \"join identifier on (testpartition.filename=identifier.s) \" +\n \"join id on (testpartition.filename=id.s) \" +\n \"join date_ on (testpartition.filename=date_.s) \" +\n \"where testpartition.gid0=1 and testpartition.sid=2 and testpartition.fid<100000 and testpartition.pfid=0\";\n String sqlOriginal = \"select idTable.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from idTable join format_ on (idTable.filename=format_.s) \" +\n \"join title on (idTable.filename=title.s) \" +\n \"join identifier on (idTable.filename=identifier.s) \" +\n \"join id on (idTable.filename=id.s) \" +\n \"join date_ on (idTable.filename=date_.s) \" +\n \"where idTable.gid0=1 and idTable.sid=2 and idTable.fid<100000\";\n\n QueryRewrite my = new QueryRewrite(sqlOriginal);\n String sqlRewrite = my.rewrite();\n System.out.println(sqlRewrite);\n\n\n }", "private void addStatements(List<Statement> statements) throws LpException {\n outputRdf.execute((connection) -> {\n connection.add(statements);\n });\n statements.clear();\n }", "public void dbActions(String SQL){\n\t\ttry {\n\t\t\tstmt.executeUpdate(SQL);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private List<String> generateDropStatementsForNonDomainIndexes() throws SQLException {\n List<String> dropStatements = new ArrayList<String>();\n\n List<String> objectNames = jdbcTemplate.queryForStringList(\n \"SELECT INDEX_NAME FROM ALL_INDEXES WHERE OWNER = ? AND INDEX_TYPE NOT LIKE '%DOMAIN%'\", name);\n\n for (String objectName : objectNames) {\n dropStatements.add(generateDefaultDropStatement(\"INDEX\", objectName, \"\"));\n }\n return dropStatements;\n }", "public void loadClasspathCypherScriptFile(String cqlFileName) {\n StringBuilder cypher = new StringBuilder();\n try (Scanner scanner = new Scanner(Thread.currentThread().getContextClassLoader().getResourceAsStream(cqlFileName))) {\n scanner.useDelimiter(System.getProperty(\"line.separator\"));\n while (scanner.hasNext()) {\n cypher.append(scanner.next()).append(' ');\n }\n }\n\n new ExecutionEngine(this.database).execute(cypher.toString());\n }", "public void executeSql(String sql, boolean doCommit) throws SQLException {\n executeSql(sql, doCommit, AppConstants.DEFAULT_FETCH_SIZE, AppConstants.DEFAULT_FETCH_DIRN);\n }", "public final void executeSQL(Connection conn,DbConnVO vo,String fileName) throws Throwable {\r\n PreparedStatement pstmt = null;\r\n StringBuffer sql = new StringBuffer(\"\");\r\n InputStream in = null;\r\n\r\n try {\r\n try {\r\n in = this.getClass().getResourceAsStream(\"/\" + fileName);\r\n }\r\n catch (Exception ex5) {\r\n }\r\n if (in==null)\r\n in = new FileInputStream(org.openswing.swing.util.server.FileHelper.getRootResource() + fileName);\r\n\r\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n String line = null;\r\n ArrayList vals = new ArrayList();\r\n int pos = -1;\r\n String oldfk = null;\r\n String oldIndex = null;\r\n StringBuffer newIndex = null;\r\n StringBuffer newfk = null;\r\n ArrayList fks = new ArrayList();\r\n ArrayList indexes = new ArrayList();\r\n boolean fkFound = false;\r\n boolean indexFound = false;\r\n String defaultValue = null;\r\n int index = -1;\r\n StringBuffer unicode = new StringBuffer();\r\n boolean useDefaultValue = false;\r\n// vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\") ||\r\n// vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\") ||\r\n//\t\t\t\t\tvo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\") ||\r\n// vo.getDriverName().equals(\"com.mysql.jdbc.Driver\");\r\n while ( (line = br.readLine()) != null) {\r\n sql.append(' ').append(line);\r\n if (line.endsWith(\";\")) {\r\n if (vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\")) {\r\n sql = replace(sql, \" VARCHAR(\", \" VARCHAR2(\");\r\n sql = replace(sql, \" NUMERIC(\", \" NUMBER(\");\r\n sql = replace(sql, \" DECIMAL(\", \" NUMBER(\");\r\n sql = replace(sql, \" TIMESTAMP\", \" DATE \");\r\n sql = replace(sql, \" DATETIME\", \" DATE \");\r\n }\r\n else if (vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\")) {\r\n sql = replace(sql, \" TIMESTAMP\", \" DATETIME \");\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n else if (vo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\")) {\r\n sql = replace(sql, \" TIMESTAMP\", \" DATETIME \");\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n else if (vo.getDriverName().toLowerCase().contains(\"postgres\")) {\r\n sql = replace(sql, \" DATETIME\", \" TIMESTAMP \");\r\n sql = replace(sql, \" DATE \", \" TIMESTAMP \");\r\n }\r\n else {\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n\r\n\r\n sql = replace(sql,\"ON DELETE NO ACTION\",\"\");\r\n sql = replace(sql,\"ON UPDATE NO ACTION\",\"\");\r\n\r\n if (sql.indexOf(\":COMPANY_CODE\") != -1) {\r\n sql = replace(sql, \":COMPANY_CODE\", \"'\" + vo.getCompanyCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":COMPANY_DESCRIPTION\") != -1) {\r\n sql = replace(sql, \":COMPANY_DESCRIPTION\",\r\n \"'\" + vo.getCompanyDescription() + \"'\");\r\n }\r\n if (sql.indexOf(\":LANGUAGE_CODE\") != -1) {\r\n sql = replace(sql, \":LANGUAGE_CODE\",\r\n \"'\" + vo.getLanguageCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":LANGUAGE_DESCRIPTION\") != -1) {\r\n sql = replace(sql, \":LANGUAGE_DESCRIPTION\",\r\n \"'\" + vo.getLanguageDescription() + \"'\");\r\n }\r\n if (sql.indexOf(\":CLIENT_LANGUAGE_CODE\") != -1) {\r\n sql = replace(sql, \":CLIENT_LANGUAGE_CODE\",\r\n \"'\" + vo.getClientLanguageCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":PASSWORD\") != -1) {\r\n sql = replace(sql, \":PASSWORD\", \"'\" + vo.getAdminPassword() + \"'\");\r\n }\r\n if (sql.indexOf(\":DATE\") != -1) {\r\n sql = replace(sql, \":DATE\", \"?\");\r\n vals.add(new java.sql.Date(System.currentTimeMillis()));\r\n }\r\n\r\n if (sql.indexOf(\":CURRENCY_CODE\") != -1) {\r\n sql = replace(sql, \":CURRENCY_CODE\", \"'\" + vo.getCurrencyCodeREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":CURRENCY_SYMBOL\") != -1) {\r\n sql = replace(sql, \":CURRENCY_SYMBOL\", \"'\" + vo.getCurrencySymbolREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":DECIMALS\") != -1) {\r\n sql = replace(sql, \":DECIMALS\", vo.getDecimalsREG03().toString());\r\n }\r\n if (sql.indexOf(\":DECIMAL_SYMBOL\") != -1) {\r\n sql = replace(sql, \":DECIMAL_SYMBOL\", \"'\" + vo.getDecimalSymbolREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":THOUSAND_SYMBOL\") != -1) {\r\n sql = replace(sql, \":THOUSAND_SYMBOL\", \"'\" + vo.getThousandSymbolREG03() + \"'\");\r\n }\r\n\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_1\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_1\", \"'\" + vo.getUseVariantType1() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_2\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_2\", \"'\" + vo.getUseVariantType2() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_3\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_3\", \"'\" + vo.getUseVariantType3() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_4\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_4\", \"'\" + vo.getUseVariantType4() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_5\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_5\", \"'\" + vo.getUseVariantType5() + \"'\");\r\n }\r\n\r\n if (sql.indexOf(\":VARIANT_1\") != -1) {\r\n sql = replace(sql, \":VARIANT_1\", \"'\" + (vo.getVariant1()==null || vo.getVariant1().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant1()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_2\") != -1) {\r\n sql = replace(sql, \":VARIANT_2\", \"'\" + (vo.getVariant2()==null || vo.getVariant2().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant2()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_3\") != -1) {\r\n sql = replace(sql, \":VARIANT_3\", \"'\" + (vo.getVariant3()==null || vo.getVariant3().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant3()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_4\") != -1) {\r\n sql = replace(sql, \":VARIANT_4\", \"'\" + (vo.getVariant4()==null || vo.getVariant4().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant4()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_5\") != -1) {\r\n sql = replace(sql, \":VARIANT_5\", \"'\" + (vo.getVariant5()==null || vo.getVariant5().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant5()) + \"'\");\r\n }\r\n\r\n if (!useDefaultValue)\r\n while((pos=sql.indexOf(\"DEFAULT \"))!=-1) {\r\n defaultValue = sql.substring(pos, sql.indexOf(\",\", pos));\r\n sql = replace(\r\n sql,\r\n defaultValue,\r\n \"\"\r\n );\r\n }\r\n\r\n fkFound = false;\r\n while((pos=sql.indexOf(\"FOREIGN KEY\"))!=-1) {\r\n oldfk = sql.substring(pos,sql.indexOf(\")\",sql.indexOf(\")\",pos)+1)+1);\r\n sql = replace(\r\n sql,\r\n oldfk,\r\n \"\"\r\n );\r\n newfk = new StringBuffer(\"ALTER TABLE \");\r\n newfk.append(sql.substring(sql.indexOf(\" TABLE \")+7,sql.indexOf(\"(\")).trim());\r\n newfk.append(\" ADD \");\r\n newfk.append(oldfk);\r\n fks.add(newfk);\r\n fkFound = true;\r\n }\r\n\r\n if (fkFound)\r\n sql = removeCommasAtEnd(sql);\r\n\r\n indexFound = false;\r\n while((pos=sql.indexOf(\"INDEX \"))!=-1) {\r\n oldIndex = sql.substring(pos,sql.indexOf(\")\",pos)+1);\r\n sql = replace(\r\n sql,\r\n oldIndex,\r\n \"\"\r\n );\r\n newIndex = new StringBuffer(\"CREATE \");\r\n newIndex.append(oldIndex.substring(0,oldIndex.indexOf(\"(\")));\r\n newIndex.append(\" ON \");\r\n newIndex.append(sql.substring(sql.indexOf(\" TABLE \")+7,sql.indexOf(\"(\")).trim());\r\n newIndex.append( oldIndex.substring(oldIndex.indexOf(\"(\")) );\r\n indexes.add(newIndex);\r\n indexFound = true;\r\n }\r\n\r\n if (indexFound)\r\n sql = removeCommasAtEnd(sql);\r\n\r\n // check for unicode chars...\r\n while((index=sql.indexOf(\"\\\\u\"))!=-1) {\r\n for(int i=index+2;i<Math.min(sql.length(),index+2+6);i++)\r\n if (Character.isDigit(sql.charAt(i)) ||\r\n sql.charAt(i)=='A' ||\r\n sql.charAt(i)=='B' ||\r\n sql.charAt(i)=='C' ||\r\n sql.charAt(i)=='D' ||\r\n sql.charAt(i)=='E' ||\r\n sql.charAt(i)=='F')\r\n if (unicode.length() < 4)\r\n unicode.append(sql.charAt(i));\r\n else\r\n break;\r\n if (unicode.length()>0) {\r\n sql.delete(index, index+1+unicode.length());\r\n sql.setCharAt(index, new Character((char)Integer.valueOf(unicode.toString(),16).intValue()).charValue());\r\n unicode.delete(0, unicode.length());\r\n }\r\n }\r\n\r\n\r\n if (sql.toString().toUpperCase().contains(\"DROP TABLE\")) {\r\n // remove fks before dropping table!\r\n String table = sql.toString().toUpperCase().replace('\\n',' ').replace('\\r',' ').trim();\r\n table = table.substring(10).trim();\r\n if (table.endsWith(\";\"))\r\n table = table.substring(0,table.length()-1);\r\n ResultSet rset = conn.getMetaData().getExportedKeys(null,vo.getUsername().toUpperCase(),table);\r\n String fkName = null;\r\n String tName = null;\r\n Statement stmt2 = conn.createStatement();\r\n boolean fksFound = false;\r\n while(rset.next()) {\r\n fksFound = true;\r\n tName = rset.getString(7);\r\n fkName = rset.getString(12);\r\n\r\n if (vo.getDriverName().equals(\"com.mysql.jdbc.Driver\"))\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP FOREIGN KEY \"+fkName);\r\n else\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP CONSTRAINT \"+fkName);\r\n }\r\n try {\r\n rset.close();\r\n }\r\n catch (Exception ex6) {}\r\n\r\n if (!fksFound &&\r\n !vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\") &&\r\n !vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\") &&\r\n !vo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\") &&\r\n !vo.getDriverName().equals(\"com.mysql.jdbc.Driver\")\r\n && !vo.getDriverName().equals(\"org.sqlite.JDBC\")) {\r\n // case postgres...\r\n rset = conn.getMetaData().getExportedKeys(null,null,null);\r\n while(rset.next()) {\r\n if (rset.getString(3).toUpperCase().equals(table)) {\r\n tName = rset.getString(7);\r\n fkName = rset.getString(12);\r\n\r\n if (vo.getDriverName().equals(\"com.mysql.jdbc.Driver\"))\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP FOREIGN KEY \"+fkName);\r\n else\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP CONSTRAINT \"+fkName);\r\n }\r\n }\r\n try {\r\n rset.close();\r\n }\r\n catch (Exception ex6) {}\r\n }\r\n\r\n try {\r\n stmt2.close();\r\n }\r\n catch (Exception ex6) {}\r\n\r\n } // end if\r\n\r\n if (sql.toString().trim().length()>0) {\r\n String query = sql.toString().substring(0,sql.length() - 1);\r\n System.out.println(\"Execute query: \" + query);\r\n pstmt = conn.prepareStatement(query);\r\n for (int i = 0; i < vals.size(); i++) {\r\n pstmt.setObject(i + 1, vals.get(i));\r\n }\r\n\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex4) {\r\n try {\r\n if (sql.toString().toUpperCase().contains(\"DROP TABLE\")) {\r\n//\t\t\t\t\t\t\t\t\tLogger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"Invalid SQL: \" + sql, ex4);\r\n }\r\n else\r\n throw ex4;\r\n }\r\n catch (Exception exx4) {\r\n throw ex4;\r\n }\r\n }\r\n pstmt.close();\r\n }\r\n\r\n sql.delete(0, sql.length());\r\n vals.clear();\r\n }\r\n }\r\n br.close();\r\n\r\n for(int i=0;i<fks.size();i++) {\r\n sql = (StringBuffer)fks.get(i);\r\n pstmt = conn.prepareStatement(sql.toString());\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex4) {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex4);\r\n }\r\n pstmt.close();\r\n }\r\n\r\n for(int i=0;i<indexes.size();i++) {\r\n sql = (StringBuffer)indexes.get(i);\r\n pstmt = conn.prepareStatement(sql.toString());\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex3) {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex3);\r\n }\r\n pstmt.close();\r\n }\r\n\r\n conn.commit();\r\n\r\n }\r\n catch (Throwable ex) {\r\n try {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex);\r\n }\r\n catch (Exception ex2) {\r\n }\r\n throw ex;\r\n }\r\n finally {\r\n try {\r\n if (pstmt!=null)\r\n pstmt.close();\r\n }\r\n catch (SQLException ex1) {\r\n }\r\n }\r\n }", "default void execute(@Language(\"MySQL\") @Nonnull String statement) {\n this.execute(statement, stmt -> {});\n }", "private void recreateDatabaseSchema() {\n\t\t// Fetch database schema\n\t\tlogger.info(\"Reading database schema from file\");\n\t\tString[] schemaSql = loadFile(\"blab_schema.sql\", new String[] { \"--\", \"/*\" }, \";\");\n\n\t\tConnection connect = null;\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\t// Get the Database Connection\n\t\t\tlogger.info(\"Getting Database connection\");\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconnect = DriverManager.getConnection(Constants.create().getJdbcConnectionString());\n\n\t\t\tstmt = connect.createStatement();\n\n\t\t\tfor (String sql : schemaSql) {\n\t\t\t\tsql = sql.trim(); // Remove any remaining whitespace\n\t\t\t\tif (!sql.isEmpty()) {\n\t\t\t\t\tlogger.info(\"Executing: \" + sql);\n\t\t\t\t\tSystem.out.println(\"Executing: \" + sql);\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassNotFoundException | SQLException ex) {\n\t\t\tlogger.error(ex);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\tstmt.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tlogger.error(ex);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (connect != null) {\n\t\t\t\t\tconnect.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tlogger.error(ex);\n\t\t\t}\n\t\t}\n\t}", "public void deleteOutfiles(String filename) {\n Runtime runTime = Runtime.getRuntime();\n\n String[] commands = new String[]{MYSQL, mysqlDb, userFlag + mysqlUser, pwdFlag + mysqlPwd,\n executeFlag, sourceCommand + filename};\n\n try {\n Process proc = runTime.exec(commands);\n\n StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), \"ERROR\");\n\n StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), \"OUTPUT\");\n\n errorGobbler.start();\n outputGobbler.start();\n\n try {\n if (proc.waitFor() == 1) {\n logger.error(\"Return code indicates error in deleting the load data outfiles \"\n + \"process\");\n }\n } catch (InterruptedException exception) {\n logger.error(\"Interrupted Exception while running the delete load data outfiles \"\n + \"process\", exception);\n }\n\n } catch (IOException exception) {\n logger.error(\"Attempt to spawn a DBMerge mysql process failed for file: \"\n + filename, exception);\n }\n }", "public static String SQLFromFile(String file) throws IOException{\n BufferedReader reader = new BufferedReader(new FileReader(file));\n StringBuilder sb = new StringBuilder();\n String line;\n while((line = reader.readLine()) != null){\n sb.append(line);\n sb.append(' ');\n }\n reader.close();\n return sb.toString();\n }", "protected final void executeQuery() {\n\ttry {\n\t executeQuery(queryBox.getText());\n\t} catch(SQLException e) {\n\t e.printStackTrace();\n\t clearTable();\n\t JOptionPane.showMessageDialog(\n\t\tnull, e.getMessage(),\n\t\t\"Database Error\",\n\t\tJOptionPane.ERROR_MESSAGE);\n\t}\n }", "private void executeImmediate(String stmtText) throws SQLException\n {\n // execute the statement and auto-close it as well\n try (final Statement statement = this.createStatement();)\n {\n statement.execute(stmtText);\n }\n }", "public void execSql(String sql) {\n\t\tjdbcTemplate.execute(sql);\n\t}", "public void makeSQL(String dropStament, String insertStament, String createStament, boolean[] isString, String patho, String nameFile, String filtroRow, int columnaActive){\n\t\tmanagerDB.executeScript_Void(dropStament);\n\n\t\t/* Listo los archivos que hay en la carpeta para hallar el que se llama descripcion*/ \n\t\tFile[] listOfFiles = new File(patho).listFiles();\n\t\tint i=0;\n\t\twhile ( i<listOfFiles.length && !listOfFiles[i].toString().contains(nameFile) )\n\t\t\ti++;\n\n\t\t// Si encontre el archivo creo la tabla, genero un scrip de insertar, lo ejecuto desde la consola y lo borro e inserto los datos\n\t\tif (i<listOfFiles.length){\n\n\t\t\tmanagerDB.executeScript_Void(createStament);\t\t\t\t\n\n\t\t\tif (managerDB.createExecutorFile(\"C:\\\\\", \"prueba\")){\n\t\t\t\tParserSNOMED.fileToSqlScript(patho,listOfFiles[i].getName().toString(),insertStament, filtroRow,columnaActive);\n\t\t\t\tSystem.out.println(patho + listOfFiles[i].getName().toString());\n\t\t\t\ttry{\n\t\t\t\t\tThread.sleep(1000); \n\n\t\t\t\t\tRuntime.getRuntime().exec(\"cmd /c start C:\\\\prueba.bat\");\n\t\t\t\t\tmanagerDB.waitUntisFinishConsole(\"C://\",\"done.prov\" );\n\n\t\t\t\t\t// Borro todos los archivos luego de que termine el script\n\t\t\t\t\tFile file = new File(\"C:\\\\done.prov\"); \tfile.delete();\n\t\t\t\t\t//\t\t\tfile = new File(\"C:\\\\auxFile.sql\"); \tfile.delete();\n\t\t\t\t\tfile = new File(\"C:\\\\prueba.bat\");\t\tfile.delete();\n\t\t\t\t}\n\t\t\t\tcatch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();}\t\t\t\t}\n\t\t}\n\t}", "public static void checkSingleLineStatements(File file){\n Scanner scanner = getScanner(file);\n String currentLine = scanner.nextLine();\n int lineCounter = 1;\n\n if(currentLine.startsWith(\"/*\")) {\n while (!currentLine.trim().startsWith(\"*/\")) {\n currentLine = scanner.nextLine();\n lineCounter++;\n }\n }\n\n while (scanner.hasNext()) {\n currentLine = scanner.nextLine();\n lineCounter++;\n if(currentLine.contains(\";\")) {\n int i = currentLine.indexOf(\";\");\n if (currentLine.substring(i + 1).contains(\";\") && !currentLine.trim().startsWith(\"for\")) {\n singleLineStatementErrors.add(lineCounter);\n }\n }\n }\n scanner.close();\n }", "public void executeQuery_Other(String query) {\n\n \n Connection con = DBconnect.connectdb();\n Statement st;\n\n try {\n st = con.createStatement();\n st.executeUpdate(query);\n\n \n } catch (Exception e) {\n //JOptionPane.showMessageDialog(null, e);\n\n }\n\n }", "public static void delatetable() \n { \n \n \ttry \n { \n Statement stmt=null; \n ResultSet res=null; \n Class.forName(\"com.mysql.jdbc.Driver\"); \n Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n stmt = (Statement)conn.createStatement(); \n// res= stmt.executeQuery(\"SELECT * from entity \"); \n String query1 = \"delete from entity\";\n String query2 = \"delete from deepmodel\";\n String query3 = \"delete from level\";\n String query4 = \"delete from package\";\n String query5 = \"delete from attribute\";\n String query6 = \"delete from binaryconnection\";\n String query7 = \"delete from inheritanceparticipation\";\n String query8 = \"delete from inheritancerelationship\";\n String query9 = \"delete from method\";\n String query10 = \"delete from generalconnection\";\n String query11 = \"delete from participation\";\n PreparedStatement preparedStmt1 = conn.prepareStatement(query1);\n PreparedStatement preparedStmt2 = conn.prepareStatement(query2);\n PreparedStatement preparedStmt3 = conn.prepareStatement(query3);\n PreparedStatement preparedStmt4 = conn.prepareStatement(query4);\n PreparedStatement preparedStmt5 = conn.prepareStatement(query5);\n PreparedStatement preparedStmt6 = conn.prepareStatement(query6);\n PreparedStatement preparedStmt7 = conn.prepareStatement(query7);\n PreparedStatement preparedStmt8 = conn.prepareStatement(query8);\n PreparedStatement preparedStmt9 = conn.prepareStatement(query9);\n PreparedStatement preparedStmt10 = conn.prepareStatement(query10);\n PreparedStatement preparedStmt11 = conn.prepareStatement(query11);\n preparedStmt1.execute();\n preparedStmt2.execute();\n preparedStmt3.execute();\n preparedStmt4.execute();\n preparedStmt5.execute();\n preparedStmt6.execute();\n preparedStmt7.execute();\n preparedStmt8.execute();\n preparedStmt9.execute();\n preparedStmt10.execute();\n preparedStmt11.execute();\n \n } \n \n catch(Exception ex) \n { \n ex.printStackTrace(); \n } \n}", "protected void runSQL(String sql) throws SystemException {\n try {\n DataSource dataSource = banking_organizationPersistence.getDataSource();\n\n SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n sql, new int[0]);\n\n sqlUpdate.update();\n } catch (Exception e) {\n throw new SystemException(e);\n }\n }", "@Override\n protected void doClean() throws SQLException {\n for (String dropStatement : generateDropStatements(name, \"V\", \"VIEW\")) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // aliases\n for (String dropStatement : generateDropStatements(name, \"A\", \"ALIAS\")) {\n jdbcTemplate.execute(dropStatement);\n }\n\n for (Table table : allTables()) {\n table.drop();\n }\n\n // slett testtabeller\n for (String dropStatement : generateDropStatementsForTestTable(name, \"T\", \"TABLE\")) {\n jdbcTemplate.execute(dropStatement);\n }\n\n\n // tablespace\n for (String dropStatement : generateDropStatementsForTablespace(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // sequences\n for (String dropStatement : generateDropStatementsForSequences(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // procedures\n for (String dropStatement : generateDropStatementsForProcedures(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // functions\n for (String dropStatement : generateDropStatementsForFunctions(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // usertypes\n for (String dropStatement : generateDropStatementsForUserTypes(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n }", "public SqlFileParser(File sqlScript) {\n try {\n this.reader = new BufferedReader(new FileReader(sqlScript));\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"file not found \" + sqlScript);\n }\n }", "public void execute() {\n /*\n r6 = this;\n java.lang.String r0 = \"Failed to close connection after DBUnit operation: \"\n java.util.logging.Logger r1 = log\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"Executing DBUnit operations: \"\n r2.append(r3)\n int r3 = r6.size()\n r2.append(r3)\n java.lang.String r2 = r2.toString()\n r1.info(r2)\n org.dbunit.database.IDatabaseConnection r1 = r6.getConnection() // Catch:{ all -> 0x005a }\n r6.disableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n java.util.Iterator r2 = r6.iterator() // Catch:{ all -> 0x0058 }\n L_0x0027:\n boolean r3 = r2.hasNext() // Catch:{ all -> 0x0058 }\n if (r3 == 0) goto L_0x0037\n java.lang.Object r3 = r2.next() // Catch:{ all -> 0x0058 }\n org.seamless.util.dbunit.DBUnitOperations$Op r3 = (org.seamless.util.dbunit.DBUnitOperations.Op) r3 // Catch:{ all -> 0x0058 }\n r3.execute(r1) // Catch:{ all -> 0x0058 }\n goto L_0x0027\n L_0x0037:\n r6.enableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n if (r1 == 0) goto L_0x0057\n r1.close() // Catch:{ Exception -> 0x0040 }\n goto L_0x0057\n L_0x0040:\n r1 = move-exception\n java.util.logging.Logger r2 = log\n java.util.logging.Level r3 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n r4.append(r0)\n r4.append(r1)\n java.lang.String r0 = r4.toString()\n r2.log(r3, r0, r1)\n L_0x0057:\n return\n L_0x0058:\n r2 = move-exception\n goto L_0x005c\n L_0x005a:\n r2 = move-exception\n r1 = 0\n L_0x005c:\n if (r1 == 0) goto L_0x0079\n r1.close() // Catch:{ Exception -> 0x0062 }\n goto L_0x0079\n L_0x0062:\n r1 = move-exception\n java.util.logging.Logger r3 = log\n java.util.logging.Level r4 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n r5.append(r0)\n r5.append(r1)\n java.lang.String r0 = r5.toString()\n r3.log(r4, r0, r1)\n L_0x0079:\n goto L_0x007b\n L_0x007a:\n throw r2\n L_0x007b:\n goto L_0x007a\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.seamless.util.dbunit.DBUnitOperations.execute():void\");\n }", "public void ExecutaSqlLi(String sql) {\n try {\n stm = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n rs = stm.executeQuery(sql);\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Falha ao executar query:\\n\" + ex);\n }\n }", "public SqlFileList(String filename) throws IOException {\n\n BufferedReader br = new BufferedReader(new FileReader(filename));\n String s, trimmed;\n StringTokenizer st;\n int ctr = 0;\n\n while ((s = br.readLine()) != null) {\n ctr++;\n\n trimmed = s.replaceFirst(\"#.*\", \"\").trim(); // Remove comments.\n\n if (trimmed.length() < 1) {\n continue; // Skip blank and comment lines\n }\n\n st = new StringTokenizer(trimmed);\n\n if (st.countTokens() < 2) {\n throw new IOException(\"Bad line no. \" + ctr\n + \" in list file '\" + filename\n + \"'\");\n }\n\n add(new TestSqlFile(st.nextToken(), st.nextToken(\"\")));\n }\n\n br.close();\n }", "public void logSQL(BindedCompiledSQL bsql, long nanoTime) ;", "@Test\n public void testSqlLoadScriptFileAbsentTest() {\n Assertions.fail();\n }", "private static String processall(String sql2) {\n\t\tString sql = sql2.replace(\"and txnChannel='ALL'\", \"\").replace(\"and txntype='ALL'\", \"\")\r\n\t\t\t\t.replace(\"and txncode='ALL'\", \"\");\r\n\t\treturn sql;\r\n\t}", "public void run(Statement state) throws SQLException {\n\n System.out.println(\"INFO: -= Inserting data via dummy table ...\");\n state.execute(multipleRowInsertDummySQL);\n System.out.println(\"INFO: -= The data are inserted via dummy table:\");\n selectAllFromTable(state, tableName, 10);\n\n System.out.println(\"INFO: -= Inserting data using INSERT INTO statement ...\");\n state.execute(multipleRowInsertIntoSQL);\n System.out.println(\"INFO: -= The data are inserted via INSERT INTO statement:\");\n selectAllFromTable(state, tableName, 20);\n }", "@Override\n\tpublic void CreateDatabaseFromFile() {\n\t\tfinal String FILENAME = \"fandv.sql\";\n\t\tint[] updates = null;\n\t\ttry {\n\t\t\tMyDatabase db = new MyDatabase();\n\t\t\tupdates = db.updateAll(FILENAME);\n\t\t} catch (FileNotFoundException | SQLException | ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Database issue\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < updates.length; i++) {\n\t\t\tsum += updates[i];\n\t\t}\n\t\tSystem.out.println(\"Number of updates: \" + sum);\n\t}" ]
[ "0.6145067", "0.6030607", "0.5491361", "0.54880905", "0.54705566", "0.5445725", "0.5334524", "0.5319735", "0.5293466", "0.52781415", "0.5260744", "0.521047", "0.5176721", "0.5147811", "0.50925255", "0.50883055", "0.5071561", "0.5052833", "0.50499606", "0.50424755", "0.50296825", "0.502776", "0.5003768", "0.49708816", "0.49563885", "0.49315596", "0.49178267", "0.4887982", "0.48861846", "0.48850292", "0.48798907", "0.4870608", "0.48599234", "0.48593032", "0.48580757", "0.4844125", "0.4841899", "0.4838594", "0.4834147", "0.48084635", "0.48073402", "0.48071778", "0.480645", "0.47923648", "0.47858286", "0.4783497", "0.47791976", "0.47785416", "0.4769543", "0.474052", "0.47207367", "0.47205415", "0.47205415", "0.47205415", "0.47205415", "0.47192332", "0.4716348", "0.4711656", "0.47060654", "0.47057608", "0.47000957", "0.46896636", "0.46885827", "0.46857566", "0.46787238", "0.46758863", "0.46739593", "0.4663109", "0.46599305", "0.4659907", "0.46554813", "0.46438184", "0.46362698", "0.46343812", "0.46283984", "0.4627392", "0.46255714", "0.46249825", "0.46202317", "0.46191633", "0.46113306", "0.4608189", "0.46046978", "0.46018043", "0.46004662", "0.4599203", "0.45923206", "0.45892596", "0.45679295", "0.45678174", "0.45625356", "0.45613652", "0.45575386", "0.45517546", "0.45414445", "0.4531746", "0.45297447", "0.452702", "0.45178747", "0.45140797" ]
0.6598421
0
Removing an ongoing execution shall result in an error. Stop it first.
void removeExecution(ExecutionContext context, int exeId) throws ExecutorException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void killExecution() {\n \n \t\tcancelOrKillExecution(false);\n \t}", "public void cancelExecution() {\n \n \t\tcancelOrKillExecution(true);\n \t}", "@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}", "public void stopProcessing() {\n interrupted = true;\n }", "@Override\n public void stopExecute() {\n\n }", "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "public void stopListener(){\r\n\t\tcontinueExecuting = false;\r\n\t\tglobalConsoleListener.interrupt();\r\n\t}", "void recordExecutionError() {\n hadExecutionError = true;\n }", "public void halt() {\n\t\t// Task can not currently be halted.\n\t}", "public void unExecute()\n\t{\n\t}", "public void tryTerminate() {\n if (wip.decrementAndGet() != 0) {\n return;\n }\n if (queue.isEmpty()) {\n completableSubscriber.onCompleted();\n } else {\n completableSubscriber.onError(CompletableOnSubscribeMerge.collectErrors(queue));\n }\n }", "public void terminate() {\n Queue<Throwable> q;\n if (this.wip.decrementAndGet() == 0) {\n Queue<Throwable> q2 = this.errors;\n if (q2 == null || q2.isEmpty()) {\n this.actual.onCompleted();\n return;\n }\n Throwable e = CompletableOnSubscribeMerge.collectErrors(q2);\n if (ONCE.compareAndSet(this, 0, 1)) {\n this.actual.onError(e);\n } else {\n RxJavaPlugins.getInstance().getErrorHandler().handleError(e);\n }\n } else if (!this.delayErrors && (q = this.errors) != null && !q.isEmpty()) {\n Throwable e2 = CompletableOnSubscribeMerge.collectErrors(q);\n if (ONCE.compareAndSet(this, 0, 1)) {\n this.actual.onError(e2);\n } else {\n RxJavaPlugins.getInstance().getErrorHandler().handleError(e2);\n }\n }\n }", "public void cancel() {\n\t\tassertRunningInJobMasterMainThread();\n\t\twhile (true) {\n\n\t\t\tExecutionState current = this.state;\n\n\t\t\tif (current == CANCELING || current == CANCELED) {\n\t\t\t\t// already taken care of, no need to cancel again\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// these two are the common cases where we need to send a cancel call\n\t\t\telse if (current == RUNNING || current == DEPLOYING) {\n\t\t\t\t// try to transition to canceling, if successful, send the cancel call\n\t\t\t\tif (startCancelling(NUM_CANCEL_CALL_TRIES)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\n\t\t\telse if (current == FINISHED) {\n\t\t\t\t// finished before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\t// a pipelined partition whose consumer has never been deployed could still be buffered on the TM\n\t\t\t\t// release it here since pipelined partitions for FINISHED executions aren't handled elsewhere\n\t\t\t\t// covers the following cases:\n\t\t\t\t// \t\ta) restarts of this vertex\n\t\t\t\t// \t\tb) a global failure (which may result in a FAILED job state)\n\t\t\t\tsendReleaseIntermediateResultPartitionsRpcCall();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == FAILED) {\n\t\t\t\t// failed before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == CREATED || current == SCHEDULED) {\n\t\t\t\t// from here, we can directly switch to cancelled, because no task has been deployed\n\t\t\t\tif (cancelAtomically()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new IllegalStateException(current.name());\n\t\t\t}\n\t\t}\n\t}", "public void stop() {\r\n running = false;\r\n }", "public void stop() {\n if (!sequencer.tryAcquire())\n throw new IllegalStateException(\"Can't acquire lock\");\n int errcount = 0;\n final StringBuilder b = new StringBuilder();\n\n try {\n switchState(STOPPED,\"stop\");\n\n errcount += cancelSessionTasks(b);\n errcount += stopDirectoryScanners(b);\n } finally {\n sequencer.release();\n }\n\n sendQueuedNotifications();\n if (errcount > 0) {\n b.insert(0,\"stop partially failed with \"+errcount+\" error(s):\");\n throw new RuntimeException(b.toString());\n }\n }", "public void stop() {}", "public void terminate(){\n running = false;\n }", "public void stop() {\n executor.shutdown();\n }", "public void stop() throws CoreHunterException;", "public void stop(){\n running = false;\n }", "public boolean interrupt() throws Exception{\n if (processorTask.isError()) return true; // if error was detected on prev phase - skip execution\n\n if ( asyncFilters == null || asyncFilters.size() == 0 ) {\n execute();\n return false;\n } else {\n asyncHandler.addToInterruptedQueue(asyncProcessorTask); \n return invokeFilters();\n }\n }", "public void stop() {\n running = false;\n }", "public void halt ( )\n\t{\n\t\tthis.running = false;\n\t}", "public void terminate() {\r\n running = false;\r\n }", "public void stop() {\n\t\texec.stop();\n\t}", "@Override\n\tpublic boolean Unexecute() \n\t{\n\t\treturn false;\n\t}", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\texecutable.feedbackExecutionError();\r\n\t\t\t\t\t}", "public void stop() {\n _running = false;\n }", "public void stoptimertask() {\n if (timer != null) {\r\n timer.cancel();\r\n timer = null;\r\n }}", "public void stop()\n {\n running = false;\n }", "@Override\n public void abort(RuntimeStep exe) {\n }", "public final void stop() {\n running = false;\n \n \n\n }", "void stopOnCompletion(Thread waiting);", "void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stop(){\n return;\n }", "public void stop() {\n executor.shutdownNow();\n rescanThread.interrupt();\n }", "private void terminateAnimation() {\n doRun = false;\n }", "public void afterExecute(Runnable runnable, Throwable th) {\n Task task = (Task) runnable;\n task.setFinished(true);\n task.setError(th);\n getQueue().recycleBlockedQueue();\n super.afterExecute(runnable, th);\n }", "protected void postStop() throws FailedToStopException { }", "void nodeFailedToStop(Exception e);", "public void terminate() {\n\t\trunning = false;\n\t}", "public void stop() throws OperationUnsupportedException;", "@Override\n public void scanAborted() {\n this.mplLiveData.stopAll();\n this.mplLiveData.emptyPool(); // CKA April 25, 2014\n }", "synchronized void flushQueueOnError(TwitterException error) {\n awaitingSession.set(false);\n\n while (!queue.isEmpty()) {\n final Callback request = queue.poll();\n request.failure(error);\n }\n }", "public void cancel() {\r\n\t\tbStop = true;\r\n\t}", "abstract public void stop();", "public void onTaskFailure(Task<?> tsk, Exception ex)\n {\n m_RunningTasks.remove(tsk);\n }", "public void stop()\n\t{\n\t\trunning = false;\n\t}", "public void cancelCurrentComputation(){\n\t\tft.cancel(true);\n\t}", "public void halt(ServiceResult result);", "void canceledPendingNodeStop();", "public synchronized void abort() {\r\n\t\tif (done) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdone = true;\r\n\r\n\t\tabortScheduledTasks();\r\n\t}", "public synchronized void stop() {\n this.running = false;\n }", "public void stop() throws FailedToStopException {\n\t\tstateHandler.assertAlive();\n\t\t\n\t\ttry (Restore restore = ComponentBoundary.push(loggerName(), this)) {\t\t\n\t\t\tif (stateHandler.waitToWhen(new IsStoppable(), new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlogger().info(\"Stopping.\");\n\t\t\t\t\t\n\t\t\t\t\tstop = true;\n\t\t\t\t\t\n\t\t\t\t\tstateHandler.wake();\n\t\t\t\t\t\n\t\t\t\t\ticonHelper.changeIcon(IconHelper.STOPPING);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t})) {\n\t\t\t\t// Order is here for SimultaneousStructural to cancel jobs first.\n\t\t\t\t\n\t\t\t\tonStop();\n\n\t\t\t\tchildHelper.stopChildren(waitForChildrenOnStop());\n\t\t\t\t\n\t\t\t\tpostStop();\n\t\t\t\t\n\t\t\t\tnew StopWait(this).run();\n\t\t\t\t\n\t\t\t\tlogger().info(\"Stopped.\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tchildHelper.stopChildren();\n\t\t\t}\n\t\t} \n\t}", "private void cancel() {\n mFuture.cancel(mMayInterruptIfRunning);\n }", "@Override\n public void run() {\n //如果本延迟任务已经执行,那么做个标识标注本清楚任务已经执行,然后手按下的时候那里就不会移除本任务\n b = false;\n cleanLine();\n }", "@Override\n\tpublic void stopProcessing() {\n\n\t}", "public void stoptimertask() {\n\t\tif (timer != null) {\n\t\t\ttimer.cancel();\n\t\t\ttimer = null;\n\t\t}\n\t}", "@Override\n public void stop() {}", "public void abort() {\n isAborted = true;\n cancelCommands();\n cancel(true);\n }", "public abstract void stopped();", "private void stopRequest(){ Remove the clause synchronized of the stopRequest method.\n // Synchronization is isolated as possible to avoid thread lock.\n // Note: the method removeRequest from SendQ is synchronized.\n // fix bug jaw.00392.B\n //\n synchronized(this){\n setRequestStatus(stAborted);\n }\n informSession.getSnmpQManager().removeRequest(this);\n synchronized(this){\n requestId=0;\n }\n }", "public void halt();", "private void gestioneDisconnessione(Exception e) {\n\t\tLOG.info(\"Client disconnesso\");\n\t\tthis.completeWithError(e);\n\t\tthis.running=false;\n\t}", "private void stop()\n {\n if(running)\n {\n scheduledExecutorService.shutdownNow();\n running = false;\n }\n }", "public void stopIt() {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_stop_cpm__FINEST\",\n new Object[] { Thread.currentThread().getName(), String.valueOf(killed) });\n\n dumpState();\n\n stopped = true;\n killed = true;\n if (!isRunning) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_already_stopped__FINEST\",\n new Object[] { Thread.currentThread().getName() });\n // Already stopped\n return;\n }\n // try {\n // Change global status\n isRunning = false;\n // terminate this thread if the thread has been previously suspended\n synchronized (lockForPause) {\n if (pause) {\n pause = false;\n lockForPause.notifyAll();\n }\n }\n // Let processing threads finish their work by emptying all queues. Even during a hard\n // stop we should try to clean things up as best as we can. First empty process queue or work\n // queue, dump result of analysis into output queue and let the consumers process that.\n // When all queues are empty we are done.\n\n // The logic below (now commented out) has a race condition -\n // The workQueue / outputQueue can become (temporarily) empty, but then\n // can be filled with the eof token\n // But this code proceeds to stop all the CAS processors,\n // which results in a hang because the pool isn't empty and the process thread waits for\n // an available cas processor forever.\n\n // Fix is to not kill the cas processors. Just let them finish normally. The artifact producer\n // will stop sending new CASes and send through an eof token, which causes normal shutdown to\n // occur for all the threads.\n\n /*\n * if (workQueue != null) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_consuming_queue__FINEST\", new Object[]\n * { Thread.currentThread().getName(), workQueue.getName(),\n * String.valueOf(workQueue.getCurrentSize()) });\n * \n * } int cc = workQueue.getCurrentSize(); while (workQueue.getCurrentSize() > 0) {\n * sleep(MAX_WAIT_ON_QUEUE); if (System.getProperty(\"DEBUG\") != null) { if (cc <\n * workQueue.getCurrentSize()) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_wait_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName(), workQueue.getName(),\n * String.valueOf(workQueue.getCurrentSize()) });\n * \n * } cc = workQueue.getCurrentSize(); } } } } if (outputQueue != null) { while\n * (outputQueue.getCurrentSize() > 0) { sleep(MAX_WAIT_ON_QUEUE); if\n * (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_wait_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName(), outputQueue.getName(),\n * String.valueOf(outputQueue.getCurrentSize()) }); } } if\n * (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_done_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName() }); } }\n * \n * for (int i = 0; processingUnits != null && i < processingUnits.length && processingUnits[i]\n * != null; i++) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_stop_processors__FINEST\", new Object[]\n * { Thread.currentThread().getName(), String.valueOf(i) }); }\n * processingUnits[i].stopCasProcessors(false); }\n * \n * } catch (Exception e) { if (UIMAFramework.getLogger().isLoggable(Level.FINER)) {\n * e.printStackTrace(); } UIMAFramework.getLogger(this.getClass()).logrb(Level.FINER,\n * this.getClass().getName(), \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n * \"UIMA_CPM_exception__FINER\", new Object[] { Thread.currentThread().getName(), e.getMessage()\n * }); }\n */\n }", "private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}", "@Override\n\t\tpublic boolean shouldContinueExecuting() {\n\t\t\treturn false;\n\t\t}", "void cancelStaleSimulations();", "@Override\r\n public void executeCommand() {\r\n shell.stopRunning();\r\n }", "static void stop(){\n stop=true;\n firstPass=true;\n }", "public static void stop(String error, boolean successful) {\n if (successful) {\n StringBuilder string = new StringBuilder();\n try {\n for (int i = STARTING_ADDRESS; i < STARTING_ADDRESS + commandCounter * (\n 1 << 2 + 2 + 1); i += (1 << 2 + 2 + 1)) {\n string.append(\"#\").append(i).append(\" | \").append(App.memory.getMemory(i,\n 1 << 2 + 2 + 1)).append(\" | int value: \").append(\n Integer.parseInt(App.memory.getMemory(i, 1 << 2 + 2 + 1),\n 2)).append(\"\\n\");\n }\n } catch (NumberFormatException n) {\n return;\n }\n App.consoleOutput.setText(string.toString());\n return;\n }\n Alert alert = new Alert(Alert.AlertType.ERROR);\n if (error.isEmpty()) error = \"Unknown error!\";\n alert.setTitle(\"ERROR!\");\n alert.setContentText(error);\n alert.showAndWait();\n }", "public void stopRunning() {\n try {\n _running = false;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void cancel() {\r\n\t\tcanceled = true;\r\n\t\ttry {\r\n\t\t\tThread.sleep(51);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void stopWork() {\n stopWork = true;\n }", "@SuppressWarnings(\"EmptyMethod\")\n public void stop() {\n }", "final void interruptTask() {\n/* 82 */ Thread currentRunner = this.runner;\n/* 83 */ if (currentRunner != null) {\n/* 84 */ currentRunner.interrupt();\n/* */ }\n/* 86 */ this.doneInterrupting = true;\n/* */ }", "public final void stopRunning() {\n\t\t_running = false;\n\t}", "public void testIteratorRemove() {\n SynchronousQueue q = new SynchronousQueue();\n\tIterator it = q.iterator();\n try {\n it.remove();\n shouldThrow();\n }\n catch (IllegalStateException success) {}\n }", "public void stop() {\n stop = true;\n }", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public abstract void stop();" ]
[ "0.63294", "0.62500507", "0.6039168", "0.6033362", "0.5935254", "0.5908857", "0.58420485", "0.5834192", "0.5810043", "0.58095723", "0.579595", "0.5785255", "0.57797295", "0.57764125", "0.57760304", "0.57707363", "0.5769481", "0.5766305", "0.57556045", "0.5749131", "0.57446057", "0.5720355", "0.57091975", "0.5691207", "0.56911", "0.56897265", "0.56738925", "0.5670047", "0.5668334", "0.56627697", "0.5647613", "0.56290287", "0.56275743", "0.5617822", "0.56141466", "0.56141466", "0.56141466", "0.56141466", "0.560702", "0.55757296", "0.55654675", "0.5553077", "0.55501896", "0.5537974", "0.5535204", "0.5522246", "0.5519979", "0.5519562", "0.5509189", "0.550866", "0.5507507", "0.549992", "0.5496741", "0.54890645", "0.5484932", "0.5481821", "0.54810995", "0.5478323", "0.5475997", "0.54756445", "0.54737884", "0.5472803", "0.5461652", "0.54600596", "0.54577845", "0.5454848", "0.54525393", "0.54472953", "0.54387325", "0.5431084", "0.5428478", "0.5416847", "0.54139096", "0.54097617", "0.5408918", "0.54088527", "0.5382252", "0.5380075", "0.53730416", "0.5367581", "0.53636175", "0.5356975", "0.5352359", "0.5351042", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53503394", "0.53489584" ]
0.579042
11
Gets the version of this executor.
String getVersion();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<String> version() throws DynamicCallException, ExecutionException {\n return call(\"version\");\n }", "public String version() throws DynamicCallException, ExecutionException {\n return (String)call(\"version\").get();\n }", "public String version() throws CallError, InterruptedException {\n return (String)service.call(\"version\").get();\n }", "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n\t\treturn version;\n\t}", "public final String getVersion() {\n return version;\n }", "public static String getVersion() {\n\t\treturn version;\r\n\t}", "public String getCurrentVersion() {\n return this.currentVersion;\n }", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public long getVersion() {\n return version;\n }", "public long getVersion() {\n return version;\n }", "public static String getVersion() {\r\n\t\treturn VERSION;\r\n\t}", "public String getVersion()\n {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "public static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "public String getVersion () {\r\n return version;\r\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\r\n return version;\r\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion() {\n return version;\n }", "int getCurrentVersion();", "public java.lang.String getVersion() {\r\n return version;\r\n }", "public final int getVersion() {\n return version;\n }", "public String getVersion() {\n\t\treturn version;\n\t}", "public String getVersion() {\n\t\treturn (VERSION);\n\t}", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public String getVersion () {\n return this.version;\n }", "public String getVersion() {\r\n\t\treturn version;\r\n\t}", "@SuppressWarnings(\"unused\")\n private Long getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public byte getVersion() {\n return version;\n }", "public int getCurrentVersion() {\n return currentVersion_;\n }", "public Integer version() {\n return this.version;\n }", "public Version getVersion() {\n return version;\n }", "public static String getVersion() {\n\t\treturn \"0.9.4-SNAPSHOT\";\n\t}", "public int getCurrentVersion() {\n return currentVersion_;\n }", "public long getVersion() {\r\n return this.version;\r\n }", "public String getVersion() {\n return _version;\n }", "public Long getVersion() {\n return this.version;\n }", "public Long getVersion() {\n return this.version;\n }", "public Version getVersion();", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic String getVersion()\n\t{\n\t\ttry\n\t\t{\n\t\t\tMethod m = clazz.getMethod(METHOD_VERSION, new Class[0]);\n\t\t\tm.setAccessible(true);\n\t\t\tString out = (String) m.invoke(instance, new Object[0]);\n\t\t\treturn out;\n\t\t}\n\t\tcatch (Throwable t)\n\t\t{\n\t\t\tThrowables.propagate(t);\n\t\t}\n\n\t\t// stupid compiler\n\t\treturn null;\n\t}", "public Integer getVersion() {\r\n return version;\r\n }", "public String getVersion() {\n\t\treturn _version;\n\t}", "public String getVersion()\n {\n return ver;\n }", "public int getVersion() {\n return this.version;\n }", "public java.lang.String getVersion() {\n return version_;\n }", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public static Version<?> getVersion() {\n return BL_VERSION;\n }", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "public String getVersion() {\n return this.version;\n }", "Version getVersion();", "Version getVersion();", "Version getVersion();", "Version getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion(){\r\n return version;\r\n }", "public BigDecimal getVersion() {\r\n return version;\r\n }", "Long getVersion();", "public CimString getVersion() {\n return version;\n }", "public com.google.protobuf.ByteString getVersion() {\n return version_;\n }", "public Integer getVersion() {\n\t\t\n\t\treturn this.version;\n\t}", "public com.google.protobuf.ByteString getVersion() {\n return version_;\n }", "@CheckForNull\n String getVersion();", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "String version();", "java.lang.String getVersion();", "java.lang.String getVersion();" ]
[ "0.7100755", "0.704861", "0.70224184", "0.6908699", "0.6908699", "0.68469733", "0.6839893", "0.68279094", "0.6825932", "0.6793908", "0.6793908", "0.6793908", "0.6793908", "0.67856234", "0.67856234", "0.6776099", "0.6774241", "0.6774241", "0.6743576", "0.6743576", "0.67431146", "0.6742881", "0.6742881", "0.6742881", "0.6742881", "0.6742881", "0.6742881", "0.6742881", "0.6742881", "0.6742881", "0.6742881", "0.6742881", "0.6740508", "0.67332137", "0.672786", "0.67228425", "0.67018735", "0.6697643", "0.6689911", "0.66713595", "0.6671332", "0.6671332", "0.6671332", "0.6671332", "0.6671332", "0.6666841", "0.66632867", "0.6661537", "0.6661139", "0.6661139", "0.66574275", "0.6654307", "0.66424733", "0.6640003", "0.66157264", "0.661463", "0.66137326", "0.6612348", "0.6601684", "0.6601684", "0.6600418", "0.6594895", "0.6594895", "0.6594895", "0.6594895", "0.6594895", "0.6594895", "0.6590587", "0.6590587", "0.6590587", "0.6590587", "0.65884894", "0.65851647", "0.65714186", "0.6562326", "0.6528979", "0.652281", "0.6522109", "0.65197945", "0.64801794", "0.64798766", "0.6465201", "0.6465201", "0.6465201", "0.6465201", "0.6450954", "0.6450954", "0.6450954", "0.6450954", "0.6429901", "0.6403704", "0.63963926", "0.63941216", "0.6380409", "0.63529944", "0.6332798", "0.6320854", "0.63115776", "0.6310637", "0.6307199", "0.6307199" ]
0.0
-1
/ Compares the category value sent in the parameter compareString to the pipe delimited list of categories in the string parameter categoryList. This function returns 'true' if the compareString value sent in the parameter is in the categoryList
public boolean compareCategory(String categoryList, String compareString) { if (categoryList.contains("|" + compareString + "|")) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean containsCategory(String categoryName);", "private boolean isInCategory(Location location, List<String> choosenCategories) {\n for(String category : choosenCategories) {\n if(location.getSubCategory().equals(category) || location.getSubCategory() == category)\n return true;\n }\n return false;\n }", "public boolean findNewCategory(String value) {\n Boolean isCheckCategory = null;\n waitForClickableOfElement(categoryDropdownEle, \"CategoryDropdown\");\n waitForJSandJQueryToLoad();\n clickElement(categoryDropdownEle, \"CategoryDropdown\");\n for (WebElement tdElement : tableOfCategoryDropdown) {\n String strSearchValue = null;\n try {\n waitForVisibleElement(tdElement, \"Get category name in list\");\n strSearchValue = tdElement.getText();\n } catch (Exception ex) {\n }\n getLogger().info(\"SearchValue = \" + strSearchValue);\n if (strSearchValue.equals(value)) {\n isCheckCategory = true;\n //Click anywhere to exit vefify\n eleAuvenirIncTxt.click();\n break;\n } else {\n isCheckCategory = false;\n }\n }\n getLogger().info(\"isCheckCategory is: \" + isCheckCategory);\n return isCheckCategory;\n }", "public boolean validateCategory(String item_category) {\r\n\t\tCategory[] category = Category.values();\r\n\t\tfor (Category c : category) {\r\n\t\t\tString s = c.toString();\r\n\t\t\tif (s.equalsIgnoreCase(item_category)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean containsCategory(String categoryName) {\n for(Category category : categories)\n if(category.getName().equals(categoryName))\n return true;\n return false;\n }", "private boolean stringContainsList(String s, ArrayList<String> list){\n\t\tboolean flag = true;\n\t\tfor(String temp : list){\n\t\t\tif(!s.contains(temp)){\n\t\t\t\tflag = false;\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "public static boolean selectCategory(String category, String flowerKind) {\r\n\r\n\t\tboolean valid = false;\r\n\t\t//checks in the natural flower category if user mentioned for it\r\n\t\tif (category == \"Natural\") {\r\n\t\t\tArrayList<String> flowerTypes = new ArrayList<String>();\r\n\t\t\tflowerTypes.add(\"Flowers\");\r\n\t\t\tflowerTypes.add(\"Floral Boquets\");\r\n\t\t\tflowerTypes.add(\"Floral Decoration\");\r\n \r\n\t\t\t//returns true if the mention flower is available in the mentioned category else returns false\r\n\t\t\tfor (String flowerType : flowerTypes) {\r\n\t\t\t\tif (flowerKind.equals(flowerType)) {\r\n\t\t\t\t\tvalid = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\t\t\t\t\tvalid = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(category + \" \" + flowerKind + \" Available\");\r\n\t\t\treturn valid;\r\n\t\t}\r\n\r\n\t\t//checks in the artificial flower category if user mentioned for it\r\n\t\telse if (category == \"Artificial\") {\r\n\t\t\tArrayList<String> flowerTypes = new ArrayList<String>();\r\n\t\t\tflowerTypes.add(\"Flowers\");\r\n\t\t\tflowerTypes.add(\"Floral Boquets\");\r\n\t\t\tflowerTypes.add(\"Floral Decoration\");\r\n\r\n\t\t\t//returns true if the mention flower is available in the mentioned category else returns false\r\n\t\t\tfor (String flowerType : flowerTypes) {\r\n\r\n\t\t\t\tif (flowerKind.equals(flowerType)) {\r\n\t\t\t\t\tvalid = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\t\t\t\t\tvalid = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tSystem.out.println(category + \" \" + flowerKind + \" Available\");\r\n\t\t\treturn valid;\r\n\t\t}\r\n\r\n\t\t//returns false if the mentioned category is not available\r\n\t\telse {\r\n\t\t\tSystem.out.println(category + \" \" + flowerKind + \" Not Available\");\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\t}", "@Then(\"book categories must match book_categories table from db\")\n public void book_categories_must_match_book_categories_table_from_db() {\n String sql = \"SELECT name FROM book_categories;\";\n List<Object> namesObj = DBUtils.getColumnData(sql, \"name\");\n List<String> exNames = new ArrayList<>();\n for (Object o : namesObj) {\n exNames.add(o.toString());\n }\n // get the actual categories from UI as webelements\n // convert the web elements to list\n List<WebElement> optionsEl = booksPage.mainCategoryList().getOptions();\n List<String> acNames = BrowserUtils.getElementsText(optionsEl);\n // remove the first option ALL from acList.\n acNames.remove(0);\n // compare 2 lists\n assertEquals(\"Categories did not match\", exNames, acNames);\n }", "@SuppressWarnings(\"unused\")\n public boolean isParent(@NotNull List<String> otherCat) {\n for (int i = 0; i < category.size() && i < otherCat.size(); i++) {\n if (!otherCat.get(i).equals(category.get(i))) {\n return i > 0;\n }\n }\n\n return true;\n }", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "private String constructCategoryFilterString(\n Collection<Integer> predefinedCategories, Collection<String> customIncludedCategories) {\n HashSet<String> categoriesSet = new HashSet<String>();\n for (int predefinedCategoriesIndex : predefinedCategories) {\n categoriesSet.addAll(PREDEFINED_CATEGORIES_LIST.get(predefinedCategoriesIndex));\n }\n for (String categoryPattern : customIncludedCategories) {\n if (isValidPattern(categoryPattern)) {\n categoriesSet.add(categoryPattern);\n } else {\n throw new IllegalArgumentException(\n \"category patterns starting with '-' or containing ',' are not allowed\");\n }\n }\n if (categoriesSet.isEmpty()) {\n // when no categories are specified -- exclude everything\n categoriesSet.add(\"-*\");\n }\n return TextUtils.join(\",\", categoriesSet);\n }", "@Test\r\n\tpublic void testGetCategoryString() {\r\n\t\tManagedIncident incident = new ManagedIncident(\"jsmith\", Category.NETWORK, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Network\", incident.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident1 = new ManagedIncident(\"jsmith\", Category.DATABASE, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Database\", incident1.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident2 = new ManagedIncident(\"jsmith\", Category.INQUIRY, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Inquiry\", incident2.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident3 = new ManagedIncident(\"jsmith\", Category.HARDWARE, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Hardware\", incident3.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident4 = new ManagedIncident(\"jsmith\", Category.SOFTWARE, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Software\", incident4.getCategoryString());\r\n\t\t\r\n\t}", "private final boolean compareStringValues(final String data1,\n\t\t\tfinal String data2, final String colName, final String key) {\n\t\tif (data1.equals(data2)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tContextComparator.addResult(namespace,\n\t\t\t\tContextComparatorConfigReferences.TEST_CATEGORY_COLUMN_VALUES,\n\t\t\t\tContextComparatorConfigReferences.TEST_STATUS_FAILED,\n\t\t\t\t\"Mismatch for \" + colName + \" for key \" + key\n\t\t\t\t+ \". \" + ContextComparator.CONTEXT_1.getName() + \": \" + data1\n\t\t\t\t+ \", \" + ContextComparator.CONTEXT_2.getName() + \": \" + data2);\n\t\treturn false;\n\t}", "public static boolean containsMatch(List<String> list, String str) {\n boolean strAvailable = false;\n final Pattern pattern = Pattern.compile(str, Pattern.CASE_INSENSITIVE | Pattern.CANON_EQ);\n if (list != null) {\n for (String s : list) {\n final Matcher matcher = pattern.matcher(s);\n if (matcher.find()) {\n strAvailable = true;\n break;\n }\n }\n }\n return strAvailable;\n }", "public boolean inBag(String searchString) {\r\n\t\tboolean found = false;\r\n\t\tfor(Iterator<Item> it = items.iterator(); it.hasNext() && !found; ) {\r\n\t\t\tif(it.next().getDescription().contains(searchString)) {\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t\t\r\n\t}", "public boolean containsCaseInsensitive(String s, List<String> l) {\n\t\tfor (String string : l) {\n\t\t\tif (string.equalsIgnoreCase(s)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean verify(String inputString, String vocabularyString) {\n List<String> inputStringList = getWords(inputString);\n List<String> vocabularyStringList = getWords(vocabularyString);\n if (inputStringList.size() == 0)return false;\n for (String word: inputStringList){\n if (!vocabularyStringList.contains(word))return false;\n }\n return true;\n }", "public boolean checkListItem(ArrayList<Item> inputListItem, String stringDesire)\r\n\t{\r\n\t\tString itemName = stringDesire.substring(0, stringDesire.indexOf(\":\"));;\r\n\t\tString variable = stringDesire.substring(stringDesire.indexOf(\":\")+1, stringDesire.lastIndexOf(\":\"));\r\n\t\tString desireValue = stringDesire.substring(stringDesire.lastIndexOf(\":\")+1,stringDesire.length());\r\n\t\r\n\t\t// Character may has multiple item with the same name, but different stats (sword, but one is broken, but the other aren't).\r\n\t\t// Thus all item with matching name must be checked\r\n\t\t// IF even ONE of the item match, this methods will return true;\r\n\t\t\r\n\t\tArrayList<Item> listMatchItem = new ArrayList<Item>();\r\n\r\n\t\tfor (int x = 0; x<inputListItem.size();x++)\r\n\t\t{\r\n\t\t\tif (inputListItem.get(x).getName() == itemName) \r\n\t\t\t\tlistMatchItem.add(inputListItem.get(x));\r\n\t\t}\r\n\t\t\r\n\t\tif (variable == \"itemNameNOT\" && listMatchItem.size() == 0) {\r\n\t\t\tSystem.out.println(\"Char not contain prohibit item\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\telse if (listMatchItem.size() == 0 ) {\r\n\t\t\tSystem.out.println(\"NO MATCH ITEM IS FOUND\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// If NONE of the item match with the desireValue >>> this method must return FALSE;\r\n\t\t// In order to do this, we use the isOneMatch.\r\n\t\t//\r\n\t\t// This boolean will turn true if one of the item match\t\t\r\n\t\t// At the end of the for loop, the methods will return this boolean\r\n\t\tboolean isOneMatch = false;\r\n\t\tif (variable == \"listPropertyNOT\")\r\n\t\t{\r\n\t\t\tisOneMatch = true;\r\n\t\t}\r\n\t\t\r\n\t\tfor (Item inputItem : listMatchItem)\t\r\n\t\t{\r\n\t\t\tswitch (variable)\r\n\t\t\t{\r\n\t\t\t\t// This is use to check if this item is in inventory\r\n\t\t\t\tcase (\"itemName\") \r\n\t\t\t\t:\r\n\t\t\t\t\tif (inputItem.getName() == desireValue) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tisOneMatch = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\tcase (\"typeOfItem\") \r\n\t\t\t\t:\r\n\t\t\t\t\tif (inputItem.getListTypeOfItem().contains(desireValue)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tisOneMatch = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (\"typeOfFunction\") \r\n\t\t\t\t:\r\n\t\t\t\t\tif (inputItem.getListTypeOfFunction().contains(desireValue)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tisOneMatch = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (\"ownerName\") \r\n\t\t\t\t:\r\n\t\t\t\t\tif (inputItem.getOwnerName() == desireValue) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tisOneMatch = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (\"isOnGround\") \r\n\t\t\t\t:\r\n\t\t\t\t\tString curIsAlive = Boolean.toString(inputItem.isItemOnGround());\r\n\t\t\t\t\tif (curIsAlive == desireValue) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tisOneMatch = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (\"currentLocation\") \r\n\t\t\t\t:\r\n\t\t\t\t\tif (inputItem.getCurrentLocation() == desireValue) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tisOneMatch = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcase (\"sameLocation\")\r\n\t\t\t\t: \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//-------------FIND ALL ITEM THAT MATCH DESIREVALUE------------------\r\n\t\t\t\t\t\r\n\t\t\t\t\tArrayList<Item> listMatchItemSameLocation = new ArrayList<Item>();\r\n\t\t\t\t\t\r\n\t\t\t\t//\tString itemName = stringDesire.substring(0, stringDesire.indexOf(\":\"));;\r\n\t\t\t\t//\tString variable = stringDesire.substring(stringDesire.indexOf(\":\")+1, stringDesire.lastIndexOf(\":\"));\r\n\t\t\t\t//\tString desireValue = stringDesire.substring(stringDesire.lastIndexOf(\":\")+1,stringDesire.length());\r\n\t\t\t\r\n\t\t\t\t\tfor (int x = 0; x<inputListItem.size();x++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (inputListItem.get(x).getName() == desireValue) \r\n\t\t\t\t\t\t\tlistMatchItemSameLocation.add(inputListItem.get(x));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (listMatchItemSameLocation.size() == 0 ) {\r\n\t\t\t\t\t\tSystem.out.println(\"NO MATCH ITEM IS FOUND\");\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//--------------------------------\r\n\t\t\t\t\t\r\n\t\t\t\t\tItem itemSameLocation = null;\r\n\t\t\t\t\tfor (Item checkItem : listMatchItemSameLocation)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (checkItem.getCurrentLocation() == inputItem.getCurrentLocation())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// If some item in match list = in same location, break and return true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If the code reach this code, it mean no matched item with same location exist, Thus return false;\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t// If contain desireValue, return true;\r\n\t\t\t\tcase (\"listProperty\") \r\n\t\t\t\t:\r\n\t\t\t\t\tif (inputItem.getListProperty().contains(desireValue)){\r\n\t\t\t\t\t\tisOneMatch = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t// If NOT contain desireValue, return true;\t\r\n\t\t\t\tcase (\"listPropertyNOT\") \r\n\t\t\t\t:\r\n\t\t\t\t\tif (!inputItem.getListProperty().contains(desireValue) && isOneMatch == true) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (inputItem.getListProperty().contains(desireValue)){\r\n\t\t\t\t\t\tisOneMatch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t// In case that variable doesn't exist, it should mean that misspelling happen\r\n\t\t\t\tdefault \r\n\t\t\t\t: \r\n\t\t\t\t\tSystem.out.println(\"checkListItem's variable does not exist, FROM enviroment.GameWorld.containCharacter\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn isOneMatch;\r\n\t}", "@Override\n\tpublic void verifyCategories() {\n\t\t\n\t\tBy loc_catNames=MobileBy.xpath(\"//android.widget.TextView[@resource-id='com.ionicframework.SaleshuddleApp:id/category_name_tv']\");\n\t\tPojo.getObjSeleniumFunctions().waitForElementDisplayed(loc_catNames, 15);\n\t\tList<AndroidElement> catNames=Pojo.getObjSeleniumFunctions().getWebElementListAndroidApp(loc_catNames);\n\t\tList<String> catNamesStr=new ArrayList<String>();\n\t\t\n\t\t\n\t\tfor(AndroidElement catName:catNames)\n\t\t{\n\t\t\tcatNamesStr.add(catName.getText().trim());\n\t\t}\n\t\t\n\t\tif(catNamesStr.size()==0)\n\t\t{\n\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", BuildSpGamePage.expectedData.get(\"Categories\").containsAll(catNamesStr));\n\n\t\t}\n\t\t}", "public Boolean findMatchingString(String findMe, String[] list){\n\t\tint length = list.length;\n\t\tfor(int i=0; i<length; i++){\n\t\t\tif(findMe.equalsIgnoreCase(list[i])){\n\t\t\t\tdebugOut(findMe+\" is the same as \"+list[i]);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tdebugOut(findMe+\" is not the same as \"+list[i]);\n\t\t}\n\t\tdebugOut(\"The enchantment '\"+findMe+\"' could not be found in this list\");\n\t\treturn false;\n\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 3;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 3;\r\n\t\t\t}", "public static boolean containsIgnoreCase(List<String> list, String str) {\n boolean strAvailable = false;\n if (list != null) {\n for (String s : list) {\n if (s.equalsIgnoreCase(str)) {\n strAvailable = true;\n break;\n }\n }\n }\n return strAvailable;\n }", "Integer checkCategory(Integer choice, \n List<DvdCategory> categories) throws DvdStoreException;", "public boolean matchResult(String expected,String count){\r\n List<String> expected_Result=new ArrayList<String>();\r\n String s1[];\r\n if(expected.contains(\",\")){\r\n s1 =expected.split(\",\");\r\n for(int i=0;i<s1.length;i++){\r\n expected_Result.add(s1[i]);\r\n }\r\n }\r\n else if(expected.length()!=0){\r\n expected_Result.add(expected);\r\n }\r\n\r\n Boolean match=islistmatching(expected_Result,getResult());\r\n\r\n return match;\r\n\r\n }", "private static boolean CharInCategoryGroup(char ch, UnicodeCategory chcategory, String category, RefObject<Integer> i)\n\t{\n\t\ti.argValue++;\n\n\t\tint curcat = (short) category.charAt(i.argValue);\n\t\tif (curcat > 0)\n\t\t{\n\t\t\t// positive case - the character must be in ANY of the categories in the group\n\t\t\tboolean answer = false;\n\n\t\t\twhile (curcat != 0)\n\t\t\t{\n\t\t\t\tif (!answer)\n\t\t\t\t{\n\t\t\t\t\t--curcat;\n\t\t\t\t\tif (chcategory == UnicodeCategory.forValue(curcat))\n\t\t\t\t\t{\n\t\t\t\t\t\tanswer = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti.argValue++;\n\t\t\t\tcurcat = (short) category.charAt(i.argValue);\n\t\t\t}\n\t\t\treturn answer;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t// negative case - the character must be in NONE of the categories in the group\n\t\t\tboolean answer = true;\n\n\t\t\twhile (curcat != 0)\n\t\t\t{\n\t\t\t\tif (answer)\n\t\t\t\t{\n\t\t\t\t\t//curcat = -curcat;\n\t\t\t\t\t//--curcat;\n\t\t\t\t\tcurcat = -1 - curcat;\n\t\t\t\t\tif (chcategory == UnicodeCategory.forValue(curcat))\n\t\t\t\t\t{\n\t\t\t\t\t\tanswer = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti.argValue++;\n\t\t\t\tcurcat = (short) category.charAt(i.argValue);\n\t\t\t}\n\t\t\treturn answer;\n\t\t}\n\t}", "public boolean hasCategory(String category)\n\t{\n\t\treturn categories.contains(category);\n\t}", "public static int listOfStringFindContains(List<String> list, String value, boolean isCaseInsensitive) {\r\n\t\treturn listOfStringFindSubstring(list, value, isCaseInsensitive);\r\n\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "public boolean isExistProduct(ProductList productList, String idCategory) {\n for (Product product : productList) {\n if (product.getCategoryID().trim().equalsIgnoreCase(idCategory.trim())) {\n return true;\n }\n }\n return false;\n }", "private static boolean CharInCategory(char ch, String set, int start, int mySetLength, int myCategoryLength)\n\t{\n\t\tUnicodeCategory chcategory = UnicodeCategory.GetUnicodeCategory(ch);\n\n\t\tint i = start + SETSTART + mySetLength;\n\t\tint end = i + myCategoryLength;\n\t\twhile (i < end)\n\t\t{\n\t\t\tint curcat = (short) set.charAt(i);\n\n\t\t\tif (curcat == 0)\n\t\t\t{\n\t\t\t\t// zero is our marker for a group of categories - treated as a unit\n\t\t\t\tRefObject<Integer> tempRef_i = new RefObject<Integer>(i);\n\t\t\t\tboolean tempVar = CharInCategoryGroup(ch, chcategory, set, tempRef_i);\n\t\t\t\t\ti = tempRef_i.argValue;\n\t\t\t\tif (tempVar)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (curcat > 0)\n\t\t\t{\n\t\t\t\t// greater than zero is a positive case\n\n\t\t\t\tif (curcat == SpaceConst)\n\t\t\t\t{\n\t\t\t\t\tif (Character.isWhitespace(ch))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t--curcat;\n\n\t\t\t\tif (chcategory == UnicodeCategory.forValue(curcat))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// less than zero is a negative case\n\t\t\t\tif (curcat == NotSpaceConst)\n\t\t\t\t{\n\t\t\t\t\tif (!Character.isWhitespace(ch))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//curcat = -curcat;\n\t\t\t\t//--curcat;\n\t\t\t\tcurcat = -1 - curcat;\n\n\t\t\t\tif (chcategory != UnicodeCategory.forValue(curcat))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn false;\n\t}", "private boolean cat() {\r\n if (in >= input.length() - 2) return false;\r\n boolean ok = cats.contains(input.substring(in, in + 2));\r\n if (ok) in = in + 2;\r\n return ok;\r\n }", "public boolean containCharacter(ArrayList<String> inputList)\r\n\t{\r\n\t\t\r\n\t\tString variable;\r\n\t\tString desireValue;\r\n\t\t\r\n\t\t//Character currentChar = new Character(); //15-2-2019\r\n\t\tCharacter currentChar = null;\r\n\t\t\r\n\t\t\r\n\t\tfor (String currentInput : inputList)\r\n\t\t{\r\n\t\t\tvariable = currentInput.substring(0, currentInput.indexOf(\":\"));\r\n\t\t\tdesireValue = currentInput.substring(currentInput.indexOf(\":\")+1,currentInput.length());\r\n\t\t\t\r\n\t\t\r\n\t\t\t//Looking for the character index\r\n\t\t\tint indexChar = 0;\r\n\t\t\tfor (int x = 0; x<listCharacter.size();x++)\r\n\t\t\t{\r\n\t\t\t\tif (listCharacter.get(x).getName() == variable) \r\n\t\t\t\t\tcurrentChar = listCharacter.get(x);\r\n\t\t\t\t\tindexChar = x;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// IF This is true, it means the character doesn't exist\r\n\t\t\tif (indexChar == 0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Character in GameState's wishlist doesn't exist\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Now consult siwtchCheckCharacter\r\n\t\t\t//IF even one of them return false, it mean one of condition isn't met\r\n\t\t\tif (!siwtchCheckCharacter(currentChar, desireValue))\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean contains(String value){\n if (value == null)\n return false;\n int index = clamp(value);\n if (linkedListStrings[index] == null)\n return false;\n else\n return linkedListStrings[index].contains(value);\n\n\n }", "private boolean anyOfSetInString(String inputStr, Set<String> items) {\n\n for (String s : items) {\n if (inputStr.contains(s)) {\n // Didn't use String.equals() as user can have the number saved with or without country code\n\n return true;\n }\n }\n\n return false;\n }", "public boolean searchList(List<String> list) {\r\n int count = 0;\r\n for (String subject : list) {\r\n if (currentLocation.searchEntities(subject) || currentPlayer.searchInventory(subject)\r\n || subject.equals(\"health\")) {\r\n count++;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n // If all subjects are found: true, if not all found: false\r\n return count == list.size();\r\n }", "public static boolean in(String strs, String str) {\n\treturn null != strs && null != str && Arrays.asList(strs.split(\",\")).contains(str);\n }", "public boolean isContainedBy(final String testedString) {\n if (testedString.indexOf(SEPARATOR) < 0) {\n return false;\n }\n return testedString.contains(key);\n }", "boolean hasCategory();", "public String categoryScan(String sIn)\r\n\t{\r\n\t\tString goBack = \"unassigned\";\r\n\t\t\r\n\t\tif(sIn.contains(\"PROFESSIONAL CATEGORY\") || sIn.contains(\"PROFESSIONAL/MANAGEMENT CATEGORY\"))\r\n\t\t{\r\n\t\t\tgoBack = \"PROFESSIONAL\";\r\n\t\t} else if(sIn.contains(\"HEALTHCARE CATEGORY\") || sIn.contains(\"HEALTH CARE/NURSING CATEGORY\"))\r\n\t\t{\r\n\t\t\tgoBack = \"HEALTHCARE\";\r\n\t\t} else if(sIn.contains(\"SALES / MARKETING CATEGORY\") || sIn.contains(\"SALES/MARKETING CATEGORY\"))\r\n\t\t{\r\n\t\t\tgoBack = \"SALES\";\r\n\t\t}else if(sIn.contains(\"SKILLS/TRADES CATEGORY\") || sIn.contains(\"SKILLED TRADES CATEGORY\"))\r\n\t\t{\r\n\t\t\tgoBack = \"SKILLS TRADES\";\r\n\t\t}else if(sIn.contains(\"GENERAL CATEGORY\"))\r\n\t\t{\r\n\t\t\tgoBack = \"GENERAL\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn goBack;\r\n\t}", "private void matchStringValues(String vConfValue, String resValue, Comparison comparison) {\r\n if (vConfValue != null && resValue != null && vConfValue.equals(resValue)) {\r\n comparison.setMatchSatus(\"MATCH\");\r\n } else {\r\n comparison.setMatchSatus(\"MISMATCH\");\r\n matchResult = false;\r\n }\r\n }", "public void setMediaCategoryList(List<String> selectedCategoryList) {\n this.selectedCategoryList = selectedCategoryList;\n ArrayList<Media> list = new ArrayList<>();\n List<Media> mediaList = viewModel.getMediaList();\n\n for (Media media : mediaList) {\n List<String> categories = media.getCategories();\n if (categories.containsAll(selectedCategoryList)) {\n list.add(media);\n }\n }\n if (selectedCategoryList.size() == 0) {\n list.clear();\n list.addAll(mediaList);\n }\n mediaCategoryList.clear();\n mediaCategoryList.addAll(list);\n }", "@Test\n public void typeCategoriesTest() {\n final Category cardio = Category.CARDIO;\n final Category core = Category.CORE;\n final Category fullBody = Category.FULL_BODY;\n final Type endurance = Type.ENDURANCE;\n\n final List<Category> myCategories = new ArrayList<>();\n\n myCategories.add(cardio);\n myCategories.add(core);\n assertEquals(\"Categories of Endurance Type\", myCategories, endurance.getCategories());\n\n myCategories.add(fullBody);\n assertNotEquals(\"Not all the Categories are of Endurance Type\", myCategories, endurance.getCategories());\n\n }", "public boolean addCategory(Category newCat) {\n\t\tfor(Category cat : categoriesList) {\n\t\t\tif(cat.getName().equals(newCat.getName())) return false;\n\t\t}\n\t\tcategoriesList.add(newCat);\n\t\t//this.notifyDataSetChanged();\n\t\treturn true;\n\t}", "private boolean compareList(ArrayList<Point> solutions2, ArrayList<Point> current) {\r\n\t\treturn solutions2.toString().contentEquals(current.toString());\r\n\t}", "public boolean equal(StringList list2) {\n\t\tIterator it1 = stringList.listIterator();\n\t\tIterator it2 = list2.iterator();\n\t\tif(list2.len() != stringList.size()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\twhile( (it1.hasNext()) ) {\n\t\t\tSystem.out.format(\"Comparing %s%n\", it1.next());\n\t\t\tif( it1.next() != it2.next()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean validate(String desc, String cat, String subCat, String company){\n\t\t\n\t\tif(cat.equals(\"Electronics\")){\n\t\t\tif (subCat.equals(\"Laptop\")||subCat.equals(\"Cellphone\")||subCat.equals(\"Tablet/iPad\")||subCat.equals(\"iPod/MP3 player\"))\n\t\t\t\treturn true;\n\t\t}\n\t\telse if(cat.equals(\"Clothing\")){\n\t\t\tif (subCat.equals(\"Jacket/Coat\")||subCat.equals(\"Gloves\")||subCat.equals(\"Shoes\"))\n\t\t\t\treturn true;\n\t\t}\n\t\telse if(cat.equals(\"Accessories\")){\n\t\t\tif (subCat.equals(\"Jewellery\")||subCat.equals(\"Watch\")||subCat.equals(\"Glasses\"))\n\t\t\t\treturn true;\n\t\t}\n\t\telse if(cat.equals(\"Keys\") && company.equals(\"N/A\")){\n\t\t\tif (subCat.equals(\"N/A\"))\n\t\t\t\treturn true;\n\t\t}\n\t\telse if(cat.equals(\"Backpack\")||cat.equals(\"Purse/Wallet\")){\n\t\t\t\tif (subCat.equals(\"N/A\"))\n\t\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n\n List<String> listOfStrings= new ArrayList<>();\n listOfStrings.add(\"Jeden\");\n listOfStrings.add(\"Dwa\");\n listOfStrings.add(\"Trzy\");\n listOfStrings.add(\"Cztery\");\n listOfStrings.add(\"Piec\");\n\n boolean contains=listOfStrings.contains(\"Jeden\");\n boolean notContains=listOfStrings.contains(\"Szesc\");\n System.out.println(contains);\n System.out.println(notContains);\n }", "public boolean colourInList(String colour) {\r\n for (String col : listOfColours) {\r\n if (colour.toLowerCase().equals(col.toLowerCase())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "static public boolean isList (String listString, String startToken, String endToken,\n String delimiter)\n{\n String s = listString.trim ();\n Vector list = new Vector ();\n\n if (s.startsWith (startToken) && s.endsWith (endToken)) \n return true;\n else\n return false;\n\n\n}", "public String searchCategoriesByCriteria()\n {\n logger.info(\"**** In searchCategoriesByCriteria in Controller ****\");\n if (category != null && (StringUtils.isNotEmpty(category.getCategoryName()) || StringUtils.isNotEmpty(category.getCategoryDescription())))\n {\n categoryList = categoryService.searchCategoriesByCriteria(category);\n }\n else\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, Constants.NO_SEARCH_CRITERIA, Constants.NO_SEARCH_CRITERIA);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n return Constants.SEARCH_CATEGORY_VIEW;\n }", "public void setStrCategoryName(final String strCategoryName) {\n this.strCategoryName = strCategoryName;\n }", "public void setProductCompareList(List pProductCompareList) {\n mProductCompareList = pProductCompareList;\n }", "public int compareTo (Tags cat2) {\n return tags.toString().compareToIgnoreCase (cat2.toString());\n }", "public static boolean isValidCategory(String test) {\n return test.matches(VALIDATION_REGEX);\n }", "@Test\r\n\tpublic void testExecuteCommandslShowCat() throws Exception {\r\n\t\t\r\n\t\tadvertising.executeCommand(advertising, \"adl show --Category Computers\");\r\n\t\tassertTrue(\"adl show --Category Computers\", true);\r\n\t\t\r\n\t}", "private void checkCategoryPreference() {\n SharedPreferences sharedPrefs = getSharedPreferences(Constants.MAIN_PREFS, Context.MODE_PRIVATE);\n String json = sharedPrefs.getString(Constants.CATEGORY_ARRAY, null);\n Type type = new TypeToken<ArrayList<Category>>(){}.getType();\n ArrayList<Category> categories = new Gson().fromJson(json, type);\n if(categories == null) {\n categories = new ArrayList<>();\n Category uncategorized = new Category(Constants.CATEGORY_UNCATEGORIZED, Constants.CYAN);\n categories.add(uncategorized);\n String jsonCat = new Gson().toJson(categories);\n SharedPreferences.Editor prefsEditor = sharedPrefs.edit();\n prefsEditor.putString(Constants.CATEGORY_ARRAY, jsonCat);\n prefsEditor.apply();\n }\n }", "public static boolean m66069b(Comparator<String> comparator, String[] strArr, String[] strArr2) {\n if (!(strArr == null || strArr2 == null || strArr.length == 0 || strArr2.length == 0)) {\n for (String str : strArr) {\n for (String compare : strArr2) {\n if (comparator.compare(str, compare) == 0) {\n return true;\n }\n }\n }\n }\n return false;\n }", "private static boolean matchesAny(String searchString, String... possibleValues) {\n\t\tfor (int i = 0; i < possibleValues.length; i++) {\n\t\t\tString attributeValue = possibleValues[i];\n\t\t\tif (StringUtils.isNotBlank(attributeValue) && (attributeValue.equals(searchString))) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public String categoryList(CategoryDetails c);", "public boolean containsLiteralString(String literalData);", "public List<String> match(List<String> someList)\n {\n char[] objectWord = this.aWord.toCharArray();\n Arrays.sort(objectWord);\n\n List<String> answer = new ArrayList<>();\n HashMap<String, Integer> mapForEachWord = new HashMap<>();\n\n for (int i = 0; i < someList.size(); i++)\n {\n String wordFromList = someList.get(i).toLowerCase();\n //mapForEachWord = processWord(wordFromList);\n\n char[] listWordArray = wordFromList.toCharArray();\n Arrays.sort(listWordArray);\n\n if (Arrays.equals(listWordArray, objectWord) && !this.aWord.equals(wordFromList))\n {\n answer.add(someList.get(i));\n }\n\n }\n\n return answer;\n }", "public static boolean compareSubstring(List<String> pieces, String s)\n {\n\n boolean result = true;\n int len = pieces.size();\n\n int index = 0;\n\nloop: for (int i = 0; i < len; i++)\n {\n String piece = pieces.get(i);\n\n // If this is the first piece, then make sure the\n // string starts with it.\n if (i == 0)\n {\n if (!s.startsWith(piece))\n {\n result = false;\n break loop;\n }\n }\n\n // If this is the last piece, then make sure the\n // string ends with it.\n if (i == len - 1)\n {\n result = s.endsWith(piece);\n break loop;\n }\n\n // If this is neither the first or last piece, then\n // make sure the string contains it.\n if ((i > 0) && (i < (len - 1)))\n {\n index = s.indexOf(piece, index);\n if (index < 0)\n {\n result = false;\n break loop;\n }\n }\n\n // Move string index beyond the matching piece.\n index += piece.length();\n }\n\n return result;\n }", "private static boolean intersect(String[] list1, String[] list2) {\n\n Set<String> s1 = new HashSet<String>(Arrays.asList(list1));\n Set<String> s2 = new HashSet<String>(Arrays.asList(list2));\n s1.retainAll(s2);\n\n String[] result = s1.toArray(new String[s1.size()]);\n\n return result.length > 0;\n }", "boolean isSuperiorImageCat(String newImageCat, String chosenImageCat) {\n\t\treturn (\t(newImageCat.equals(\"pc\") && (chosenImageCat.equals(\"p\")))\n\t\t\t\t\t|| (newImageCat.equals(\"ps\") && ((chosenImageCat.equals(\"p\") || (chosenImageCat.equals(\"pc\")))))\n\t\t\t\t);\n\t}", "protected boolean hasKeywords(List<KeyValuePair> keywords, String... values) {\n\t\tList<String> keywordStrings = new ArrayList<String>();\r\n\t\tfor (KeyValuePair keyValuePair : keywords) {\r\n\t\t\tkeywordStrings.add(keyValuePair.getKey());\r\n\t\t}\r\n\t\tfor (String value : values) {\r\n\t\t\tif (!keywordStrings.contains(value)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean areStringComparisonsCaseInsensitive() {\n \t\treturn false;\n \t}", "protected <Ty> HashSet<Ty> evaluate(ArrayList<HashSet<Ty>> setList, String opDescriptor) {\n if (setList == null || setList.isEmpty()) {\n return new HashSet<>();\n }\n if (setList.size() > 1) {\n for (char c : opDescriptor.toCharArray()) {\n if (c == '&') {\n setList.set(0, this.intersection(setList.get(0), setList.get(1)));\n setList.remove(1);\n } else if (c == '|') {\n setList.set(0, this.union(setList.get(0), setList.get(1)));\n setList.remove(1);\n }\n if (setList.size() == 1) {\n break;\n }\n }\n }\n return setList.get(0);\n }", "public void category(String menuCategory) {\n for (WebElement element : categories) {\n\n if (menuCategory.equals(CategoryConstants.NEW_IN.toString())) {\n String newin = menuCategory.replace(\"_\", \" \");\n menuCategory = newin;\n }\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String elementText = element.getText();\n if (elementText.equals(menuCategory)) {\n element.click();\n\n break;\n }\n }\n }", "private boolean searchCondition(String searched, String actual) {\n return actual.toLowerCase().contains(searched.toLowerCase());\n }", "public static void checkCitiesStates(List<Token> tokenList) {\r\n\t\t// Initialize a list of lists.\r\n\t\t// This will serve as a way of storing tokenized WordList contents.\r\n\t\t// For example: \"Anaktuvuk Pass, Alaska\" will become\r\n\t\t// ['Anaktuvuk', 'Pass', ',', 'Alaska'] along with all the other cities/states.\r\n\t\tList<List<String>> tokenizedCitiesStates = new ArrayList<List<String>>();\r\n\t\t\r\n\t\tString orig = Token.combineTokenList(tokenList);\r\n\t\t\r\n\t\t// Iterate through the citiesAndStatesUS from the WordLists library.\r\n\t\tIterator<String> it = WordLists.citiesAndStatesUS().iterator();\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tString cityState = it.next();\r\n\t\t\tif(!orig.contains(cityState)) continue;\r\n\t\t\tList<String> piece = tokenizeString(cityState);\r\n\t\t\t\r\n\t\t\tif(piece != null) {\r\n\t\t\t\ttokenizedCitiesStates.add(tokenizeString(cityState)); // Tokenize the string for comparison\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttokenizedCompare(tokenList, tokenizedCitiesStates, \"citystate\");\r\n\t}", "boolean isProductCategoryConfigurable(int productCategoryId);", "public boolean addToCategory (String category, PublicKey key) {\n Logger.write(\"VERBOSE\", \"DB\", \"addToCategory(\" + category + \", ...)\");\n \n PublicKey[] members = getCategoryMembers(category);\n if (Arrays.asList(members).contains(key)) {\n return false;\n }\n \n try {\n execute(DBStrings.addToCategory.replace(\"__catID__\", category)\n .replace(\"__key__\", Crypto.encodeKey(key)));\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n return false;\n }\n \n return true;\n }", "public void checkIfItemCategoryExist(ArrayList<Item> itemList) throws NewException {\n for (Item item : itemList) {\n if (!checkCategories.contains(item.getCategoryId())) {\n throw new NewException(\"ID\", item.getLine(), \"Item doesn't exist\");\n }\n }\n }", "private boolean fruitChecker(String currentInput)\n\t{\n\t\tboolean hasFruit = false;\n\t\t// loop over all items in it, and look for a meme.\n\n\t\tfor (String currentPhrase : fruitList)\n\t\t{\n\t\t\tif (currentPhrase.equals(currentInput))\n\t\t\t{\n\t\t\t\thasFruit = true;\n\t\t\t}\n\t\t}\n\t\treturn hasFruit;\n\t}", "public static boolean isInList(String pkgname,String []arylist)\n\t{\n\t \tif(arylist == null)return false;\n\t\tfor(int i=0;i<arylist.length;i++)\n\t\t{\n\t\t\tif(pkgname.contains(arylist[i]))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean contains(String value);", "public boolean islistmatching(List<String> expected,List<String> actual){\r\n if (expected == null && actual == null){\r\n return true;\r\n }\r\n\r\n if((expected == null && actual != null) || expected != null && actual == null || expected.size() != actual.size()){\r\n return false;\r\n }\r\n\r\n expected = new ArrayList<String>(expected);\r\n actual = new ArrayList<String>(actual);\r\n\r\n Collections.sort(expected);\r\n Collections.sort(actual);\r\n\r\n return expected.equals(actual);\r\n }", "static boolean matches(String value, String conditionString) {\n if (value == null && conditionString == null) {\n return true;\n }\n if (value == null ^ conditionString == null) {\n return false;\n }\n conditionString = conditionString.replace(\"*\", \".*\").replace(\"..*\", \".*\");\n if (!conditionString.startsWith(\"^\") && !conditionString.startsWith(\".*\")) {\n conditionString = \".*\" + conditionString;\n }\n if (!conditionString.endsWith(\"$\") && !conditionString.endsWith(\".*\")) {\n conditionString += \".*\";\n }\n return value.matches(conditionString);\n }", "private static Stream<String> parseCategory(ClassificationCategory category) {\n return Stream.of(category.getName().substring(1).split(\"/| & \"));\n }", "public boolean compare(String string) {\n\t\tif (_maoriNumber.equals(string)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static void returnCategoryList(String categoryNumber, List<MovieList> filmList) {\n\t\tTreeSet<String> filmsInCategory = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);\n\t\tfor (int i = 0; i < filmList.size(); i++) {\n\t\t\tif (filmList.get(i).getMovieGenre().equals(categoryNumber)) {\n\t\t\t\tString filmTitle = filmList.get(i).getMovieTitle();\n\t\t\t\tfilmsInCategory.add(filmTitle);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(categoryNumber + \" contains these films: \" + filmsInCategory.toString());\n\t}", "public static boolean permuteCompare(String strA, String strB) {\n\t\tif(strA == null || strB == null)\n\t\t\treturn false;\n\t\t\n\t\t/*\n\t\t * Step 2: Check if the length of both strings is not equal, then they will not match\n\t\t */\n\t\tif(strA.length() != strB.length()) \n\t\t\treturn false;\n\t\t\n\t\t/*\n\t\t * Step 3: Convert both strings to ArrayList (split method looks like not a elegant way, but works)\n\t\t */\n\t\tList<String> strAList = new ArrayList<String>(Arrays.asList(strA.split(\"\")));\n\t\tList<String> strBList = new ArrayList<String>(Arrays.asList(strB.split(\"\")));\n\t\t\n\t\t/*\n\t\t * Step 4: Sort both ArrayList using Collections\n\t\t */\n\t\tCollections.sort(strAList);\n\t\tCollections.sort(strBList);\n\t\t\n\t\t/*\n\t\t * Step 5: Compare them using equals that will compare size and each element value (Ref: https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#equals-java.lang.Object-)\n\t\t */\n\t\tif(!strAList.equals(strBList))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "@Test\n public void testCreateListCriteria() throws Exception {\n System.out.println(\"createListCriteria\");\n \n Map<String, String> map = new TreeMap<String,String>();\n map.put(\"1\", \"{\\\"key\\\":{\\\"FunctionalEnvironment\\\":\\\"Production\\\",\\\"Delivery\\\":\\\"***REMOVED***\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\",\\\"Manufacturer\\\"]}\");\n \n map.put(\"2\", \"{\\\"key\\\":{\\\"FunctionalEnvironment\\\":\\\"Production\\\",\\\"Delivery\\\":\\\"***REMOVED***\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\"]}\");\n \n \n \n String expResult1 = \"{\\\"key\\\":{\\\"Delivery\\\":\\\"***REMOVED***\\\",\\\"FunctionalEnvironment\\\":\\\"Production\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\",\\\"Manufacturer\\\"]}\";\n String expResult2 = \"{\\\"key\\\":{\\\"Delivery\\\":\\\"***REMOVED***\\\",\\\"FunctionalEnvironment\\\":\\\"Production\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\"]}\";\n \n \n TreeMap<String,String> key = new TreeMap<>();\n List<String> values =new ArrayList<String>();\n CriteriaFilter instance = new CriteriaFilter(key, values);\n \n List<CriteriaFilter> resultList = instance.createListCriteria(map);\n \n String result1 = \"\";\n String result2 = \"\";\n for (int i = 0 ; i < resultList.size() ; i++){\n result1 = resultList.get(0).toString();\n result2 = resultList.get(1).toString();\n break;\n }\n System.out.println(result1);\n System.out.println(expResult1);\n System.out.println(result2);\n System.out.println(expResult2);\n \n \n \n assertEquals(expResult1, result1);\n assertEquals(expResult2, result2);\n \n }", "private String getContainsList(){\n\t\t\n\t\tArrayList<String> containsList = new ArrayList<String>();\n\t\t\n\t\tIterator<String> it = tagArray.iterator();\n\t\tString tag;\n\t\t\n\t\twhile (it.hasNext()) {\n\t\t\t\n\t\t\ttag = it.next();\n\t\t\t\n\t\t\tString containsClause = \"PrimaryTag='\" + \n\t\t\t tag + \"'\";\n\t\t\t \n\t\t\tcontainsList.add(containsClause);\n\t\t\t\n\t\t}\n\t\t\n\t\tString retVal = StringUtils.join(containsList, \" or \");\n\n\t\treturn retVal;\n\t}", "private boolean isOperator (String s){ \n for (int i = 0; i<operators.length; i++){\n if (s.equals(operators[i])){\n return true;\n }\n }\n return false;\n }", "public boolean matches(String value) {\n return matches(value, TokenType.OPERATOR);\n }", "boolean inCommunities(String element);", "public List<String> getCategoryList(String cat) {\n ArrayList<String> ls = new ArrayList<String>();\n String[] keys = sortedStringKeys();\n\n for (String s : keys) {\n if (s.startsWith(cat)) { ls.add(getProperty(s)); }\n }\n return ls;\n }", "private boolean matchedKeyword(String keyword, String[] tokens) {\n\t\tfor (int i = 0; i < tokens.length; i++)\n\t\t\tif (keyword.equalsIgnoreCase(tokens[i]))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "private ZCategory stringToCategory(String categoryData) {\r\n\t\tZCategory category = new ZCategory();\r\n\t\tString[] tmp = categoryData.split(Commons.SPLITTER_LEVEL1);\r\n\t\ttry {\r\n\t\t\tcategory.setCatId(Integer.parseInt(tmp[0]));\r\n\t\t\tcategory.setCatName(tmp[1]);\r\n\r\n\t\t\tif (tmp.length > 2) { // add childs\r\n\t\t\t\tString[] childTmp = tmp[2].split(Commons.SPLITTER_LEVEL2);\r\n\t\t\t\tfor (String str : childTmp) {\r\n\t\t\t\t\tcategory.addCatChild(this.selectCategory(Integer.parseInt(str)));\r\n\t\t\t\t}\r\n\t\t\t} // end of if\r\n\t\t} catch (Exception ex) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn category;\r\n\t}", "public static void compare(Set<Long> recipeIdList) {\r\n\t\tHistory.newItem(SCREEN_NAME + \"&\" + PARAMETER_ID_LIST + \"=\" + Kuharija.listJoiner.join(recipeIdList));\r\n\t}", "public String searchCategory()\n {\n logger.info(\"**** In searchCategory in Controller ****\");\n categoryList = categoryService.getCategories();\n return Constants.SEARCH_CATEGORY_VIEW;\n }" ]
[ "0.5935683", "0.5619684", "0.5505688", "0.5413101", "0.52450967", "0.523621", "0.5139202", "0.504099", "0.49995932", "0.49321178", "0.49321178", "0.49321178", "0.49321178", "0.49321178", "0.49321178", "0.49112156", "0.49007612", "0.48791647", "0.4851876", "0.48433164", "0.48327506", "0.4795158", "0.47840238", "0.47736797", "0.475707", "0.47501838", "0.47501838", "0.4731421", "0.47264886", "0.47129083", "0.47107872", "0.47093803", "0.46865425", "0.46690026", "0.46690026", "0.46690026", "0.4662376", "0.45980614", "0.45936602", "0.4586547", "0.4586193", "0.4579546", "0.45725942", "0.45640498", "0.45331225", "0.45302048", "0.45261407", "0.45130894", "0.4473107", "0.44692543", "0.445777", "0.443276", "0.440944", "0.44063896", "0.44039887", "0.4391367", "0.43883312", "0.43720353", "0.4371697", "0.43383232", "0.43334314", "0.43313414", "0.43293077", "0.4326378", "0.43213385", "0.4305081", "0.43042538", "0.4301533", "0.4273831", "0.42709804", "0.42696923", "0.42690602", "0.42624196", "0.4260996", "0.425942", "0.42514908", "0.4249452", "0.42114022", "0.41998494", "0.41996118", "0.41981655", "0.4197085", "0.41918606", "0.4187507", "0.41853863", "0.4176499", "0.41739556", "0.41664016", "0.41647813", "0.41643655", "0.41609526", "0.416076", "0.4160514", "0.41527772", "0.41527307", "0.41489416", "0.41407466", "0.4137371", "0.41365254", "0.41349205" ]
0.88191396
0
/ Compares the query value sent in the parameter query to the value in the HashMap node that is extracted from the source XML file. The function checks for an exact match based on the parameter value exact_match
public boolean matchNodes(HashMap<String, String> node, HashMap<String, String> query, boolean exact_match) { String value = new String(); String query_value = new String(); boolean match = false; if (query.isEmpty()) { match = true; } if (query.containsKey("type")) { String document_type = node.get("type"); String query_document_type = query.get("type"); if (!query_document_type.contains("|" + document_type + "|")) { return false; } else if (query.keySet().size() == 1) { return true; } } for (String key : query.keySet()) { if (node.containsKey(key) && !key.equals("type")) { value = node.get(key).trim().toLowerCase(); query_value = query.get(key).trim().toLowerCase(); if (value.contains(query_value)) { match = true; } else if (exact_match) { match = false; break; } } } return match; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void test_caselessmatch07() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch07.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', 'k', 'i')\";\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public Map<String, Map<String, List<String>>> dbMatch (Map<String, Map<String, List<String>>> outputVal) {\n\t\tfinal String DB_URL = \"jdbc:mysql://localhost/extractor\";\n\t\t\n\t\t// Database credentials\n\t\tfinal String USER = \"\";\n\t\tfinal String PASS = \"\";\n\t\t\n\t\tConnection conn = null;\n\t\tStatement stmt = null;\n\t\t\n\t\tArrayList<String> auditorResultsFromDB = new ArrayList<String>();\n\t\tMap<String, Map<String, List<String>>> dbMatchofAuditor = new HashMap<String, Map<String,List<String>>>();\n\t\tMap<String, List<String>> filteredValForSynonymMatchingInDB = new HashMap<String, List<String>>();\n\t\tList<String> filteredValues = new ArrayList<String>();\n\t\t\n\t\tfor (Map.Entry<String, Map<String, List<String>>> entry : outputVal.entrySet()) {\n\t\t\tString dataPoint = entry.getKey();\n\t\t\tMap<String, List<String>> InnerMap = entry.getValue();\n\t\t\tfor (Map.Entry<String, List<String>> innerMapEntry : InnerMap.entrySet()) {\n\t\t\t\tString keyword = innerMapEntry.getKey();\n\t\t\t\tfor (String value : innerMapEntry.getValue()) {\n\t\t\t\t\tif (auditorResultsFromDB.contains(value)) {\n\t\t\t\t\t\tfilteredValues.add(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilteredValForSynonymMatchingInDB.put(keyword, filteredValues);\n\t\t\t}\n\t\t\tdbMatchofAuditor.put(dataPoint, filteredValForSynonymMatchingInDB);\n\t\t }\n\t\t\n\t\ttry {\n\t\t\t// STEP 2: Register JDBC driver\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t\t// STEP 3: Open a connection\n\t\t\tSystem.out.println(\"Connecting to database...\");\n\t\t\tconn = DriverManager.getConnection(DB_URL, USER, PASS);\n\n\t\t\t// STEP 4: Execute a query\n\t\t\tSystem.out.println(\"Creating statement...\");\n\t\t\tstmt = conn.createStatement();\n\t\t\tString sql;\n\t\t\tsql = \"select name from auditors\";\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\n\t\t\t// STEP 5: Extract data from result set\n\t\t\twhile (rs.next()) {\n\t\t\t\tauditorResultsFromDB.add(rs.getString(\"name\"));\n\t\t\t}\n\t\t\t// STEP 6: Clean-up environment\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconn.close();\n\t\t} catch (SQLException se) {\n\t\t\t// Handle errors for JDBC\n\t\t\tse.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\t// Handle errors for Class.forName\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// finally block used to close resources\n\t\t\ttry {\n\t\t\t\tif (stmt != null)\n\t\t\t\t\tstmt.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t} // nothing we can do\n\t\t\ttry {\n\t\t\t\tif (conn != null)\n\t\t\t\t\tconn.close();\n\t\t\t} catch (SQLException se) {\n\t\t\t\tse.printStackTrace();\n\t\t\t} // end finally try\n\t\t} // end try\n\t\t\n\t\treturn dbMatchofAuditor;\n\t}", "public void search(Map<String, String> searchParam);", "public void test_caselessmatch06() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch06.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', 'K', 'i')\"; \n \t \n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch04() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch04.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', '[A-Z]', 'i')\";\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Description(\"request has query parameter '{param}' with value contains/matches RegExp pattern '{valueExpression}'\")\n public static Criteria<HarEntry> recordedRequestQueryParamMatches(@DescriptionFragment(\"param\") String queryParam,\n @DescriptionFragment(\"valueExpression\") String valueExpression) {\n checkArgument(isNotBlank(queryParam), \"Query parameter should not be blank or null string\");\n checkArgument(isNotBlank(valueExpression), \"Query parameter value substring/RegExp should be defined\");\n\n return condition(entry -> {\n List<HarQueryParam> queryParams = entry.getRequest().getQueryString();\n\n return ofNullable(queryParams)\n .map(params -> params\n .stream()\n .filter(param -> Objects.equals(param.getName(), queryParam))\n .map(HarQueryParam::getValue)\n .anyMatch(checkByStringContainingOrRegExp(valueExpression)))\n .orElse(false);\n });\n }", "private void matchValues(String vConfValue, String resValue, Comparison comparison, String param) {\r\n\r\n if (vConfValue != null && (Double.parseDouble(vConfValue) == Double.parseDouble(resValue)\r\n || (Double.parseDouble(vConfValue) == (Double.parseDouble(resValue) * m_Fact_1024))\r\n || (Double.parseDouble(resValue) * m_Fact_1000 - Double.parseDouble(vConfValue) <10 ) && (Double.parseDouble(resValue) * m_Fact_1000 - Double.parseDouble(vConfValue) >=0 ) )) {\r\n comparison.setMatchSatus(\"MATCH\");\r\n } else {\r\n comparison.setMatchSatus(\"MISMATCH\");\r\n matchResult = false;\r\n }\r\n }", "public void test_caselessmatch05() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch05.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', '[a-z]', 'i')\";\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public boolean matchFilter(Map<String,String> filter);", "public void test_caselessmatch01() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch01.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public boolean isMatchFilterKey(String key) {\n boolean match = false;\n\n // Validate the title contains the key\n if (title.contains(key)) {\n System.out.println(String.format(\"Title for Talent %s contains the search key %s \", name, key));\n match = true;\n }else System.out.println(String.format(\"Title for Talent %s dose not contains the search key %s \", name, key));\n\n // Validate the Name contains the key\n if (name.contains(key)) {\n System.out.println(String.format(\"Name for Talent %s contains the search key %s \", name, key));\n match = true;\n }else System.out.println(String.format(\"Name for Talent %s dose not contains the search key %s \", name, key));\n\n // Validate the overview contains the key\n if (overview.contains(key)) {\n System.out.println(String.format(\"Overview for Talent %s contains the search key %s \", name, key));\n match = true;\n }else System.out.println(String.format(\"Overview for Talent %s dose not contains the search key %s \", name, key));\n\n // Validate the skills contains the key\n if (skills.contains(key)) {\n System.out.println(String.format(\"Skills for Talent %s contains the search key %s \", name, key));\n match = true;\n }else System.out.println(String.format(\"Skills for Talent %s dose not contains the search key %s \", name, key));\n\n return match;\n }", "public void execFuzzySearchVariationFunc(){\n\n\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n System.out.println(this.searchParam );\n if(this.searchParam.contains(\":\")==true || this.searchParam.startsWith(\"chr\") == true) {\n String chrom = \"\";\n int pstart = -1;\n int pend = -1;\n if (this.searchParam.indexOf(\":\") > -1) {\n int idex = this.searchParam.indexOf(\":\");\n chrom = this.searchParam.substring(0, idex );\n System.out.println(\"chrom=\" + chrom);\n map.put(\"chrom\", chrom);\n if (this.searchParam.indexOf(\"-\") > -1) {\n int idex1 = this.searchParam.indexOf(\"-\");\n pstart = Integer.parseInt(this.searchParam.substring(idex + 1, idex1 ));\n pend = Integer.parseInt(this.searchParam.substring(idex1 + 1, this.searchParam.length()));\n map.put(\"startpos\", pstart);\n map.put(\"endpos\", pend);\n } else {\n pstart = Integer.parseInt(this.searchParam.substring(idex + 1, this.searchParam.length()));\n map.put(\"startpos\", pstart);\n }\n\n } else if (this.searchParam.startsWith(\"chr\") == true) {\n map.put(\"chrom\", this.searchParam);\n }\n }\n\n map.put(\"searchParam\",this.searchParam);\n }\n\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"null\") ==false && this.searchSpecies.equals(\"all\") == false){\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"species\",this.searchSpecies);\n }\n\n if(this.searchTrait != null&& this.searchTrait.equals(\"null\") ==false && this.searchTrait.length()>0){\n\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"searchTrait\", this.searchTrait) ;\n }\n\n if(this.pvalue != null&& this.pvalue.equals(\"null\") ==false && this.pvalue.length()>0){\n\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n\n //here, parse search param and get genotype information\n genotypeBeanList = (List<GenotypeBean>) baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectGenotypeByPos\",map);\n if(genotypeBeanList != null && genotypeBeanList.size() > 0 ){\n for(GenotypeBean tbean :genotypeBeanList ){\n List genotypelist = new ArrayList();\n genotypelist.add(tbean.getGenotypeId()) ;\n\n Map t = new HashMap();\n t.put(\"genotypelist\",genotypelist);\n List<GenotypeAnnotateGeneView> annotateview = baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectGenotypeByList\",t);\n if(annotateview != null && annotateview.size()>0 ){\n //here we need to filter the result\n Map filtermap = new HashMap();\n for(GenotypeAnnotateGeneView tview : annotateview){\n String fkey = tview.getMapGeneId()+\"_\"+tview.getConseqtype();\n if(filtermap.containsKey(fkey) == false){\n filtermap.put(fkey,tview);\n }\n }\n\n if(filtermap.size()>0){\n List<GenotypeAnnotateGeneView> alist = new ArrayList<GenotypeAnnotateGeneView>();\n Iterator it = filtermap.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry entry = (Map.Entry) it.next();\n GenotypeAnnotateGeneView val = (GenotypeAnnotateGeneView) entry.getValue();\n alist.add(val);\n }\n\n tbean.setGenotypeAnnotateGeneView(alist);\n }\n\n\n }\n\n //find association count\n GwasAssociationBean gwas = (GwasAssociationBean) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectAssociationCountByGenotypeid\",tbean.getGenotypeId());\n if(gwas != null){\n tbean.setTraitCount(gwas.getGwasCount());\n }\n\n //find studycount\n Map cmap = new HashMap();\n cmap.put(\"genotypeId\",tbean.getGenotypeId());\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n cmap.put(\"species\",this.searchSpecies);\n }\n\n\n GwasAssociationBean tg_bean1 = (GwasAssociationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectStudyCountByGenotypeid\",cmap);\n if(tg_bean1 != null ){\n tbean.setStudyCount(tg_bean1.getGwasCount());\n }\n\n }\n\n\n\n }\n\n StringBuffer sb = new StringBuffer() ;\n\n if(genotypeBeanList != null && genotypeBeanList.size()>0){\n for(GenotypeBean genotype: genotypeBeanList){\n sb.append(genotype.getVarId()).append(\"\\t\").append(genotype.getChrom()).append(\":\")\n .append(genotype.getStartPos()).append(\"\\t\").append(genotype.getTraitCount())\n .append(\"\\t\").append(genotype.getStudyCount()).append(\"\\n\");\n }\n }\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "public boolean compareXMLMap(Element destinationDataElement, Map<Integer, String> map, List<Check> ck, String messageTitle, String keyName, int keyId)\n\t{\n\t\tboolean result = true;\n\t\ttry{\t\t\t\t\n\t\t\tfor (int j=0; j<ck.size(); j++) \n\t\t\t{\n\t\t\t\tCheck check = ck.get(j);\n\t\t\t\tNode destinationNode = destinationDataElement.selectSingleNode(check.DestinationPath);\n\t\t\t\tString sqlValue = map.get(j+1);\n\t\t\t\tif (destinationNode != null)\n\t\t\t\t{\n\t\t\t\t\tif (!destinationNode.getText().trim().equals(sqlValue)) \n\t\t\t\t\t{\n\t\t\t\t\t\tlogger.error(messageTitle + \"\\t\" + keyName + \":\" + map.get(keyId) + \"\\t\" + check.DestinationPath + \" Actual Value isn't equal with Expected Value: \" + destinationNode.getText().trim() + \",\" + sqlValue);\n\t\t\t\t\t\tresult = false;\n\t\t\t\t\t}\n\t\t\t\t}else if (sqlValue != null )\n\t\t\t\t{\n\t\t\t\t\tif (!sqlValue.trim().equals(\"\")) \n\t\t\t\t\t{\n\t\t\t\t\t\tlogger.error(messageTitle + \"\\t\" + keyName + \":\" + map.get(keyId) + \"\\t\" + \"CUSIP \" + map.get(4) + \"\\t\" + check.DestinationPath + \" Actual Value isn't equal with Expected Value: null, \" + sqlValue);\n\t\t\t\t\t\tresult = false;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (Exception ex) {\t\t\t\n\t\t\tlogger.error(messageTitle + \"\\t\" + \"CUSIP \" + map.get(4) + \"\\t\" + ex.toString());\n\t\t\tresult = false;\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public void test_caselessmatch11() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch11.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "boolean hasSearchValue();", "public void test_caselessmatch12() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch12.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch02() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch02.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch08() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch08.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "private void searchHashMap(String[] searchKey, String callNumber,int startYear, int endYear) {\n\t\t/* Temporarily stores next 'values' for a title keyword */\n\t\tArrayList<Integer> tempStore = new ArrayList<Integer>();\n\t\t/* Stores only the intersection 'values' of title keywords */\n\t\tCollection<Integer> intersection = new ArrayList<Integer>();\n\t\t/* Counts number of keywords found */\n\t\tint foundKeys = 0;\n\n\t\t/* Loop to iterate through title keywords and get key-value pair intersection */\n\t\tfor (String key : searchKey) {\n\t\t\tif (titleHashMap.containsKey(key)) {\n\t\t\t\tfoundKeys = foundKeys + 1;\n\t\t\t\ttempStore.addAll((titleHashMap.get(key))); /* Stores all found values */\n\t\t\t\tif (intersection.size() == 0) {\n\t\t\t\t\tintersection.addAll(titleHashMap.get(key));\n\t\t\t\t}\n\t\t\t\tintersection.retainAll(tempStore); /* Stores only common 'values' */\n\t\t\t\ttempStore.clear(); /* Clears temporary array*/\n\t\t\t}\n\t\t}\n\n\t\t/* Checks if all keywords were found */\n\t\tif(searchKey.length == foundKeys){\n\t\t/* Performs search of other fields via the reduced list of 'values' for matched record */\n\t\tfor (Integer i : intersection) {\n\t\t\tif ((callNumber.equals(\"\") || items.get(i.intValue()).getCallNumber().equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (items.get(i.intValue()).getYear() >= startYear && items.get(i.intValue()).getYear() <= endYear)) {\n\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\tSystem.out.println(items.get(i.intValue())); /* Prints found records from master list 'Reference' */\n\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t}\n\t\t}\n\t\t}\n\t}", "public void test_caselessmatch03() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch03.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch10() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch10.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch14() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch14.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch09() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch09.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "final void checkMatch(String input,String url,String title)\r\n {\r\n String searchLine=removeHTMLTags(input); // remove html tags before search.\r\n // If the line contains non - HTML text then search it.\r\n\tif(searchLine.length()>0)\r\n\t{\r\n\t if(app.matchCase) // Check if case sensitive search\r\n\t {\r\n\t if(app.matchWord) // Check if attempting to match whole word\r\n\t\t{\r\n\t\t if(searchLine.indexOf(\" \"+textToFind+\" \")!=-1 ||\r\n \t\t (searchLine.indexOf(textToFind)!=-1 && searchLine.length()==textToFind.length()) ||\r\n\t\t\t\t searchLine.indexOf(\" \"+textToFind)!=-1 && textToFind.charAt(textToFind.length()-1)==\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t searchLine.charAt(searchLine.length()-1))\r\n\t\t {\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\t\r\n\t\t }\r\n\t\t}\r\n\t\telse if(searchLine.indexOf(textToFind)!=-1)\r\n\t\t{\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t else\r\n\t {\r\n\t String lower1=searchLine.toLowerCase();\r\n\t\tString lower2=textToFind.toLowerCase();\r\n\t\t// Check if attempting to match the whole word.\r\n\t\tif(app.matchWord)\r\n\t\t{\r\n\t\t if(lower1.indexOf(\" \"+lower2+\" \")!=-1 || \r\n\t\t (lower1.indexOf(lower2)!=-1 && lower1.length()== lower2.length()) ||\r\n\t\t\t (lower1.indexOf(\" \"+lower2)!=-1 && lower2.charAt(lower2.length()-1) == \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t lower1.charAt(lower1.length()-1)))\r\n {\r\n\t\t // Found it display the match\r\n\t\t\tapp.addToList(url,searchLine,title);\r\n\t\t\thitsFound++;\r\n\t\t }\r\n\t\t}\r\n\t\telse if(lower1.indexOf(lower2)!=-1)\r\n\t\t{\r\n\t\t // Found it! Display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t}\r\n }", "public void test_caselessmatch13() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch13.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch15() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch15.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void execFuzzySearchRangeFunc(){\n\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n if(this.searchParam.contains(\":\")==true || this.searchParam.startsWith(\"chr\") == true){\n String chrom = \"\";\n int pstart = -1;\n int pend = -1;\n if(this.searchParam.indexOf(\":\") > -1 ){\n int idex = this.searchParam.indexOf(\":\");\n chrom = this.searchParam.substring(0,idex );\n System.out.println(\"chrom=\"+chrom);\n map.put(\"chrom\",chrom);\n if(this.searchParam.indexOf(\"-\") > -1 ){\n int idex1 = this.searchParam.indexOf(\"-\");\n pstart = Integer.parseInt(this.searchParam.substring(idex+1, idex1));\n pend = Integer.parseInt(this.searchParam.substring(idex1+1, this.searchParam.length()));\n map.put(\"startpos\",pstart);\n map.put(\"endpos\",pend);\n }else {\n pstart = Integer.parseInt(this.searchParam.substring(idex+1, this.searchParam.length()));\n map.put(\"startpos\",pstart);\n }\n\n }else if(this.searchParam.startsWith(\"chr\") == true){\n map.put(\"chrom\",this.searchParam);\n\n\n }\n }\n }\n\n int idenfilter = 0;\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n idenfilter =1;\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"species\",this.searchSpecies);\n }\n\n if(this.searchTrait != null&& this.searchTrait.equals(\"null\")==false && this.searchTrait.length()>0){\n idenfilter =1;\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"searchTrait\", this.searchTrait) ;\n }\n\n if(this.pvalue != null&& this.pvalue.equals(\"null\")==false && this.pvalue.length()>0){\n idenfilter =1;\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n List<SearchItemBean> searchlist = (List<SearchItemBean>) baseService.findResultList(\"cn.big.gvk.dm.Search.selectRangeBySearch\",map);\n if( searchlist != null ){\n genotypeBeanList = new ArrayList<GenotypeBean>();\n mapGeneBeanList = new ArrayList<MapGeneBean>();\n for(SearchItemBean tmpbean : searchlist){\n if(tmpbean.getItemType() == 1){ //variant\n Map cmp = new HashMap();\n cmp.put(\"genotypeid\",tmpbean.getItemId());\n GenotypeBean tbean = (GenotypeBean) baseService.findObjectByObject(\"cn.big.gvk.dm.Genotype.selectGenotypeByPos\",cmp);\n if(tbean != null ){\n List genotypelist = new ArrayList();\n genotypelist.add(tbean.getGenotypeId()) ;\n\n Map t = new HashMap();\n t.put(\"genotypelist\",genotypelist);\n List<GenotypeAnnotateGeneView> annotateview = baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectGenotypeByList\",t);\n if(annotateview != null && annotateview.size()>0 ){\n //here we need to filter the result\n Map filtermap = new HashMap();\n for(GenotypeAnnotateGeneView tview : annotateview){\n String fkey = tview.getMapGeneId()+\"_\"+tview.getConseqtype();\n if(filtermap.containsKey(fkey) == false){\n filtermap.put(fkey,tview);\n }\n }\n\n if(filtermap.size()>0){\n List<GenotypeAnnotateGeneView> alist = new ArrayList<GenotypeAnnotateGeneView>();\n Iterator it = filtermap.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry entry = (Map.Entry) it.next();\n GenotypeAnnotateGeneView val = (GenotypeAnnotateGeneView) entry.getValue();\n alist.add(val);\n }\n\n tbean.setGenotypeAnnotateGeneView(alist);\n }\n\n\n }\n\n //find association count\n GwasAssociationBean gwas = (GwasAssociationBean) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectAssociationCountByGenotypeid\",tbean.getGenotypeId());\n if(gwas != null){\n tbean.setTraitCount(gwas.getGwasCount());\n }\n\n //find studycount\n Map cmap = new HashMap();\n cmap.put(\"genotypeId\",tbean.getGenotypeId());\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n cmap.put(\"species\",this.searchSpecies);\n }\n\n\n GwasAssociationBean tg_bean1 = (GwasAssociationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectStudyCountByGenotypeid\",cmap);\n if(tg_bean1 != null ){\n tbean.setStudyCount(tg_bean1.getGwasCount());\n }\n\n genotypeBeanList.add(tbean) ;\n }\n\n\n\n\n }else if(tmpbean.getItemType() == 2){//gene\n\n Map cmp = new HashMap();\n cmp.put(\"gid\",tmpbean.getItemId()) ;\n MapGeneBean mgb = (MapGeneBean) baseService.findObjectByObject(\"cn.big.gvk.dm.MapGene.selectMapGeneCount\",cmp);\n if(mgb != null ){\n Map t = new HashMap();\n t.put(\"gId\",mgb.getGid()) ;\n t.put(\"count\",\"count\");\n\n //trait count\n GwasAssociationView gwas = (GwasAssociationView) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectGwasViewByGeneInfo\",t);\n if(gwas != null){\n mgb.setTraitCount(gwas.getTraitCount());\n }\n\n //study count\n StudyBean study = (StudyBean) baseService.findObjectByObject(\"cn.big.gvk.dm.study.selectStudyByMapGeneId\",t);\n if(study != null ){\n mgb.setStudyCount(study.getStudyCount());\n }\n\n //publication count\n PublicationBean publication = (PublicationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.publication.selectPubByGeneId\",t);\n if (publication != null ){\n mgb.setPublicationCount(publication.getPublicationCount());\n }\n mapGeneBeanList.add(mgb) ;\n\n }\n\n\n }\n }\n }\n StringBuffer sb = new StringBuffer();\n //generate hidden html table and then use tableExport.js export\n if(genotypeBeanList != null && genotypeBeanList.size()>0){\n for(GenotypeBean genotype: genotypeBeanList){\n sb.append(genotype.getVarId()).append(\"\\t\").append(genotype.getChrom()).append(\":\")\n .append(genotype.getStartPos()).append(\"\\t\").append(genotype.getTraitCount())\n .append(\"\\t\").append(genotype.getStudyCount()).append(\"\\n\");\n }\n }\n\n if(mapGeneBeanList != null && mapGeneBeanList.size()>0){\n for(MapGeneBean mapgene: mapGeneBeanList){\n sb.append(mapgene.getMapGeneId()).append(\"\\t\").append(mapgene.getMapGeneChrom()).append(\":\")\n .append(mapgene.getMapGeneStart()).append(\"-\").append(mapgene.getMapGeneEnd()).append(\"\\t\").append(mapgene.getTraitCount()).append(\"\\t\")\n .append(mapgene.getStudyCount()).append(\"\\n\");\n }\n }\n\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "private void queryEqualToValue(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tObject objValue;\n\n if ( data.length() >= 2 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tobjValue = data.get(1);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryEqualToValue : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"queryEqualToValue().addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryEqualToValue failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n };\n // Read data and react to changes\n if( objValue.getClass() == Double.class )\n \turlRef.equalTo(((Double)objValue).doubleValue()).addListenerForSingleValueEvent(listener);\n else if(objValue.getClass() == Boolean.class )\n \turlRef.equalTo(((Boolean)objValue).booleanValue()).addListenerForSingleValueEvent(listener);\n else if( objValue.getClass() == String.class )\n \turlRef.equalTo((String)objValue).addListenerForSingleValueEvent(listener);\n else\n \turlRef.equalTo(objValue.toString()).addListenerForSingleValueEvent(listener);\n }", "protected abstract String createSnpSearchQueryStr(HashMap<String,String> paramMap);", "private void matchStringValues(String vConfValue, String resValue, Comparison comparison) {\r\n if (vConfValue != null && resValue != null && vConfValue.equals(resValue)) {\r\n comparison.setMatchSatus(\"MATCH\");\r\n } else {\r\n comparison.setMatchSatus(\"MISMATCH\");\r\n matchResult = false;\r\n }\r\n }", "Match getResultMatch();", "public abstract HashMap search(String keyword);", "private void checkEntry(String expectedValue, String key,\n MultivaluedMap<String, String> templateParameters) {\n assertEquals(expectedValue, templateParameters.getFirst(key));\n }", "@Override\r\n\tprotected boolean remoteQuery(String qstr) {\r\n\t\tif (queryBk.getPublishYear() == null || queryBk.getPublishYear().equals(\"\")) {\r\n\t\t\tif (queryBk.getPublisher() == null || queryBk.getPublisher().equals(\"\")) {\r\n\t\t\t\tif (queryBk.parseEdition() == -1 && queryBk.parseVolume() == -1) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t} // end if\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tDocumentBuilderFactory f;\r\n\t\tDocumentBuilder b;\r\n\t\tDocument doc;\r\n\t\ttry {\r\n\t\t\tf = DocumentBuilderFactory.newInstance();\r\n\t\t\tb = f.newDocumentBuilder();\r\n\t\t\tURL url = new URL(Config.PRIMO_X_BASE + qstr);\r\n\r\n\t\t\tURLConnection con = url.openConnection();\r\n\t\t\tcon.setConnectTimeout(3000);\r\n\t\t\tdoc = b.parse(con.getInputStream());\r\n\t\t\tqueryStr = Config.PRIMO_X_BASE + qstr;\r\n\t\t\tdebug += queryStr + \"\\n\";\r\n\r\n\t\t\tnodesRecord = doc.getElementsByTagName(\"record\");\r\n\r\n\t\t\t/*\r\n\t\t\t * After fetched a XML doc, store necessary tags from the XMLs for further\r\n\t\t\t * matching.\r\n\t\t\t */\r\n\r\n\t\t\tfor (int i = 0; i < nodesRecord.getLength(); i++) {\r\n\t\t\t\tnodesControl = doc.getElementsByTagName(\"control\").item(i).getChildNodes();\r\n\t\t\t\tnodesDisplay = doc.getElementsByTagName(\"display\").item(i).getChildNodes();\r\n\t\t\t\tnodesLink = doc.getElementsByTagName(\"links\").item(i).getChildNodes();\r\n\t\t\t\tnodesSearch = doc.getElementsByTagName(\"search\").item(i).getChildNodes();\r\n\t\t\t\tnodesDelivery = doc.getElementsByTagName(\"delivery\").item(i).getChildNodes();\r\n\t\t\t\tnodesFacet = doc.getElementsByTagName(\"facets\").item(i).getChildNodes();\r\n\r\n\t\t\t\t// Return true if the query item is of ISO doc no. and of\r\n\t\t\t\t// published by ISO\r\n\t\t\t\tif (matchIsoPublisher() && matchIsoDocNo()) {\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (!strHandle.hasSomething(queryBk.getCreator())) {\r\n\t\t\t\t\tif (matchTitle() && matchPublisher() && matchYear()) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (matchTitle() && matchAuthor()) {\r\n\r\n\t\t\t\t\tif ((matchEdition() && matchPublisher() && matchYear())) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else if (!strHandle.hasSomething(queryBk.getPublisher()) && matchYear()\r\n\t\t\t\t\t\t\t&& strHandle.hasSomething(queryBk.getPublishYear())) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else if (matchEdition() && queryBk.parseEdition() > 1) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * As Primo X-service only shows the first FRBRed record, check the rest records\r\n\t\t\t\t\t\t * involving the same frbrgroupid.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tString frbrid = \"\";\r\n\t\t\t\t\t\tfrbrid = getNodeValue(\"frbrgroupid\", nodesFacet);\r\n\t\t\t\t\t\tString frbr_qstr = qstr + \"&query=facet_frbrgroupid,exact,\" + frbrid;\r\n\t\t\t\t\t\t// System.out.println(\"FRBR:\" + Config.PRIMO_X_BASE +\r\n\t\t\t\t\t\t// frbr_qstr);\r\n\t\t\t\t\t\tDocument doc2 = b.parse(Config.PRIMO_X_BASE + frbr_qstr);\r\n\t\t\t\t\t\tnodesFrbrRecord = doc2.getElementsByTagName(\"record\");\r\n\r\n\t\t\t\t\t\tfor (int j = 0; j < nodesFrbrRecord.getLength(); j++) {\r\n\r\n\t\t\t\t\t\t\tnodesControl = doc2.getElementsByTagName(\"control\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesDisplay = doc2.getElementsByTagName(\"display\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesLink = doc2.getElementsByTagName(\"links\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesSearch = doc2.getElementsByTagName(\"search\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesDelivery = doc2.getElementsByTagName(\"delivery\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesFacet = doc2.getElementsByTagName(\"facets\").item(j).getChildNodes();\r\n\r\n\t\t\t\t\t\t\tif (!strHandle.hasSomething(queryBk.getPublishYear()) && queryBk.parseEdition() == -1\r\n\t\t\t\t\t\t\t\t\t&& !strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t} // end if\r\n\r\n\t\t\t\t\t\t\tif (matchEdition() && matchTitle() && matchAuthor() && matchPublisher() && matchYear()) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} else if (matchEdition() && matchTitle() && matchAuthor() && matchYear()\r\n\t\t\t\t\t\t\t\t\t&& !strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} // end if\r\n\t\t\t\t\t\t} // end for\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\t\t\t} // end for\r\n\t\t} // end try\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tStringWriter errors = new StringWriter();\r\n\t\t\te.printStackTrace(new PrintWriter(errors));\r\n\t\t\tString errStr = \"PrimoQueryByNonISBN:remoteQuery()\" + errors.toString();\r\n\t\t\tSystem.out.println(errStr);\r\n\t\t\terrMsg = errStr;\r\n\t\t} // end catch\r\n\t\treturn false;\r\n\t}", "public void test_fn_matches_1() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-1.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-1.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public boolean compareXMLMapList(List<Element> destinationDataElements, List<Map<Integer, String>> mapList, List<Check> ck, String messageTitle, String keyName, int keyId)\n\t{\n\t\tboolean result = true;\n\t\ttry{\n\t\t\tfor (int i=0; i< destinationDataElements.size(); i++)\n\t\t\t{\n\t\t\t\tElement element = destinationDataElements.get(i);\n\t\t\t\tMap<Integer, String> map = mapList.get(i);\n\t\t\t\tfor (int j=0; j<ck.size(); j++) \n\t\t\t\t{\n\t\t\t\t\tCheck check = ck.get(j);\n\t\t\t\t\tNode destinationNode = element.selectSingleNode(check.DestinationPath);\n\t\t\t\t\tString sqlValue = map.get(j+1);\n\t\t\t\t\tif (destinationNode != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (destinationNode.getText().trim().endsWith(sqlValue)) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlogger.error(messageTitle + \"\\t\" + keyName + \":\" + map.get(keyId) + \"\\t\" + check.DestinationPath + \" Actual Value isn't equal with Expected Value: \" + destinationNode.getText().trim() + \",\" + sqlValue);\n\t\t\t\t\t\t\tresult = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if (sqlValue != null )\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!sqlValue.trim().equals(\"\")) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlogger.error(messageTitle + \"\\t\" + keyName + \":\" + map.get(keyId) + \"\\t\" + check.DestinationPath + \" Actual Value isn't equal with Expected Value: null, \" + sqlValue);\n\t\t\t\t\t\t\tresult = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (Exception ex) {\t\t\t\n\t\t\tlogger.error(messageTitle + \"\\t\" + ex.toString());\n\t\t\tresult = false;\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "protected boolean equals(URL paramURL1, URL paramURL2) {\n/* 336 */ String str1 = paramURL1.getRef();\n/* 337 */ String str2 = paramURL2.getRef();\n/* 338 */ return ((str1 == str2 || (str1 != null && str1.equals(str2))) && \n/* 339 */ sameFile(paramURL1, paramURL2));\n/* */ }", "private void findMatches(String key, String path, boolean caseSensitive, boolean fileName) {\n\t\tfor (String word : document) {\n\t\t\tif (contains(key, word, caseSensitive)) {\n\t\t\t\tif (fileName) {\n\t\t\t\t\tSystem.out.println(path);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void test_fn_matches_2() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-2.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-2.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "private boolean isXpathQueryMatching(TreeWalkerAuditEvent event) {\n boolean isMatching;\n if (xpathExpression == null) {\n isMatching = true;\n }\n else {\n isMatching = false;\n final List<Item> items = getItems(event);\n for (Item item : items) {\n final AbstractNode abstractNode = (AbstractNode) item;\n isMatching = abstractNode.getTokenType() == event.getTokenType()\n && abstractNode.getLineNumber() == event.getLine()\n && abstractNode.getColumnNumber() == event.getColumnCharIndex();\n if (isMatching) {\n break;\n }\n }\n }\n return isMatching;\n }", "public void setExactMatch(boolean exactMatch) {\n this.exactMatch = exactMatch;\n }", "private void searchFunction() {\n\t\t\r\n\t}", "void compareSearch();", "public static List<Handset> search(Map<String, String> reqParam) {\n\n\t\tList<Handset> temp = new ArrayList<Handset>();\n\t\ttemp.addAll(cache.values());\n\n\t\tfor (String param : reqParam.keySet()) {\n\t\t\tString val = (String) reqParam.get(param);\n\n\t\t\tswitch (param) {\n\t\t\tcase \"priceEur\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getRelease().getPriceEur() == Integer.parseInt(val))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"sim\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getSim().toLowerCase().contains(val.toLowerCase()))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"announceDate\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getRelease().getAnnounceDate().equalsIgnoreCase(val))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\ttemp = new ArrayList<Handset>();\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"filtered handset size \" + temp.size());\n\t\treturn temp;\n\n\t}", "protected abstract void onMatch(String value, Label end);", "public void test_fn_matches2args_1() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches2args-1.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches2args-1.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_16() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-16.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-16.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_8() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-8.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-8.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_21() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-21.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-21.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Override\n\tpublic void searchProduct(HashMap<String, String> searchKeys) {\n\t\tQueryStringFormatter formatter=new QueryStringFormatter(\"http://shopper.cnet.com/1770-5_9-0.html\");\n\t\t\n\t\ttry\n\t\t{\n//\t\t\tformatter.addQuery(\"url\", \"search-alias\");\n\t\t\tif(searchKeys.get(ProductSearch.BRAND_NAME)!=null && searchKeys.get(ProductSearch.PRODUCT_NAME)!=null)\n\t\t\t{\n\t\t\t\tformatter.addQuery(\"query\",(String)searchKeys.get(ProductSearch.BRAND_NAME) +\" \"+ (String)searchKeys.get(ProductSearch.PRODUCT_NAME)+\" \" );\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tString color=(String)searchKeys.get(ProductSearch.COLOR);\n\t\t\tString min=(String)searchKeys.get(ProductSearch.MIN_PRICE);\n\t\t\tString max=(String)searchKeys.get(ProductSearch.MAX_PRICE);\n\t\t\tif(color!=null){\n\t\t\t\tformatter.addQuery(\"color\",color);\n\t\t\t}\n\t\t\tif(min.length()>0&&max.length()>0)\n\t\t\t{\n\t\t\t//formatter.addQuery(\"color\",(String)searchKeys.get(HeadPhonesSearch.COLOR_S)+\" Price between $\"+(String)searchKeys.get(HeadPhonesSearch.MIN_PRICE)+\" to $\"+(String)searchKeys.get(HeadPhonesSearch.MAX_PRICE));\n\t\t\t\t\n\t\t\t\tformatter.addQuery(\" Price between $\",min +\" to $\"+max);\n\t\t\t}\n\t\t\tformatter.addQuery(\"tag\",\"srch\");\n\t\t\t\n\t\t\tString finalQueryString=\"http://shopper.cnet.com/1770-5_9-0.html\"+formatter.getQueryString();\n\t\t\tSystem.out.println(\"query string :\"+formatter.getQueryString());\n\t\t\tSystem.out.println(\"Query:\"+finalQueryString);\n\t\t\tprocessMyNodes(finalQueryString);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\t\t\t\n\t\t\n\t}", "public void test_fn_matches_17() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-17.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-17.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_7() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-7.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-7.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "private Boolean is_request_match(HashMap<String, HashMap<String, String>> queue_data,\r\n\t\t\tHashMap<String, HashMap<String, String>> design_data) {\n\t\tBoolean is_match = Boolean.valueOf(true);\r\n\t\tList<String> check_items = new ArrayList<String>();\r\n\t\tcheck_items.add(\"Software\");\r\n\t\tcheck_items.add(\"System\");\r\n\t\tcheck_items.add(\"Machine\");\r\n\t\tIterator<String> item_it = check_items.iterator();\r\n\t\twhile (item_it.hasNext()) {\r\n\t\t\tString item_name = item_it.next();\r\n\t\t\tHashMap<String, String> design_map = design_data.get(item_name);\r\n\t\t\tHashMap<String, String> queue_map = queue_data.get(item_name);\r\n\t\t\tBoolean request_match = design_map.equals(queue_map);\r\n\t\t\tif (!request_match) {\r\n\t\t\t\tis_match = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn is_match;\r\n\t}", "private boolean findMapValue(Map<String, String> map, String searchValue) {\n\t\treturn (findMapKeyByValue(map, searchValue) != null);\r\n\t}", "private void search(Object value)\r\n\t\t{\n\r\n\t\t}", "public void test_fn_matches_11() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-11.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-11.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "void findMatchings(boolean isProtein) {\n\n GraphDatabaseFactory dbFactory = new GraphDatabaseFactory();\n HashSet<String > searchSpaceList = new HashSet<>();\n GraphDatabaseService databaseService = dbFactory.newEmbeddedDatabase(graphFile);\n for (int id: queryGraphNodes.keySet()) {\n if(isProtein)\n searchSpaceList.add(queryGraphNodes.get(id).label);\n else\n searchSpaceList.add(String.valueOf(queryGraphNodes.get(id).labels.get(0)));\n }\n for(String x: searchSpaceList) {\n ResourceIterator<Node> xNodes;\n try(Transaction tx = databaseService.beginTx()) {\n xNodes = databaseService.findNodes(Label.label(x));\n tx.success();\n }\n\n while (xNodes.hasNext()) {\n Node node = xNodes.next();\n if (searchSpaceProtein.containsKey(x))\n searchSpaceProtein.get(x).add(node.getId());\n else {\n HashSet<Long> set = new HashSet<>();\n set.add(node.getId());\n searchSpaceProtein.put(x, set);\n }\n }\n\n }\n\n if(isProtein)\n search(0, databaseService, true);\n else\n search(0, databaseService, false);\n databaseService.shutdown();\n }", "public void test_fn_matches_18() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-18.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-18.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public String searchByMaterial(String string, ArrayList<String> materiallist, int count, Set<String> keys, Collection<String> values, Map<String, String> dataTable1) {\nfor(String s:materiallist) {\r\n\t\t\t\r\n\t\t\tif (string.equals(s)) {\r\n\t\t\t//\tSystem.out.print(s);\r\n\t\t\t\tcount--;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\t}\r\nSystem.out.println(\"A List of Home that matches the Material \"+string+\":\");\r\n\r\nfor(String k: keys) {\r\n\t\r\n\tarraytoprintkey=k.split(\"_\");\r\n\r\n\r\n\t\r\n\t\tif(arraytoprintkey[1].equals(string)) {\r\n\t\t\t\r\n\t\t\t\tSystem.out.print(k);\r\n\t\t\t\tSystem.out.println(\" \"+dataTable1.get(k));\r\n\t\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n}\r\nSystem.out.println();\r\n\t\tif(count==0) {\r\n\t\t\treturn string;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn null;\r\n\t}", "JsonObject search(JsonObject params, ConcurrentMap<String, String> precisionMap);", "public void test_fn_matches_6() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-6.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-6.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Test\n public void test_singleRetrieve_withParens_ParamQuery() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"(samaccountname=mary.olowu)\");\n request.setParameters(parameters);\n\n Map<String, Object> recordMap = null;\n BridgeError unexpectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n recordMap = record.getRecord();\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertNotNull(recordMap);\n }", "public void test_fn_matches_26() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-26.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-26.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_28() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-28.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-28.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public static ArrayList<Result> findMatches(Query query, DataManager myVocab){\n\n\t\t//Uncomment this for logging in this class\t\n//\t\tmyLogger.setLevel(Level.INFO); \n\n\t\t// get the term we're going to search for and\n\t\t// take out any leading or trailing whitespaces\n\t\tString querystr = query.getQuery();\n\t\tquerystr = querystr.trim();\n\t\tString uncleaned = querystr;\n\t\t\n\t\t// This is in case of numeric entries. Google Refine doesn't seem\n\t\t// to have int cell types, instead it adds an invisible .0 to all\n\t\t// numbers. This fixes that issue, as it sometimes causes false negatives.\n\t\tif (querystr.endsWith(\".0\")){\n\t\t Pattern p = Pattern.compile(\"[^0-9\\\\.]+\");\n\t\t Matcher m = p.matcher(querystr);\n\t\t boolean result = m.find();\n\t\t if (!result){\n\t\t \t querystr = querystr.substring(0, querystr.length()-2);\n\t\t }\n\t\t}\n\t\t// see if it's in the synonyms map, if it is\n\t\t// replace it with the appropriate term, if it's\n\t\t// not, don't do anything. \n\n\t\tif (myVocab.subMap.get(querystr)!=null){\n\t\t\tquerystr = myVocab.subMap.get(querystr);\n\t\t\tquery.setQuery(querystr);\n\t\t}\n\t\t\n\t\t// Clean up the query string if it isn't case/punctuation sensitive\n\t\tif (!myVocab.capsSensitive()){\t\t\n\t\t\tquerystr = querystr.toLowerCase();\n\t\t}\n\t\tif (! myVocab.punctSensitive()){\t\t\n\t\t\tquerystr = querystr.replaceAll(\"[\\\\W_]\", \"\");\n\t\t}\n\t\t\n\t\t// see if it's in the synonyms map, if it is\n\t\t// replace it with the appropriate term, if it's\n\t\t// not, don't do anything. \n\t\tif(myVocab.subMap.get(querystr)!=null){\n\t\t\tquerystr = myVocab.subMap.get(querystr);\n\t\t\tquery.setQuery(querystr);\n\t\t}\n\n\t\tString type = query.getType();\n\n\t\t// This ArrayList is the results that are going to be returned. \n\t\tArrayList<Result> results = getDirectMatches(myVocab, querystr, uncleaned, type);\n\t\t\n\t\t// If there's a perfect match return it.\n\t\tif (results.size() == 1 && results.get(0).match){\n\t\t\treturn results;\n\t\t}else{\n\t\t\t// Otherwise, add the initial ones and try matching\n\t\t\t// based on distance to vocabulary terms.\n\t\t\tresults.addAll(distanceMatching(query, myVocab));\n\t\t\t\n\t\t\t// Split the original query term by space and non-alphanumeric characters \n\t\t\t// to find how many words there are.\n\t\t\t//querystr = query.getQuery().replaceAll(\"[\\\\W_]\", \" \");\n\t\t\tString [] termList = querystr.split(\" \");\n\t\t\t\n\t\t\t// if there's more than one, run bagOfWords\n\t\t\t// which tries to find a match for each of the words.\n\t\t\tif (termList.length > 1){\n\t\t\t\tresults.addAll(bagOfWords(query, myVocab));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Clean the results: no duplicates\n\t\t// no extra results to return, and sorted\n\t\t// them by score before returning them\n\t\tresults = removeDuplicates(results);\n\t\t\n\t\t// They do not need to be reduced in \n\t\t// number if there are fewer than \n\t\t// the max results.\n\t\t// The pruneResults sorts them\n\t\t// by score already.\n\t\tif(query.getLimit()!=null){\n\t\t\tresults = pruneResults(results,Integer.parseInt(query.getLimit()));\n\t\t}else{\n\t\t\tresults = pruneResults(results,MAX_RESULTS);\n\t\t}\n\t\t\t\n\t\tresults = sortByScore(results);\n\t\tfor (int i = 0; i< results.size(); i++){\n//\t\t\tmyLogger.log(Level.SEVERE,results.get(i).getScore()+ \" is bigger than 100?\");\n\t\t\tif(results.get(i).getScore() > (double)100){\n\t\t\t\tresults.get(i).setScore((double)100 - (results.get(i).getScore()-(double)100));\n//\t\t\t\tmyLogger.log(Level.SEVERE,results.get(i).getScore()+\" is bigger than 100! and was set to \"+\n//\t\t\t\t\t\t((double)100 - (results.get(i).getScore()-(double)100)));\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "public static String search(String obj) {\n\t\tMap<String, Object> map = objectMapper.parser().parseMap(obj);\n\t\tif (map.keySet().containsAll(reqQuery)){\n\t\t\treturn objectMapper.toJson(ValueIndexEngine.search(map));\n\t\t}\n\t\treturn badresp;\n\t}", "public void test_fn_matches_12() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-12.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-12.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches2args_4() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches2args-4.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches2args-4.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "boolean exactMatch(FlowRule rule);", "@Override\n\t\tpublic void searchProduct(HashMap<String, String> searchKeys) {\n\t\t\t \n\t\t\tQueryStringFormatter formatter=new QueryStringFormatter(\"http://www.target.com/s\");\n\t\t\ttry{\n\t\t\t\t//formatter.addQuery1(\"query\", \"ca77b9b4beca91fe414314b86bb581f8en20\");\n\t\t\t\t\n\t\t\t\tString color=(String)searchKeys.get(ProductSearch.COLOR);\n\t\t\t\tString min=(String)searchKeys.get(ProductSearch.MIN_PRICE);\n\t\t\t\tString max=(String)searchKeys.get(ProductSearch.MAX_PRICE);\n\t\t\t\t\n\t\t\t\tif((searchKeys.get(ProductSearch.BRAND_NAME)!=null) && (searchKeys.get(ProductSearch.PRODUCT_NAME)!=null)){\n\t\t\t\t\t\n\t\t\t\tformatter.addQuery1(\"searchTerm\",(String)searchKeys.get(ProductSearch.BRAND_NAME)+\" \"+(String)searchKeys.get(ProductSearch.PRODUCT_NAME));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(color!=null){\n\t\t\t\tformatter.addQuery1(\"\",color);\n\t\t\t\t}\n\t\t\t\tif(min.length()>0&&max.length()>0)\n\t\t\t\t{\n\t\t\t\t//formatter.addQuery(\"color\",(String)searchKeys.get(HeadPhonesSearch.COLOR_S)+\" Price between $\"+(String)searchKeys.get(HeadPhonesSearch.MIN_PRICE)+\" to $\"+(String)searchKeys.get(HeadPhonesSearch.MAX_PRICE));\n\t\t\t\t\t\n\t\t\t\t\tformatter.addQuery1(\" Price between $\",min +\" to $\"+max);\n\t\t\t\t}\n\t\t\t\tString finalQueryString=\"http://www.target.com/s\"+formatter.getQueryString();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Query:\"+finalQueryString);\n\t\t\t\tprocessMyNodes(finalQueryString);\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}", "protected abstract boolean matches(String paramString, int paramInt);", "public void test_fn_matches_27() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-27.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-27.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_13() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-13.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-13.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_4() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-4.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-4.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_3() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-3.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-3.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "java.lang.String getSearchValue();", "public void test_fn_matches_14() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-14.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-14.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches2args_2() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches2args-2.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches2args-2.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_20() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-20.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-20.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_19() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-19.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-19.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "private Double calculateMatchScore(String query, ConceptMap matchedMapping) {\n return 10000d;\n }", "public void test_fn_matches2args_5() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches2args-5.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches2args-5.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void stringContains(Map<String, String> parameters, SvcLogicContext ctx) throws SvcLogicException {\n SliPluginUtils.checkParameters(\n parameters, new String[]{STRING_TO_SEARCH, STRING_TO_FIND, RESULT_CTX_STRING}, LOG);\n setIfNotNull(parameters.get(RESULT_CTX_STRING),\n Boolean.toString(parameters.get(STRING_TO_SEARCH).contains(parameters.get(STRING_TO_FIND))),\n ctx);\n }", "public void test_fn_matches_15() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-15.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-15.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public static boolean matches(String param, String matchValue) {\n\t\tSystem.out.println(\"[propMatch] Matching \"+param+\" : \"+System.getProperty(param)+\" = \"+matchValue+\" ? \" + matchValue.equalsIgnoreCase(System.getProperty(param)));\n\t\treturn matchValue.equalsIgnoreCase(System.getProperty(param));\n\t}", "public boolean valueExists(String tableName, String key, Object value) throws SQLException, NullPointerException {\n ResultSet rs = mysql.query(\"SELECT * FROM `\"+ tableName +\"` WHERE `\" + key + \"` LIKE '\" + value.toString() + \"'\");\n\n // Gets the next line from the table\n if(rs.next()){\n // return true if the String is available\n return rs.getString(key) != null;\n }\n\n // Value and Key are not identified\n return false;\n }", "public boolean compareXMLNoOrderMapList(List<Element> destinationDataElements, List<Map<Integer, String>> mapList, List<Check> ck, String messageTitle, String keyName, int keyId)\n\t{\n\t\tboolean result = true;\n\t\ttry{\n\t\t\tfor (int i=0; i<mapList.size(); i++)\n\t\t\t{\t\t\t\t\t\n\t\t\t\tMap<Integer, String> map = mapList.get(i);\n\t\t\t\tfor (int j=0; j<destinationDataElements.size(); j++)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tElement element = destinationDataElements.get(j);\n\t\t\t\t\tif (element.selectSingleNode(keyName).getText().trim().equals(map.get(keyId)))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (int k=0; k<ck.size(); k++) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCheck check = ck.get(k);\n\t\t\t\t\t\t\tNode destinationNode = element.selectSingleNode(check.DestinationPath);\n\t\t\t\t\t\t\tString sqlValue = map.get(k+1);\n\t\t\t\t\t\t\tif (destinationNode != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!destinationNode.getText().trim().equals(sqlValue)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlogger.error(messageTitle + \"\\t\" + keyName + \":\" + map.get(keyId) + \"\\t\" + check.DestinationPath + \" Actual Value isn't equal with Expected Value: \" + destinationNode.getText().trim() + \",\" + sqlValue);\n\t\t\t\t\t\t\t\t\tresult = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if (sqlValue != null )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!sqlValue.trim().equals(\"\")) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlogger.error(messageTitle + \"\\t\" + keyName + \":\" + map.get(keyId) + \"\\t\" + check.DestinationPath + \" Actual Value isn't equal with Expected Value: null, \" + sqlValue);\n\t\t\t\t\t\t\t\t\tresult = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (j == (destinationDataElements.size() -1 ))\n\t\t\t\t\t{\n\t\t\t\t\t\tlogger.error(messageTitle + \"\\t\" + keyName + \":\" + map.get(keyId) + \"\\tCan't find it in Destination Page\");\n\t\t\t\t\t\tresult = false;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}catch (Exception ex) {\t\t\t\n\t\t\tlogger.error(messageTitle + \"\\t\" + ex.toString());\n\t\t\tresult = false;\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public void test_fn_matches2args_3() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches2args-3.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches2args-3.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public boolean search(String key){\n DataPair dp = getDataPair(key);\n BTNode out=null;\n if (dp != null)\n out = search(dp);\n return out != null;\n }", "@Test\n public void test_singleRetrieve_withoutParens_ParamQuery() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n Map<String, Object> recordMap = null;\n BridgeError expectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n } catch (BridgeError e) {\n expectedError = e;\n }\n\n assertNotNull(expectedError);\n }", "SearchResponse query(SearchRequest request, Map<SearchParam, String> params);", "public void test_fn_matches_9() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-9.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-9.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_matches_5() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-5.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/fn-matches-5.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Test\n public void mapContains() {\n check(MAPCONT);\n query(MAPCONT.args(MAPNEW.args(), 1), false);\n query(MAPCONT.args(MAPENTRY.args(1, 2), 1), true);\n }", "@Test\n public void extraQuestionMarkStillMatches() {\n createFids(\"/someAdminPage.html*\", null);\n\n FilterInvocation fi = createFilterInvocation(\"/someAdminPage.html?x=2/aa?y=3\", null);\n\n Collection<ConfigAttribute> response = fids.lookupAttributes(fi.getRequestUrl(), null);\n assertEquals(def, response);\n\n fi = createFilterInvocation(\"/someAdminPage.html??\", null);\n\n response = fids.lookupAttributes(fi.getRequestUrl(), null);\n assertEquals(def, response);\n }", "public void searchFunction1() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView_recylce.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "public abstract QueryElement addEquals(String property, Object value);", "private final boolean isMatch(Element e, boolean isMatch) {\n\n\t\tCollection<Attribute> attributes = e.getAttributes().values(); //PERF\n\t\t//Attribute[] myAttributes = this.getAttributes();\n\n\t\tisMatch = ( e.getName() == null || e.getName().equals(\"*\") ) \n\t\t|| ( (e.isQbeEquality() && e.getName().equalsIgnoreCase(this.getName())) || (!e.isQbeEquality() && !e.getName().equalsIgnoreCase(this.getName())) ) ;\n\n\t\tisMatch = isMatch\n\t\t&& (e.getValue() == null || (this.getValue() != null && \n\t\t\t\t(e.isQbeEquality() && e.getValue().equalsIgnoreCase(this.getValue())) || (!e.isQbeEquality() && !e.getValue().equalsIgnoreCase(this.getValue())) ));\n\n\t\tString attName = null, value = null, myValue = null;\n\t\tAttribute myAtt = null;\n\t\tboolean attMustMatch;\n\n\t\tfor (Attribute att : attributes) {\n\t\t\t\n\t\t\tattName = att.getName();\n\t\t\tvalue = att.getValue();\n\t\t\tattMustMatch = att.isQbeMatch();\n\n\t\t\tmyAtt = this.getAttribute(attName);\n\n\t\t\tif (myAtt != null)\n\t\t\t\tmyValue = myAtt.getValue();\n\n\t\t\t// (value == null) 071207 \n\t\t\tisMatch = isMatch\n\t\t\t&& ( (value == null) || (myAtt != null\n\t\t\t\t\t&& value.equals(\"*\") ) \n\t\t\t\t\t|| (myValue != null && myValue\n\t\t\t\t\t\t\t.equalsIgnoreCase(\"*\")) || (myValue != null && \n\t\t\t\t\t\t\t\t\t( attMustMatch && myValue.equalsIgnoreCase(value) ) || ( !attMustMatch && !myValue.equalsIgnoreCase(value) ) ));\n\n\t\t\t\n\t\t\tif ( ! isMatch )\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor (Element child : e.getAllChildren()) {\n\n\t\t\tboolean match = false;\n\n\t\t\tfor (Element myChild : this.getAllChildren()) {\n\n\t\t\t\tmatch = match || myChild.isMatch(child, isMatch);\n\t\t\t\t\n\t\t\t\tif ( match )\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tisMatch = isMatch && match;\n\n\t\t\tif ( !isMatch )\n\t\t\t\tbreak;\n\n\t\t}\n\t\treturn isMatch;\n\n\t}", "abstract public void search();", "public static String getTheMatchResult(String searchType) throws IOException {\n String matchResult = null;\n CouchBaseUtility bucketExtractor = new CouchBaseUtility();\n CouchBaseUtility.openBucket();\n String query = null;\n String array1[] = Serenity.getCurrentSession().get(\"SearchCategory\").toString().split(\":\");\n if (searchType.equals(\"case\")) {\n if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"CaseId\")) {\n query = \"Select * from CaseManagement where documentType='Case' and caseId = '\" + Serenity.getCurrentSession()\n .get(\"CaseId\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"PaymentId\")) {\n query = \"Select * from CaseManagement where paymentTransaction.txnPaymentId = '\" + Serenity\n .getCurrentSession().get(\"OutgoingPaymentID\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"OrderId\")) {\n query = \"Select * from CaseManagement where paymentTransaction.txnOrderId = '\" + Serenity\n .getCurrentSession().get(\"OrderId\").toString() + \"'and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"CustomerId\")) {\n query = \"Select * from CaseManagement where customer.customerId = '\" + Serenity\n .getCurrentSession().get(\"customerId\").toString() + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"ConfirmationNumber\")) {\n query = \"Select * from CaseManagement where paymentTransaction.confirmationNumber = '\"\n + Serenity.getCurrentSession().get(\"ConfirmationNumber\").toString()\n + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Region & Country\")) {\n query = \"Select * from CaseManagement where regionInfo.regionCode='\" + Serenity\n .getCurrentSession().get(\"RegionCode\").toString() + \"' and regionInfo.countryCode='\"\n + Serenity.getCurrentSession().get(\"CountryCode\").toString()\n + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Assigned - Saved/Pended\")) {\n query =\n \"Select * from CaseManagement where caseStatusId = '4' and classification='\" + array1[2]\n + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Assigned - Working\")) {\n query =\n \"Select * from CaseManagement where caseStatusId = '1' and classification='\" + array1[2]\n + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Assigned - Not Picked Up\")) {\n query =\n \"Select * from CaseManagement where caseStatusId = '2' and classification='\" + array1[2]\n + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Completed - Pass/Fail\")) {\n query =\n \"Select * from CaseManagement where caseStatusId = '9' and classification='\" + array1[2]\n + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Escalated - In Queue\")) {\n query = \"Select * from CaseManagement where caseStatusId = '48' and classification='\"\n + array1[2] + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().contains(\"New\")) {\n query = \"Select * from CaseManagement where caseStatusId = '41' and classification='\"\n + array1[2] + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .contains(\"Release to Queue - Skipped\")) {\n query =\n \"Select * from CaseManagement where caseStatusId = '5' and classification='\" + array1[2]\n + \"' and processing_Stage='\" + array1[1] + \"' and documentType='Case'\";\n }\n } else if ((searchType.equals(\"payment\")) && (Serenity.getCurrentSession()\n .get(\"goodBadPaymentFlag\").equals(false))) {\n if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"PaymentId\")) {\n query =\n \"SELECT cp.payment.platform, cp.payment.orderID as orderId, cp.payment.sourcePaymentID as paymentId, cc.caseId, \"\n + \"cp.payment.customerID as customerId, party.name.name as customer, cp.payment.creationDate as created, cp.payment.expectedValueDate as valueDate, \"\n + \"cp.payment.currency, cp.payment.amount, party.address.countryCode as country , cc.regionInfo.countryName as BranchCountryName,cc.regionInfo.regionName as RegionName \"\n + \" From CaseManagement cc Join CaseManagement cp ON KEYS(cc.paymentTransaction.paymentDocumentID) \"\n + \"UNNEST cp.payment.parties AS party WHERE party.type = 'Customer' AND cc.paymentTransaction.txnPaymentId ='\"\n + Serenity.getCurrentSession().get(\"OutgoingPaymentID\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"OrderId\")) {\n query =\n \"SELECT cp.payment.platform, cp.payment.orderID as orderId, cp.payment.sourcePaymentID as paymentId, cc.caseId, \"\n + \"cp.payment.customerID as customerId, party.name.name as customer, cp.payment.creationDate as created, cp.payment.expectedValueDate as valueDate, \"\n + \"cp.payment.currency, cp.payment.amount, party.address.countryCode as country , cc.regionInfo.countryName as BranchCountryName,cc.regionInfo.regionName as RegionName \"\n + \" From CaseManagement cc Join CaseManagement cp ON KEYS(cc.paymentTransaction.paymentDocumentID) \"\n + \"UNNEST cp.payment.parties AS party WHERE party.type = 'Customer' AND cc.paymentTransaction.txnOrderId ='\"\n + Serenity.getCurrentSession().get(\"OrderId\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"CustomerId\")) {\n query =\n \"SELECT cp.payment.platform, cp.payment.orderID as orderId, cp.payment.sourcePaymentID as paymentId, cc.caseId, \"\n + \"cp.payment.customerID as customerId, party.name.name as customer, cp.payment.creationDate as created, cp.payment.expectedValueDate as valueDate, \"\n + \"cp.payment.currency, cp.payment.amount, party.address.countryCode as country , cc.regionInfo.countryName as BranchCountryName,cc.regionInfo.regionName as RegionName \"\n + \" From CaseManagement cc Join CaseManagement cp ON KEYS(cc.paymentTransaction.paymentDocumentID) \"\n + \"UNNEST cp.payment.parties AS party WHERE party.type = 'Customer' AND cp.payment.customerID ='\"\n + Serenity.getCurrentSession().get(\"customerId\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"ConfirmationNumber\")) {\n query =\n \"SELECT cp.payment.platform, cp.payment.orderID as orderId, cp.payment.sourcePaymentID as paymentId, cc.caseId, \"\n + \"cp.payment.customerID as customerId, party.name.name as customer, cp.payment.creationDate as created, cp.payment.expectedValueDate as valueDate, \"\n + \"cp.payment.currency, cp.payment.amount, party.address.countryCode as country , cc.regionInfo.countryName as BranchCountryName,cc.regionInfo.regionName as RegionName \"\n + \" From CaseManagement cc Join CaseManagement cp ON KEYS(cc.paymentTransaction.paymentDocumentID) \"\n + \"UNNEST cp.payment.parties AS party WHERE party.type = 'Customer' AND cp.payment.customerID ='\"\n + Serenity.getCurrentSession().get(\"customerId\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"Region & Country\")) {\n query =\n \"SELECT cp.payment.platform, cp.payment.orderID as orderId, cp.payment.sourcePaymentID as paymentId, cc.caseId, \"\n + \"cp.payment.customerID as customerId, party.name.name as customer, cp.payment.creationDate as created, cp.payment.expectedValueDate as valueDate, \"\n + \"cp.payment.currency, cp.payment.amount, party.address.countryCode as country , cc.regionInfo.countryName as BranchCountryName,cc.regionInfo.regionName as RegionName \"\n + \" From CaseManagement cc Join CaseManagement cp ON KEYS(cc.paymentTransaction.paymentDocumentID) \"\n + \"UNNEST cp.payment.parties AS party WHERE party.type = 'Customer' AND cp.payment.customerID ='\"\n + Serenity.getCurrentSession().get(\"customerId\").toString() + \"'\";\n }\n\n } else if (searchType.equals(\"payment\") && (Serenity.getCurrentSession()\n .get(\"goodBadPaymentFlag\").equals(true))) {\n if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"PaymentId\")) {\n query =\n \"select CaseManagement.payment.platform,CaseManagement.payment.orderID,CaseManagement.payment.sourcePaymentID,CaseManagement.payment.customerID,CaseManagement.payment.parties[0].name.name,CaseManagement.payment.parties[0].address.countryCode,CaseManagement.payment.creationDate,\"\n + \"CaseManagement.payment.expectedValueDate,CaseManagement.payment.currency,CaseManagement.payment.amount,CaseManagement.payment.regionInfo.countryName,CaseManagement.payment.regionInfo.regionName \"\n + \"from CaseManagement where documentType='Payment' and CaseManagement.payment.sourcePaymentID='\"\n + Serenity.getCurrentSession().get(\"OutgoingPaymentID\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString().equals(\"OrderId\")) {\n query =\n \"select CaseManagement.payment.platform,CaseManagement.payment.orderID,CaseManagement.payment.sourcePaymentID,CaseManagement.payment.customerID,CaseManagement.payment.parties[0].name.name,CaseManagement.payment.parties[0].address.countryCode,CaseManagement.payment.creationDate,\"\n + \"CaseManagement.payment.expectedValueDate,CaseManagement.payment.currency,CaseManagement.payment.amount,CaseManagement.payment.regionInfo.countryName,CaseManagement.payment.regionInfo.regionName \"\n + \"from CaseManagement where documentType='Payment' and CaseManagement.payment.orderID='\"\n + Serenity.getCurrentSession().get(\"OrderId\").toString() + \"'\";\n } else if (Serenity.getCurrentSession().get(\"SearchCategory\").toString()\n .equals(\"CustomerId\")) {\n query =\n \"select CaseManagement.payment.platform,CaseManagement.payment.orderID,CaseManagement.payment.sourcePaymentID,CaseManagement.payment.customerID,CaseManagement.payment.parties[0].name.name,CaseManagement.payment.parties[0].address.countryCode,CaseManagement.payment.creationDate,\"\n + \"CaseManagement.payment.expectedValueDate,CaseManagement.payment.currency,CaseManagement.payment.amount,CaseManagement.payment.regionInfo.countryName,CaseManagement.payment.regionInfo.regionName \"\n + \"from CaseManagement where documentType='Payment' and CaseManagement.payment.customerID='\"\n + Serenity.getCurrentSession().get(\"customerId\").toString() + \"'\";\n }\n }\n // bucketExtractor.fetchAndSaveDocuments();\n\n bucketExtractor.queryAndSaveDocumentIDsInSession(query, searchType);\n Response res = (Response) Serenity.getCurrentSession().get(\"apiResponse\");\n //return res.then().extract().statusCode();\n String searchCaseAPIResponse = res.then().extract().response().getBody().asString();\n //JSONObject obj=(JSONObject)JSONValue.parse(searchCaseAPIResponse);\n //JSONArray arr=(JSONArray)obj.get(\"cases\");\n JSONArray array;\n if (searchType.equals(\"payment\")) {\n array = JsonPath.read(searchCaseAPIResponse, \"payments[*]\");\n } else {\n array = JsonPath.read(searchCaseAPIResponse, \"cases[*]\");\n }\n\n System.out.println(\"response body : \" + searchCaseAPIResponse);\n try {\n if (compare(Serenity.getCurrentSession().get(\"caseDetailsFromQuery\").toString(),\n searchCaseAPIResponse, searchType, array.size())) {\n matchResult = \"Pass\";\n\n } else {\n matchResult = \"Fail\";\n\n }\n } catch (Exception e) {\n\n }\n\n String testData = Serenity.getCurrentSession().get(\"stringBuffResult\").toString();\n Allure.addAttachment(\"Json Comparison Details\", testData);\n //Serenity.recordReportData().withTitle(\"Json Comparison Details\").andContents(testData);\n return matchResult;\n }" ]
[ "0.56665176", "0.5568806", "0.55559605", "0.55549", "0.5445827", "0.5426583", "0.539326", "0.5380633", "0.5371723", "0.53705764", "0.5353068", "0.5313782", "0.5302679", "0.5298944", "0.52938545", "0.52773976", "0.5256809", "0.5248224", "0.52199215", "0.5195118", "0.51895356", "0.5180552", "0.5158408", "0.5141162", "0.51380944", "0.5137839", "0.5129267", "0.5093433", "0.5076878", "0.5050753", "0.50401455", "0.50374323", "0.5036063", "0.5008813", "0.4998728", "0.49702093", "0.49660864", "0.4959329", "0.4955077", "0.49324006", "0.49262002", "0.49245167", "0.4913634", "0.49045745", "0.49039432", "0.48996198", "0.4898085", "0.488994", "0.48699227", "0.4868525", "0.48629898", "0.48612866", "0.48538977", "0.4852384", "0.4852004", "0.48515046", "0.48434064", "0.4839641", "0.48368236", "0.48356223", "0.4823569", "0.48202503", "0.4817439", "0.48151377", "0.48139402", "0.4805621", "0.48008612", "0.4797039", "0.479463", "0.47934148", "0.47848064", "0.4783164", "0.47807735", "0.47738948", "0.47637275", "0.4763478", "0.47630993", "0.47593105", "0.47513208", "0.47491497", "0.47477743", "0.4747547", "0.47468087", "0.4740936", "0.47376078", "0.4736603", "0.47289735", "0.47272304", "0.47207636", "0.4720693", "0.47188187", "0.47156712", "0.47103292", "0.47085074", "0.4707362", "0.4699236", "0.46947604", "0.46805832", "0.46746784", "0.46705478" ]
0.65773094
0
Returns all the attributes of the node passed
public void getAttributes(Iterator<?> attrs, HashMap<String, String> document) throws IOException { while (attrs.hasNext()) { Attribute attr = (Attribute) attrs.next(); String attribute_value = attr.getValue(); String attribute_name = attr.getName().getLocalPart(); if (!attribute_value.isEmpty()) addNode(attribute_name, attribute_value, document); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Iterable<? extends XomNode> attributes();", "public List<Jattr> attributes() {\n NamedNodeMap attributes = node.getAttributes();\n if (attributes == null)\n return new ArrayList<Jattr>();\n List<Jattr> jattrs = new ArrayList<Jattr>();\n for (int i = 0; i < attributes.getLength(); i++) {\n jattrs.add(new Jattr((Attr) attributes.item(i)));\n }\n return jattrs;\n }", "public Attributes[] getAllAttributes() \r\n {\r\n\tfinal Attributes[] array = new Attributes[ntMap.size()];\r\n\tint i=0;\r\n\tfor (final NodeTypeHolder nt : ntMap.values())\r\n\t array[i++] = nt.getAttributes();\r\n\treturn array;\r\n }", "public List<TLAttribute> getAttributes();", "@Override\n public List<ConfigurationNode> getAttributes(String name)\n {\n return attributes.getSubNodes(name);\n }", "Attributes getAttributes();", "public java.util.Collection getAttributes();", "Map<String, String> getAttributes();", "public String getAttributes() {\n\t\treturn getProperty(\"attributes\");\n\t}", "Map<String, Object> getAttributes();", "Map<String, Object> getAttributes();", "Map<String, Object> getAttributes();", "public static Map<String, String> getAllAttributes(Node aNode) throws BaseException\r\n\t{\r\n\t\tMap<String, String> attributesMap = new HashMap<String, String>();\r\n\t\tif (aNode.hasAttributes())\r\n\t\t{\r\n\t\t\tNamedNodeMap attrList = aNode.getAttributes();\r\n\t\t\tint numAttr = attrList.getLength();\r\n\t\t\tfor (int counter = 0; counter < numAttr; counter++)\r\n\t\t\t{\r\n\t\t\t\tattributesMap.put(attrList.item(counter).getNodeName(), attrList.item(counter).getNodeValue());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn attributesMap;\r\n\t}", "public Map<String, String> getAttributes();", "public Map<String, Object> getAttrs();", "public String[] getAllAttributes() {\n\t\treturn allAttributes;\n\t}", "Map<String, String> getAttr(NodeKey key);", "@Override\r\n\t\tpublic NamedNodeMap getAttributes()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public Map<String, Object> getAttributes();", "public Map<String, Object> getAttributes();", "List<Attribute<T, ?>> getAttributes();", "public abstract Map<String, Object> getAttributes();", "public String[] getRelevantAttributes();", "ArrayList getAttributes();", "public Map<String, String> getAttributes() {\n\t\treturn atts;\n\t}", "public String getAttributes() {\n return attributes;\n }", "public String getAttributes() {\n return attributes;\n }", "IAttributes getAttributes();", "@Override\r\n\tpublic Map<String, String> getAttributes() {\r\n\t\treturn this.attributes;\r\n\t}", "public final String[] getAttributes() {\n return this.attributes;\n }", "public Attribute[] getAttributes()\n {\n return _attrs;\n }", "public abstract Map getAttributes();", "public Attributes getAttributes() { return this.attributes; }", "public List<Pair<String, String>> getAttributes() {\n\t\treturn attributes;\n\t}", "public List<String> attributes() {\n return this.attributes;\n }", "public ArrayList<Attribute> getAttributeList(){\n\t\treturn child.getAttributeList();\n\t}", "@Override\n public ArrayList<SCANAttributesXML> getAttributes() {\n return mesoCfgXML.getAttributesData();\n }", "public List<Attribute> getAttributes() {\r\n return attributes;\r\n }", "public Attributes getAttributes(String nodeType)\r\n {\r\n\tfinal NodeTypeHolder nt = ntMap.get(nodeType);\r\n\treturn (nt == null) ? null : nt.getAttributes();\r\n }", "private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}", "public ArrayList<Attribute> getAttributeList(){\n\t\t\n\t\treturn(child.getAttributeList());\n\t}", "public ArrayList<Attribute> getAttributeList(){\n\t\t\n\t\treturn(child.getAttributeList());\n\t}", "public Map<String, String> getAttributes() {\n\t\treturn attributes;\n\t}", "public Set<String> getAllAttributes() {\r\n if (parent.isPresent()) {\r\n return Sets.union(attributeMap.keySet(), parent.get().getAllAttributes());\r\n } else {\r\n return getAttributes();\r\n }\r\n }", "public List<GenericAttribute> getAttributes() {\n return attributes;\n }", "public List<Attribute<?>> getAttributes() {\r\n\t\treturn Collections.unmodifiableList(attributes);\r\n\t}", "Map<String, Object> getAttributes(String path) throws IOException;", "@Override\r\n\tpublic Map<String, Object> getAttributes() {\n\t\treturn null;\r\n\t}", "public List<Attribute> getAttributes() {\n return Collections.unmodifiableList(attributes);\n }", "public final native JsArray<Attribute> getAttributes() /*-{\n\t\t\treturn this.attributes;\n\t\t}-*/;", "public Attributes getAttributes() {\n\t\treturn null;\r\n\t}", "public Set<String> getAttributes() {\r\n return attributeMap.keySet();\r\n }", "public Map<String, Set<String>> getAttributes() {\n return attributes;\n }", "public VAttribute[] getAttributes() throws VlException \n {\n return getAttributes(getAttributeNames());\n }", "@Override\n\tpublic AttributeMap getAttributes() {\n\t\treturn defaultEdgle.getAttributes();\n\t}", "public String getListAttributesPref()\n {\n Serializer<Collection<RecognizedElement>> serializer = new Serializer<Collection<RecognizedElement>>();\n return serializer.serialize(tree.getChildren());\n }", "public String getAttributes() {\n StringBuilder sb = new StringBuilder();\n\n // class\n if (!getClassAttribute().isEmpty()) {\n sb.append(\"class='\").append(getClassAttribute()).append(\"' \");\n }\n\n // data-*\n if (!getDataAttributes().isEmpty()) {\n sb.append(getDataAttributes()).append(\" \");\n }\n\n // hidden\n if (isHiddenAttribute()) {\n //sb.append(\"hidden \");\n addSpecialAttribute(\"hidden\");\n }\n\n // id\n if (!getIdAttribute().isEmpty()) {\n sb.append(\"id='\").append(getIdAttribute()).append(\"' \");\n }\n\n // style\n if (!getStyleAttribute().isEmpty()) {\n sb.append(\"style='\").append(getStyleAttribute()).append(\"' \");\n }\n\n // title\n if (!getTitleAttribute().isEmpty()) {\n sb.append(\"title='\").append(getTitleAttribute()).append(\"' \");\n }\n\n // custom\n if (!getCustomAttributes().isEmpty()) {\n sb.append(getCustomAttributes()).append(\" \");\n }\n \n // special\n if (!getSpecialAttribute().isEmpty()) {\n sb.append(getSpecialAttribute());\n }\n\n return sb.toString().trim();\n }", "public WSLAttributeList getAttributes() {return attributes;}", "public String getNodeAttribute() {\n\treturn nodeAttribute;\n }", "public Collection<HbAttributeInternal> attributes();", "default List<String> getAttributeNames() {\n\t\treturn getAttributes().stream().map(v -> v.getName()).collect(Collectors.toList());\n\t}", "java.util.List<tendermint.abci.EventAttribute> \n getAttributesList();", "@Override\n public List<MappedField<?>> getAttributes() {\n return attributes;\n }", "public Map<String, NodeAttribute> getRefreshAttributes() throws Exception;", "public Object[] getAttributes() {\n\t\treturn new Object[] {true}; //true for re-init... \n\t}", "@Override\n\tpublic Attributes getAttributes() {\n\t\treturn (Attributes)map.get(ATTRIBUTES);\n\t}", "public final Map<String, DomAttr> getAttributesMap() {\n return attributes_;\n }", "public void parseAttribute(Node node) {\n\t\tNamedNodeMap attList = node.getAttributes();\n\t\tif(attList != null) {\n\t\t\tfor(int n=0; n<attList.getLength(); n++) {\n\t\t\t\tNode att = attList.item(n);\n\t\t\t\tlogger.info(att.getNodeName() + \":\" + att.getNodeValue());\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic ArrayList<Object> getAttributeList() {\n\t\tArrayList<Object> attributes = new ArrayList<Object>();\n//\t\tattributes.add(\"s2014_age\");\n//\t\tattributes.add(\"s2014_prog_skill\");\n//\t\tattributes.add(\"s2014_uni_yrs\");\n//\t\tattributes.add(\"s2014_os\");\n//\t\tattributes.add(\"s2014_progLangs\");\n//\t\tattributes.add(\"s2014_engSkill\");\n\t\tattributes.add(\"s2014_favAnimal\");\n\t\tattributes.add(\"s2014_MoreMtns\");\n//\t\tattributes.add(\"s2014_winter\");\n\t\tattributes.add(\"s2014_favColor\");\n//\t\tattributes.add(\"s2014_neuralNetwork\");\n//\t\tattributes.add(\"s2014_vectorMachine\");\n//\t\tattributes.add(\"s2014_sql\");\n//\t\tattributes.add(\"s2014_favSQLServ\");\n//\t\tattributes.add(\"s2014_apriori\");\n\t\treturn attributes;\n\t}", "@Override\n public int getAttributeCount()\n {\n return attributes.getSubNodes().size();\n }", "Collection<DynamicAttribute> getActiveAttributes(String nodeType, boolean searchableOnly, String[] attributeTypes);", "public Enumeration getAttributes()\n {\n ensureLoaded();\n return m_tblAttribute.elements();\n }", "public String [] getNames () { \n return this.listAttributes(); \n }", "private static Map<String,String> getStringAttributes(Node node) {\r\n Map<String,String> ret = new HashMap<String,String>();\r\n \r\n NodeList children = node.getChildNodes();\r\n for (int j = 0; j < children.getLength(); j++) {\r\n Node attr = children.item(j); // an \"attr\" element which is a child\r\n // of the node\r\n if( attr.getNodeName().equals(\"attr\") ) {\r\n String key = getAttribute(attr, \"name\");\r\n NodeList values = attr.getChildNodes(); // a \"string\" element\r\n // which is a child of\r\n // attr\r\n for (int k = 0; k < values.getLength(); k++) {\r\n if (values.item(k).getNodeName().equals(\"string\")) {\r\n Node labelNode = values.item(k).getFirstChild();\r\n if (labelNode != null)\r\n ret.put(key, labelNode.getNodeValue());\r\n }\r\n }\r\n }\r\n }\r\n \r\n return ret;\r\n }", "public Map<String, String> getAttributes() {\n return Collections.unmodifiableMap(attributes);\n }", "@Override\n\tpublic <E> Iterator<Attr<E>> attrs() {\n\t\treturn null;\n\t}", "public static Map<String, String> getAllAttributes(Document xmlDoc) throws BaseException\r\n\t{\r\n\t\tNode rootNode = xmlDoc.getDocumentElement();\r\n\t\treturn getAllAttributes(rootNode);\r\n\t}", "public TableAttributes getAttributes() {\n\treturn attrs;\n }", "public List<String> getAttributeNames() {\n\t\treturn new ArrayList<>(attributes.keySet());\n\t}", "public List<Attribute> getAttribute() {\n\t if (attribute==null) {\n\t attribute = new ArrayList<>();\n\t }\n\n\t return attribute;\n\t}", "public Enumeration getAttributes() {\n\t\treturn url.getAttributes();\n }", "public void dumpAttributeList(Attributes atts)\n {\n\tif (atts.getLength() == 0)\n\t System.out.println(nestString + \" (no attributes) \");\n\telse\n\t {\n\t System.out.println(nestString + \" AttributeList: \");\n\t for (int i = 0; i < atts.getLength(); i++)\n\t\t{\n\t\tString name = atts.getQName(i);\n\t\t// String type = atts.getType(i);\n\t\tString value = atts.getValue(i);\n\t\tSystem.out.println(nestString + \" name=\" + name + \n\t\t\t\t \" value=\" + value);\n\t\t}\n\t }\n\t}", "public FactAttributes getAttributes() {\r\n return localAttributes;\r\n }", "public Attribute[] getAvailableAttributes(){\n Attribute attributes[] = {\n TextAttribute.FAMILY,\n TextAttribute.WEIGHT,\n TextAttribute.POSTURE,\n TextAttribute.SIZE,\n\t TextAttribute.TRANSFORM,\n TextAttribute.SUPERSCRIPT,\n TextAttribute.WIDTH,\n };\n\n return attributes;\n }", "private byte attributes() {\n return (byte) buffer.getShort(ATTRIBUTES_OFFSET);\n }", "java.util.Map<java.lang.String, java.lang.String> getAttributesMap();", "java.lang.String getAttribute();", "protected Map<String, String> getElementAttributes() {\n // Preserve order of attributes\n Map<String, String> attrs = new HashMap<>();\n\n if (this.getName() != null) {\n attrs.put(\"name\", this.getName());\n }\n if (this.getValue() != null) {\n attrs.put(\"value\", this.getValue());\n }\n\n return attrs;\n }", "@Override\n\tpublic String[] getAttrNames() {\n\t\treturn null;\n\t}", "@Override\n public ConfigurationNode getAttribute(int index)\n {\n return attributes.getNode(index);\n }", "private ArrayList<Attribute> getAttributes() {\n\t\tif (attributes != null && attributes instanceof ArrayList)\n\t\t\treturn ((ArrayList<Attribute>) attributes);\n\t\telse {\n\t\t\tArrayList<Attribute> tmp = new ArrayList<Attribute>();\n\t\t\tif (attributes != null)\n\t\t\t\ttmp.addAll(attributes);\n\t\t\tattributes = tmp;\n\t\t\treturn tmp;\n\t\t}\n\t}", "private List<String> getAttributes(ModuleURN inURN) throws Exception {\r\n MBeanInfo beanInfo = getMBeanServer().getMBeanInfo(inURN.toObjectName());\r\n List<String> attribs = new ArrayList<String>();\r\n for(MBeanAttributeInfo info: beanInfo.getAttributes()) {\r\n attribs.add(info.getName());\r\n }\r\n return attribs;\r\n }", "public java.lang.Integer getAttributes() {\r\n return attributes;\r\n }", "public List getAttributeNames() {\n log.debug(\"getAttributeNames()\");\n ResultSet resultSet = attrNST.selectRows(\"name\");\n return resultSet.toStringList(1);\n }", "public String[] getAttributeArray() {\n\t\treturn url.getAttributeArray();\n }", "Map getPassThroughAttributes();", "public HashSet<String> getUsefulAttributes() {\n\t\t \n\t\tHashSet<String> attr = new HashSet<>();\n\t\tQuery firstQ = this.rset.get(1); // get first query on rewriting set 'rset'.\n\t\t\n\t\tGrouping gPart = firstQ.getQueryTriple()._1();\n\t attr.addAll(gPart.getUsefulAttributes());\n\t \n\t Measuring mPart = firstQ.getQueryTriple()._2();\n\t attr.addAll(mPart.getMeasuringAttributes());\n\t \n\t\treturn attr;\n\t}", "public HashMap<String, String> GetRawAttributes();", "public List<AttributeDeclaration> getAttributeDeclarations() {\n return Collections.unmodifiableList(attributeDeclarations);\n }", "public FactAttribute[] getAttribute() {\r\n return localAttribute;\r\n }", "public static Stream<Attr> attributesOf(@Nonnull final Element element) {\n\t\treturn streamOf(element.getAttributes()).map(Attr.class::cast); //the nodes should all be instances of Attr in this named node map\n\t}" ]
[ "0.7980219", "0.75635475", "0.7540011", "0.73922384", "0.7369008", "0.73688376", "0.72310114", "0.7156985", "0.7120728", "0.7057952", "0.7057952", "0.7057952", "0.7050269", "0.6986972", "0.6953669", "0.69430816", "0.69206226", "0.6920584", "0.68986285", "0.68986285", "0.68835956", "0.6876794", "0.68687963", "0.68687934", "0.6850877", "0.68507004", "0.68507004", "0.6847605", "0.68213826", "0.68162215", "0.6813621", "0.6810296", "0.6747105", "0.67323226", "0.6713332", "0.6710946", "0.6655484", "0.6653971", "0.66450685", "0.663692", "0.66205436", "0.66205436", "0.6602451", "0.6598453", "0.6597167", "0.6596396", "0.6589357", "0.6561652", "0.6560163", "0.6546189", "0.64995724", "0.64877164", "0.6476496", "0.646776", "0.64631045", "0.64592296", "0.64420414", "0.6426995", "0.64266396", "0.64124495", "0.64003444", "0.63945097", "0.6384698", "0.6384657", "0.6378549", "0.63696826", "0.6360359", "0.6332417", "0.63314164", "0.63304615", "0.63300186", "0.631887", "0.63045573", "0.62730545", "0.6251358", "0.62184757", "0.62112653", "0.61783576", "0.6165668", "0.6132205", "0.6120748", "0.6117286", "0.6114395", "0.6098374", "0.60960996", "0.6092042", "0.6091434", "0.60766464", "0.6074646", "0.6065385", "0.60639834", "0.60617095", "0.6044365", "0.60395825", "0.6034761", "0.60271025", "0.602674", "0.6020776", "0.6012679", "0.60068893", "0.599307" ]
0.0
-1
Add value to the document hashmap
public void addNode(String node_name, String node_value, HashMap<String, String> document) throws IOException { PropertyValues property = new PropertyValues(); String key = property.getPropValues(node_name); if (key == null) key = node_name; if (!document_types.contains("|" + node_name + "|") && !formatter_nodes.contains("|" + node_name + "|")) { if (document.containsKey(key)) { document.put(key, document.get(key) + ", " + node_value); } else { document.put(key, node_value); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToMap(){\n\t\tInteger hc = currentQuery.hashCode();\n\t\tif (!hmcache.containsKey(hc)) {\n\t\t\thmcache.put(hc, 0);\n\t\t}else{\n\t\t\tInteger val = hmcache.get(hc) + (currentQuery.getWords().size());\n\t\t\thmcache.put(hc, val);\n\t\t}\n\t}", "public void addUserInfo(HashMap<String,Object> map){\n fStore.collection(\"user_profiles\").document(fUser.getUid()).set(map).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n return;\n }\n });\n }", "public void add(K key,V value) {\n DictionaryPair pair = new DictionaryPair(key,value);\n int index = findPosition(key);\n\n if (index!=DsConst.NOT_FOUND) {\n list.set(index,pair);\n } else {\n list.addLast(pair);\n this.count++;\n }\n }", "void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }", "private void addDoc(String path, SnapshotVersion readTime, String field, int value) {\n MutableDocument doc = doc(path, 10, map(field, value));\n remoteDocumentCache.add(doc, readTime);\n }", "private void hashMapPutPlusOne(Map<String, Integer> map, String key) {\n Integer value = map.get(key);\n if (value == null)\n map.put(key, 1);\n else\n map.put(key, value + 1);\n }", "public DocMap(Gedcomx doc) {\n // Build all the maps.\n update(doc);\n }", "@Override\n public final void onPut(final K key, final V value) {\n if (!freqPutMap.containsKey(key)) {\n freqPutMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqPutMap.put(key, freqPutMap.get(key) + 1);\n }", "public void insert (Map<String, String> map) throws IOException {\n assert indexWriter != null : \"IndexWriter is uninitialized. Initialize it before inserting.\";\n LOGGER.info(\"Indexing {}\", map);\n final Document document = new Document();\n map.forEach((k, v) -> document.add(new StringField(k, v, Field.Store.YES)));\n indexWriter.addDocument(document);\n }", "public void add(int number) {\n // Write your code here\n if(map.containsKey(number)){\n map.put(number, map.get(number) + 1);\n }else{\n list.add(number);\n map.put(number, 1);\n }\n }", "private void addEntry(String word, String file, int position, HashMap<String, ArrayList<Integer>> subIndex) {\n\t\tif (subIndex.containsKey(word)) {\r\n\t\t\t// checks if the file name is a key in the nested\r\n\t\t\t// hash map of the word\r\n\t\t\tsubIndex.get(word).add(position);\r\n\t\t\r\n\t\t/*\r\n\t\t * if the word is not yet a key, create a new entry in the hash map.\r\n\t\t * Create new hash map to hold the file the word is found and an array\r\n\t\t * to find the position Then put that in the wordMap hash map as value\r\n\t\t * and the word as a key.\r\n\t\t */\r\n\t\t}else {\r\n\t\t\tsubIndex.put(word, new ArrayList<Integer>());\r\n\t\t\tsubIndex.get(word).add(position);\r\n\t\t\r\n\t\t}\r\n\t\r\n\t}", "public boolean add(K key, V value){\r\n int loc = find(key);\r\n if(needToRehash()){\r\n rehash();\r\n }\r\n Entry<K,V> newEntry = new Entry<>(key,value);\r\n if(hashTable[loc]!= null && hashTable[loc].equals(key))\r\n return false;\r\n else{\r\n hashTable[loc] = newEntry;\r\n size++;\r\n return true;\r\n }\r\n }", "@Override\n public void process(String key, String value) {\n logger.info(\"Adding record to state store\");\n this.wordStateStore.put(key, value);\n }", "private void addSeenInfo(SeenInfo value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureSeenInfoIsMutable();\n seenInfo_.add(value);\n }", "public void add( String documentKey ) {\r\n relatedDocuments.add( documentKey );\r\n relatedDocumentsCounter++;\r\n globalRelatedDocumentsCounter++;\r\n\r\n if (relatedDocumentsCounter >= MAX_TRIGRAMS_PER_REFERENCEFILE) {\r\n saveInternal();\r\n }\r\n }", "public void add(Object key, Object value){\n\t\tint bucketLoc = key.hashCode() % _numBuckets;\r\n\t\tif(_locate(key) == null){\r\n\t\t\tNode newNode = new Node(key,value,_buckets[bucketLoc]);\r\n\t\t\t_buckets[bucketLoc] = newNode;\r\n\t\t\t_count++;\r\n\t\t\t_loadFactor = (double) _count / (double) _numBuckets;\r\n\t\t\tif(_loadFactor > _maxLoadFactor){\r\n\t\t\t\t_increaseTableSize();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t_buckets[bucketLoc]._value = value;\r\n\t\t}\r\n\t}", "private void addToMap(Word from, Word to) {\n Set<Word> s = wordMap.get(from);\n if(s == null) {\n s = new HashSet<>();\n wordMap.put(from, s);\n }\n s.add(to);\n }", "private void UpdateAddNestedValue(){\n notebookRef.document(\"IpWOjXtIgGJ2giKF4VTp\")\r\n// .update(KEY_Tags+\".tag1\", false);\r\n\r\n // ****** For Practice If we have nested over nested values likke:\r\n // tags-> tag1-> nested_tag-> nested_tag2 :true we write like\r\n .update(\"tags.tag1.nested_tag.nested_tag2\", true);\r\n\r\n }", "public void add(int number) {\n // Write your code here\n if(map.containsKey(number)) {\n map.put(number, map.get(number) + 1);\n }else {\n map.put(number, 1);\n }\n }", "private static void addOrIncrement(HashMap<Pair<String, String>, Integer> m, Pair<String, String> p){\n // In python, this is a defaultdict.\n if(!m.containsKey(p)){\n m.put(p, 0);\n }\n m.put(p, m.get(p)+1);\n }", "void add(K key, V value);", "private void add(String key) {\n dict = add(dict, key, 0);\n }", "public void add(String key,String value){\n int index=hash(key);\n if (arr[index] == null)\n {\n arr[index] = new Llist();\n }\n arr[index].add(key, value);\n\n\n }", "void addEntry(K key, V value);", "public void insert(Key key, Value value) {\r\n root.insert(key,value);\r\n size++;\r\n }", "public void map(String _, Document value,\n OutputCollector<String, Integer> output) {\n }", "protected static void addArgToResultsMap(String sArg, Object oValue, Map map)\n {\n Object oValuePrev = map.get(sArg);\n if (oValuePrev == null)\n {\n map.put(sArg, oValue);\n return;\n }\n\n List listVals;\n if (oValuePrev instanceof List)\n {\n listVals = (List) oValuePrev;\n }\n else\n {\n map.put(sArg, listVals = new LinkedList());\n listVals.add(oValuePrev);\n }\n listVals.add(oValue);\n }", "void put(MongoDBEntry<K, V> entry);", "void add(ThreadLocal<?> key, Object value) {\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n if (k == null) {\n table[index] = key.reference;\n table[index + 1] = value;\n return;\n }\n }\n }", "public void add(Document document) {\n document.setIsAllocated();\n documents.add(document);\n }", "public synchronized boolean add(String key, String content) {\n if (store.get(key) != null) {\n logger.warning(\"Key \" + key + \" already in store\");\n return false;\n }\n logger.info(\"Adding key \" + key);\n ensureMapSize();\n MapData mapData = new MapData();\n mapData.setContent(content);\n mapData.setTime((new Date()).getTime());\n store.put(key, mapData);\n tally.put(key, 0);\n return true;\n }", "public void put(Text key,LongWritable value){\n\t\tindexcontainer.put(key, value);\n\t}", "public static <K> void addNumber (Map<? super K, Integer> toAdd, K key, int val) {\n if (toAdd.get(key) == null) {\n toAdd.put(key, val);\n } else {\n toAdd.put(key, toAdd.get(key) + val);\n }\n }", "private void addSeenInfo(\n int index, SeenInfo value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureSeenInfoIsMutable();\n seenInfo_.add(index, value);\n }", "public void addKeyValue (String key, String value){\r\n\t\tcodebook.put(key, value);\r\n\t}", "public void map()\n\t{\n\t // key is the documentId\n\t\t// value is the url\n\t\t//fetch the document using the documentId\n\t\t\n\t}", "public V add(K key, V value);", "private void addValueToStatMap(HashMap<String, ArrayList<Double>> map, String key, Double value) {\r\n if (!map.containsKey(key)) {\r\n map.put(key, new ArrayList<Double>());\r\n }\r\n map.get(key).add(value);\r\n }", "public void add(K key, V value) {\r\n if(this.table.containsKey(key)){\r\n BloomFilterUtil bf = (BloomFilterUtil)table.get(key).getHash();\r\n bf.put(value);\r\n Node<V> node = (Node<V>) table.get(key);\r\n node.getValues().add(value);\r\n }else {\r\n BloomFilterUtil bf = BloomFilterUtil.create(funnel,\r\n expectedInsertions,\r\n fpp,\r\n (BloomFilterUtil.Strategy) hashStrategy);\r\n bf.put(value);\r\n Node<V> node = new Node<V>(value, bf);\r\n table.put(key, node);\r\n }\r\n }", "public Document addDocument(Document doc) {\n\t\tthis.documents.put(doc.getIdentifier(),doc);\n\t\treturn doc;\n\t}", "private void addEntity(String name, int value)\n\t{\n\t\tmap.add(name, value);\n\t}", "boolean add(Object key, Object value);", "private void addTableEntry(HashMap<Integer,Integer> map, int key){\n int count = map.containsKey(key) ? map.get(key) : 0;\n map.put(key, count + 1); //If wasn't present, this is set to 1, else its incremented\n\n return;\n }", "public void add(PhotonDoc doc);", "public void add(int number) {\n //map.put(number, map.getOrDefault(number, 0) + 1);\n if (map.containsKey(number)) {\n map.put(number, map.get(number) + 1);\n } else {\n map.put(number, 1);\n }\n }", "boolean add(String token, ArrayList<Posting> documentList) { \r\n\t\tif (token == null)\r\n\t\t\treturn false;\r\n\t\tif (map.containsKey(token)) {\r\n\t\t\tmap.put(token, mergeTwoPostingList(map.get(token), documentList));\r\n\t\t\treturn true;\r\n\t\t} else { \r\n\t\t\tmap.put(token, documentList);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public V add(K key, V value)\r\n\t{\r\n\t\tint slot = findSlot(key, false); // check if key already exists\r\n\t\tV oldVal = null;\r\n\t\t\r\n\t\tif (slot >= 0)\r\n\t\t{\r\n\t\t\tMapEntry<K, V> e = table[slot];\r\n\t\t\toldVal = e.setValue(value);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tslot = findSlot(key, true); // find empty slot for adding\r\n\t\t\ttable[slot] = new MapEntry<>(key, value);\r\n\t\t\tcount++;\r\n\t\t\tif (count >= maxCount)\r\n\t\t\t{\r\n\t\t\t\trehash();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn oldVal;\r\n\t}", "public void put(DNA key, long value) {\n total_in++;\n if(this.debug)\n System.out.println(\"ExtHash::put >> insertando cadena: \" + key.toString() + \", hashCode: \" + key.hashCode());\n\n Node actual_node = this.getReference(key);\n if(this.debug)\n System.out.println(\"ExtHash::put >> altura del nodo: \" + actual_node.getAltura());\n\n int reference_page = actual_node.getReference();\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n\n int last_page = reference_page;\n ArrayList<Integer> last_content = content;\n\n int total_elements = 0, altura = actual_node.getAltura();\n while(true) {\n\n if(this.debug)\n System.out.println(\"ExtHash::put >> referencia a pagina: \" + reference_page);\n\n if(this.debug) {\n System.out.println(\"ExtHash::put >> contenido de la pagina:\");\n for(int i=0; i<content.size(); i++)\n System.out.println(\" \" + content.get(i));\n }\n\n total_elements += last_content.get(0);\n if(last_content.get(0) != B-2) {\n if(this.debug)\n System.out.println(\"ExtHash::put >> insertando en: \" + last_page);\n\n ArrayList<Integer> new_content = new ArrayList<>();\n\n new_content.add(last_content.get(0) + 1);\n for(int i=1; i<=last_content.get(0); i++)\n new_content.add(last_content.get(i));\n\n new_content.add(key.hashCode());\n\n if(new_content.get(0) == B-2) {\n total_active_block++;\n new_content.add(this.last);\n\n ArrayList<Integer> last = new ArrayList<>();\n last.add(0);\n this.fm.write(last, this.last); this.out_counter++;\n\n this.last++;\n\n }\n\n if(this.debug) {\n System.out.println(\"ExtHash::put >> contenido en pagina despues de insercion:\");\n for(int i=0; i<new_content.size(); i++)\n System.out.println(\" \" + new_content.get(i));\n }\n\n this.fm.write(new_content, reference_page); this.out_counter++;\n\n total_elements++; // por el elmento que se inserto.\n break;\n\n }\n if(this.debug)\n System.out.println(\"ExtHash::put >> acceciendo a siguiente pagina\");\n\n last_page = last_content.get(B-1);\n last_content = this.fm.read(last_page); this.in_counter++;\n }\n\n // se lleno la pagina y aun no se llega al final del hashing.\n if(total_elements >= B - 2 && altura < 30){\n if(this.debug)\n System.out.println(\"ExtHash::put >> limite de pagina, iniciando duplicacion\");\n\n this.duplicate(actual_node);\n }\n }", "private void addToHashmap(String key, Long timestamp){\r\n\t\tkeyHashMap.putIfAbsent(key, new PriorityQueue<Long>());\r\n\t\tsynchronized(keyHashMap.get(key)){\r\n\t\t\tSystem.out.println(\"Added Key: \" + key + \" Time: \" + timestamp);\r\n\t\t\tkeyHashMap.get(key).add(timestamp);\r\n\t\t}\r\n\t}", "Object put(Object key, Object value);", "public static void addToMap()\n {\n Map<String, Integer> map = new HashMap<>();\n\n BiConsumer<String, Integer> mapAdderEveryTime = (s, i) -> map.put(s, i);\n\n mapAdderEveryTime.accept(\"key1\", 4);\n mapAdderEveryTime.accept(\"key2\", 4);\n\n BiConsumer<String, Integer> mapAdderIfPresent = (s, i) -> {\n map.computeIfPresent(s, (key, value) -> (value % 4 == 0) ? 0 : value +1);\n };\n\n mapAdderIfPresent.accept(\"key1\", 1);\n\n System.out.println(map);\n }", "void add(String key);", "void add( Map< String, Object > paramMap );", "@Override\n public void add(K key, V value) {\n if(containsKey(key)){\n List<V> v = getValues(key);\n if(v.contains(value)){return;}\n }\n internalGetValue(key).add(value);\n }", "public void add(int number) {\n\t map.put(number,map.containsKey(number)?map.get(number)+1:1);\n\t}", "@Override\n public void addValue(T value) {\n Vertex<T> vertex = new Vertex<>(value);\n vertices.put(value,vertex);\n }", "private void addSeenInfo(\n SeenInfo.Builder builderForValue) {\n ensureSeenInfoIsMutable();\n seenInfo_.add(builderForValue.build());\n }", "void addTransientEntry(K key, V value);", "public void addField(String key, Object value) {\n\t\tput(key, value);\n\t}", "DefinedProperty relAddProperty( long relId, int propertyKey, Object value );", "public synchronized void register(int docid, String word, int frequency) {\n // load the hashtable for this term\n Object val = index.get(word);\n\n // define a new int[1] to store the frequency\n int[] fArray = new int[1];\n fArray[0] = frequency;\n\n if (val == null) {\n // if this term isn't in the index, create a new hashtable and store\n // it\n HashMap newList = new HashMap();\n newList.put(docid, fArray);\n index.put(word, newList);\n } else {\n // if the term exists, simply store appropriately\n ((HashMap) val).put(docid, fArray);\n }\n }", "@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }", "void putValue(String key, Object data);", "private void addOne(String value){\n\t\tif (numCache.containsKey(value)){\n\t\t\tnumCache.put(value, numCache.get(value) + 1);\n\t\t}else{\n\t\t\tnumCache.put(value, 1);\n\t\t}\n\t}", "@Override\r\n\tpublic void insert(Map<String, String> map) {\n\t\t\r\n\t}", "@Override\n\tpublic V add(K key, V value) {\n\t\tcheckNullKey(key);\n\t\tcheckNullValue(value);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.put(key, value);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}", "public boolean add(K key, V value);", "public void add(String key, Object value) {\n Object oldValue = null;\n if (value instanceof String) {\n editor.putString(key, (String) value);\n oldValue = get(key, \"\");\n } else if (value instanceof Boolean) {\n editor.putBoolean(key, (Boolean) value);\n oldValue = get(key, false);\n } else if (value instanceof Integer) {\n editor.putInt(key, (Integer) value);\n oldValue = get(key, -1);\n } else if (value instanceof Long) {\n editor.putLong(key, (Long) value);\n oldValue = get(key, -1l);\n } else {\n if (value != null)\n Log.e(TAG, \"Value not inserted, Type \" + value.getClass() + \" not supported\");\n else\n Log.e(TAG, \"Cannot insert null values in sharedprefs\");\n }\n editor.apply();\n\n //notifying the observers\n notifyObservers(key, oldValue, value);\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tprivate boolean checkAndAdd(DefinitionName key, DmsDefinition obj, HashMap map){\n if (map.containsKey(key))\n return(false);\n else\n map.put(key,obj);\n\n return(true);\n }", "void add(KeyType key, ValueType value);", "private Map<String, List<Double>> updateWordMapForTotalCountK(\n\t\t\tMap<String, List<Double>> wordMap, double totalWordCountPerDocument) {\n\t\tIterator<Entry<String, List<Double>>> iterator = wordMap.entrySet().iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\t Map.Entry<String, List<Double>> entry = (Map.Entry<String, List<Double>>) iterator.next();\n\t\t\t if(totalWordCountPerDocument> 0.0)\n\t\t\t\t entry.getValue().set(5,entry.getValue().get(0)); //store unnormized version\n\t\t\t\t entry.getValue().set(0,entry.getValue().get(0)/totalWordCountPerDocument); //add all tf for total words\n\t\t\t \t}\n\t\n\t\treturn wordMap;\n\t}", "public void add(Object value) {\n\n\t}", "@Override\n public RecordId put(RecordId key, RecordId value) {\n if (key.getSegmentId().getMostSignificantBits() % 10000 == 0) {\n getCandidateIds.add(key);\n }\n return null;\n }", "public void put(int key, int value) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1){\n // empty entry, insert entry\n entry.key = key;\n entry.value = value;\n }else if (entry.key == key){\n // target entry\n entry.value = value;\n }else{\n // in list, find target entry\n while(entry.key != key && entry.next!=null){\n entry = entry.next;\n }\n if (entry.key == key)\n entry.value = value;\n else\n entry.next = new Entry(key, value);\n }\n }", "public void map(Object key, Text value, Context context)\n throws IOException, InterruptedException {\n Scanner line = new Scanner(value.toString());\n line.useDelimiter(\"\\t\");\n author.set(line.next());\n context.write(author, one);\n }", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "public static <K, T extends Number> void addToMap(Map<K, T> m, K key, T value) {\n m.put(key, m.containsKey(key) ? (T) (Double) (value.doubleValue() + m.get(key).doubleValue()) : value);\n }", "public void put(Key key,Value value){\n\t\troot = insert(root,key,value);\n\t}", "public void addToShared(Document doc) {\n\t\tif(doc != null)\n\t\t\tsharedToMe.add(doc);\n\t}", "public V add(K key, V value)\n { \n checkInitialization();\n if ((key == null) || (value == null))\n throw new IllegalArgumentException();\n else\n { \n V result = null; \n int keyIndex = locateIndex(key); \n if ((keyIndex < numberOfEntries) && \n key.equals(dictionary[keyIndex].getKey()))\n {\n // Key found; return and replace entry's value\n result = dictionary[keyIndex].getValue(); // Get old value\n dictionary[keyIndex].setValue(value); // Replace value \n }\n else // Key not found; add new entry to dictionary\n { \n makeRoom(keyIndex);\n dictionary[keyIndex] = new Entry(key, value);\n numberOfEntries++;\n ensureCapacity(); // Ensure enough room for next add\n } // end if \n return result;\n } // end if\n }", "private void addToHashingIndex(int hashValue, String stringValue, boolean overwrite){\n DBCollection hashingIndex = client.getDB(\"cacheManagerMetadata\").getCollection(\"hashingIndex\");\n\n DBObject currentIndex = hashingIndex.findOne(new BasicDBObject(\"hashValue\", hashValue));\n\n BasicDBObject hash = new BasicDBObject();\n hash.put(\"hashValue\", hashValue);\n hash.put(\"stringValue\", stringValue);\n\n if (currentIndex == null) { // No current index for this hash, so just add this one\n hashingIndex.insert(hash);\n } else if (!((String)currentIndex.get(\"stringValue\")).equals(stringValue)) { // Problem! The hashes match, but the strings representations are different!\n if (overwrite) { // Overwrite the old\n hashingIndex.update(currentIndex, hash);\n } else {\n throw new CachingException(\"The hash configuration of this pipeline has been seen before, but their string representations are different.\");\n }\n }\n }", "public void put(String key, int value) {\n\n // Hold the tmpNode node\n FreqNode tmpNode;\n\n //calculate the index by hashcode mod table length \n int index = Math.abs(key.hashCode()) % (frequencyTable.length);\n\n //if location is empty place new node \n if (frequencyTable[index] == null) {\n frequencyTable[index] = new FreqNode(key, value);\n\n numNodes++; //incremement the nodes (per demo recommendation with Professor) \n } else {\n //set temp node\n tmpNode = frequencyTable[index];\n\n //for each node \n while (true) {\n //check for duplicate value and increment \n if (key.equals(tmpNode.getKey())) {\n //increment\n tmpNode.setValue(value + tmpNode.getValue());\n return; //success \n }//end if \n else if (tmpNode.getNext() == null) {\n //set the new node at the next free\n tmpNode.setNext(new FreqNode(key, value));\n //increase nodes \n numNodes++;\n\n //check if nodes are greater than table proportions\n if (numNodes > (frequencyTable.length * sizePerc)) {\n extendTable(); //increase size \n }\n return; //success\n } else {\n //continue traversal of table \n tmpNode = tmpNode.getNext();\n }//end else\n }//end while \n }//end else \n }", "@Override\n\tprotected void saveTo(Map<String, Object> map) {\n\t\tmap.put(\"rootElemId\", rootElemId);\n\t}", "public void addToValueAtKey(String aKey, String aValue) {\n if (cars.containsKey(aKey)) {\n cars.get(aKey).add(aValue);\n }\n }", "public void storeDL(BarcodeInfo dl){\n\n Map<String, Object> dlInfo = new HashMap<>();\n Map<String, Object> overall = new HashMap<>();\n dlInfo.put(\"DLNumber\", dl.licenseNumber );\n dlInfo.put(\"DOB\", dl.birthDate);\n dlInfo.put(\"City\", dl.city);\n dlInfo.put(\"MiddleName\", dl.middleName);\n dlInfo.put(\"ExpDate\", dl.expDate);\n dlInfo.put(\"FirstName\", dl.firstName);\n dlInfo.put(\"Gender\", dl.gender);\n dlInfo.put(\"IssueDate\", dl.issueDate);\n dlInfo.put(\"IssuingCountry\", dl.issuingCountry);\n dlInfo.put(\"State\", dl.stateUS);\n dlInfo.put(\"LastName\", dl.lastName);\n dlInfo.put(\"ZipCode\", dl.zipcode);\n dlInfo.put(\"Street\", dl.street);\n overall.put(\"DL Info\", dlInfo);\n\n db.collection(type).document(user.getUid()).set(overall, SetOptions.merge())\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n }\n });\n }", "public void attach(Object key, Object value);", "private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }", "public int add(String key, E value) {\r\n int index = items.size();\r\n keys.put(key, index);\r\n items.add(value);\r\n return index;\r\n }", "public Value put(Key key, Value thing) ;", "private HashEntry(K insertKey, V insertValue)\r\n\t\t{\r\n\t\t\tkey = insertKey;\r\n\t\t\tvalue.add(insertValue);\r\n\t\t}", "public void put(Object key,Object value) {\n map.put(key,value);\n hashtable.put(key,value);\n }", "public static <\n K,\n V> void addToCollectionMap(K key, V valueToAdd, Map<K, Collection<V>> map) {\n if (key != null && valueToAdd != null && map != null) {\n map.computeIfAbsent(key, Suppliers.asFunction(ArrayList::new)).add(valueToAdd);\n }\n }", "public void add(Key key, Value value) {\n\n\t\tif (2 * this.size > this.capacity) {\n\t\t\tresize(2 * this.capacity);\n\t\t}\n\n\t\t// Add this item to the hash table in the expected location.\n\n\t\tint index = locate(key);\n\t\tthis.keys[index] = key;\n\t\tthis.values[index] = value;\n\t\tthis.size++;\n\t}", "public void put(int key, int value) {\n\n int index = key % n;\n MapNode node = keys[index];\n// System.out.println(key + \" \" + value + \" \" + (node == null));\n for (int i =0; i < node.list.size(); ++i) {\n if (node.list.get(i) == key) {\n node.list.remove(i);\n vals[index].list.remove(i);\n }\n }\n\n node.list.add(key);\n vals[index].list.add(value);\n }", "private void put(K key, V value) {\n\t\t\tif (key == null || value == null)\n\t\t\t\treturn;\n\t\t\telse if (keySet.contains(key)) {\n\t\t\t\tvalueSet.set(keySet.indexOf(key), value);\n\t\t\t} else {\n\t\t\t\tkeySet.add(key);\n\t\t\t\tvalueSet.add(keySet.indexOf(key), value);\n\t\t\t\tsize++;\n\t\t\t}\n\t\t}" ]
[ "0.6652187", "0.6496801", "0.6087985", "0.60632354", "0.5989751", "0.59844196", "0.59765214", "0.59467447", "0.5893644", "0.5867365", "0.5844008", "0.5839872", "0.5834596", "0.5833071", "0.5822919", "0.58171326", "0.57970893", "0.57886153", "0.5774513", "0.57643086", "0.5700038", "0.56958854", "0.5688808", "0.5670649", "0.56593394", "0.56550115", "0.56486905", "0.564853", "0.5633523", "0.5632349", "0.5626875", "0.5623142", "0.56209236", "0.5619305", "0.5618799", "0.56179005", "0.5608305", "0.5598645", "0.55819947", "0.5577826", "0.55662906", "0.55659616", "0.5530232", "0.5519231", "0.5508772", "0.55057704", "0.54908794", "0.5490454", "0.54846483", "0.54804057", "0.5463097", "0.54575205", "0.54521805", "0.54500586", "0.5443912", "0.543714", "0.54366857", "0.54274", "0.5426659", "0.542494", "0.54226524", "0.5411119", "0.5406285", "0.54062", "0.5403727", "0.53938866", "0.5386592", "0.5381132", "0.53744584", "0.53723484", "0.53719676", "0.53710496", "0.53692967", "0.53623086", "0.5359343", "0.5359221", "0.5359221", "0.5359221", "0.5359221", "0.5359221", "0.5359221", "0.5358049", "0.5357233", "0.5355316", "0.53532565", "0.53488797", "0.5346386", "0.53331625", "0.53327143", "0.53319705", "0.532962", "0.53287363", "0.5320236", "0.53184885", "0.5317341", "0.5305127", "0.5302731", "0.5301756", "0.5301699", "0.5300463" ]
0.578163
18
Retrieves the next node from the XML file
public HashMap<String, String> getNextNode() throws XMLStreamException, IOException { boolean add_elements = false; String node_name = new String(); HashMap<String, String> document = new HashMap<String, String>(); // StringWriter tag_content = new StringWriter(); // Loop over the document while (xmlEventReader.hasNext()) { xmlEvent = xmlEventReader.nextEvent();// get the next event // Start element if (xmlEvent.isStartElement()) { node_name = xmlEvent.asStartElement().getName().getLocalPart(); if (!node_name.equalsIgnoreCase(root_node) && !formatter_nodes.contains("|" + node_name + "|")) { // not 'dblp' and is a document type tag if (document_types.contains("|" + node_name + "|")) { add_elements = true; document.put("type", node_name); // Read the attributes to the document getAttributes( xmlEvent.asStartElement().getAttributes(), document); } else { // xmlWriter = xmlOutputFactory // .createXMLEventWriter(tag_content); } } } else if (add_elements && xmlEvent.isEndElement()) { node_name = xmlEvent.asEndElement().getName().getLocalPart(); if (!formatter_nodes.contains("|" + node_name + "|")) { // Close the XML writer // xmlWriter.close(); // add the node content to the document // String tag_value = tag_content.toString(); // if (tag_value != null) // addNode(node_name, tag_value.trim(), document); // // Refresh the tag content value // tag_content = new StringWriter(); // Stop adding elements if (document_types.contains("|" + node_name + "|")) { add_elements = false; break; } } } else if (xmlEvent.isCharacters()) { // Add the characters to the XMLWriter stream String value = xmlEvent.asCharacters().getData().trim(); if (!value.isEmpty()) addNode(node_name, value, document); } } return document; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getNext() {\n Node currNode = getScreenplayElem().getChildNodes().item(currPos++);\n while (currNode.getNodeType() != Node.ELEMENT_NODE) {\n currNode = getScreenplayElem().getChildNodes().item(currPos++);\n }\n currElem = (Element) currNode;\n }", "public node getNext() {\n\t\t\treturn next;\n\t\t}", "public Node getNext(){\n\t\t\treturn next;\n\t\t}", "public Nodo getnext ()\n\t\t{\n\t\t\treturn next;\n\t\t\t\n\t\t}", "public T getNextElement();", "Element nextElement () {\n\t\treturn stream.next();\n\t}", "public DNode getNext() { return next; }", "public SimpleNode getNext() {\n return next;\n }", "public Node getNext(){\n\t\treturn next;\n\t}", "public Node getNext() { return next; }", "public Node getNext()\r\n\t{\r\n\t\treturn next;\r\n\t}", "public Node getNext()\r\n\t{\r\n\t\treturn next;\r\n\t}", "public Node getNext()\n\t{\n\t\treturn next;\n\t}", "public Node getNext()\n\t{\n\t\treturn next;\n\t}", "public abstract void nextElement();", "public Item next() throws XPathException {\n while (true) {\n NodeInfo next = (NodeInfo)iterator.next();\n if (next == null) {\n current = null;\n position = -1;\n return null;\n }\n if (current != null && next.isSameNodeInfo(current)) {\n continue;\n } else {\n position++;\n current = next;\n return current;\n }\n }\n }", "public Item next() throws XPathException {\n curr = base.next();\n if (curr == null) {\n pos = -1;\n } else {\n pos++;\n }\n return curr;\n }", "public Node getNext() {\n\t\treturn next;\n\t}", "public SlideNode getNext() {\n\t\treturn next;\n\t}", "public Node getNext() {\r\n\t\treturn next;\r\n\t}", "private Object getNextElement()\n {\n return __m_NextElement;\n }", "public Node getNext() {\n return next;\n }", "Node<T> getNext() {\n\t\t\treturn nextNode;\n\t\t}", "public Node<E> getNext() { return next; }", "public Node<E> getNext() {\r\n\t\treturn next;\r\n\t}", "int getNext(int node_index) {\n\t\treturn m_list_nodes.getField(node_index, 2);\n\t}", "public Node getNext() {\n\t\treturn this.next;\n\t}", "public Node getNextNode() {\n return nextNode;\n }", "public Node getNext() {\n return next;\n }", "public ListElement getNext()\n\t {\n\t return this.next;\n\t }", "public MyNode<? super E> getNext()\n\t{\n\t\treturn this.next;\n\t}", "public Node getNext() {\t\t//O(1)\n\t\treturn next;\n\t}", "public ListElement<T> getNext()\n\t{\n\t\treturn next;\n\t}", "public Node getNext()\n {\n return this.next;\n }", "public Node<D> getNext(){\n\t\treturn next;\n\t}", "public XNode xnextNode() throws Exception {\n\t\treturn xfactory().xNode(x().nextNode());\r\n\t}", "public LLNode<T> getNext() {\n return next;\n }", "public Node<T> getNext() {\n\t\treturn next;\n\t}", "public Node<S> getNext() { return next; }", "public Element<T> getNextElement() \n\t{\n\t\treturn nextElement;\n\t}", "public ElectionNode getNextNode() {\r\n return nextNode;\r\n }", "public LinearNode<T> getNext() {\r\n\t\t\r\n\t\treturn next;\r\n\t\r\n\t}", "@Override\n\t\tpublic Node next() {\n\t\t\tif (this.next == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tNode element = this.next;\n\t\t\t\tthis.next = (Node) this.next.getNextNode();\n\t\t\t\treturn (Node) element;\n\t\t\t}\n\t\t}", "@Override\n public Node next() {\n if (next == null) {\n throw new NoSuchElementException();\n }\n Node current = next;\n next = next.getNextSibling();\n return current;\n }", "public Node<T> getNext()\n\t{\treturn this.next; }", "public E next() \n {\n \tfor(int i = 0; i < size; i++)\n \t\tif(tree[i].order == next) {\n \t\t\tnext++;\n \t\t\ttree[i].position = i;\n \t\t\treturn tree[i].element;\n \t\t}\n \treturn null;\n }", "public CommitNode getNext(){\r\n\t\treturn next;\r\n\t}", "Object getNextElement() throws NoSuchElementException;", "private int findNextElement() {\n\t\tif (hasNext()) {\n\t\t\tint value = this.index + 1;\n\t\t\treturn value;\n\n\t\t}\n\t\treturn -1;\n\t}", "public Node<T> getNextNode() {\n\t\treturn nextNode;\n\t}", "public E next(){\r\n E data = node.getData();\r\n node = node.getNext();\r\n return data;\r\n }", "public DependencyElement next() {\n\t\treturn next;\n\t}", "public HL7DataTree next() {\n final int size = Util.size(this.list), i = this.next == null ? size : this.list.indexOf(this.next) + 1;\n final HL7DataTree curr = this.next;\n \n this.next = i == size ? more() : this.list.get(i);\n \n return curr;\n }", "public Node<E> nextNode() {\n\t\treturn next_node;\n\t}", "public E next()\r\n {\r\n E valueToReturn;\r\n\r\n if (!hasNext())\r\n throw new NoSuchElementException(\"The lister is empty\");\r\n \r\n // get the string from the node\r\n valueToReturn = cursor.getData();\r\n \r\n // advance the cursor to the next node\r\n cursor = cursor.getLink();\r\n \r\n return valueToReturn;\r\n }", "ListNode getNext() { /* package access */ \n\t\treturn next;\n\t}", "@Override\n\t\tpublic FileInputStream nextElement() {\n\t\t\treturn fileStreams[index++];\n\t\t}", "public Node<T> getNext() {\n return this.next;\n }", "protected final Node<N> getNext() {\n return this.next;\n }", "public ShapeNode getNext()\n {\n return next;\n }", "public E next() {\r\n\r\n\t\tE result = null;\r\n\t\tif (hasNext()) {\r\n\t\t\tresult = links.get(counter);\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override // ohos.com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase\r\n public boolean nextNode() {\r\n IncrementalSAXSource incrementalSAXSource = this.m_incrementalSAXSource;\r\n if (incrementalSAXSource == null) {\r\n return false;\r\n }\r\n if (this.m_endDocumentOccured) {\r\n clearCoRoutine();\r\n return false;\r\n }\r\n Object deliverMoreNodes = incrementalSAXSource.deliverMoreNodes(true);\r\n if (deliverMoreNodes instanceof Boolean) {\r\n if (deliverMoreNodes != Boolean.TRUE) {\r\n clearCoRoutine();\r\n }\r\n return true;\r\n } else if (deliverMoreNodes instanceof RuntimeException) {\r\n throw ((RuntimeException) deliverMoreNodes);\r\n } else if (!(deliverMoreNodes instanceof Exception)) {\r\n clearCoRoutine();\r\n return false;\r\n } else {\r\n throw new WrappedRuntimeException((Exception) deliverMoreNodes);\r\n }\r\n }", "public static Node readXML(String filename)\r\n\t{\r\n\t\t\r\n\t\tDocument doc=null;\r\n\t\t\r\n\t\tDocumentBuilder db = null;\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\r\n\t try {\r\n\t \tdbf.setIgnoringElementContentWhitespace(true);\r\n\t db = dbf.newDocumentBuilder();\r\n\t \tdoc = db.parse(new File(filename));\r\n\r\n\t\t\t//******* ALBERO DOM *********/\r\n\t\t\t\r\n\t\t\t// Elemento corrispondente al DOCTYPE\r\n\t\t Node child = doc.getFirstChild();\r\n\t\t // Elemento corrispondente al primo elemento del documento\r\n\t\t child = child.getNextSibling();\r\n\t\t \r\n\t\t return child;\r\n\t }\t\r\n\t\tcatch (IOException se){\r\n\t\t\tSystem.err.println(\"Il file \" + filename + \" non e' stato trovato\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tcatch (SAXException se){\r\n\t\t\tSystem.err.println(\"Non � possibile fare il parser\");\r\n\t\t\treturn null;\r\n\t\t}\t\r\n\t\tcatch (ParserConfigurationException pce){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Variable getNext(){\n\t\treturn this.next;\n\t}", "@Override\n\tpublic String getNext() throws IOException {\n\t\ttry {\n\t\t\t// Ignore space, tab, newLine, commentary\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = this.ignore(nextVal);\n\n\t\t\treturn (!isEndOfFile(nextVal)) ? this.getInstruction(nextVal) : null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\n\t}", "public ListNode<E> getNext()\n {\n return nextNode;\n }", "public LinkedNode<T> getNext() {\n\t return myNextNode;\n }", "public com.Node<T> getNextRef() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Item next() {\n\t\tindex = findNextElement();\n\n\t\tif (index == -1)\n\t\t\treturn null;\n\t\treturn items.get(index);\n\t}", "public ListNode<T> getNext();", "@com.francetelecom.rd.stubs.annotation.FieldGet(\"e\")\n\t\tpublic T nextElement() {\n\t\t\treturn null;\n\t\t}", "public Node returnNextChild(){\n try{\n return children.get(counter);\n }catch(Exception ex){\n return null;\n }\n }", "public GameNode getNext() {\n return this.next;\n }", "public MapElement getNext() {\n return next;\n }", "public ListNode getNext()\r\n {\r\n return next;\r\n }", "@Override \r\n\tpublic LLNode<T> next() throws NoSuchElementException{\r\n\t\tLLNode<T> node = nodeptr;\r\n\t\tif (nodeptr == null)\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\tnodeptr = nodeptr.getNext();\r\n\t\treturn node;\r\n\t}", "public BSCObject next()\n {\n if (ready_for_fetch)\n {\n // the next sibling is waiting to be returned, so just return it\n ready_for_fetch = false;\n return sibling;\n }\n else if (hasNext())\n {\n // make sure there is a next sibling; if so, return it\n ready_for_fetch = false;\n return sibling;\n }\n else\n throw new NoSuchElementException();\n }", "public E getNext() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index >= this.size() - 1)\n\t\t\t\tindex = -1;\n\t\t\treturn this.get(++index);\n\t\t}\n\t\treturn null;\n\t}", "public ListNode<Item> getNext() {\n return this.next;\n }", "@Override\r\n\t\tpublic T next() {\r\n\t\t\tNode<T> temp = currentNode;\r\n\t\t\tcurrentNode = currentNode.nextNode;\r\n\t\t\treturn temp.content;\r\n\t\t}", "@Override\r\n\tpublic String nextElement() {\n\t\treturn it.next();\r\n\t}", "public Content getNavLinkNext() {\n Content li;\n if (next != null) {\n Content nextLink = getLink(new LinkInfoImpl(configuration,\n LinkInfoImpl.Kind.CLASS, next)\n .label(nextclassLabel).strong(true));\n li = HtmlTree.LI(nextLink);\n }\n else\n li = HtmlTree.LI(nextclassLabel);\n return li;\n }", "@Override\n public E next() {\n if (this.hasNext()) {\n curr = curr.nextNode;\n return curr.getData();\n }\n else {\n throw new NoSuchElementException();\n }\n }", "public T next()\n\t\t{\n\t\t\tif(hasNext())\n\t\t\t{\n\t\t\t\tT currentData = current.getData(); //the data that will be returned\n\t\t\t\t\n\t\t\t\t// must continue to keep track of the Node that is in front of\n\t\t\t\t// the current Node whose data is must being returned , in case\n\t\t\t\t// its nextNode must be reset to skip the Node whose data is\n\t\t\t\t// just being returned\n\t\t\t\tbeforePrevious = previous;\n\t\t\t\t\n\t\t\t\t// must continue keep track of the Node that is referencing the\n\t\t\t\t// data that was just returned in case the user wishes to remove()\n\t\t\t\t// the data that was just returned\n\t\t\t\t\n\t\t\t\tprevious = current; // get ready to point to the Node with the next data value\n\t\t\t\t\n\t\t\t\tcurrent = current.getNext(); // move to next Node in the chain, get ready to point to the next data item in the list\n\t\t\t\t\n\t\t\t\tthis.removeCalled = false;\n\t\t\t\t// it's now pointing to next value in the list which is not the one that may have been removed\n\t\t\t\t\n\t\t\t\treturn currentData;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\t}\n\t\t}", "@Override\n\tpublic File next() throws NoSuchElementException {\n\t\treturn fileQueue.dequeue();\n\t}", "public K next()\n {\n\tif (hasNext()) {\n\t K element = current.data();\n\t current = current.next(0);\n\t return element; \n\t} else {\n\t return null; \n\t}\n }", "@Override\r\n\tpublic String next() {\n\t\tString nx;\r\n\r\n\t\tnx = p.getNext();\r\n\r\n\t\tif (nx != null) {\r\n\t\t\tthisNext = true;\r\n\t\t\tinput(nx);\r\n\t\t}\r\n\t\treturn nx;\r\n\t}", "Entry getNext()\n {\n return (Entry) m_eNext;\n }", "public Node<T> next() {\r\n return next;\r\n }", "HNode getNextSibling();", "public IDLink<T> getNext(){\n \treturn npointer;\n }", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "public int next() {\n TreeNode iter = dq.pop();\n int val = iter.val;\n if(iter.right!=null)\n process(iter.right);\n return val;\n }", "public DoublyLinkedNode<E> getNext() {\n return nextNode;\n }", "public DoubleNode<T> getNext()\n {\n\n return next;\n }", "public Event getNextEvent() {\n \treturn next;\n }", "@Override\r\n\t\tpublic Node getNextSibling()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public emxPDFDocument_mxJPO getNext()\r\n {\r\n /*\r\n * Author : DJ\r\n * Date : 02/04/2003\r\n * Notes :\r\n * History :\r\n */\r\n return (emxPDFDocument_mxJPO)super.removeFirst();\r\n }", "public SortedLinkedListNode getNext() {\n return next;\n }", "public ElementHeader getNextStep()\n {\n return nextStep;\n }" ]
[ "0.6864649", "0.67748135", "0.6644528", "0.6628649", "0.6582724", "0.65794903", "0.6567017", "0.6521269", "0.6507276", "0.6477443", "0.6475293", "0.6475293", "0.6470695", "0.6470695", "0.6468584", "0.64521885", "0.64505786", "0.6443087", "0.6438011", "0.6432394", "0.64017284", "0.63667697", "0.63551694", "0.6336364", "0.63219607", "0.6310032", "0.6301223", "0.6298794", "0.6296957", "0.6294694", "0.62325376", "0.6225127", "0.6205389", "0.62040955", "0.61990577", "0.61917335", "0.6186192", "0.616824", "0.61520064", "0.6151457", "0.6135565", "0.6101741", "0.6101739", "0.60991365", "0.6090579", "0.60904884", "0.6084872", "0.60847193", "0.6082428", "0.6064617", "0.60628694", "0.6052501", "0.60102266", "0.59865123", "0.5976348", "0.59685534", "0.5959621", "0.5958537", "0.5948914", "0.5939876", "0.59318346", "0.5930374", "0.59202623", "0.5914442", "0.5913647", "0.5904426", "0.5896474", "0.589082", "0.58656573", "0.58648336", "0.586344", "0.5860358", "0.5841155", "0.58366615", "0.58345866", "0.58334225", "0.5812361", "0.57933164", "0.5790567", "0.578815", "0.5771531", "0.57623065", "0.5737286", "0.57097286", "0.5698281", "0.56945276", "0.5684401", "0.56826055", "0.5674691", "0.56636804", "0.56545186", "0.564848", "0.56478506", "0.5636763", "0.56184894", "0.5614867", "0.5614736", "0.5595147", "0.5590141", "0.55855626" ]
0.5788442
79
Test Random document pick
public static void main(String[] args) { try { ReadXMLFile xmlReader = new ReadXMLFile(); for (HashMap<String, String> document : xmlReader .getRandomDocuments(12)) { for (String key : document.keySet()) { System.out.println(key + " : " + document.get(key)); } } } catch (XMLStreamException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } // Test - Match // try { // ReadXMLFile xmlReader = new ReadXMLFile(); // String title_query = "parser"; // HashMap<String, String> query = new HashMap<String, String>(); // query.put("title", title_query); // // query.put("year", "1996"); // System.out.println("First-----------------------"); // for (HashMap<String, String> document : xmlReader.getQueryNodes( // query, 20, true)) { // for (String key : document.keySet()) { // System.out.println(key + " : " + document.get(key)); // } // } // // System.out.println("Second-----------------------"); // for (HashMap<String, String> document : xmlReader.getQueryNodes( // query, 10, true)) { // for (String key : document.keySet()) { // System.out.println(key + " : " + document.get(key)); // } // } // // System.out.println("Done"); // } catch (XMLStreamException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // } catch (IOException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // } // String workingDir = System.getProperty("user.dir"); // System.out.println("Current working directory : " + workingDir); // Get node count in extract // try { // ReadXMLFile xmlReader = new ReadXMLFile(); // System.out.println(xmlReader.getNodeCount()); // } catch (XMLStreamException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // } catch (IOException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void chooseRandomTweet() {\n if (random.nextBoolean()) {\n realTweet = true;\n displayRandomTrumpTweet();\n } else {\n realTweet = false;\n displayRandomFakeTweet();\n }\n }", "private void random() {\n\n\t}", "Randomizer getRandomizer();", "private void selectRandom() {\n\n\t\tRandom randomise;\n\n\t\t// Select random char from Spinner only if it is enabled\n\t\tif (solo.getCurrentSpinners().get(0).isEnabled()) {\n\t\t\trandomise = new Random();\n\t\t\trandomCharPos = randomise.nextInt(solo.getCurrentSpinners().get(1)\n\t\t\t\t\t.getCount());\n\n\t\t\tsolo.pressSpinnerItem(0, randomCharPos);\n\t\t\tsolo.goBackToActivity(\"OptionsActivity\");\n\n\t\t\trandomChar = solo.getCurrentSpinners().get(0).getSelectedItem()\n\t\t\t\t\t.toString();\n\t\t}\n\n\t\t// Select random act from Spinner\n\t\trandomise = new Random();\n\t\trandomActPos = randomise.nextInt(solo.getCurrentSpinners().get(1)\n\t\t\t\t.getCount());\n\n\t\tsolo.pressSpinnerItem(1, randomActPos);\n\t\tsolo.goBackToActivity(\"OptionsActivity\");\n\n\t\trandomAct = solo.getCurrentSpinners().get(1).getSelectedItem()\n\t\t\t\t.toString();\n\n\t\t// Select random page from Spinner\n\t\trandomise = new Random();\n\t\trandomPagePos = randomise.nextInt(solo.getCurrentSpinners().get(2)\n\t\t\t\t.getCount());\n\n\t\tsolo.pressSpinnerItem(2, randomPagePos);\n\t\tsolo.goBackToActivity(\"OptionsActivity\");\n\n\t\trandomPage = solo.getCurrentSpinners().get(2).getSelectedItem()\n\t\t\t\t.toString();\n\t}", "public void findBook() {\n\t\tif (books.size() > 0) {\n\t\t\tint randInt = rand.nextInt(books.size());\n\t\t\tbook = books.get(randInt);\n\t\t}\n\t}", "@Test\r\n\tpublic void randomTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getRandom(0);\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute search of random items: SQLException\");\r\n\t\t}\r\n\t}", "public abstract void randomize();", "private void chooseBreedToBeIdentified() {\n Random r = new Random();\n int questionBreedIndex = r.nextInt(3);\n\n questionCarMake = displayingCarMakes.get(questionBreedIndex);\n carMakeNameTitle.setText(questionCarMake);\n }", "public void testRand()\n throws IOException, FileNotFoundException\n {\n compareValues(PATH + \"randtable.txt\", PATH + \"RandPair.txt\", FACTORY);\n }", "@Test\n\t public void randomItem() throws InterruptedException\n\t {\n\t\t \n\t\t productpage = new ProductPage(driver);\n\t\t productpage.clickOnSomePrompt();\n\t\t productdetails = productpage.clickOnRandomItem();\n\t\t\tboolean status = productdetails.isProductDEtailsPageDisplayed();\n\t\t\tAssertionHelper.updateTestStatus(status);\n\t\t\tTestBaseRunner.result = TestBaseRunner.passOrFail(status);\n\t\t\tExcelReadWrtite.updateResult(\"testData.xlsx\", \"TestScripts\", \"randomItem\", result);\n\t }", "void saveRandom();", "private static Option pickRandom() {\n\t\treturn Option.values()[rand.nextInt(3)];\n\t}", "private void findResourcesFake() {\r\n\t\t\r\n\t\tRandom random = new Random();\t\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\tif (random.nextInt() % 10 == 0) {PoCOnline.setSelected(true); loadContainerOnline.setSelected(true);}\t\r\n\t\tif (random.nextInt() % 10 == 0) {fillRedOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillYellowOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillBlueOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {testOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {lidOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {dispatchOnline.setSelected(true);}\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}", "@Test\n\tpublic void myRandomTest() throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime) {\n\t\t\n\t\tstart();\n\t\tint n = gui.myRandom(1, 1);\n\t\tassertTrue(n == 1);\n\n\t\tn = gui.myRandom(2, 2);\n\t\tassertTrue(n == 2);\n\n\t\tn = gui.myRandom(0, 0);\n\t\tassertTrue(n == 0);\n\t\t\n\t\tn = gui.myRandom(4, 4);\n\t\tassertTrue(n == 4);\n\n\t\tn = gui.myRandom(1000, 1001);\n\t\tassertTrue(n == 1000 || n == 1001);\n\t\t\n\t\t}\n\t}", "RandomizedRarestFirstSelector(Random random) {\n this.random = random;\n }", "public static String pickWord(String f) throws IOException {\n \n //read in number of words in file\n Scanner read = new Scanner(new File(f));\n int wordCount = read.nextInt();\n read.next();\n \n //read each word as an element of a string array\n String[] words = new String[wordCount];\n for(int wordsIndex = 0; wordsIndex < wordCount; wordsIndex++) {\n words[wordsIndex] = read.nextLine();\n }\n \n Random rand = new Random();\n int num = rand.nextInt(wordCount);\n //String word = words[rand];\n //return a randomly chosen word from the string array\n return words[num];\n \n }", "public static String randomSelection() {\n int min = 1;\n int max = 3;\n String randomSelection;\n Random random = new Random(System.currentTimeMillis());\n int randomNumber = random.nextInt((max - min) +1) +min;\n if(randomNumber == 1) {\n randomSelection = \"rock\";\n } else if (randomNumber == 2) {\n randomSelection = \"paper\";\n } else {\n randomSelection = \"scissors\";\n }\n return randomSelection;\n }", "@Test\n public void f14SelectAssetTest() {\n FlowPane assets;\n int i = 0;\n Random random = new Random();\n\n //select 4 random assets out of the first 12 visible assets in the window\n do {\n clickOn(\"#thumbnailTab\").moveBy(300, 500);\n scroll(10, VerticalDirection.UP).sleep(2000);\n\n assets = (FlowPane) scene.getRoot().lookup(\"#assetsThumbPane\");\n clickOn(assets.getChildren().get(random.nextInt(12)));\n sleep(1000).clickOn(\"#serialNumberOutput\").sleep(1000);\n clickOn(\"#backBtn\");\n\n } while (++i < 4);\n\n assertTrue(\"There are selectable assets on the main page.\", assets.getChildren().size() > 0);\n }", "@Override\r\n public int positionRandom() {\r\n int random = ((int) (Math.random() * arrayWords.length - 1) + 1);//define a random number with lengt more one for not getout the number zero\r\n return random;\r\n }", "Chromosome getRandomAmongFittest(int limit);", "public void testSelect_4()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n selector.setDoubletteChromosomesAllowed(true);\n // the following original rate controls that only 30% of the chromosomes\n // will be considered for selection as given with BestChromosomesSelector.\n // The last 70% will be added as doublettes in this case.\n selector.setOriginalRate(0.3d);\n // add first chromosome\n // --------------------\n Gene gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(true));\n Chromosome thirdBestChrom = new Chromosome(conf, gene, 7);\n thirdBestChrom.setFitnessValue(10);\n selector.add(thirdBestChrom);\n // add second chromosome\n // ---------------------\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n // add third chromosome\n // ---------------------\n gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n // receive top 1 (= best) chromosome\n // ---------------------------------\n Population pop = new Population(conf);\n selector.select(1, null, pop);\n IChromosome[] bestChroms = pop.toChromosomes();\n assertEquals(1, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n // receive top 4 chromosomes with original rate = 0.3\n // --------------------------------------------------\n pop.getChromosomes().clear();\n selector.select(4, null, pop);\n bestChroms = pop.toChromosomes();\n assertEquals(4, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n assertEquals(bestChrom, bestChroms[1]); //because of originalRate = 0.3\n assertEquals(secondBestChrom, bestChroms[2]);\n assertEquals(thirdBestChrom, bestChroms[3]);\n // Non-unique chromosomes should have been returned, although not the same\n // but a cloned instance!\n assertEquals(bestChroms[0], bestChroms[1]);\n // receive top 4 chromosomes with original rate = 1\n // ------------------------------------------------\n pop.getChromosomes().clear();\n selector.setOriginalRate(1.0d);\n selector.select(4, null, pop);\n bestChroms = pop.toChromosomes();\n assertEquals(4, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n assertEquals(secondBestChrom, bestChroms[1]);\n assertEquals(thirdBestChrom, bestChroms[2]);\n assertEquals(bestChrom, bestChroms[3]);\n }", "@Test\n \tpublic void testTargetRandomSelection() {\n \tComputerPlayer player = new ComputerPlayer();\n \t// Pick a location with no rooms in target, just three targets\n \tboard.calcTargets(23, 7, 2);\n \tint loc_24_8Tot = 0;\n \tint loc_22_8Tot = 0;\n \tint loc_21_7Tot = 0;\n \t// Run the test 100 times\n \tfor (int i=0; i<100; i++) {\n \t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\tif (selected == board.getRoomCellAt(24, 8))\n \t\t\tloc_24_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(22, 8))\n \t\t\tloc_22_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(21, 7))\n \t\t\tloc_21_7Tot++;\n \t\telse\n \t\t\tfail(\"Invalid target selected\");\n \t}\n \t// Ensure we have 100 total selections (fail should also ensure)\n \tassertEquals(100, loc_24_8Tot + loc_22_8Tot + loc_21_7Tot);\n \t// Ensure each target was selected more than once\n \tassertTrue(loc_24_8Tot > 10);\n \tassertTrue(loc_22_8Tot > 10);\n \tassertTrue(loc_21_7Tot > 10);\t\t\t\t\t\t\t\n }", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "public String randomGenertateContent(){\n\t\tString []temp = {\"This\",\"Is\",\"Random\",\"Randomize\",\"Content\",\"Random\",\"Randomize\",\"Random\",\"Randomly\",\"Random Text\"};\n\t\tRandom random = new Random();\n\t\tint numOfWord = (int) (random.nextInt(20 - 1 + 1) + 1);\n\t\tString output = \"\";\n\t\tfor(int i=0;i<numOfWord;i++){\n\t\t\tint index = (int) (random.nextInt(temp.length - 2 + 1));\n\t\t\toutput+= temp[index] + \" \";\n\t\t}\n\t\treturn output;\n\t}", "public Item sample() {\n if (N == 0) throw new java.util.NoSuchElementException();\n return collection[rnd.nextInt(N)];\n }", "public void setRandom(boolean random){\n this.random = random;\n }", "public static String RandomSelectMethod(Random random){\n String[] methodArray = new String[] {\"isValid\",\"setDescription\"};// The list of the of methods to be tested in the Appt class\n\n int n = random.nextInt(methodArray.length);// get a random number between 0 (inclusive) and methodArray.length (exclusive)\n\n return methodArray[n] ; // return the method name \n }", "public Position sampleRandomUniformPosition();", "public void readFromFile(String doc) {\n\t\tString newline = \"\\n\";\n\t\tString doc_text = \"\";\n\t\tint count = 0;\n\t\tString line=\"\";\n\t\t\n\t\t//for random button\n\t\tint buttoncount = 0;\n\t\tArrayList<JButton> list = new ArrayList<JButton>();\n\t\t\n\t\ttry{\n\t\t\t//input stream for reading special characters in German\t\n\t\t\t//documents from folder textfiles\n \tBufferedReader rd = new BufferedReader(new InputStreamReader(new FileInputStream(\"textfiles/\" + doc),StandardCharsets.UTF_8));\n \twhile ((line=rd.readLine()) != null) {\n \t\t//question text\n \t\tif (count == 0) {\n \t\t\t\n \t\t\tswitch(bg) {\n \t\t\t\tcase(1):\n \t\t\t\tdoc_text = \"Dein Charakter lässt sich durch 4 Merkmale beschreiben.\\r\\n\" + \n \t\t\t\t\t\t\"Wähle als 1. dein Persönlichkeitsmerkmal:\" + newline;\n \t\t\t\t\tcount++;\n \t\t\t\tbreak;\n \t\t\tcase(2):\n \t\t\t\tdoc_text = \"Wähle das 2. Merkmal ein Ideal:\" + newline;\n \t\t\t\tcount++;\n \t\t\t\tbreak;\n \t\t\tcase(3):\n \t\t\t\tdoc_text = \"Entscheide dich als nächstes für eine Bindung:\"+ newline;\n \t\t\t\tcount++;\n \t\t\t\tbreak;\n \t\t\tcase(4):\n \t\t\t\tdoc_text = \"Deine letzte Frage. Im Anschluss wird dein Charakter generiert.\\r\\n\" + \n \t\t\t\t\t\t\"Wähle ein Makel der dich beschreibt:\"+ newline;\n \t\t\t\tcount++;\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tdoc_text = doc_text + line + newline;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\ttxt.setText(doc_text);\n \t\t\tif(randomButton == true) {\n\t\t \t\ttxt.setVisible(false);\n \t\t\t\t}\n \t\t\tpanelA.add(txt);\n \t\t}\n \t\t\n \t\t//buttonname;next document(;information)\n \t\tif (count == 1) {\n \t\t\tString[] tokens = line.split(\";\");\n \t\t\tJButton button = new JButton (tokens[0]);\n \t\t\t\tbutton.setFont(new Font(\"Rockwell\", Font.PLAIN, 24));\n \t\t\t//for random button: add buttons to a list and count them\n \t\t\tlist.add(button);\n \t\t\tbuttoncount++;\n \t\t\t\tif(randomButton == true) {\n \t\t\t\t\tbutton.setVisible(false);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tpanelB.add(button);\n\t\t\t\t\tbutton.addActionListener( new ActionListener() {\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\t\t\t\tif(ae.getSource() == button) {\n\t\t\t\t\t\t\t\tif (tokens.length == 1) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tclearPanel();\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//if race is already set but class not yet, than read question for class\n\t\t\t\t\t\t\t\t\tif(baseRace == true && baseClass == false) {\n \t\t\t\t\t\t\t\t\tspecific_race = tokens[0];\n \t\t\t\t\t\t\t\t\treadFromFile(\"/question_class/question_class_\" + attribute + \".txt\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//if race and class is already set -> open question for background\n\t\t\t\t\t\t\t\t\telse if(baseRace == true && baseClass == true) {\n\t\t\t \t\t\t\t\tspecific_class = tokens[0];\n \t\t\t\t\t\t\t\t\treadFromFile(\"question_backgrounds\" + \".txt\");\n\t\t\t \t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (tokens.length > 1) {\n\t\t\t\t\t\t\t\t\t//Buttonname/tokens[0];[tokens[1];tokens[2] \n\t\t\t\t\t\t\t\t\tif (tokens.length>2) {\n\t\t\t\t\t\t\t\t\t\tif (baseRace == false && baseClass == false) {\n\t\t\t \t\t\t\t\t\tbase_race.setRace(tokens[2]);\n\t\t\t \t\t\t\t\t\tbaseRace = true;\n\t\t\t \t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (baseRace == true && baseClass == false) {\n\t\t\t \t\t\t\t\t\tbase_class.setClass(tokens[2]);\n\t\t\t \t\t\t\t\t\tbaseClass = true;\n\n\t\t\t \t\t\t\t\t} \t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//random button\n\t\t\t\t\t\t\t\t\tif (tokens[0].equals(\"Zufallscharakter erstellen\")) {\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\trandomButton = true;\n\t\t\t\t\t\t\t\t\t\tclearPanel();\n\t\t\t\t\t\t\t\t\t\treadFromFile(tokens[1] + \".txt\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//choose main attribute for race and class\n\t\t\t\t\t\t\t\t\telse if(doc.equals(\"question_1.txt\")) {\n\t\t\t \t\t\t\t\tString attribute_tokens [] = tokens[1].split(\"_\");\n\t\t\t \t\t\t\t\tattribute = attribute_tokens[3];\n\t\t\t \t\t\t\t\tclearPanel();\n\t\t\t\t\t\t\t\t\t\treadFromFile(tokens[1]+\".txt\");\t\n\t\t\t \t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//choose background personality\n\t\t\t\t\t\t\t\t\telse if(doc.equals(\"question_backgrounds.txt\")) {\n\t\t\t\t\t\t\t\t\t\tpersonality = tokens[1];\n\t\t\t \t \t\tbase_personality.setPersonality(tokens[0]);\n\t\t\t \t \t\tclearPanel();\n\t\t\t \t \t\tbg++;\n\t\t\t \t \t\treadFromFile(\"question_personalities/\" + personality + \"/question_personality_\" + personality + \".txt\");\n\t\t\t \t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//background\n\t\t\t\t\t\t\t\t\telse if (bg == 1) {\t\n\t\t\t\t\t\t\t\t\t\tbg++;\n\t \t\t\t\t\t\t\t\tbase_personality.setPersonalityTrait(tokens[1]);\n\t \t\t\t\t\t\t\t\tclearPanel();\n\t \t\t\t\t\t\t\t\treadFromFile(\"/question_personalities/\" + personality + \"/question_ideal_\" + personality + \".txt\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (bg == 2) {\n\t\t\t\t\t\t\t\t\t\tbg++;\n\t\t\t\t\t\t\t\t\t\tbase_personality.setIdeal(tokens[1]);\n\t\t\t\t\t\t\t\t\t\tclearPanel();\n\t \t\t \t\t\t\treadFromFile(\"/question_personalities/\" + personality + \"/question_bond_\" + personality + \".txt\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (bg == 3) {\t\n\t\t\t\t\t\t\t\t\t\tbg++;\n\t \t\t\t\t\t\t\t\tbase_personality.setBond(tokens[1]);\n\t \t\t\t\t\t\t\t\tclearPanel();\n\t \t\t \t\t\t\treadFromFile(\"/question_personalities/\" + personality + \"/question_flaw_\" + personality + \".txt\");\t \t\t \t\t\t \t\t\t\t\n\t\t\t\t \t\t\t} \t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\telse if (bg == 4) {\n\t\t\t\t\t\t\t\t\t\tbg = 0;\n\t \t\t\t\t\t\t\t\tbase_personality.setFlaw(tokens[1]);\n\t \t\t\t\t\t\t\t\tsetAttributes();\n\t \t\t \t\tshowResults();\n\t \t\t \t\t\n\t\t\t\t \t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tclearPanel();\n\t\t\t\t\t\t\t\t\t\treadFromFile(tokens[1]+\".txt\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t \t \t\t\t\t\n \t\t\t}); //actionlistener close \n \t\t\t\n \t\t} //if count == 1 end\n\n \t\t//empty line\n\t\t if (line.length() == 0) {\n\t\t \tcount++;\n\t\t \ttxt.setText(doc_text);\n\t\t \tif(randomButton == true) {\n\t\t \t\ttxt.setVisible(false);\n \t\t\t\t}\n\t\t \tpanelA.add(txt);\n\t\t }\n\t\t \n \t} // while end\n \t\n\t\t\t\n \trd.close();\n \t\n } //try\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetFrameContent();\n\t\tif(randomButton == true) {\n\t\t\trandomInt = rdm.nextInt(buttoncount);\t\n\t\t\tlist.get(randomInt).doClick();\n\t\t}\n\t}", "private String getRandomTopic()\n\t{\n\t\tString randomTopic = \"\";\n\t\tdouble myRandom = Math.random();\n\t\tint myRandomListPosition = (int) (myRandom * randomList.size());\n\n\t\trandomTopic = randomList.get(myRandomListPosition);\n\t\treturn randomTopic;\n\t}", "@Test\n public void testRandom() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n String kysymys = k.random(true);\n\n\n assertEquals(\"Random ei kysy sanaa\", \"sana\", kysymys);\n }", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "Boolean getRandomize();", "private static void sample1(ScoredDocIDs collection, int collectionSize, int[] sample, long[] times) \n throws IOException {\n ScoredDocIDsIterator it = collection.iterator();\n if (returnTimings) {\n times[0] = System.currentTimeMillis();\n }\n int sampleSize = sample.length;\n int prime = findGoodStepSize(collectionSize, sampleSize);\n int mod = prime % collectionSize;\n if (returnTimings) {\n times[1] = System.currentTimeMillis();\n }\n int sampleCount = 0;\n int index = 0;\n for (; sampleCount < sampleSize;) {\n if (index + mod < collectionSize) {\n for (int i = 0; i < mod; i++, index++) {\n it.next();\n }\n } else {\n index = index + mod - collectionSize;\n it = collection.iterator();\n for (int i = 0; i < index; i++) {\n it.next();\n }\n }\n sample[sampleCount++] = it.getDocID();\n }\n if (returnTimings) {\n times[2] = System.currentTimeMillis();\n }\n }", "@Test\n public void randomRecipeTest() {\n onView(withContentDescription(\"Open navigation drawer\")).perform(click());\n //Open the search bar at the top\n onView(withText(\"Find a Random Recipe!\")).perform(click());\n onView(withId(R.id.recipe_title)).check(matches(isDisplayed()));\n\n //Exit to the main activity\n pressBack();\n }", "public int getRandom() {\n ListNode pick = null;\n ListNode p = head;\n int count = 1;\n while (p != null) {\n if (rand.nextInt(count) == 0) {\n pick = p;\n }\n p = p.next;\n count++;\n }\n return pick.val;\n }", "@Override\r\n\tpublic Item sample() {\r\n\t\tint index = StdRandom.uniform(count);\r\n\t\tItem item = arr[index];\r\n\t\treturn item;\r\n\t}", "public static void singleRunTest(){ \t\n BlueRand random = new BlueRand(\"sample/input/a.jpg\", \"sample/input/b.jpg\");\n random.setOutputFile(\"sample/output/singleRun_ab.txt\");\n random.setOutputImage(\"sample/output/singleRun_ab.bmp\");\n random.considerTwoLSB(false);\n try {\n\t ArrayList<Byte> output = random.generateRandom();\n\t System.out.println(\"Single run finished. Bytes generated: \" + output.size());\n } catch(BlueRandException e){\n \te.printStackTrace();\n }\n }", "public ArrayList<RandomItem> getRandomItems();", "Chromosome getRandom();", "public abstract boolean isRandom();", "public void randomGenre(View view) {\r\n String[] randomGenre = {\"Rock\", \"Funk\", \"Hip hop\", \"Country\", \"Pop\", \"Blues\", \"K-pop\", \"Punk\", \"House\", \"Soul\"};\r\n int index = (int) (Math.random() * 10);\r\n displayMessage(\"Your random genre is: \" + randomGenre[index]);\r\n }", "public static Ally getRandomRep () {\n return republican[(int) (Math.random() * republican.length)];\n }", "protected void getRndWord(String fileName) {\n\t\t// create the dict in the DictReader\n\t\tdr.readInFile(fileName);\n\t\t// get a random word and save it to this.word from the DictReader\n\t\tthis.word = new Word(dr.getRandomWord());\n\t}", "private <T> T getRandomElement(List<T> list) {\n return list.get(randomInt(0, list.size()));\n }", "@Test\r\n public void TestFindLog() {\r\n\r\n int index = r.nextInt(100);\r\n Assert.assertEquals(logs[index], logDocument.findLog(index));\r\n\r\n }", "public List<Vec> sample(int count, Random rand);", "public Patch randPatch(){\r\n\r\n\t\t\tlogger.info(\"randPatch method\");\r\n\t\t\tPatch patch;\r\n\t\t\tlogger.info(\"start randomly finding patch\");\r\n\r\n\t\t\twhile(true) {\r\n\t\t\t\tpatch = patches[randInt(0,numOfPathes-1)]\r\n\t\t\t\t\t\t[randInt(0,numOfPathes-1)];\r\n\t\t\t\tif(patch.getPerson().size() == 0) break;\r\n\t\t\t}\r\n\t\t\tlogger.info(\"finished randomly finding patch\");\r\n\r\n\t\t\treturn patch;\r\n\t\t}", "public void SetRandom(boolean random);", "@BeforeEach\n public void init() throws Exception {\n this.uri1 = new URI(\"http://edu.yu.cs/com1320/project/doc1\");\n this.b1 = new byte[1];\n this.s1 = \"pizza pious\";\n\n //init possible values for doc2\n this.uri2 = new URI(\"http://edu.yu.cs/com1320/project/doc2\");\n this.b2 = new byte[2];\n this.s2 = \"Party times\";\n\n //init possible values for doc3\n this.uri3 = new URI(\"http://edu.yu.cs/com1320/project/doc3\");\n this.b3 = new byte[3];\n this.s3 = \"nothi mucho\";\n\n this.uri4 = new URI(\"http://edu.yu.cs/com1320/project/doc4\");\n this.b4 = new byte[4];\n this.s4 = \"not goingss\";\n\n this.uri5 = new URI(\"http://edu.yu.cs/com1320/project/doc5\");\n this.b5 = new byte[5];\n this.s5 = \"p like fizz\";\n\n this.uri6 = new URI(\"http://edu.yu.cs/com1320/project/doc6\");\n this.b6 = new byte[33];\n this.s6 = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\";\n\n docBin1 = new DocumentImpl(this.uri1, this.b1);\n docBin2 = new DocumentImpl(this.uri2, this.b2);\n docBin3 = new DocumentImpl(this.uri3, this.b3);\n docBin4 = new DocumentImpl(this.uri4, this.b4);\n docBin5 = new DocumentImpl(this.uri5, this.b5);\n docBin6 = new DocumentImpl(this.uri6, this.b6);\n\n docTxt1 = new DocumentImpl(this.uri1, this.s1);\n docTxt2 = new DocumentImpl(this.uri2, this.s2);\n docTxt3 = new DocumentImpl(this.uri3, this.s3);\n docTxt4 = new DocumentImpl(this.uri4, this.s4);\n docTxt5 = new DocumentImpl(this.uri5, this.s5);\n docTxt6 = new DocumentImpl(this.uri6, this.s6);\n }", "private static String pickRandom(String[] stringArray) {\n\n Random random = new Random();\n int nameIndex = random.nextInt(stringArray.length);\n return stringArray[nameIndex];\n }", "@Test\r\n\tpublic void testSampleFile() {\r\n\r\n\t\tRaceList rl = null;\r\n\t\trl = WolfResultsReader.readRaceListFile(\"test-files/sample.md\");\r\n\t\tassertEquals(2, rl.size());\r\n\r\n\t}", "public void generateRandomEvents();", "@Test \n\tpublic void generateParagraphsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'paragraphs' radio button \n\t\thomePage.selectContentType(\"paragraphs\");\n\n\t\t// enter '10' in the count field \n\t\thomePage.inputCount(\"10\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of text paragraphs generated \n\t\tint paragraphCount = generatedPage.getActualGeneratedCount(\"paragraphs\");\n\t\tAssert.assertTrue(paragraphCount == 10);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\"\n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\t}", "private Point randomIndex() {\r\n\t\tRandom rand = new Random();\r\n\t\tint val1 = rand.nextInt(rows_size);\r\n\t\tint val2 = rand.nextInt(columns_size);\r\n\t\twhile (!isEmpty(val1,val2)) {\r\n\t\t\tval1 = rand.nextInt(rows_size);\r\n\t\t\tval2 = rand.nextInt(columns_size);\r\n\t\t}\r\n\t\treturn new Point(val1,val2);\r\n\t}", "@Test\n public void createRandomNumber() throws IOException {\n Assert.assertNotNull(Utils.createRandomNumber());\n }", "public void chooseWord() {\n int length = words.size();\n int index = (int) ((length - 1) * Math.random());\n word = words.get(index);\n }", "private void sampleEdge() {\n int rand = RandomUtil.getInstance().nextInt(\n getNumNodes() * (getNumNodes() - 1));\n randomParent = rand / (getNumNodes() - 1);\n int rest = rand - randomParent * (getNumNodes() - 1);\n if (rest >= randomParent) {\n randomChild = rest + 1;\n }\n else {\n randomChild = rest;\n }\n }", "public Item sample() {\n \t if (size==0){\n \t \tthrow new NoSuchElementException();\n \t }\n \t int index = StdRandom.uniform(size);\n // System.out.println(\"The index of the number is: \" + index);\n int k = 0;\n \t Node p=sentinel.next.next;\n \t for (int i = 0; i < index; i++){\n p = p.next; \n \t }\n \t return p.item;\n }", "private Car generateRandomCar(int generationTime) {\n\t\tBoolean error = true;\n\t\tint errorCount=0;\n\t\twhile (error) {\n\n\t\t\tString destination;\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\t\t \n\t\t // Compute the total weight of all items together\n\t\t int totalWeight = 0;\n\t\t int selection = -1;\n\t\t for (int element : stuff)\n\t\t {\n\t\t totalWeight += element;\n\t\t \n\t\t }\n\n\t\t int position = new Random().nextInt(totalWeight);\n//\t\t System.out.println(\"totalweight:\" + totalWeight);\n//\t\t System.out.println(\"position:\" + position);\n\t\t int f = 0;\n\t\t for (int element : stuff)\n\t\t {\n//\t\t \tSystem.out.println(\"element:\" + element);\n\t\t \tf++;\n\t\t \tif (position < element)\n\t\t \t{\n\t\t \t \n\t\t selection = f;\n\t\t break;\n\t\t \t}\n\t\t \tposition -= element;\n\t\t }\n//\t\t System.out.println(\"selection:\" + selection);\n\t\t \n\t\t \n\t\t FeatureReader<SimpleFeatureType,SimpleFeature> features1 = dataStore.getFeatureReader();\n\t\t SimpleFeature selectedFeature= features1.next();\n\t\t for (int j=1 ; j<selection ; j++) {\n\t\t \tselectedFeature = features1.next(); \t\n\t\t } \n\t\t \t\n//\t\t\t\tSystem.out.println(\"id:\" + selectedFeature.getAttribute(1));\n//\t\t \tSystem.out.println(\"name:\" + selectedFeature.getAttribute(2));\n//\t\t \tSystem.out.println(\"population:\" + selectedFeature.getAttribute(3));\n\t\t features1.close();\n//\t\t System.out.println(firstFeature.getAttribute(0));\n\t\t GeometryFactory geometryFactory = (GeometryFactory) JTSFactoryFinder.getGeometryFactory( null );\n//\t\t Coordinate coord = new Coordinate( geo1.getLongitude(), geo1.getLatitude() );\n//\t\t com.vividsolutions.jts.geom.Point point = geometryFactory.createPoint(coord);\n\t\t Geometry g = (Geometry) selectedFeature.getAttribute( \"the_geom\" );\n\n\t\t\t Envelope env = new Envelope(selectedFeature.getBounds().getMinX(), selectedFeature.getBounds().getMaxX(), selectedFeature.getBounds().getMinY(), selectedFeature.getBounds().getMaxY());\n\t\t\t double x = env.getMinX() + env.getWidth() * Math.random();\n\t\t\t\tdouble y = env.getMinY() + env.getHeight() * Math.random();\n\t\t\t\tCoordinate pt = new Coordinate(x, y);\n//\t\t\t\tgeometryFactory.getPrecisionModel().makePrecise(pt);\n//\t\t\t\tCoordinate p = pt;\n\t\t\t\tcom.vividsolutions.jts.geom.Point point1 = geometryFactory.createPoint(pt);\n\t\t\t\tPoint source = Simulator.geoToCor(y,x);\n//\t\t\t\tSystem.out.println(x);\n//\t\t\t\tSystem.out.println(y);\n\t\t\t\tint tries = 0;\n\t\t\t\tdestination=strategy.chooseDestination(source);\n\t\t\t\t\n\t\t while(tries<5){\n\t\t \tif (point1.isWithinDistance(g, 0)){\n\n\t\t\t\t\t\tif(destination!=null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\terror=false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//sDs.chooseDestination(source);\n\t\t\t\t\t\t\tint x1 = (int) source.getX();\n\t\t\t\t\t\t\tint y1 = (int) source.getY();\n\t\t\t\t\t\t\tGeoPosition geo1 = Simulator.corToGeo(x1, y1);\n\t\t\t\t\t\t\tPoint des = Simulator.getStations().get(destination).getPoint();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint chargingTime=strategy.setChargingTime(source);\n\t\t\t\t\t\t\tint y2 = (int) des.getY();\n\t\t\t\t\t\t\tint x2 = (int) des.getX();\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGeoPosition geo2 = Simulator.corToGeo(x2, y2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGHResponse res = Simulator.getRoute(geo1, geo2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (res != null){\n\t\t\t\t\t\t\t\tCar c = new Car(geo1.getLatitude(), geo1.getLongitude(), destination, generationTime, chargingTime);\n\t\t\t\t\t\t\t\tc.saveRoute(res);\n\t//\t\t\t\t\t\t\tSystem.out.println(\"success\");\n\t\t\t\t\t\t\t\treturn c;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t \t}\n\t\t \ttries++;\n\t\t \tx = env.getMinX() + env.getWidth() * Math.random();\n\t\t\t\t\ty = env.getMinY() + env.getHeight() * Math.random();\n\t\t\t\t\tpt = new Coordinate(x, y);\n\t\t\t\t\tpoint1 = geometryFactory.createPoint(pt);\n\t\t\t\t\tsource = Simulator.geoToCor(y,x);\n\t\t } \n\t\t \n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\terrorCount++;\n\t\t\t//can not successfully get the station destination\n\t\t\tif(errorCount==10)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"System Error From Car Production Line: Can not get the destination with current strategy\");\n\t\t\t}\n\t\t\t\t\t\n\n\n\t\t}\n\t\treturn null;\n\t}", "protected int selectRandom(int... p_151619_1_) { return p_151619_1_[nextInt(p_151619_1_.length)]; }", "public void testSelect_0()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n Gene gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.select(1, null, new Population(conf));\n }", "public int getRandom() {\n return sub.get(rand.nextInt(sub.size()));\n }", "public int randomizeFirstNumber() {\n a = random.nextInt(100);\n question.setA(a);\n return a;\n }", "public int randomizeSecondNumber() {\n b = random.nextInt(100);\n question.setA(b);\n return b;\n }", "private int choose(){\n\t\tdouble temp = 10 * Math.random();\n\t\tint i = (int)temp;\n\t\treturn i;\n\t}", "TestDocument getDocument(DocumentReference reference);", "private void generateWord() throws Exception {\n\t\tArrayList<String> wordList = new ArrayList<String>();\n\n//\t\tString[] wordList2 = new String[5];\n\t\tif (chckbxFruits2.isSelected()) {\n\t\t\tFile file = new File(\"C:\\\\Users\\\\admin\\\\eclipse-workspace\\\\test\\\\src\\\\fruits.txt\");\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString st;\n\t\t\twhile ((st = br.readLine()) != null) {\n\t\t\t\twordList.add(st);\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t\tif (chckbxAnimals2.isSelected()) {\n\t\t\tFile file = new File(\"C:\\\\Users\\\\admin\\\\eclipse-workspace\\\\test\\\\src\\\\animals.txt\");\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString st;\n\t\t\twhile ((st = br.readLine()) != null) {\n\t\t\t\twordList.add(st);\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t\tif (chckbxColors2.isSelected()) {\n\t\t\tFile file = new File(\"C:\\\\Users\\\\admin\\\\eclipse-workspace\\\\test\\\\src\\\\colors.txt\");\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString st;\n\t\t\twhile ((st = br.readLine()) != null) {\n\t\t\t\twordList.add(st);\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t\tRandom ran = new Random();\n\t\tint randIndex = ran.nextInt(wordList.size());\n\t\tString answer = wordList.get(randIndex);\n\t\tanswerArray = answer.toCharArray();\n\t\tdashArray = new String[answerArray.length];\n\t\tfor (int k = 0; k < answerArray.length; k++) {\n\t\t\tdashArray[k] = \"_\";\n\t\t}\n\n\t\tSystem.out.print(answer);\n\t}", "private ArrayList<Attribute> getRandomFeatures(int featuresCount, ArrayList<Attribute> features) {\n ArrayList<Attribute> featuresSubset = new ArrayList<>(featuresCount);\n //initialize list with indexes\n ArrayList<Integer> featuresIndexes = new ArrayList<>(features.size());\n for (int i = 0; i < features.size(); i++) {\n featuresIndexes.add(i);\n }\n \n //mix indexes and pick first m indexes\n Collections.shuffle(featuresIndexes, new Random());\n int featureIndex;\n for (int i = 0; i < featuresCount; i++) {\n featureIndex = featuresIndexes.get(i);\n featuresSubset.add(features.get(featureIndex));\n }\n \n return featuresSubset;\n }", "public void randomlyChooseWord()\n {\n Random random = new Random();\n int randomIndex = random.nextInt(POSSIBLE_WORDS.length);\n System.out.println(randomIndex);\n word = POSSIBLE_WORDS[randomIndex].toUpperCase();\n showChar = new boolean[word.length()];\n }", "private String getRandomName(){\n return rndString.nextString();\n }", "private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }", "private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }", "@Override\n public <T> T getRandomElement(List<T> list) {\n return super.getRandomElement(list);\n }", "public void randomStyle(DrawTextItem s) {\n\t\tString[] fontFamilies = {\"Monospace\", \"Helvetica\", \"TimesRoman\", \"Courier\", \"Serif\", \"Sans_Serif\"}; \n\t\tint fontType = new Random().nextInt(fontFamilies.length); \n\t\tint fontSize = new Random().nextInt(15); \n\t\tif (fontSize <= 6)\n\t\t\tfontSize = 7;\n\t\tint fontStyle;\n\t\tif (Math.random() > 0.25)\n\t\t\tfontStyle = Font.ITALIC;\n\t\telse if (Math.random() > 0.5)\n\t\t\tfontStyle = Font.BOLD;\n\t\telse\n\t\t\tfontStyle = Font.ITALIC + Font.BOLD;\n\t\ts.setFont( new Font(fontFamilies[fontType], fontStyle, fontSize )); \n\t\tint angle = new Random().nextInt(359);\n\t\ts.setRotationAngle(angle);\n\t\tint scale = new Random().nextInt(5);\n\t\tif (scale == 0)\n\t\t\tscale = 1; \n\t\ts.setMagnification(scale);\n\t\tif (Math.random() < 0.5)\n\t\t\ts.setBorder(true); \n\t\telse\n\t\t\ts.setBorder(false);\n\t\ts.setTextTransparency(0.3);\n\t\tint r = new Random().nextInt(255);\n\t\tint g = new Random().nextInt(255);\n\t\tint b = new Random().nextInt(255);\n\t\ts.setBackground(new Color(r,g,b));\n\t\ts.setBackgroundTransparency(Math.random() * 0.90 + 0.10);\n\t}", "public String chooseWord(){\n\t\tRandom a = new Random();\t\t\r\n\t\t\r\n\t\tint randomNumber = a.nextInt(words.length);\r\n\t\t\r\n\t\tString gameWord = words[randomNumber];\r\n\t\t\r\n\t\treturn gameWord;\r\n\t\t\t\t\r\n\t}", "public int pickNumber() {\n\t\t\n\t\tint max=10;\n\t\t\n\t\tint i = (int) Math.floor((Math.random()*max)+1);\n\t\treturn i;\n\t\t\n\t}", "public void produceRandomBookList(int numOfBooks) {\n\t\tfor (int i = 0; i < numOfBooks; i++) {\n\t\t\tdouble rand = (Math.random() * bookList.size());\n\t\t\tSystem.out.println(bookList.get((int) rand));\n\t\t}\n\t}", "public void testSelect_3()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n selector.setDoubletteChromosomesAllowed(false);\n // add first chromosome\n // --------------------\n Gene gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(true));\n Chromosome thirdBestChrom = new Chromosome(conf, gene, 7);\n thirdBestChrom.setFitnessValue(10);\n selector.add(thirdBestChrom);\n // add second chromosome\n // ---------------------\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.setOriginalRate(1.0d);\n // receive top 30 chromosomes (select-method should take into account only\n // 2 chroms!)\n // -----------------------------------------------------------------------\n Population pop = new Population(conf);\n selector.select(30, null, pop);\n Population bestChroms = pop;\n Population chromosomes = (Population) privateAccessor.getField(selector,\n \"m_chromosomes\");\n assertTrue(bestChroms.equals(chromosomes));\n }", "public int randomGene();", "int select_musics(Musica mus, int n, String target_Folder, int ids_file[]) {\n File temp;\n File target;\n File mpos;\n int pos, i;\n boolean copy_files = false;\n boolean aleatory = true;\n\n target = new File(target_Folder);\n String target_Original=target_Folder;\n if (target.exists()) copy_files = true;\n\n\n\n if (n == -1) /* n=-1 when selection is not random. */ {\n n = ids_quantity;\n aleatory = false;\n }\n\n for (i = 0; i < n; i++) { /* For each music from list or to be selected randomly */\n System.out.println(\"\\n\" + (i + 1) + \"/\" + n);\n if (music_count == 1) /* if only one music remaining, play this one and select all again */\n {\n pos = 0;\n temp = AllFiles[pos];\n System.out.println(temp.getName());\n System.out.println(temp.getAbsolutePath());\n music_count = music_total;\n }\n else\n {\n if (aleatory) {\n Random rand = new Random(); /* Select one music randomly */\n pos = rand.nextInt(music_count);\n System.out.println(\"id#:[\" + pos+ \"]\");\n temp = AllFiles[pos];\n music_count--; /* Exchange selected music with last one and reduce list size to not repeat */\n AllFiles[pos] = AllFiles[music_count];\n AllFiles[music_count] = temp;\n System.out.println(temp.getName());\n System.out.println(temp.getAbsolutePath());\n\n } else {\n pos = ids_file[i]; /* not random, just take file from array */\n System.out.println(\"id#:[\" + pos+\"]\");\n temp = AllFiles[pos];\n System.out.println(temp.getName());\n System.out.println(temp.getAbsolutePath());\n }\n }\n Path FROM = Paths.get(temp.getAbsolutePath());\n\n String ext = temp.getName().substring(temp.getName().length() - 3); /* Set extension according */\n\n if ((Objects.equals(ext.toLowerCase(), \"mp3\")))\n ext = \"mp3\";\n else\n ext = \"wma\";\n\n\n\n if (copy_files) /* If subfolder should be created, create them,if not use one folder only */\n {\n if (Main.subgroup)\n {\n target_Folder = target_Original + \"\\\\LetTheMusicPlay\" + (i/Main.maxsubgroup+1);\n }\n else\n {\n target_Folder = target_Original + \"\\\\LetTheMusicPlay\";\n }\n }\n target = new File(target_Folder);\n if (!target.exists()) target.mkdir();\n\n if (copy_files) { /* when copying if same filename exist, copy to a different folder */\n\n\n String path_text = target_Folder + \"\\\\\" + temp.getName();\n if (Main.number_files) path_text = target_Folder + \"\\\\(\" + zerofill(i+1,n) + \")\"+ temp.getName();\n target = new File(path_text);\n int j = 0;\n while (target.exists()) {\n j++;\n target = new File(target_Folder + \"\\\\\" + j);\n if (!target.exists()) target.mkdir();\n path_text = target_Folder + \"\\\\\" + j + \"\\\\\" + temp.getName();\n target = new File(path_text);\n }\n Path TO = Paths.get(path_text);\n CopyOption[] options = new CopyOption[]{\n StandardCopyOption.REPLACE_EXISTING,\n StandardCopyOption.COPY_ATTRIBUTES};\n try {\n Files.copy(FROM, TO, options);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n Path TO = Paths.get(\"music1.\" + ext); /* to play, copy file to a temporary file to avoid issues due name*/\n if (flag_music_copy == 0) TO = Paths.get(\"music2.\" + ext);\n //overwrite existing file, if exists\n CopyOption[] options = new CopyOption[]{\n StandardCopyOption.REPLACE_EXISTING,\n StandardCopyOption.COPY_ATTRIBUTES};\n try {\n Files.copy(FROM, TO, options);\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n PrintWriter writer = new PrintWriter(\"playmusic.bat\", \"ISO-8859-1\");\n if (flag_music_copy == 1) {\n writer.println(\"music1.\" + ext);\n File f = new File(\"music1.\" + ext);\n f.setWritable(true);\n }\n if (flag_music_copy == 0) {\n writer.println(\"music2.\" + ext);\n File f = new File(\"music2.\" + ext);\n f.setWritable(true);\n }\n\n flag_music_copy = (flag_music_copy + 1) % 2; /* Exchange between 1 and 2 */\n\n writer.close();\n Runtime.getRuntime().exec(\"playmusic.bat\"); /* Play Music */\n Thread.sleep(250);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n Scanner in = new Scanner(System.in);\n int s;\n s = -1;\n\n while ((i < n - 1) && (s == -1)) {\n System.out.print(\"Type any number greater than 0 to next music or 0 to exit: \"); /* Wait user select next one */\n s = in.nextInt();\n\n }\n ;\n if (s == 0) break;\n }\n }\n return (0);\n }", "TestDocument getDocument(String name);", "private int getRandomPiece() {\r\n return new Random().nextInt(Constants.NUM_PIECES);\r\n }", "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(10, 20); \t\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}", "public void sampleTopics(int doc) {\n \t\n \tArrayList<Integer> fs = training.get(doc);\n\t\tint seqLen = fs.size();\n\t\tint[] docLevels = levels[doc];\n\t\t\n\t\tint[] levelCounts = new int[numLevels];\n\t\tint type, token, level;\n\t\tdouble sum;\n\n\t\t// Get the leaf\n\t\tNCRPNode node;\n\t\tnode = documentLeaves[doc];\n\n\t\t//get path\n\t\tNCRPNode[] path = new NCRPNode[numLevels];\n\t\tfor (level = numLevels - 1; level >= 0; level--) {\n\t\t\tpath[level] = node;\n\t\t\tnode = node.parent;\n\t\t}\n\n\t\tdouble[] levelWeights = new double[numLevels];\n\n\t\t// Initialize level counts\n\t\tfor (token = 0; token < seqLen; token++) {\n\t\t\tlevelCounts[ docLevels[token] ]++;\n\t\t}\n\n\t\t//very similar to LDA gibbs\n\t\tfor (token = 0; token < seqLen; token++) { //for each word\n\t\t\ttype = fs.get(token);\n\t \n\t\t\t//remove selected word from its topic\n\t\t\tlevelCounts[ docLevels[token] ]--;\n\t\t\tnode = path[ docLevels[token] ];\n\t\t\tnode.typeCounts[type]--;\n\t\t\tnode.totalTokens--;\n\t \n\t\t\t//calc weight for each topic (nodes on the path)\n\t\t\t//to avoid sparsity, alpha should be large\n\t\t\tsum = 0.0;\n\t\t\tfor (level=0; level < numLevels; level++) {\n\t\t\t\tlevelWeights[level] = \n\t\t\t\t\t(alpha + levelCounts[level]) * \n\t\t\t\t\t(eta + path[level].typeCounts[type]) /\n\t\t\t\t\t(etaSum + path[level].totalTokens);\n\t\t\t\tsum += levelWeights[level];\n\t\t\t}\n\t\t\t//sample a topic\n\t\t\tlevel = random.nextDiscrete(levelWeights, sum);\n\n\t\t\t//put word back\n\t\t\tdocLevels[token] = level;\n\t\t\tlevelCounts[ docLevels[token] ]++;\n\t\t\tnode = path[ level ];\n\t\t\tnode.typeCounts[type]++;\n\t\t\tnode.totalTokens++;\n\t\t}\n }", "public T getRandomElement() {\n\t\treturn this.itemList.get(this.getRandomIndex());\n\t}", "public T next(final Random random) {\n return elements[selection.applyAsInt(random)];\n }", "private static void readRandom(Random rand, byte[] data, int off, int len)\r\n {\r\n \tlen += off;\r\n \tfor(int i = off; i < len; i++)\r\n {\r\n \t\tdata[i] = (byte)rand.nextInt(256);\r\n }\r\n }", "@Override\n public void nextTuple() {\n final Random rand = new Random();\n int instanceRandom = rand.nextInt(MAX_RANDOM);\n if(instanceRandom == referenceRandom){\n collector.emit(new Values(\"Hello World\"));\n } else {\n collector.emit(new Values(\"Other Random Word\"));\n }\n }", "public String readARandomWord() {\r\n\r\n\t\tString inputFileName = \"dictionary.txt\";\r\n\t\tString[] wordsArray = null;\r\n\r\n\t\tScanner textFileScanner = new Scanner(BackToTheFutureClient.class.getResourceAsStream(inputFileName));\r\n\t\tArrayList<String> wordsList = new ArrayList<String>();\r\n\r\n\t\t// Reading all the lines from the file into array list\r\n\t\twhile (textFileScanner.hasNextLine()) {\r\n\t\t\tString w = textFileScanner.next();\r\n\t\t\twordsList.add(w);\r\n\t\t}\r\n\t\ttextFileScanner.close();\r\n\r\n\t\t// Convert words list to words array\r\n\t\twordsArray = wordsList.toArray(new String[wordsList.size()]);\r\n\r\n\r\n\t\tString randomWord = \"\";\r\n\r\n\t\t// Choose a random word from the array list of words\r\n\t\tif (wordsArray != null) {\r\n\t\t\tint index = new Random().nextInt(wordsArray.length);\r\n\t\t\trandomWord = (wordsArray[index]);\r\n\t\t}\r\n\t\treturn randomWord;\r\n\t}", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "private ActorProfile selectRandomActorProfile(List<ActorProfile> list,\n ActorProfile actorSender)\n throws CannotSelectARandomActorException {\n if(randomSelectorIndex>=MAX_LOOPS_ON_RANDOM_ACTORS){\n throw new CannotSelectARandomActorException(\"The number of tries, \"+randomSelectorIndex+\" is upper than the limit\");\n }\n int randomIndex = (int) (((double)list.size())*Math.random());\n ActorProfile actorSelected = list.get(randomIndex);\n if(actorSelected.getIdentityPublicKey().equals(actorSender.getIdentityPublicKey())){\n randomSelectorIndex++;\n actorSelected = selectRandomActorProfile(list, actorSender);\n }\n /*if(actorSelected.getNsIdentityPublicKey().equals(actorSender.getNsIdentityPublicKey())){\n randomSelectorIndex++;\n actorSelected = selectRandomActorProfile(list, actorSender);\n }*/\n return actorSelected;\n }", "public int selectRandom(int x) {\n count++; // increment count of numbers seen so far\n\n // If this is the first element from stream, return it\n if (count == 1)\n res = x;\n else {\n // Generate a random number from 0 to count - 1\n Random r = new Random();\n int i = r.nextInt(count);\n\n // Replace the prev random number with new number with 1/count probability\n if (i == count - 1)\n res = x;\n }\n return res;\n }", "@Test\n\tpublic void testGetRandom() {\n\t\ttestInitializePopulation();\n\t\tassertNotNull(\"no random chromosome\", population.getRandomChromosome());\n\t}", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}", "public void openRandom() {\n\t\tint total = N * N;\n\t\tint index, row, col;\n\t\tdo {\n\t\t\tindex = randomGenerator.nextInt(total);\n\t\t\trow = index / N;\n\t\t\tcol = index % N;\n\t\t}while(isOpen(row, col) && size < total);\n\t\tif(size < total)\n\t\t\topen(row, col);\n\t}", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public int pickFile(int[] textFiles) {\n\t\treturn numGen.nextInt(textFiles.length - 1);\n\t}" ]
[ "0.594545", "0.59266573", "0.5787566", "0.57687503", "0.57097787", "0.57045466", "0.56697464", "0.5655354", "0.5650155", "0.5631384", "0.55949986", "0.558011", "0.5567166", "0.5533935", "0.55012155", "0.54953474", "0.546129", "0.5385679", "0.5367777", "0.5323333", "0.5277588", "0.52754235", "0.5257619", "0.5250443", "0.52417386", "0.5225539", "0.52237517", "0.5220986", "0.5219495", "0.521886", "0.5200099", "0.51980764", "0.5196114", "0.5189553", "0.5182779", "0.5174538", "0.5151548", "0.5149106", "0.51404893", "0.5129805", "0.51211333", "0.51131827", "0.5112334", "0.51097316", "0.5105831", "0.51043427", "0.5092891", "0.5089017", "0.5075817", "0.5075327", "0.5063789", "0.50614315", "0.5056645", "0.5039711", "0.50359434", "0.50340575", "0.50278777", "0.50278103", "0.5022355", "0.49998724", "0.49948147", "0.49919492", "0.4988946", "0.49832228", "0.49826458", "0.49793056", "0.49764994", "0.49716082", "0.49709284", "0.49705404", "0.4967019", "0.4966003", "0.4964706", "0.4964706", "0.49511343", "0.49491385", "0.4940786", "0.49396968", "0.49300596", "0.49289775", "0.49235633", "0.49224842", "0.49165517", "0.4916256", "0.491566", "0.4914871", "0.49143624", "0.4910982", "0.4909463", "0.49060774", "0.4902703", "0.49003848", "0.49002874", "0.4898294", "0.48824826", "0.48796988", "0.48762274", "0.48678684", "0.48669466", "0.4866781", "0.48644516" ]
0.0
-1